Alphabetical Class Index   File Members   Compound Members   File List  

HNetMgr.h

00001 //
00002 // Copyright (c) 2002 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Header: /files/homes/master/cvs/hoops_master/Hoops3dStreamCtrl/source/HNetMgr.h,v 1.5 2006-08-07 20:38:46 stage Exp $
00013 //
00014 
00015 #if !defined(HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00016 #define HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__
00017 
00018 
00019 #ifdef HNET_SUPPORT
00020 #include "Vector"
00021 using namespace std;
00022 
00023 class HNet;
00024 class HNetClient;
00026 //  HNetMgr
00027 
00028 class HNetMgr 
00029 {
00030 // Construction
00031 public:
00032     HNetMgr();   // standard constructor
00033     virtual ~HNetMgr();
00034 
00035     bool ConnectToServer(
00036             const char * csServerAddress, 
00037             const char * csServerPort, 
00038             const char * csServerAccessPassword);
00039 
00040     bool CreateSession(
00041         const char * csSessionName, 
00042         const char * csSessionPassword,
00043         const char * csAdminPassword);
00044 
00045     HNetClient * CreateSessionAndClient(
00046         const char * session_name, 
00047         const char * session_password,
00048         const char * admin_password,
00049         const char * client_name );
00050 
00051     bool DeleteSession(
00052         const char * session_name, 
00053         const char * session_password,
00054         const char * admin_password);
00055 
00056     HNetClient * JoinSession(
00057         const char * session_name, 
00058         const char * session_password,
00059         const char * client_name);
00060 
00061     void DisconnectFromServer();
00062 
00063     void QuitSession(HNetClient * client);
00064 
00065 
00066     bool GetSessionsList();
00067 
00068     void Init();
00069     void ProcessMessages(); 
00070     char * GetNextSessionName();
00071 
00072     bool IsConnected();
00073 
00074 protected:
00075 
00076     int m_SessionSend;
00077     HNet* m_pHNet;
00078     vector <char *> m_SessionList;
00079     void ClearSessionsList();
00080  
00081 //  UINT  m_nTimer;
00082 
00083  
00084 //  BOOL PreCreateWindow(CREATESTRUCT& cs);
00085 //  afx_msg void OnTimer(UINT nIDEvent);
00086 //  DECLARE_MESSAGE_MAP()
00087 
00088 private:
00089 
00090     static void hnet_status_notice_function(unsigned int status, void * user_data);
00091     static void hnet_error_notice_function( unsigned int error, const char * session_name,  const char * client_name, void * user_data);
00092     static void enumerate_session_helper(const char * name, void * user_data);
00093 
00094 
00095  
00096 };
00097 
00098 #endif
00099 
00100 #endif // !defined(HNETMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00101 
00102 
00103