Alphabetical Class List   File List   Compound Members  

HNetMgr.h

00001 #if !defined(HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00002 #define HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__
00003 
00004 
00005 #ifdef HNET_SUPPORT
00006 #include "Vector"
00007 using namespace std;
00008 
00009 class HNet;
00010 class HNetClient;
00012 //      HNetMgr
00013 
00014 class HNetMgr 
00015 {
00016 // Construction
00017 public:
00018         HNetMgr();   // standard constructor
00019         virtual ~HNetMgr();
00020 
00021         bool ConnectToServer(
00022                         const char * csServerAddress, 
00023                         const char * csServerPort, 
00024                         const char * csServerAccessPassword);
00025 
00026         bool CreateSession(
00027                 const char * csSessionName, 
00028                 const char * csSessionPassword,
00029                 const char * csAdminPassword);
00030 
00031         HNetClient * CreateSessionAndClient(
00032                 const char * session_name, 
00033                 const char * session_password,
00034                 const char * admin_password,
00035                 const char * client_name );
00036 
00037         bool DeleteSession(
00038                 const char * session_name, 
00039                 const char * session_password,
00040                 const char * admin_password);
00041 
00042         HNetClient * JoinSession(
00043                 const char * session_name, 
00044                 const char * session_password,
00045                 const char * client_name);
00046 
00047         void DisconnectFromServer();
00048 
00049         void QuitSession(HNetClient * client);
00050 
00051 
00052         bool GetSessionsList();
00053 
00054         void Init();
00055         void ProcessMessages(); 
00056         char * GetNextSessionName();
00057 
00058         bool IsConnected();
00059 
00060 protected:
00061 
00062         int m_SessionSend;
00063         HNet* m_pHNet;
00064         vector <char *> m_SessionList;
00065         void ClearSessionsList();
00066  
00067 //      UINT  m_nTimer;
00068 
00069  
00070 //      BOOL PreCreateWindow(CREATESTRUCT& cs);
00071 //      afx_msg void OnTimer(UINT nIDEvent);
00072 //      DECLARE_MESSAGE_MAP()
00073 
00074 private:
00075 
00076         static void hnet_status_notice_function(unsigned int status, void * user_data);
00077         static void hnet_error_notice_function( unsigned int error, const char * session_name,  const char * client_name, void * user_data);
00078         static void enumerate_session_helper(const char * name, void * user_data);
00079 
00080 
00081  
00082 };
00083 
00084 #endif
00085 
00086 #endif // !defined(HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00087 
00088 
00089 


Copyright © 2002 Tech Soft 3D