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