Merge branch 'master' of git://github.com/thepowersgang/acess2
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CClient.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang) 
4  *
5  * CClient.hpp
6  * - IPC Client
7  */
8 #ifndef _CCLIENT_H_
9 #define _CCLIENT_H_
10
11 #include "CWindow.hpp"
12 #include "serialisation.hpp"
13 #include <map>
14 #include <cassert>
15 #include "IFontFace.hpp"
16
17 namespace AxWin {
18
19 class IIPCChannel;
20
21 class CClient
22 {
23         unsigned int    m_id;
24         IIPCChannel&    m_channel;
25         
26         ::std::map<unsigned int,CWindow*>       m_windows;
27         //CWindow*      m_windows[1];
28 public:
29         CClient(::AxWin::IIPCChannel& channel);
30         virtual ~CClient();
31         
32         void set_id(unsigned int id) { assert(m_id == 0); m_id = id; }
33         unsigned int id() const { return m_id; }
34         
35         CWindow*        GetWindow(int ID);
36         void    SetWindow(int ID, CWindow* window);
37         
38         IFontFace&      GetFont(unsigned int id);
39         
40         virtual void    SendMessage(CSerialiser& reply) = 0;
41         void    HandleMessage(CDeserialiser& message);
42 };
43
44
45 };
46
47 #endif
48

UCC git Repository :: git.ucc.asn.au