2002-08-02 23:57:46 +04: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.
|
|
|
|
*/
|
|
|
|
|
2001-11-19 03:33:36 +03:00
|
|
|
#ifndef XNETWORK_H
|
|
|
|
#define XNETWORK_H
|
|
|
|
|
|
|
|
#include "XBase.h"
|
2002-06-11 02:06:45 +04:00
|
|
|
#include "CString.h"
|
2001-11-19 03:33:36 +03:00
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Generic network exception
|
|
|
|
/*!
|
|
|
|
Network exceptions are thrown when initializing the network subsystem
|
|
|
|
and not during normal network use.
|
|
|
|
*/
|
2001-11-19 03:33:36 +03:00
|
|
|
class XNetwork : public XBase { };
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Network subsystem not available exception
|
|
|
|
/*!
|
|
|
|
Thrown when the network subsystem is unavailable, typically because
|
|
|
|
the necessary shared library is unavailable.
|
|
|
|
*/
|
2001-11-19 03:33:36 +03:00
|
|
|
class XNetworkUnavailable : public XNetwork {
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-11-19 03:33:36 +03:00
|
|
|
// XBase overrides
|
|
|
|
virtual CString getWhat() const throw();
|
|
|
|
};
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Network subsystem failed exception
|
|
|
|
/*!
|
|
|
|
Thrown when the network subsystem cannot be initialized.
|
|
|
|
*/
|
2001-11-19 03:33:36 +03:00
|
|
|
class XNetworkFailed : public XNetwork {
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-11-19 03:33:36 +03:00
|
|
|
// XBase overrides
|
|
|
|
virtual CString getWhat() const throw();
|
|
|
|
};
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Network subsystem vesion unsupported exception
|
|
|
|
/*!
|
|
|
|
Thrown when the network subsystem has a version incompatible with
|
|
|
|
what's expected.
|
|
|
|
*/
|
2001-11-19 03:33:36 +03:00
|
|
|
class XNetworkVersion : public XNetwork {
|
2002-04-29 18:40:01 +04:00
|
|
|
public:
|
2001-11-19 03:33:36 +03:00
|
|
|
XNetworkVersion(int major, int minor) throw();
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! @name accessors
|
|
|
|
//@{
|
2001-11-19 03:33:36 +03:00
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Get the network subsystem's major version
|
2001-11-19 03:33:36 +03:00
|
|
|
int getMajor() const throw();
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Get the network subsystem's minor version
|
2001-11-19 03:33:36 +03:00
|
|
|
int getMinor() const throw();
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//@}
|
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-11-19 03:33:36 +03:00
|
|
|
// XBase overrides
|
|
|
|
virtual CString getWhat() const throw();
|
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-11-19 03:33:36 +03:00
|
|
|
int m_major;
|
|
|
|
int m_minor;
|
|
|
|
};
|
|
|
|
|
2002-07-28 23:06:52 +04:00
|
|
|
//! Network subsystem incomplete exception
|
|
|
|
/*!
|
|
|
|
Thrown when the network subsystem is missing an expected and required
|
|
|
|
function.
|
|
|
|
*/
|
2001-11-19 03:33:36 +03:00
|
|
|
class XNetworkFunctionUnavailable : public XNetwork {
|
2002-04-29 18:40:01 +04:00
|
|
|
public:
|
2001-11-19 03:33:36 +03:00
|
|
|
XNetworkFunctionUnavailable(const char* name) throw();
|
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-11-19 03:33:36 +03:00
|
|
|
// XBase overrides
|
|
|
|
virtual CString getWhat() const throw();
|
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-11-19 03:33:36 +03:00
|
|
|
CString m_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|