deskflow/src/lib/ipc/CIpcServerProxy.h

48 lines
1.3 KiB
C
Raw Normal View History

2012-06-28 07:29:06 +00:00
/*
* synergy -- mouse and keyboard sharing utility
* 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"
namespace synergy { class IStream; }
2012-07-02 15:28:23 +00:00
class CIpcMessage;
class CIpcLogLineMessage;
2012-07-02 15:28:23 +00:00
2012-06-28 07:29:06 +00:00
class CIpcServerProxy {
friend class CIpcClient;
2012-06-28 07:29:06 +00:00
public:
CIpcServerProxy(synergy::IStream& stream);
2012-06-28 07:29:06 +00:00
virtual ~CIpcServerProxy();
2012-07-02 15:28:23 +00:00
private:
2012-07-02 15:28:23 +00:00
void send(const CIpcMessage& message);
void handleData(const CEvent&, void*);
CIpcLogLineMessage* parseLogLine();
2012-07-02 15:28:23 +00:00
void disconnect();
//! Raised when the client receives a message from the server.
static CEvent::Type getMessageReceivedEvent();
2012-07-02 15:28:23 +00:00
private:
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
};