3 * - By John Hodge (thePowersGang)
9 #include <IIPCChannel.hpp>
14 CClient::CClient(::AxWin::IIPCChannel& channel):
23 ::AxWin::IPC::DeregisterClient(*this);
26 CWindow* CClient::GetWindow(int ID)
29 return m_windows.at(ID);
31 catch(const std::exception& e) {
36 void CClient::SetWindow(int ID, CWindow* window)
38 _SysDebug("SetWindow(ID=%i,window=%p)", ID, window);
39 auto it = m_windows.find(ID);
40 if( it != m_windows.end() ) {
41 _SysDebug("CLIENT BUG: Window ID %i is already used by %p", ID, it->second);
44 m_windows[ID] = window;
48 void CClient::HandleMessage(CDeserialiser& message)
51 IPC::HandleMessage(*this, message);
52 if( !message.IsConsumed() )
54 _SysDebug("NOTICE - CClient::HandleMessage - Trailing data in message");
57 catch( const ::std::exception& e )
59 _SysDebug("ERROR - Exception while processing message from client: %s", e.what());
63 _SysDebug("ERROR - Unknown exception while processing message from client");