QtsHttp  0.9.4
QtsHttp.h
1 //
2 // QTS_HTTP_SDK_Framework.h
3 // QTS_HTTP_SDK_Framework
4 //
5 // Created by QNAP on 2013/11/22.
6 // Copyright (c) 2013年 QNAP Inc. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "QtsHttpFileStation.h"
11 #import "QtsHttpSystem.h"
12 #import "QtsHttpComm.h"
13 
15 typedef enum _QTS_HTTP_STATION_TYPE_
16 {
18  QTS_HTTP_STATION_TYPE_SYSTEM = 0,
20  QTS_HTTP_STATION_TYPE_FILE_STATION = 1,
22  //QTS_HTTP_STATION_TYPE_MUSIC_STATION = 2,
23 }QTS_HTTP_STATION_TYPE;
24 
30 @interface QNQtsHttpServerInfo : NSObject
31 {
32  NSString* m_hostName;
33  NSString* m_userName;
34  NSString* m_password;
36  NSString* m_computerName;
37 }
38 
57 -(id) initWithHostName:(NSString*)hostName username:(NSString*)username password:(NSString*)password isSecureConnection:(BOOL)isSecureConnection computerName:(NSString*)computerName;
65 -(NSString*) getHostName;
73 -(NSString*) getUserName;
81 -(NSString*) getPassword;
90 -(BOOL) isSecureConnection;
98 -(NSString*) getComputerName;
99 
100 @end
101 
109 @interface QNQtsHttpServer : NSObject
110 {
111  QNQtsHttpServerInfo* serverInfo;
112  QNQtsHttpSystem* sysDelegate;
113  QNQtsHttpFileStation* fsDelegate;
114  long FSPortNum;
115  long FSSSLPortNum;
116  long MSPortNum;
117  long MSSSLPortNum;
118  long SystemPortNum;
119  long SystemSSLPortNum;
120  NSString* agentName;
121  int timeOutMilliseconds;
122  QTS_HTTP_FILE_STATION_API_VERSION FSVersion;
123  QTS_HTTP_SYSTEM_API_VERSION SystemVersion;
124 }
125 
136 -(id) initWithServerInfo:(QNQtsHttpServerInfo*)qtsHttpServerInfo;
137 
155 -(BOOL) setAgentName:(NSString*)strAgentName;
179 -(BOOL) setTimeouts:(int)iTimeOutMilliseconds;
199 -(void) login:(QTS_HTTP_STATION_TYPE)loginStation communicationMode:(BOOL)isAsync cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
200 
202 
221 -(BOOL) setFileStationPortNum:(long)portNumber;
241 -(BOOL) setFileStationSSLPortNum:(long)portNumber;
252 -(QTS_HTTP_FILE_STATION_API_VERSION) queryFileStationVersion;
263 -(QNQtsHttpFileStation*) openFileStation;
274 -(void) closeFileStation:(QNQtsHttpFileStation*)delegate communicationMode:(BOOL)isAsync cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
275 
276 
278 
297 -(BOOL) setSystemPortNumber:(long)portNumber;
317 -(BOOL) setSystemSSLPortNumber:(long)portNumber;
328 -(QTS_HTTP_SYSTEM_API_VERSION) querySystemVersion;
339 -(QNQtsHttpSystem*) openSystem;
350 -(void) closeSystem:(QNQtsHttpSystem*)delegate communicationMode:(BOOL)isAsync cancel:(int*)isCancel success:(void(^)(QTS_RESPONSE_CTX* response))success fail:(void(^)(QTS_HTTP_API_RESULTS error))fail;
351 
352 @end
353 
NSString * getPassword()
Get password.
NSString * m_computerName
Definition: QtsHttp.h:36
NSString * m_userName
Definition: QtsHttp.h:33
BOOL m_isSecureConnection
Definition: QtsHttp.h:35
NSString * getComputerName()
Get computer name.
Definition: QtsHttpFileStation.h:1074
NSString * getUserName()
Get user name.
Content of API Response.
Definition: QtsHttpComm.h:61
QNAP Turbo NAS server information class.
Definition: QtsHttp.h:30
NSString * m_password
Definition: QtsHttp.h:34
Definition: QtsHttpSystem.h:89
BOOL isSecureConnection()
Is SSL connect.
QTS http server class.
Definition: QtsHttp.h:109
NSString * getHostName()
Get host name.