mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 16:02:46 +08:00
indentation and other formatting changes. also cleaned up
#includes.
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
#include "CServerProtocol.h"
|
||||
#include "CServerProtocol1_0.h"
|
||||
#include "ProtocolTypes.h"
|
||||
#include "XSynergy.h"
|
||||
#include "IOutputStream.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <cstdio>
|
||||
|
||||
//
|
||||
// CServerProtocol
|
||||
//
|
||||
|
||||
CServerProtocol::CServerProtocol(CServer* server, const CString& client,
|
||||
IInputStream* input, IOutputStream* output) :
|
||||
m_server(server),
|
||||
m_client(client),
|
||||
m_input(input),
|
||||
m_output(output)
|
||||
CServerProtocol::CServerProtocol(
|
||||
CServer* server,
|
||||
const CString& client,
|
||||
IInputStream* input,
|
||||
IOutputStream* output) :
|
||||
m_server(server),
|
||||
m_client(client),
|
||||
m_input(input),
|
||||
m_output(output)
|
||||
{
|
||||
assert(m_server != NULL);
|
||||
assert(m_input != NULL);
|
||||
@@ -26,29 +29,38 @@ CServerProtocol::~CServerProtocol()
|
||||
// do nothing
|
||||
}
|
||||
|
||||
CServer* CServerProtocol::getServer() const
|
||||
CServer*
|
||||
CServerProtocol::getServer() const
|
||||
{
|
||||
return m_server;
|
||||
}
|
||||
|
||||
CString CServerProtocol::getClient() const
|
||||
CString
|
||||
CServerProtocol::getClient() const
|
||||
{
|
||||
return m_client;
|
||||
}
|
||||
|
||||
IInputStream* CServerProtocol::getInputStream() const
|
||||
IInputStream*
|
||||
CServerProtocol::getInputStream() const
|
||||
{
|
||||
return m_input;
|
||||
}
|
||||
|
||||
IOutputStream* CServerProtocol::getOutputStream() const
|
||||
IOutputStream*
|
||||
CServerProtocol::getOutputStream() const
|
||||
{
|
||||
return m_output;
|
||||
}
|
||||
|
||||
IServerProtocol* CServerProtocol::create(SInt32 major, SInt32 minor,
|
||||
CServer* server, const CString& client,
|
||||
IInputStream* input, IOutputStream* output)
|
||||
IServerProtocol*
|
||||
CServerProtocol::create(
|
||||
SInt32 major,
|
||||
SInt32 minor,
|
||||
CServer* server,
|
||||
const CString& client,
|
||||
IInputStream* input,
|
||||
IOutputStream* output)
|
||||
{
|
||||
// disallow invalid version numbers
|
||||
if (major < 0 || minor < 0) {
|
||||
@@ -70,4 +82,3 @@ IServerProtocol* CServerProtocol::create(SInt32 major, SInt32 minor,
|
||||
// given version.
|
||||
return new CServerProtocol1_0(server, client, input, output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user