home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 217 / DPCS0306DVD.ISO / Toolkit / Internet / FileZilla / Server / FileZilla_Server-0.9.11.exe / source / interface / MainFrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-11-26  |  5.7 KB  |  180 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // MainFrm.h : Schnittstelle der Klasse CMainFrame
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_)
  24. #define AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. #include "misc\systemtray.h"
  31. #include "misc\led.h"
  32. #include "Options.h"    // Hinzugefⁿgt von der Klassenansicht
  33. #include "splitex.h"
  34.  
  35. class CStatusView;
  36. class CUsersView;
  37. class CAdminSocket;
  38.  
  39. class CUsersDlg;
  40. class CGroupsDlg;
  41. class CMainFrame : public CFrameWnd
  42. {
  43.     
  44. public:
  45.     CMainFrame(COptions *pOptions);
  46. protected: 
  47.     DECLARE_DYNAMIC(CMainFrame)
  48.  
  49. // Attribute
  50. public:
  51.  
  52. // Operationen
  53. public:
  54.     void ParseReply(int nReplyID, unsigned char *pData, int nDataLength);
  55.     void ParseStatus(int nStatusID, unsigned char *pData, int nDataLength);
  56.  
  57.     CStatusView* GetStatusPane();
  58.     CUsersView* GetUsersPane();
  59.  
  60.  
  61. // ▄berladungen
  62.     // Vom Klassenassistenten generierte ▄berladungen virtueller Funktionen
  63.     //{{AFX_VIRTUAL(CMainFrame)
  64.     public:
  65.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  66.     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  67.     protected:
  68.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  69.     //}}AFX_VIRTUAL
  70.  
  71. // Implementierung
  72. public:
  73.     void CloseAdminSocket(bool shouldReconnect = true);
  74.     void ShowStatusRaw(char *status, int nType);
  75.     void ShowStatus(CString status, int nType);
  76.     BOOL m_bQuit;
  77.     void SetIcon();
  78.     BOOL SendCommand(int nType);
  79.     BOOL SendCommand(int nType, void *pData, int nDataLength);
  80.     void OnAdminInterfaceConnected();
  81.     void OnAdminInterfaceClosed();
  82.  
  83.     virtual ~CMainFrame();
  84.  
  85. protected:  // Eingebundene Elemente der Steuerleiste
  86.     CAdminSocket *m_pAdminSocket;
  87.     int m_nServerState;
  88.     CStatusView* m_pStatusPane;
  89.     CUsersView* m_pUsersPane;
  90.  
  91.     void CMainFrame::SetStatusbarText(int nIndex,CString str);
  92.     CLed m_SendLed;
  93.     CLed m_RecvLed;
  94.     CStatusBar  m_wndStatusBar;
  95.     CToolBar    m_wndToolBar;
  96.     CToolBar    m_wndUserListToolBar;
  97.     CSplitterWndEx m_wndSplitter;
  98.  
  99.     //// Internal support functions
  100.     void SetupTrayIcon();
  101.     
  102.     //// Internal data
  103.     CSystemTray m_TrayIcon;
  104.     int nTrayNotificationMsg_;
  105.  
  106.     // static data member to hold window class name
  107.     static LPCSTR s_winClassName;
  108.  
  109.     CUsersDlg *m_pUsersDlg;
  110.     CGroupsDlg *m_pGroupsDlg;
  111.     COptionsDlg *m_pOptionsDlg;
  112.  
  113. // Generierte Message-Map-Funktionen
  114. protected:
  115.     int m_nEdit;
  116.     COptions *m_pOptions;
  117.     UINT_PTR m_nRateTimerID;
  118.     unsigned __int64 m_nSendCount;
  119.     unsigned __int64 m_nRecvCount;
  120.     __int64 m_nOldSendCount;
  121.     __int64 m_nOldRecvCount;
  122.     DWORD m_lastchecktime;
  123.     __int64 m_lastreaddiff;
  124.     __int64 m_lastwritediff;
  125.     UINT_PTR m_nTimerID;
  126.     UINT_PTR m_nReconnectTimerID;
  127.     int m_nReconnectCount;
  128.     CReBar m_wndReBar;
  129.     //{{AFX_MSG(CMainFrame)
  130.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  131.     afx_msg void OnSetFocus(CWnd *pOldWnd);
  132.     afx_msg void OnSize(UINT nType, int cx, int cy);
  133.     afx_msg void OnClose();
  134.     afx_msg void OnEditSettings();
  135.     afx_msg void OnActive();
  136.     afx_msg void OnUpdateActive(CCmdUI* pCmdUI);
  137.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);    
  138.     afx_msg void OnTrayExit();
  139.     afx_msg void OnTrayRestore();
  140.     afx_msg void OnLock();
  141.     afx_msg void OnUpdateLock(CCmdUI* pCmdUI);
  142.     afx_msg void OnTimer(UINT_PTR nIDEvent);
  143.     afx_msg void OnMenuEditUsers();
  144.     afx_msg void OnMenuEditGroups();
  145.     afx_msg void OnFileConnect();
  146.     afx_msg void OnFileDisconnect();
  147.     afx_msg void OnUpdateFileDisconnect(CCmdUI* pCmdUI);
  148.     afx_msg void OnUpdateEditSettings(CCmdUI* pCmdUI);
  149.     afx_msg void OnUpdateMenuEditUsers(CCmdUI* pCmdUI);
  150.     afx_msg void OnUpdateMenuEditGroups(CCmdUI* pCmdUI);
  151.     afx_msg void OnUpdateUsers(CCmdUI* pCmdUI);
  152.     afx_msg void OnUpdateGroups(CCmdUI* pCmdUI);
  153.     afx_msg void OnDestroy();
  154.     afx_msg void OnDisplayLogicalNames();
  155.     afx_msg void OnDisplayPhysicalNames();
  156.     afx_msg void OnUpdateDisplayLogicalNames(CCmdUI* pCmdUI);
  157.     afx_msg void OnUpdateDisplayPhysicalNames(CCmdUI* pCmdUI);
  158.     afx_msg void OnDisplaySortMenu();
  159.     afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes);
  160.     afx_msg void OnDisplaySortByUserid();
  161.     afx_msg void OnDisplaySortByAccount();
  162.     afx_msg void OnDisplaySortByIP();
  163.     afx_msg void OnUpdateDisplaySortByUserid(CCmdUI* pCmdUI);
  164.     afx_msg void OnUpdateDisplaySortByAccount(CCmdUI* pCmdUI);
  165.     afx_msg void OnUpdateDisplaySortByIP(CCmdUI* pCmdUI);
  166.     //}}AFX_MSG
  167.     DECLARE_MESSAGE_MAP()
  168. public:
  169.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  170. protected:
  171.     virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  172. };
  173.  
  174. /////////////////////////////////////////////////////////////////////////////
  175.  
  176. //{{AFX_INSERT_LOCATION}}
  177. // Microsoft Visual C++ fⁿgt unmittelbar vor der vorhergehenden Zeile zusΣtzliche Deklarationen ein.
  178.  
  179. #endif // !defined(AFX_MAINFRM_H__741499DF_FFBB_481F_B214_8C14C31217BB__INCLUDED_)
  180.