2012-06-28 07:29:06 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2012-09-04 02:09:56 +00:00
|
|
|
* Copyright (C) 2012 Bolton Software Ltd.
|
2012-06-28 07:29:06 +00:00
|
|
|
* Copyright (C) 2012 Nick Bolton
|
|
|
|
|
*
|
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* found in the file COPYING that should have accompanied this file.
|
|
|
|
|
*
|
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2012-07-02 15:28:23 +00:00
|
|
|
#include "CEvent.h"
|
|
|
|
|
|
2012-07-05 18:05:35 +00:00
|
|
|
namespace synergy { class IStream; }
|
2012-07-02 15:28:23 +00:00
|
|
|
class CIpcMessage;
|
2012-07-10 01:51:51 +00:00
|
|
|
class CIpcLogLineMessage;
|
2012-07-02 15:28:23 +00:00
|
|
|
|
2012-06-28 07:29:06 +00:00
|
|
|
class CIpcServerProxy {
|
2012-07-10 01:51:51 +00:00
|
|
|
friend class CIpcClient;
|
|
|
|
|
|
2012-06-28 07:29:06 +00:00
|
|
|
public:
|
2012-07-05 18:05:35 +00:00
|
|
|
CIpcServerProxy(synergy::IStream& stream);
|
2012-06-28 07:29:06 +00:00
|
|
|
virtual ~CIpcServerProxy();
|
2012-07-02 15:28:23 +00:00
|
|
|
|
2012-07-10 01:51:51 +00:00
|
|
|
private:
|
2012-07-02 15:28:23 +00:00
|
|
|
void send(const CIpcMessage& message);
|
|
|
|
|
|
|
|
|
|
void handleData(const CEvent&, void*);
|
2012-07-10 01:51:51 +00:00
|
|
|
CIpcLogLineMessage* parseLogLine();
|
2012-07-02 15:28:23 +00:00
|
|
|
void disconnect();
|
|
|
|
|
|
2012-07-10 01:51:51 +00:00
|
|
|
//! Raised when the client receives a message from the server.
|
|
|
|
|
static CEvent::Type getMessageReceivedEvent();
|
|
|
|
|
|
2012-07-02 15:28:23 +00:00
|
|
|
private:
|
2012-07-05 18:05:35 +00:00
|
|
|
synergy::IStream& m_stream;
|
2012-07-02 15:28:23 +00:00
|
|
|
|
|
|
|
|
static CEvent::Type s_messageReceivedEvent;
|
2012-06-28 07:29:06 +00:00
|
|
|
};
|