#include <CeylanNetwork.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
HostDNSEntry (const std::string &hostName) | |
Creates a DNS description for specified host name. | |
HostDNSEntry (const IPAddress &ip) | |
Creates a DNS description for specified host name. | |
virtual | ~HostDNSEntry () throw () |
Basic virtual destructor. | |
std::string | getOfficialHostName () const |
Returns the official name of this host. | |
std::list< std::string > & | getAliasList () const |
Returns the list of alias for this host. | |
NetworkAddressType | getAddressType () const |
Returns the type of the network address of this entry. | |
std::list< IPAddress * > & | getAddresses () const |
Returns the list of known network address of this entry. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns a user-friendly description of the state of this object. | |
Static Public Member Functions | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Static Public Attributes | |
static const Ceylan::Uint16 | HostNameMaxLength = 256 |
The maximum number of characters of an hostname. | |
Protected Member Functions | |
virtual void | manageHostEntry () |
Helper method shared by constructors. | |
Protected Attributes | |
SystemSpecificHostEntry * | _internalEntry |
The system-specific DNS host entry being used internally. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
HostDNSEntry (const HostDNSEntry &source) | |
Copy constructor made private to ensure that it will never be called. | |
HostDNSEntry & | operator= (const HostDNSEntry &source) |
Assignment operator made private to ensure that it will never be called. |
Definition at line 104 of file CeylanNetwork.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
HostDNSEntry::HostDNSEntry | ( | const std::string & | hostName | ) | [explicit] |
Creates a DNS description for specified host name.
hostName | the name of host to create a DNS description for. |
NetworkException | if the operation is not supported on the platform, or is supported but failed. |
Definition at line 206 of file CeylanNetwork.cc.
References _internalEntry, Ceylan::Network::explainSocketError(), and manageHostEntry().
HostDNSEntry::HostDNSEntry | ( | const IPAddress & | ip | ) | [explicit] |
Creates a DNS description for specified host name.
ip | an IPv4 (or, in the future, IPv6) instance. |
NetworkException | if the operation is not supported on the platform, or is supported but failed. |
Definition at line 276 of file CeylanNetwork.cc.
References _internalEntry, Ceylan::Network::explainSocketError(), Ceylan::Network::IPAddress::getType(), Ceylan::Network::IPv4, manageHostEntry(), and Ceylan::Network::IPAddress::toString().
HostDNSEntry::~HostDNSEntry | ( | ) | throw () [virtual] |
Basic virtual destructor.
Definition at line 343 of file CeylanNetwork.cc.
References _internalEntry.
Ceylan::Network::HostDNSEntry::HostDNSEntry | ( | const HostDNSEntry & | source | ) | [private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
list< IPAddress * > & HostDNSEntry::getAddresses | ( | ) | const |
Returns the list of known network address of this entry.
Definition at line 516 of file CeylanNetwork.cc.
References _internalEntry, getAddressType(), Ceylan::Network::IPv4, Ceylan::Network::IPv6, and Ceylan::toString().
Referenced by Ceylan::Network::ClientStreamSocket::connect(), and toString().
NetworkAddressType HostDNSEntry::getAddressType | ( | ) | const |
Returns the type of the network address of this entry.
Definition at line 455 of file CeylanNetwork.cc.
References _internalEntry, Ceylan::Network::IPv4, and Ceylan::Network::IPv6.
Referenced by getAddresses(), and toString().
list< string > & HostDNSEntry::getAliasList | ( | ) | const |
Returns the list of alias for this host.
Definition at line 400 of file CeylanNetwork.cc.
References _internalEntry.
Referenced by Ceylan::Network::getFQDNFromDNSEntry(), and toString().
string HostDNSEntry::getOfficialHostName | ( | ) | const |
Returns the official name of this host.
NetworkException | if the operation failed. |
Definition at line 370 of file CeylanNetwork.cc.
References _internalEntry.
Referenced by Ceylan::Network::getFQDNFromDNSEntry(), and toString().
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
void HostDNSEntry::manageHostEntry | ( | ) | [protected, virtual] |
Helper method shared by constructors.
Definition at line 709 of file CeylanNetwork.cc.
References _internalEntry.
Referenced by HostDNSEntry().
HostDNSEntry& Ceylan::Network::HostDNSEntry::operator= | ( | const HostDNSEntry & | source | ) | [private] |
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string HostDNSEntry::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Implements Ceylan::TextDisplayable.
Definition at line 642 of file CeylanNetwork.cc.
References dataUtils::e, Ceylan::formatStringList(), getAddresses(), getAddressType(), getAliasList(), getOfficialHostName(), Ceylan::Network::IPv4, and Ceylan::Network::IPv6.
Referenced by Ceylan::Network::getFQDNFromDNSEntry(), and Ceylan::Network::ClientStreamSocket::toString().
SystemSpecificHostEntry* Ceylan::Network::HostDNSEntry::_internalEntry [protected] |
The system-specific DNS host entry being used internally.
Definition at line 245 of file CeylanNetwork.h.
Referenced by getAddresses(), getAddressType(), getAliasList(), getOfficialHostName(), HostDNSEntry(), manageHostEntry(), and ~HostDNSEntry().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
const Ceylan::Uint16 Ceylan::Network::HostDNSEntry::HostNameMaxLength = 256 [static] |
The maximum number of characters of an hostname.
Definition at line 225 of file CeylanNetwork.h.
Referenced by Ceylan::Network::getLocalHostName().