9 #import <Foundation/Foundation.h> 10 #import "QtsHttpComm.h" 13 typedef enum _QTS_HTTP_FILE_STATION_API_VERSION_
16 QTS_HTTP_FILE_STATION_API_VERSION_UNKNOW = 0,
18 QTS_HTTP_FILE_STATION_API_V1 = 1,
20 }QTS_HTTP_FILE_STATION_API_VERSION;
23 typedef enum _QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE_
26 QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE_ZIP = 0,
28 QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE_7Z = 1,
29 }QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE;
32 typedef enum _QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_
35 QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_NORMAL = 0,
37 QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_LARGE,
39 QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_FAST,
40 }QTS_HTTP_FILE_STATION_COMPRESS_LEVEL;
43 typedef enum _QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE_
46 QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE_AES256 = 0,
48 QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE_ZIPCRYPTO,
49 }QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE;
52 typedef enum _QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_
55 QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_ADD_REPLACE = 0,
57 QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_UPDATE_ADD,
59 QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_UPDATE_EXISTING,
61 QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_UPDATE_SYNCHRONIZE,
62 }QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE;
65 typedef enum _QTS_HTTP_FILE_STATION_OVERWRITE_
68 QTS_HTTP_FILE_STATION_OVERWRITE_SKIP = 0,
70 QTS_HTTP_FILE_STATION_OVERWRITE_OVERWRITE,
71 }QTS_HTTP_FILE_STATION_OVERWRITE;
74 typedef enum _QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE_
77 QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE_NONE = 0,
79 QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE_FULL,
80 }QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE;
83 typedef enum _QTS_HTTP_FILE_STATION_EXTRACT_MODE_
86 QTS_HTTP_FILE_STATION_EXTRACT_MODE_ALL = 0,
88 QTS_HTTP_FILE_STATION_EXTRACT_MODE_PART,
89 }QTS_HTTP_FILE_STATION_EXTRACT_MODE;
92 typedef enum _QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE_
95 QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE_LARGE = 0,
97 QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE_MEDIUM = 1,
99 QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE_SMALL = 2
100 }QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE;
109 @property (assign) BOOL isDir;
110 @property (assign)
long long size;
111 @property (strong) NSString*
path;
112 @property (strong) NSString*
name;
129 -(id) initWithPath:(NSString*)path name:(NSString*)name size:(
long long)size isDir:(BOOL)isDir;
134 NSString* shareFilePath;
140 @property (strong) NSString* shareFilePath;
141 @property (strong) NSString* password;
142 @property (strong) NSString* dateTime;
143 @property (assign) BOOL useSSL;
160 -(id) initWithFilePath:(NSString*)filePath password:(NSString*)password datetime:(NSString*)dateTime useSSL:(BOOL)useSSL;
176 @property (assign) BOOL isDir;
177 @property (assign) BOOL isCompressed;
178 @property (assign)
long long size;
179 @property (strong) NSString* folderPermission;
180 @property (strong) NSString*
path;
181 @property (strong) NSString*
name;
182 @property (strong) NSString* group;
183 @property (strong) NSString* owner;
184 @property (strong) NSString* mt;
211 -(id) initWithPath:(NSString*)path name:(NSString*)name isDir:(BOOL)isDir
212 isCompressed:(BOOL)isCompressed size:(
long long)size folderPermission:(NSString*)folderPermission group:(NSString*)group owner:(NSString*)owner mt:(NSString*)mt;
222 @property (strong) NSString* fileName;
223 @property (strong) NSString* expireTime;
224 @property (strong) NSString* url;
239 -(id) initWithFileName:(NSString*)_filename expireTime:(NSString*)_expireTime url:(NSString*)_url;
251 @property (assign) BOOL isDir;
252 @property (assign)
long long size;
253 @property (assign)
long long compressSize;
254 @property (strong) NSString* modifyTime;
255 @property (strong) NSString* fileName;
261 NSString* myCloudNasName;
282 -(id) initWithMyCloudNasName:(NSString*)strMyCloudNasNamw nasExternalIP:(NSString*)strNasExternalIP nasLocalIP:(NSString*)strNasLocalIP nasHostIP:(NSString*)strNasHostIP;
289 @property (strong,nonatomic) NSString *
name;
290 @property (strong,nonatomic) NSNumber *share_member;
291 @property (strong,nonatomic) NSNumber *event_status;
292 @property (strong,nonatomic) NSNumber *event_id;
305 @protocol IQtsHttpFileStation <NSObject>
324 -(void) getShareFolderListWithCommunicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
348 -(void) getFileListCountWithPath:(NSString*)path communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
376 -(void) getFileListWithPath:(NSString*)path indexFrom:(
int)startIdx fileLimit:(
int)fileLimit communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
400 -(void) uploadFileWithPath:(NSString*)fromFilePath toPath:(NSString*)toFilePath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfUploading,
unsigned long long bytesOfUploading))block;
426 -(void) downloadFile:(
QNQtsHttpFileEntry*)fileEntry toPath:(NSString*)toFilePath offset:(
long)offset communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfDownloading,
unsigned long long bytesOfDownloading))block;
452 -(void) downloadFileWithPath:(NSString*)path toPath:(NSString*)toFilePath offset:(
long)offset communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfDownloading,
unsigned long long bytesOfDownloadloading))block;
473 -(void) createShareLink:(
QNQtsHttpShareLinkInfo*)shareLinkInfo communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
494 -(void) getShareLinkListWithFileLimit:(
int)fileLimit communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
514 -(void) deleteShareLink:(
QNQtsHttpShareLink*)shareLink communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
536 -(void) createFolderWithParentFolder:(
QNQtsHttpFileEntry*)parentFolderEntry name:(NSString*)folderName communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
562 -(void) copyFile:(
QNQtsHttpFileEntry*)fileEntry toPath:(NSString*)toPath mode:(
int)mode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfCopy))block;
588 -(void) moveFile:(
QNQtsHttpFileEntry*)fileEntry toPath:(NSString*)toPath mode:(
int)mode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfMove))block;
608 -(void) deleteFile:(
QNQtsHttpFileEntry*)fileEntry communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
630 -(void) createFolderWithPath:(NSString*)folderPath name:(NSString*)folderName communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
656 -(void) copyFileWithPath:(NSString*)fromPath toPath:(NSString*)toPath mode:(
int)mode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfCopy))block;
682 -(void) moveFileWithPath:(NSString*)fromPath toPath:(NSString*)toPath mode:(
int)mode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfMove))block;
702 -(void) deleteFileWithPath:(NSString*)filePath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
728 -(void) searchFileWithKeyword:(NSString*)keyword rootFolder:(NSString*)folderPath fileLimit:(
int)fileLimit communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
749 -(void) getFileStatusWithPath:(NSString*)filePath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
770 -(void) createChunkedUploadIdWithPath:(NSString*)uploadTempPath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
800 -(void) chunkedUploadFileWithPath:(NSString*)uploadFilePath toPath:(NSString*)toFilePath fileName:(NSString*)renameOriDestFileName uploadID:(NSString*)uploadID uploadTempPath:(NSString*)uploadTempPath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfUploading,
unsigned long long bytesOfUploading))block;
822 -(void) deleteChunkedUploadFileWithId:(NSString*)uploadID uploadTempPath:(NSString*)uploadTempPath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
844 -(void) renameFileWithPath:(NSString*)filePath fileName:(NSString*)newName communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
866 -(void) updateFileModifyDateWithFilePath:(NSString*)filePath modifyTime:(
long)modifyTime communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
902 -(void) compressFilesName:(NSString*)compressName path:(NSString*)compressFilePath numberOfFiles:(
int)totalFileNum fileList:(NSMutableArray*)fileList compressType:(QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE)compressFormat password:(NSString*)password compressLevel:(QTS_HTTP_FILE_STATION_COMPRESS_LEVEL)compressLevel compressEncryrtType:(QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE)encryptType compressUpdateMode:(QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE)updateMode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
927 -(void) ListContentsOfExtractedFilePath:(NSString*)filePath start:(
int)startIdx limit:(
int)fileLimit communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
961 -(void) ExtractFiles:(
QNQtsHttpFileEntry*)extractedFile toPath:(NSString*)toPath password:(NSString*)password exractMode:(QTS_HTTP_FILE_STATION_EXTRACT_MODE)extractMode partTotalFileCount:(
int)partTotalFileCount partFileList:(NSMutableArray*)partFileList overwrite:(QTS_HTTP_FILE_STATION_OVERWRITE)overWrite extractPathMode:(QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE)extractPathMode communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
980 -(void) getDomainIPListWithCommunicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1000 -(void) addVideoTranscodeWithFilePath:(NSString*)filePath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1020 -(void) deleteVideoTranscodeWithFilePath:(NSString*)filePath communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1041 -(void) getFileURLWithFilePath:(NSString*)fileFullPath cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1061 -(void) getImgThumbURLWithFilePath:(NSString*)fileFullPath cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1063 -(void) getImgThumbURLWithFilePath:(NSString*)fileFullPath thumbnailSize:(QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE)thumbnailSize cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1065 -(void) getImgThumbURLWithFilePath:(NSString*)fileFullPath isSSL:(BOOL)isSSL thumbnailSize:(QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE)thumbnailSize cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1067 -(void) getImgThumbURLWithFile:(
QNQtsHttpFileEntry*)entry thumbnailSize:(QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE)thumbnailSize cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1069 -(void) getImgThumbURLWithFile:(
QNQtsHttpFileEntry*)entry isSSL:(BOOL)isSSL thumbnailSize:(QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE)thumbnailSize cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail;
1071 -(void) downloadImgThumbWithFile:(
QNQtsHttpFileEntry*)entry toPath:(NSString*)toFilePath thumbnailSize:(QTS_HTTP_FILE_STATION_THUMBNAIL_SIZE)thumbnailSize communicationMode:(BOOL)isAsync cancel:(
int*)isCancel success:(
void(^)(
QTS_RESPONSE_CTX* response))success fail:(
void(^)(QTS_HTTP_API_RESULTS error))fail progress:(
void(^)(
int rateOfDownloading,
unsigned long long bytesOfDownloading))block;
NSString * folderPermission
Definition: QtsHttpFileStation.h:168
NSString * name
Definition: QtsHttpFileStation.h:106
Definition: QtsHttpFileStation.h:101
NSString * nasLocalIP
Definition: QtsHttpFileStation.h:263
NSString * nasHosstIP
Definition: QtsHttpFileStation.h:264
NSString * name
Definition: QtsHttpFileStation.h:170
BOOL useSSL
Definition: QtsHttpFileStation.h:137
NSString * nasExternalIP
Definition: QtsHttpFileStation.h:262
Definition: QtsHttpFileStation.h:1074
NSString * path
Definition: QtsHttpFileStation.h:105
NSString * group
Definition: QtsHttpFileStation.h:171
NSString * dateTime
Definition: QtsHttpFileStation.h:136
BOOL isCompressed
Definition: QtsHttpFileStation.h:166
Definition: QtsHttpFileStation.h:215
NSString * url
Definition: QtsHttpFileStation.h:219
long long size
Definition: QtsHttpFileStation.h:167
Content of API Response.
Definition: QtsHttpComm.h:61
Definition: QtsHttpFileStation.h:259
Definition: QtsHttpFileStation.h:132
Definition: QtsHttpFileStation.h:163
NSString * path
Definition: QtsHttpFileStation.h:169
long long size
Definition: QtsHttpFileStation.h:104
NSString * expireTime
Definition: QtsHttpFileStation.h:218
NSString * password
Definition: QtsHttpFileStation.h:135
Definition: QtsHttpFileStation.h:287
NSString * owner
Definition: QtsHttpFileStation.h:172
NSString * mt
Definition: QtsHttpFileStation.h:173