QtsHttp  0.9.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties
QtsHttpFileStation.h
Go to the documentation of this file.
1 //
2 // QtsHttpFileStation.h
3 // QTSHTTPSDK
4 //
5 // Created by Lawrence on 2013/11/24.
6 // Copyright (c) 2013年 Lawrence. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "QtsHttpComm.h"
11 
14 {
19  //QTS_FILESTATION_V2 = 2,
21 
24 {
30 
33 {
41 
44 {
50 
53 {
63 
66 {
72 
75 {
81 
84 {
90 
91 @interface QNQtsHttpFileEntry : NSObject
92 {
93  BOOL isDir;
94  long long size;
95  NSString* path;
96  NSString* name;
97 }
98 
99 @property (assign) BOOL isDir;
100 @property (assign) long long size;
101 @property (strong) NSString* path;
102 @property (strong) NSString* name;
119 -(id) initWithPath:(NSString*)path name:(NSString*)name size:(long long)size isDir:(BOOL)isDir;
120 @end
121 
122 @interface QNQtsHttpShareLinkInfo : NSObject
123 {
124  NSString* shareFilePath;
125  NSString* password;
126  NSString* dateTime;
127  BOOL useSSL;
128 }
129 
130 @property (strong) NSString* shareFilePath;
131 @property (strong) NSString* password;
132 @property (strong) NSString* dateTime;
133 @property (assign) BOOL useSSL;
150 -(id) initWithFilePath:(NSString*)filePath password:(NSString*)password datetime:(NSString*)dateTime useSSL:(BOOL)useSSL;
151 @end
152 
153 @interface QNQtsHttpFileStatus : NSObject
154 {
155  BOOL isDir;
157  long long size;
158  NSString* folderPermission;
159  NSString* path;
160  NSString* name;
161  NSString* group;
162  NSString* owner;
163  NSString* mt;
164 }
165 
166 @property (assign) BOOL isDir;
167 @property (assign) BOOL isCompressed;
168 @property (assign) long long size;
169 @property (strong) NSString* folderPermission;
170 @property (strong) NSString* path;
171 @property (strong) NSString* name;
172 @property (strong) NSString* group;
173 @property (strong) NSString* owner;
174 @property (strong) NSString* mt;
201 -(id) initWithPath:(NSString*)path name:(NSString*)name isDir:(BOOL)isDir
202  isCompressed:(BOOL)isCompressed size:(long long)size folderPermission:(NSString*)folderPermission group:(NSString*)group owner:(NSString*)owner mt:(NSString*)mt;
203 @end
204 
205 @interface QNQtsHttpShareLink : NSObject
206 {
207  NSString* fileName;
208  NSString* expireTime;
209  NSString* url;
210 }
211 
212 @property (strong) NSString* fileName;
213 @property (strong) NSString* expireTime;
214 @property (strong) NSString* url;
229 -(id) initWithFileName:(NSString*)_filename expireTime:(NSString*)_expireTime url:(NSString*)_url;
230 @end
231 
232 @interface QNQtsHttpExtractEntry : NSObject
233 {
234  BOOL isDir;
235  long long size;
236  long long compressSize;
237  NSString* modifyTime;
238  NSString* fileName;
239 }
240 
241 @property (assign) BOOL isDir;
242 @property (assign) long long size;
243 @property (assign) long long compressSize;
244 @property (strong) NSString* modifyTime;
245 @property (strong) NSString* fileName;
247 @end
248 
249 @interface QNQtsHttpNASInfo : NSObject
250 {
251  NSString* myCloudNasName;
252  NSString* nasExternalIP;
253  NSString* nasLocalIP;
254  NSString* nasHosstIP;
255 }
272 -(id) initWithMyCloudNasName:(NSString*)strMyCloudNasNamw nasExternalIP:(NSString*)strNasExternalIP nasLocalIP:(NSString*)strNasLocalIP nasHostIP:(NSString*)strNasHostIP;
273 @end
274 
275 
276 
277 @interface QNShareMember : NSObject
278 
279 @property (strong,nonatomic) NSString *name;
280 @property (strong,nonatomic) NSNumber *share_member;
281 @property (strong,nonatomic) NSNumber *event_status;
282 @property (strong,nonatomic) NSNumber *event_id;
283 
284 @end
285 
286 
287 
295 @protocol IQtsHttpFileStation <NSObject>
296 @optional
297 
314 -(void) getShareFolderListWithCommunicationMode:(BOOL)isAsync cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
315 
338 -(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;
339 
366 -(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;
367 
390 -(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;
391 
416 -(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;
417 
442 -(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;
443 
463 -(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;
464 
484 -(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;
485 
504 -(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;
505 
526 -(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;
527 
552 -(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;
553 
578 -(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;
579 
598 -(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;
599 
620 -(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;
621 
646 -(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;
647 
672 -(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;
673 
692 -(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;
693 
718 -(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;
719 
739 -(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;
740 
760 -(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;
761 
790 -(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;
791 
812 -(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;
813 
834 -(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;
835 
856 -(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;
857 
892 -(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;
893 
917 -(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;
918 
951 -(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;
952 
970 -(void) getDomainIPListWithCommunicationMode:(BOOL)isAsync cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
971 
990 -(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;
991 
1010 -(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;
1011 
1031 -(void) getFileURLWithFilePath:(NSString*)fileFullPath cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
1051 -(void) getImgThumbURLWithFilePath:(NSString*)fileFullPath cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
1052 
1053 @end
1055 @end
enum _QTS_HTTP_FILE_STATION_API_VERSION_ QTS_HTTP_FILE_STATION_API_VERSION
NSString * name
_QTS_HTTP_FILE_STATION_EXTRACT_MODE_
NSNumber * share_member
enum _QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE_ QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE
_QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_
Interface for Qts Http file station API.
NSString * fileName
_QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE_
NSString * path
_QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE_
_QTS_HTTP_FILE_STATION_OVERWRITE_
BOOL isDir
enum _QTS_HTTP_API_RESULTS_ QTS_HTTP_API_RESULTS
enum _QTS_HTTP_FILE_STATION_EXTRACT_MODE_ QTS_HTTP_FILE_STATION_EXTRACT_MODE
enum _QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE_ QTS_HTTP_FILE_STATION_COMPRESS_FORMAT_TYPE
BOOL isDir
_QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_
_QTS_HTTP_FILE_STATION_API_VERSION_
_QTS_HTTP_FILE_STATION_COMPRESS_ENCRYPT_TYPE_
Content of API Response.
Definition: QtsHttpComm.h:61
enum _QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE_ QTS_HTTP_FILE_STATION_COMPRESS_UPDATE_MODE
enum _QTS_HTTP_FILE_STATION_COMPRESS_LEVEL_ QTS_HTTP_FILE_STATION_COMPRESS_LEVEL
long long compressSize
NSString * modifyTime
long long size
enum _QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE_ QTS_HTTP_FILE_STATION_EXTRACT_PATH_MODE
long long size
NSNumber * event_status
enum _QTS_HTTP_FILE_STATION_OVERWRITE_ QTS_HTTP_FILE_STATION_OVERWRITE