QtsHttp  0.9.0
QtsHttp.h
Go to the documentation of this file.
1 #ifndef QTS_HTTP_H
2 #define QTS_HTTP_H
3 
4 #include <iostream>
5 #include <list>
6 #include <vector>
7 #include "QtsHttpFileStation.h"
8 #include "QtsHttpSystem.h"
9 
10 #ifdef QTSHTTP_EXPORTS
11 #define QTSHTTPDLL_API __declspec(dllexport)
12 #define EXPIMP_TEMPLATE
13 #else
14 #define QTSHTTPDLL_API __declspec(dllimport)
15 #define EXPIMP_TEMPLATE extern
16 #endif
17 
18 EXPIMP_TEMPLATE template class QTSHTTPDLL_API std::vector<CQtsHttpFileEntry>;
19 EXPIMP_TEMPLATE template class QTSHTTPDLL_API std::vector<CQtsHttpShareLink>;
20 EXPIMP_TEMPLATE template class QTSHTTPDLL_API std::vector<CQtsHttpExtractEntry>;
21 
24 {
30 
37 {
38 public:
59  CQtsHttpServerInfo(LPCTSTR strHostName, LPCTSTR strUsername, LPCTSTR strPassword, BOOL bSecureConnection, LPCTSTR strComputerName);
60 
63 
71  LPCTSTR GetHostName();
79  LPCTSTR GetUsername();
87  LPCTSTR GetPassword();
96  BOOL IsSecureMode();
104  LPCTSTR GetComputerName();
105 
106 private:
107  wstring m_strHostName;
108  wstring m_strUsername;
109  wstring m_strPassword;
110  BOOL m_bSecureConnection;
111  wstring m_strComputerName;
112 };
113 
122 {
123 public:
125  CQtsHttpServer();
138  ~CQtsHttpServer();
139 
157  BOOL SetAgentName(LPCTSTR strAgentName);
158 
182  BOOL SetTimeouts(int nTimeOutMilliseconds);
183 
194  QTS_HTTP_API_RESULT Login(QTS_HTTP_STATION_TYPE loginStation);
195 
196  //File station part
197 
217  BOOL SetFileStationPortNum(long lPortNumber);
218 
238  BOOL SetFileStationSSLPortNum(long lSSLPortNumber);
239 
250  QTS_HTTP_FILE_STATION_API_VERSION QueryFileStationVersion();
251 
262  IQtsHttpFileStation* OpenFileStation();
263 
274  QTS_HTTP_API_RESULT CloseFileStation(IQtsHttpFileStation** pFileStation);
275 
276  //System part
277 
297  BOOL SetSystemPortNum(long lPortNumber);
298 
318  BOOL SetSystemSSLPortNum(long lSSLPortNumber);
319 
330  QTS_HTTP_SYSTEM_API_VERSION QuerySystemVersion();
331 
342  IQtsHttpSystem* OpenSystem();
343 
354  QTS_HTTP_API_RESULT CloseSystem(IQtsHttpSystem** pSystem);
355 
356 private:
357  CQtsHttpServerInfo m_ServerInfo;
358  IQtsHttpFileStation* m_pFSObj;
359  IQtsHttpSystem* m_pSYSObj;
360  long m_lFSPortNum;
361  long m_lFSSSLPortNum;
362  long m_lSystemPortNum;
363  long m_lSystemSSLPortNum;
364  wstring m_strAgentName;
365  int m_nTimeOutMilliseconds;
367  QTS_HTTP_SYSTEM_API_VERSION m_eSYSVersion;
368 };
369 
370 #endif // QTS_HTTP_H
enum _QTS_HTTP_FILE_STATION_API_VERSION_ QTS_HTTP_FILE_STATION_API_VERSION
QNAP Turbo NAS server information class.
Definition: QtsHttp.h:36
QTS http server class.
Definition: QtsHttp.h:121
Definition: QtsHttp.h:26
Interface for Qts Http file station API.
Definition: QtsHttpFileStation.h:1121
#define QTSHTTPDLL_API
Definition: QtsHttp.h:14
Definition: QtsHttp.h:28
_QTS_HTTP_STATION_TYPE_
Definition: QtsHttp.h:23
enum _QTS_HTTP_API_RESULT_ QTS_HTTP_API_RESULT
enum _QTS_HTTP_SYSTEM_API_VERSION_ QTS_HTTP_SYSTEM_API_VERSION
Interface for Qts Http system API.
Definition: QtsHttpSystem.h:264
enum _QTS_HTTP_STATION_TYPE_ QTS_HTTP_STATION_TYPE
#define EXPIMP_TEMPLATE
Definition: QtsHttp.h:15