ContentLibraryManager
IntroductionThe ContentLibraryManager singleton object represents an interface for the storage and retrieval of all content files.
Methods
deleteContentInfoByFileId:andVersion:- (BOOL)deleteContentInfoByFileId:(NSNumber *)fileId andVersion:(NSNumber *)versionNo; ParametersReturn ValueNO in a case if operation failed. DiscussionRemoves particular File Version form File system. Only content removed - item itself stays alive.
deRegisterDelegate:- (void)deRegisterDelegate:(id<ContentLibraryManagerDelegate>)delegate; ParametersDiscussionDeregisters the delegate from this class.
getAllCategories- (NSArray *)getAllCategories; Return ValueAn array of all categories as NSString* instances. DiscussionGets the list of all the categories for all the content files.
getAllContentInfo- (NSArray *)getAllContentInfo; Return ValueAn array of all ContentFileInfoType instances in storage. For files that have more than one version, the latest version is returned. DiscussionGets ContentFileInfoType instances of all available content info files.
getAllContentInfoVersions:- (NSArray *)getAllContentInfoVersions:(NSNumber *)fileId; ParametersReturn ValueAn array of ContentFileInfoType instances for all the versions of the file. DiscussionGets list of ContentFileInfoType instances. Each of them represent corresponding version.
getContentFileInfoStateByFileId:andVersion:- (ContentFileInfoState)getContentFileInfoStateByFileId:(NSNumber *)fileId andVersion:(NSNumber *)versionNo; ParametersReturn ValueThe state of a specific file version. DiscussionGets a file info state of a file version. See
getContentInfoByFileId:andVersion:- (ContentFileInfoType *)getContentInfoByFileId:(NSNumber *)fileId andVersion:(NSNumber *)versionNo; ParametersReturn ValueThe ContentFileInformation instance for the file and version if it exists. DiscussionGets the content info for a specific file and version.
getContentsAsynchronouslyByPath:recursive:- (NSInteger)getContentsAsynchronouslyByPath:(NSString *)path recursive:(BOOL) isRecursive; ParametersReturn ValueThe number of files being returned. DiscussionGets contents of a certain path.
getContentsByPath:recursive:- (NSArray *)getContentsByPath:(NSString *)path recursive:(BOOL) isRecursive; ParametersReturn ValueThe array of ContentFileInfoType instances that represent content of a folder py path. DiscussionGets contents of a certain path.
getFileSyncRootItem- (NSArray *)getFileSyncRootItem; Return ValueArray of File Sync items
instance+ (ContentLibraryManager *)instance; Return ValueSingleton of ContentLibraryManager DiscussionGets singleton instance of the content libray manager.
registerDelegate:- (void)registerDelegate:(id<ContentLibraryManagerDelegate>)delegate; ParametersDiscussionRegisters the delegate for this class.
removeAllContentInfo- (BOOL)removeAllContentInfo; Return ValueNO in a case if operation failed. DiscussionRemoves all content info files.
requestToDownloadAllFiles- (BOOL)requestToDownloadAllFiles; Return ValueNO in a case if operation failed. DiscussionRequests to download all latest versions of non-mandatory files.
requestToDownloadFileByFileId:andVersion:- (BOOL)requestToDownloadFileByFileId:(NSNumber *)fileId andVersion:(NSNumber *)versionNo; ParametersReturn ValueNO in a case if operation failed. DiscussionRequests to download a specific file version.
saveContentInfo:- (void)saveContentInfo:(ContentFileInfoType *)contentFileInfo; ParametersDiscussionSaves content file info to data storage.
Properties
contentInfoCount@property (readonly, nonatomic) NSInteger contentInfoCount; DiscussionThe amount of files in the content library.
contentLibraryAbsolutePath@property (readonly, nonatomic) NSString *contentLibraryAbsolutePath; DiscussionThe absolute path of the content library.
dataPath@property (readonly, nonatomic) NSString *dataPath; DiscussionThe absolute path of the File Sync Items. downloadedContentInfoCount@property (readonly, nonatomic) NSInteger downloadedContentInfoCount; DiscussionThe amount of downloaded files in the content library.
ineffectiveDownloadedContentInfoCount@property (readonly, nonatomic) NSInteger ineffectiveDownloadedContentInfoCount; DiscussionThe amount of ineffective downloaded files in the content library.
isAsynchronousOperationFinished@property (assign, atomic) BOOL isAsynchronousOperationFinished; DiscussionA Boolean value denoting whether or not Asynchronous operation of getting contents from given path is completed. versionedFilesCount@property (nonatomic) NSInteger versionedFilesCount; DiscussionNumber of versioned files which are not the latest version. it will help in calculating total number of files |