QtsHttp  0.9.4
Instance Methods | Protected Attributes | List of all members
QNQtsHttpServer Class Reference

QTS http server class. More...

#import <QtsHttp.h>

Inheritance diagram for QNQtsHttpServer:

Instance Methods

(id) - initWithServerInfo:
 Constructor with CQtsHttpServerInfo server info. More...
 
(BOOL) - setAgentName:
 Developers can change HTTP agent name before call QTS NAS system/file station API. More...
 
(BOOL) - setTimeouts:
 Developers can change HTTP time-out value before call QTS NAS system/file station API. More...
 
(void) - login:communicationMode:cancel:success:fail:
 Login NAS system/file station of QNAP Turbo NAS Server. More...
 
(BOOL) - setFileStationPortNum:
 Set file station connection port number. More...
 
(BOOL) - setFileStationSSLPortNum:
 Set file station SSL connection port number. More...
 
(QTS_HTTP_FILE_STATION_API_VERSION) - queryFileStationVersion
 Query file station SDK version. More...
 
(QNQtsHttpFileStation *) - openFileStation
 OpenFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to get file station object. More...
 
(void) - closeFileStation:communicationMode:cancel:success:fail:
 CloseFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to close and destroy file station object. More...
 
(BOOL) - setSystemPortNumber:
 Set NAS system connection port number. More...
 
(BOOL) - setSystemSSLPortNumber:
 Set NAS system SSL connection port number. More...
 
(QTS_HTTP_SYSTEM_API_VERSION) - querySystemVersion
 Query NAS system SDK version. More...
 
(QNQtsHttpSystem *) - openSystem
 OpenSystem if QTS_SYSTEM_VERSION = QTS_SYSTEM to get NAS system object. More...
 
(void) - closeSystem:communicationMode:cancel:success:fail:
 CloseSystem if QTS_SYSTEM_VERSION = QTS_SYSTEM to close and destroy NAS system object. More...
 

Protected Attributes

QNQtsHttpServerInfoserverInfo
 
QNQtsHttpSystemsysDelegate
 
QNQtsHttpFileStationfsDelegate
 
long FSPortNum
 
long FSSSLPortNum
 
long MSPortNum
 
long MSSSLPortNum
 
long SystemPortNum
 
long SystemSSLPortNum
 
NSString * agentName
 
int timeOutMilliseconds
 
QTS_HTTP_FILE_STATION_API_VERSION FSVersion
 
QTS_HTTP_SYSTEM_API_VERSION SystemVersion
 

Detailed Description

QTS http server class.

  1. Support to login QNAP Turbo NAS system and file station.
  2. Open and close QNAP Turbo NAS system/file station.

Method Documentation

◆ closeFileStation:communicationMode:cancel:success:fail:()

- (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 

CloseFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to close and destroy file station object.

Parameters
[IN]delegate : File station object.
Returns
QTS_HTTP_API_RESULTS : API success or fail error code..

◆ closeSystem:communicationMode:cancel:success:fail:()

- (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 

CloseSystem if QTS_SYSTEM_VERSION = QTS_SYSTEM to close and destroy NAS system object.

Parameters
[IN]delegate : NAS system object.
Returns
QTS_HTTP_API_RESULTS : API success or fail error code..

◆ initWithServerInfo:()

- (id) initWithServerInfo: (QNQtsHttpServerInfo *)  qtsHttpServerInfo

Constructor with CQtsHttpServerInfo server info.

Parameters
[IN]qtsHttpServerInfo : Qts http server info.
Returns
n/a.

◆ login:communicationMode:cancel:success:fail:()

- (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 

Login NAS system/file station of QNAP Turbo NAS Server.

Parameters
[IN]loginStation : Login station type.
[IN]isAsync : Execute API by Synchronized or Asynchronized Mode.
[IN]isCancel : Cancel API.
[BLOCK]success : block to retrieve QTS_RESPONSE_CTX class when API was executed successfully. QTS_RESPONSE_CTX's response will store list of QNCloudHttpPortMapping class.
[BLOCK]fail : block to retrieve error code when API was executed failurely.
Returns
n/a.

◆ openFileStation()

- (QNQtsHttpFileStation*) openFileStation

OpenFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to get file station object.

Parameters
n/a
Returns
QNQtsHttpFileStation* : File station object pointer.

◆ openSystem()

- (QNQtsHttpSystem*) openSystem

OpenSystem if QTS_SYSTEM_VERSION = QTS_SYSTEM to get NAS system object.

Parameters
n/a
Returns
QNQtsHttpSystem* : NAS system object pointer.

◆ queryFileStationVersion()

- (QTS_HTTP_FILE_STATION_API_VERSION) queryFileStationVersion

Query file station SDK version.

Parameters
n/a
Returns
QTS_HTTP_FILE_STATION_API_VERSION : File station API version.

◆ querySystemVersion()

- (QTS_HTTP_SYSTEM_API_VERSION) querySystemVersion

Query NAS system SDK version.

Parameters
n/a
Returns
QTS_HTTP_SYSTEM_API_VERSION : NAS system API version.

◆ setAgentName:()

- (BOOL) setAgentName: (NSString *)  strAgentName

Developers can change HTTP agent name before call QTS NAS system/file station API.

Parameters
[IN]strAgentName : New HTTP agent name.
Returns
TRUE : set HTTP agent name success.
FALSE : set HTTP agent name fail.
Remarks
If no change HTTP agent name,
QTS HTTP API will use default agent name to sent QTS NAS system/file station request.

◆ setFileStationPortNum:()

- (BOOL) setFileStationPortNum: (long)  portNumber

Set file station connection port number.

Parameters
[IN]portNumber : File station port number.
Returns
TRUE : Set success.
FALSE : Set fail.
Remarks
If no set port number,
QTS file station API will use QNAP default port number to connect.
Non-SSL : 8080

◆ setFileStationSSLPortNum:()

- (BOOL) setFileStationSSLPortNum: (long)  portNumber

Set file station SSL connection port number.

Parameters
[IN]portNumber : File station SSL port number.
Returns
TRUE : Set success.
FALSE : Set fail.
Remarks
If no set SSL port number,
QTS file station API will use QNAP default SSL port number to connect.
SSL : 443

◆ setSystemPortNumber:()

- (BOOL) setSystemPortNumber: (long)  portNumber

Set NAS system connection port number.

Parameters
[IN]portNumber : NAS system port number.
Returns
TRUE : Set success.
FALSE : Set fail.
Remarks
If no set port number,
QTS NAS system API will use QNAP default port number to connect.
Non-SSL : 8080

◆ setSystemSSLPortNumber:()

- (BOOL) setSystemSSLPortNumber: (long)  portNumber

Set NAS system SSL connection port number.

Parameters
[IN]portNumber : NAS system SSL port number.
Returns
TRUE : Set success.
FALSE : Set fail.
Remarks
If no set SSL port number,
QTS NAS system API will use QNAP default SSL port number to connect.
SSL : 443

◆ setTimeouts:()

- (BOOL) setTimeouts: (int)  iTimeOutMilliseconds

Developers can change HTTP time-out value before call QTS NAS system/file station API.

Parameters
[IN]nTimeOutMilliseconds : HTTP time-out value, in milliseconds.
Returns
TRUE : set HTTP time-out value success.
FALSE : set HTTP time-out value fail.
Remarks
ConnectTimeout : nTimeOutMilliseconds
SendTimeout : nTimeOutMilliseconds
ReceiveTimeout : nTimeOutMilliseconds
If no change HTTP time-out value,
QTS HTTP API will use default time-out value (30000).

The documentation for this class was generated from the following file: