2002-08-02 19:57:46 +00:00
|
|
|
/*
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
|
|
|
* Copyright (C) 2002 Chris Schoeneman
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2002-07-09 21:22:31 +00:00
|
|
|
#ifndef ISERVER_H
|
|
|
|
#define ISERVER_H
|
|
|
|
|
2002-07-13 22:00:38 +00:00
|
|
|
#include "IInterface.h"
|
2002-07-09 21:22:31 +00:00
|
|
|
#include "ClipboardTypes.h"
|
|
|
|
#include "CString.h"
|
|
|
|
|
2002-07-10 14:15:17 +00:00
|
|
|
class CClientInfo;
|
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Server interface
|
|
|
|
/*!
|
|
|
|
This interface defines the methods necessary for clients to
|
|
|
|
communicate with the server. Note that the methods in this
|
|
|
|
interface are similar to the methods in IScreenReceiver but
|
|
|
|
include extra parameters. This interface is suitable for
|
|
|
|
server-side client proxies. Client-side objects should use
|
|
|
|
the IScreenReceiver interface since the extra parameters are
|
|
|
|
meaningless on the client-side.
|
|
|
|
*/
|
2002-07-13 22:00:38 +00:00
|
|
|
class IServer : public IInterface {
|
2002-07-09 21:22:31 +00:00
|
|
|
public:
|
2002-07-29 16:07:26 +00:00
|
|
|
//! @name manipulators
|
|
|
|
//@{
|
|
|
|
|
|
|
|
//! Notify of error
|
|
|
|
/*!
|
|
|
|
Called when the screen is unexpectedly closing. This implies that
|
|
|
|
the screen is no longer usable and that the program should close
|
|
|
|
the screen and probably terminate.
|
|
|
|
*/
|
2002-07-16 16:52:26 +00:00
|
|
|
virtual void onError() = 0;
|
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Notify of client screen change
|
|
|
|
/*!
|
|
|
|
Called when the client's info has changed.
|
|
|
|
*/
|
2002-07-10 14:15:17 +00:00
|
|
|
virtual void onInfoChanged(const CString& clientName,
|
|
|
|
const CClientInfo&) = 0;
|
2002-07-09 21:22:31 +00:00
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Notify of clipboad grab
|
|
|
|
/*!
|
|
|
|
Called when the clipboard was grabbed by another program and,
|
|
|
|
therefore, we no longer own it. Returns true if the grab was
|
|
|
|
honored, false otherwise.
|
|
|
|
*/
|
2002-07-10 14:15:17 +00:00
|
|
|
virtual bool onGrabClipboard(const CString& clientName,
|
|
|
|
ClipboardID, UInt32 seqNum) = 0;
|
2002-07-09 21:22:31 +00:00
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Notify of new clipboard data
|
|
|
|
/*!
|
|
|
|
Called when the data on the clipboard has changed because some
|
2002-07-30 14:59:36 +00:00
|
|
|
other program has changed it. \c data has the marshalled clipboard
|
|
|
|
data.
|
2002-07-29 16:07:26 +00:00
|
|
|
*/
|
2002-07-09 21:22:31 +00:00
|
|
|
virtual void onClipboardChanged(ClipboardID,
|
|
|
|
UInt32 seqNum, const CString& data) = 0;
|
2002-07-29 16:07:26 +00:00
|
|
|
|
|
|
|
//@}
|
2002-07-09 21:22:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|