mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-28 05:36:02 +03:00
64232c7854
now speaks to the primary screen and secondary screens almost everywhere the same way through an IClient interface; only special primary screen calls are accessed through a different interface, the CPrimaryClient interface. this simplifies the server since it no longer needs to test whether the active screen is the primary or a secondary in most cases. the server no longer speaks directly to the primary screen; all that goes through the CPrimaryClient, which often just forwards the call. the primary screen no longer speaks directly to the server either, again going through the CPrimaryClient via a IPrimaryReceiver interface. CServerProtocol classes have been replaced by CClientProxy classes which are very similar. the name makes more sense though.
48 lines
648 B
C++
48 lines
648 B
C++
#include "CClientProxy.h"
|
|
#include "IInputStream.h"
|
|
#include "IOutputStream.h"
|
|
|
|
//
|
|
// CClientProxy
|
|
//
|
|
|
|
CClientProxy::CClientProxy(IServer* server, const CString& name,
|
|
IInputStream* input, IOutputStream* output) :
|
|
m_server(server),
|
|
m_name(name),
|
|
m_input(input),
|
|
m_output(output)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
CClientProxy::~CClientProxy()
|
|
{
|
|
delete m_output;
|
|
delete m_input;
|
|
}
|
|
|
|
IServer*
|
|
CClientProxy::getServer() const
|
|
{
|
|
return m_server;
|
|
}
|
|
|
|
IInputStream*
|
|
CClientProxy::getInputStream() const
|
|
{
|
|
return m_input;
|
|
}
|
|
|
|
IOutputStream*
|
|
CClientProxy::getOutputStream() const
|
|
{
|
|
return m_output;
|
|
}
|
|
|
|
CString
|
|
CClientProxy::getName() const
|
|
{
|
|
return m_name;
|
|
}
|