QtsHttp  0.9.1
Public Member Functions | Properties | List of all members
QtsHttp.Server Class Reference

QTS http server class. More...

Public Member Functions

 Server ()
 
 Server (ServerInfo serverInfo)
 Constructor with QtsHttpServerInfo server info. More...
 
async Task Login (StationType loginStation)
 Login NAS system/file station of QNAP Turbo NAS Server. Please using try catch mechanism to call this function. More...
 
bool SetAgentName (string strAgenName)
 Developers can change HTTP agent name before call QTS NAS system/file station API. More...
 
bool SetTimeouts (int nTimeOutMilliseconds)
 Developers can change HTTP time-out value before call QTS NAS system/file station API. More...
 
QtsHttp.FileStaion.APIVersion QueryFileStationVersion ()
 Query file station SDK version. More...
 
IQtsHttpFileStation OpenFileStation ()
 OpenFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to get file station object. More...
 
async Task CloseFileStation (IQtsHttpFileStation fileStation)
 CloseFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to close and destroy file station object. Please using try catch mechanism to call this function. More...
 
bool SetFileStationPortNum (long lPortNumber)
 Set file station connection port number. More...
 
IQtsHttpSystem OpenSystem ()
 OpenSystem if QTSSystemVersion = QTS_SYSTEM to get NAS system object. More...
 
QtsHttp.System.APIVersion QuerySystemVersion ()
 Query NAS system SDK version. More...
 
async Task CloseSystem (IQtsHttpSystem system)
 CloseSystem if QTSSystemVersion = QTS_SYSTEM to close and destroy NAS system object. Please using try catch mechanism to call this function. More...
 

Properties

ServerInfo ServerInfo [get, set]
 

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.

Constructor & Destructor Documentation

QtsHttp.Server.Server ( )

Default constructor

QtsHttp.Server.Server ( ServerInfo  serverInfo)

Constructor with QtsHttpServerInfo server info.

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

Member Function Documentation

async Task QtsHttp.Server.CloseFileStation ( IQtsHttpFileStation  fileStation)

CloseFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to close and destroy file station object. Please using try catch mechanism to call this function.

Parameters
[IN]fileStation : File station object.
Returns
APIResult : API success or fail error code..
async Task QtsHttp.Server.CloseSystem ( IQtsHttpSystem  system)

CloseSystem if QTSSystemVersion = QTS_SYSTEM to close and destroy NAS system object. Please using try catch mechanism to call this function.

Parameters
[IN]system : NAS system object.
Returns
APIResult : API success or fail error code..
async Task QtsHttp.Server.Login ( StationType  loginStation)

Login NAS system/file station of QNAP Turbo NAS Server. Please using try catch mechanism to call this function.

Parameters
[IN]loginStation : Login station type.
Returns
APIResult : API success or fail error code.
IQtsHttpFileStation QtsHttp.Server.OpenFileStation ( )

OpenFileStation if QTS_FILESTATION_VERSION = QTS_FILESTATION to get file station object.

Parameters
n/a
Returns
IQtsHttpFileStation : File station object.
IQtsHttpSystem QtsHttp.Server.OpenSystem ( )

OpenSystem if QTSSystemVersion = QTS_SYSTEM to get NAS system object.

Parameters
n/a
Returns
IQtsHttpSystem : NAS system object.
QtsHttp.FileStaion.APIVersion QtsHttp.Server.QueryFileStationVersion ( )

Query file station SDK version.

Parameters
n/a
Returns
QTSFileStationVersion : File station API version.
QtsHttp.System.APIVersion QtsHttp.Server.QuerySystemVersion ( )

Query NAS system SDK version.

Parameters
n/a
Returns
QTSSystemVersion : NAS system API version.
bool QtsHttp.Server.SetAgentName ( string  strAgenName)

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.
bool QtsHttp.Server.SetFileStationPortNum ( long  lPortNumber)

Set file station connection port number.

Parameters
[IN]lPortNumber : 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
bool QtsHttp.Server.SetTimeouts ( int  nTimeOutMilliseconds)

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).

Property Documentation

ServerInfo QtsHttp.Server.ServerInfo
getset

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