home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / internet / httpsvr / httpdoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.2 KB  |  82 lines

  1. // HttpDoc.h : interface of the CHttpSvrDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1997-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. class CRequest;
  14. class CListenSocket;
  15.  
  16. class CHttpSvrDoc : public CDocument
  17. {
  18. protected: // create from serialization only
  19.     CHttpSvrDoc();
  20.     DECLARE_DYNCREATE(CHttpSvrDoc)
  21.  
  22. // Attributes
  23. public:
  24.     BOOL StartListening( void );
  25.     void StopListening( void );
  26.     BOOL m_bResetListen;
  27.     CString m_strTitleBase;
  28.     CString m_strRoot;
  29.     CString m_strServer;
  30.     CTime   m_timeStarted;
  31.     UINT    m_uPort;
  32.     int     m_nSvrName;
  33.     BOOL    m_bLoggingOn;
  34.     BOOL    m_bListIcon;
  35.     BOOL    m_bAllowListing;
  36.     // indexes into m_aReStats array....
  37.     enum { STATUS_INFORMATIONAL = 0,
  38.         STATUS_SUCCESS, STATUS_REDIRECTION,
  39.         STATUS_CLIENTERR, STATUS_SERVERERR };
  40.     int     m_aReStats[5]; // array of status group counts
  41.     int     m_nTotalHits; // total hits
  42.     CObList m_reqList; // working list of request objects
  43.     CListenSocket* m_pListen;
  44.  
  45. // Operations
  46. public:
  47.     void    DocHit( CRequest* pRequest );
  48.     BOOL    IdleProc( LONG lCount );
  49.     void    ExtractStats( CRequest* pRequest );
  50.  
  51. // Overrides
  52.     // ClassWizard generated virtual function overrides
  53.     //{{AFX_VIRTUAL(CHttpSvrDoc)
  54.     public:
  55.     virtual BOOL OnNewDocument();
  56.     virtual void Serialize(CArchive& ar);
  57.     virtual void OnCloseDocument();
  58.     virtual void SetTitle(LPCTSTR lpszTitle);
  59.     virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  60.     //}}AFX_VIRTUAL
  61.  
  62. // Implementation
  63. public:
  64.     virtual ~CHttpSvrDoc();
  65. #ifdef _DEBUG
  66.     virtual void AssertValid() const;
  67.     virtual void Dump(CDumpContext& dc) const;
  68. #endif
  69.  
  70. protected:
  71.  
  72. // Generated message map functions
  73. protected:
  74.     //{{AFX_MSG(CHttpSvrDoc)
  75.     afx_msg void OnSvrOptions();
  76.     afx_msg void OnFileRestart();
  77.     //}}AFX_MSG
  78.     DECLARE_MESSAGE_MAP()
  79. };
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82.