Fawkes API
Fawkes Development Version
|
Host information. More...
#include <utils/system/hostinfo.h>
Public Member Functions | |
HostInfo () | |
Constructor. More... | |
~HostInfo () | |
Destructor. More... | |
const char * | name () |
Get full hostname. More... | |
const char * | short_name () |
Get short hostname (up to first dot). More... | |
const char * | domain () |
Get domain name (after first dot or none if no dot in name). More... | |
const char * | arch () |
Get architecture (like i686 or x86_64). More... | |
const char * | sys_name () |
Get system name (like Linux). More... | |
const char * | sys_release () |
Get system release (kernel version on Linux). More... | |
const char * | sys_version () |
Get system version (build date on Linux). More... | |
void | update () |
Update information. More... | |
Host information.
This class provides access to basic system information like hostname, domain name, architecture and system information. It's basically a C++ wrapper to the uname system call.
Definition at line 31 of file hostinfo.h.
fawkes::HostInfo::HostInfo | ( | ) |
fawkes::HostInfo::~HostInfo | ( | ) |
Destructor.
Definition at line 61 of file hostinfo.cpp.
const char * fawkes::HostInfo::arch | ( | ) |
Get architecture (like i686 or x86_64).
Definition at line 134 of file hostinfo.cpp.
const char * fawkes::HostInfo::domain | ( | ) |
Get domain name (after first dot or none if no dot in name).
Definition at line 124 of file hostinfo.cpp.
const char * fawkes::HostInfo::name | ( | ) |
Get full hostname.
Definition at line 104 of file hostinfo.cpp.
Referenced by fawkes::NetworkNameResolver::hostname().
const char * fawkes::HostInfo::short_name | ( | ) |
Get short hostname (up to first dot).
Definition at line 114 of file hostinfo.cpp.
Referenced by WebviewHeaderGenerator::html_header(), ROSNodeThread::init(), fawkes::SQLiteConfiguration::load(), WebviewThread::loop(), fawkes::WebPageReply::pack(), and fawkes::NetworkNameResolver::short_hostname().
const char * fawkes::HostInfo::sys_name | ( | ) |
const char * fawkes::HostInfo::sys_release | ( | ) |
Get system release (kernel version on Linux).
Definition at line 154 of file hostinfo.cpp.
const char * fawkes::HostInfo::sys_version | ( | ) |
Get system version (build date on Linux).
Definition at line 164 of file hostinfo.cpp.
void fawkes::HostInfo::update | ( | ) |
Update information.
Gathers the information again.
Definition at line 73 of file hostinfo.cpp.
Referenced by fawkes::NetworkNameResolver::flush_cache(), and HostInfo().