2001-11-19 03:33:36 +03:00
|
|
|
#include "XNetwork.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// XNetworkUnavailable
|
|
|
|
//
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
CString
|
|
|
|
XNetworkUnavailable::getWhat() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return format("XNetworkUnavailable", "network library is not available");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// XNetworkFailed
|
|
|
|
//
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
CString
|
|
|
|
XNetworkFailed::getWhat() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return format("XNetworkFailed", "cannot initialize network library");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// XNetworkVersion
|
|
|
|
//
|
|
|
|
|
2002-06-17 17:31:21 +04:00
|
|
|
XNetworkVersion::XNetworkVersion(int major, int minor) throw() :
|
2002-06-11 02:06:45 +04:00
|
|
|
m_major(major),
|
|
|
|
m_minor(minor)
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
int
|
|
|
|
XNetworkVersion::getMajor() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return m_major;
|
|
|
|
}
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
int
|
|
|
|
XNetworkVersion::getMinor() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return m_minor;
|
|
|
|
}
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
CString
|
|
|
|
XNetworkVersion::getWhat() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return format("XNetworkVersion",
|
|
|
|
"unsupported network version %d.%d",
|
|
|
|
m_major, m_minor);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// XNetworkFunctionUnavailable
|
|
|
|
//
|
|
|
|
|
|
|
|
XNetworkFunctionUnavailable::XNetworkFunctionUnavailable(
|
2002-06-17 17:31:21 +04:00
|
|
|
const char* name) throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
try {
|
|
|
|
m_name = name;
|
|
|
|
}
|
|
|
|
catch (...) {
|
|
|
|
// ignore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-06-11 02:06:45 +04:00
|
|
|
CString
|
|
|
|
XNetworkFunctionUnavailable::getWhat() const throw()
|
2001-11-19 03:33:36 +03:00
|
|
|
{
|
|
|
|
return format("XNetworkFunctionUnavailable",
|
|
|
|
"missing network function %s",
|
|
|
|
m_name.c_str());
|
|
|
|
}
|