Alphabetical Class List   File List   Compound Members  

HNetClientMgr.h

00001 #if !defined(HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00002 #define HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__
00003 
00004 #ifdef HNET_SUPPORT
00005 
00006 
00007 #include "Vector"
00008 using namespace std;
00009 
00010 class HNet;
00011 class HNetClient;
00012 class HNetMgr;
00013 class HBaseView;
00014 class HNetMessageRegistrar;
00016 //      HNetMgr
00017 
00018 class HNetClientMgr 
00019 {
00020 // Construction
00021 public:
00022         HNetClientMgr(HNetClient *client, HNetMgr *netmgr, HBaseView *view);
00023         virtual ~HNetClientMgr();
00024 
00025         static void emit_message_function(const char * message, unsigned int length, void * user_data);
00026         static void condition_notice_function(unsigned int condition, void * user_data);
00027         static void control_token_notice_function(bool has_control, void * user_data);
00028         static void pointcast_update_function(const char * message, unsigned int message_length, void * user_data);
00029         static void client_update_notice_function(void * user_data);
00030         static void enumerate_client_helper(const char * name, void * user_data);
00031 
00032 
00033 
00034 
00035         void Init();
00036         bool ClientHasControl();
00037         void RequestControlToken(bool req);
00038 
00039         void RefreshClientsList();
00040         bool ClientListRefreshed() { return m_bClientListRefreshed; }
00041         void GetClientsList();
00042         char * GetNextClientName();
00043 
00044         void AddMessage(char *messagetext);
00045 
00046         void SetUpdateMessages(bool update) { ClearMessagesList(); m_bUpdateMessageList = update; }
00047         bool GetUpdateMessages() { return m_bUpdateMessageList; }
00048         long GetNumChatMessages();
00049         char * GetNextChatMessage();
00050 
00051         void SendChatMessage(char *clients, char *message);
00052 
00053 
00054 protected:
00055 
00056         vector <char *> m_ClientsList;
00057         void ClearClientsList();
00058 
00059         vector <char *> m_MessagesList;
00060         void ClearMessagesList();
00061         
00062 
00063         HBaseView * m_pView;
00064         HNetMessageRegistrar * m_pNetMessageRegistrar;
00065         HNetMgr * m_pNetMgr;
00066         HNetClient *m_pNetClient;
00067         int m_ClientSend;
00068 
00069         bool m_bClientListRefreshed;
00070 
00071         bool m_bUpdateMessageList;
00072 
00073 
00074  
00075 
00076 };
00077 
00078 #endif
00079 
00080 #endif // !defined(HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00081 
00082 
00083 


Copyright © 2002 Tech Soft 3D