Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CClient.hpp
diff --git a/Usermode/Applications/axwin4_src/Server/include/CClient.hpp b/Usermode/Applications/axwin4_src/Server/include/CClient.hpp
new file mode 100644 (file)
index 0000000..2a23f15
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Acess2 GUI v4
+ * - By John Hodge (thePowersGang) 
+ *
+ * CClient.hpp
+ * - IPC Client
+ */
+#ifndef _CCLIENT_H_
+#define _CCLIENT_H_
+
+#include "CWindow.hpp"
+#include "serialisation.hpp"
+#include <map>
+#include <cassert>
+#include "IFontFace.hpp"
+
+namespace AxWin {
+
+class IIPCChannel;
+
+class CClient
+{
+       unsigned int    m_id;
+       IIPCChannel&    m_channel;
+       
+       ::std::map<unsigned int,CWindow*>       m_windows;
+       //CWindow*      m_windows[1];
+public:
+       CClient(::AxWin::IIPCChannel& channel);
+       virtual ~CClient();
+       
+       void set_id(unsigned int id) { assert(m_id == 0); m_id = id; }
+       unsigned int id() const { return m_id; }
+       
+       CWindow*        GetWindow(int ID);
+       void    SetWindow(int ID, CWindow* window);
+       
+       IFontFace&      GetFont(unsigned int id);
+       
+       virtual void    SendMessage(CSerialiser& reply) = 0;
+       void    HandleMessage(CDeserialiser& message);
+};
+
+
+};
+
+#endif
+

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