home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 217 / DPCS0306DVD.ISO / Toolkit / Internet / FileZilla / Server / FileZilla_Server-0.9.11.exe / source / Server.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-02-24  |  1.9 KB  |  69 lines

  1. // Server.h: Schnittstelle fⁿr die Klasse CServer.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_SERVER_H__4896D8C6_EDB5_438E_98E6_08957DBCD1BC__INCLUDED_)
  6. #define AFX_SERVER_H__4896D8C6_EDB5_438E_98E6_08957DBCD1BC__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. class CListenSocket;
  13. class CServerThread;
  14. class COptions;
  15. class CAdminListenSocket;
  16. class CAdminInterface;
  17. class CAdminSocket;
  18. class CFileLogger;
  19.  
  20. class CServer  
  21. {
  22. public:
  23.     void ShowStatus(LPCTSTR msg, int nType);
  24.     void ShowStatus(DWORD eventDateHigh, DWORD eventDateLow, LPCTSTR msg, int nType);
  25.     BOOL ProcessCommand(CAdminSocket *pAdminSocket, int nID, unsigned char *pData, int nDataLength);
  26.     virtual void OnClose();
  27.     bool Create();
  28.     CServer();
  29.     virtual ~CServer();
  30.     HWND GetHwnd();
  31.     COptions *m_pOptions;
  32. protected:
  33.     BOOL CreateListenSocket();
  34.     BOOL CreateAdminListenSocket();
  35.     void OnTimer(UINT nIDEvent);
  36.     BOOL ToggleActive(int nServerState);
  37.     unsigned int GetNextThreadNotificationID();
  38.     void FreeThreadNotificationID(CServerThread *pThread);
  39.     
  40.     // Send state to interface
  41.     void SendState();
  42.     
  43.     BOOL m_bQuit;
  44.     int m_nServerState;
  45.     CAdminInterface *m_pAdminInterface;
  46.     CFileLogger *m_pFileLogger;
  47.     
  48.     std::list<CServerThread*> m_ThreadArray;
  49.     std::list<CServerThread*> m_ClosedThreads;
  50.  
  51.     std::vector<CServerThread*> m_ThreadNotificationIDs;
  52.     std::list<CAdminListenSocket*> m_AdminListenSocketList;
  53.     std::list<CListenSocket*> m_ListenSocketList;
  54.  
  55.     std::map<int, t_connectiondata> m_UsersList;
  56.  
  57.     UINT m_nTimerID;
  58.     
  59.     _int64 m_nRecvCount;
  60.     _int64 m_nSendCount;
  61.  
  62.     LRESULT OnServerMessage(CServerThread *pThread, WPARAM wParam, LPARAM lParam);
  63. private:
  64.     static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  65.     HWND m_hWnd;
  66. };
  67.  
  68. #endif // !defined(AFX_SERVER_H__4896D8C6_EDB5_438E_98E6_08957DBCD1BC__INCLUDED_)
  69.