Alphabetical Class Index   File Members   Compound Members   File List  

HNetClientMgr.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/docs_hoops/HoopsAtl/ref_manual/Attic/_h_net_client_mgr_8h-source.html,v 1.1.2.2 2004/06/28 20:59:56 rob Exp $
00013 //
00014 
00015 #if !defined(HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00016 #define HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__
00017 
00018 #ifdef HNET_SUPPORT
00019 
00020 
00021 #include "Vector"
00022 using namespace std;
00023 
00024 class HNet;
00025 class HNetClient;
00026 class HNetMgr;
00027 class HBaseView;
00028 class HNetMessageRegistrar;
00030 //  HNetMgr
00031 
00032 class HNetClientMgr 
00033 {
00034 // Construction
00035 public:
00036     HNetClientMgr(HNetClient *client, HNetMgr *netmgr, HBaseView *view);
00037     virtual ~HNetClientMgr();
00038 
00039     static void emit_message_function(const char * message, unsigned int length, void * user_data);
00040     static void condition_notice_function(unsigned int condition, void * user_data);
00041     static void control_token_notice_function(bool has_control, void * user_data);
00042     static void pointcast_update_function(const char * message, unsigned int message_length, void * user_data);
00043     static void client_update_notice_function(void * user_data);
00044     static void enumerate_client_helper(const char * name, void * user_data);
00045 
00046 
00047 
00048 
00049     void Init();
00050     bool ClientHasControl();
00051     void RequestControlToken(bool req);
00052 
00053     void RefreshClientsList();
00054     bool ClientListRefreshed() { return m_bClientListRefreshed; }
00055     void GetClientsList();
00056     char * GetNextClientName();
00057 
00058     void AddMessage(char *messagetext);
00059 
00060     void SetUpdateMessages(bool update) { ClearMessagesList(); m_bUpdateMessageList = update; }
00061     bool GetUpdateMessages() { return m_bUpdateMessageList; }
00062     long GetNumChatMessages();
00063     char * GetNextChatMessage();
00064 
00065     void SendChatMessage(char *clients, char *message);
00066 
00067 
00068 protected:
00069 
00070     vector <char *> m_ClientsList;
00071     void ClearClientsList();
00072 
00073     vector <char *> m_MessagesList;
00074     void ClearMessagesList();
00075     
00076 
00077     HBaseView * m_pView;
00078     HNetMessageRegistrar * m_pNetMessageRegistrar;
00079     HNetMgr * m_pNetMgr;
00080     HNetClient *m_pNetClient;
00081     int m_ClientSend;
00082 
00083     bool m_bClientListRefreshed;
00084 
00085     bool m_bUpdateMessageList;
00086 
00087 
00088  
00089 
00090 };
00091 
00092 #endif
00093 
00094 #endif // !defined(HNETCLIENTMGR__H__INCLUDED__RAJESH_B__20010724__1714__)
00095 
00096 
00097