#include "CWindow.hpp"
#include "serialisation.hpp"
-
-class IIPCChannel;
+#include <map>
+#include <cassert>
namespace AxWin {
+class IIPCChannel;
+
class CClient
{
+ unsigned int m_id;
IIPCChannel& m_channel;
- //::std::map<unsigned int,CWindow*> m_windows;
- CWindow* m_windows[1];
+ ::std::map<unsigned int,CWindow*> m_windows;
+ //CWindow* m_windows[1];
public:
- CClient(IIPCChannel& channel);
- ~CClient();
+ 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);
- void SendMessage(CSerialiser& reply);
+ virtual void SendMessage(CSerialiser& reply) = 0;
+ void HandleMessage(CDeserialiser& message);
};