Eris
1.3.21
Main Page
Related Pages
Classes
Files
File List
Eris
ServerInfo.h
1
#ifndef ERIS_SERVER_INFO_H
2
#define ERIS_SERVER_INFO_H
3
4
#include <Atlas/Objects/ObjectsFwd.h>
5
6
#include <string>
7
8
namespace
Eris {
9
10
class
Meta;
11
21
class
ServerInfo
22
{
23
public
:
24
ServerInfo
();
25
26
typedef
enum
{
27
INVALID,
28
QUERYING,
29
VALID,
30
TIMEOUT
31
}
Status
;
32
33
// bookmark / favourites functionality
34
35
// accessors
36
Status
getStatus()
const
37
{
return
m_status; }
38
42
const
std::string&
getHostname
()
const
43
{
return
_host; }
44
46
const
std::string&
getServername
()
const
47
{
return
_name; }
48
50
const
std::string&
getRuleset
()
const
51
{
return
_ruleset; }
52
54
const
std::string&
getServer
()
const
55
{
return
_server; }
56
58
const
std::string&
getVersion
()
const
59
{
return
m_version; }
60
62
const
std::string&
getBuildDate
()
const
63
{
return
m_buildDate; }
64
66
int
getNumClients
()
const
67
{
return
_clients; }
68
72
int
getPing
()
const
73
{
return
_ping; }
74
76
double
getUptime
()
const
77
{
return
_uptime; }
78
80
long
getEntities
()
const
81
{
return
_entities; }
82
83
protected
:
84
friend
class
Meta
;
85
friend
class
Connection
;
86
88
ServerInfo
(
const
std::string &host);
89
92
void
processServer
(
const
Atlas::Objects::Entity::RootEntity &svr);
93
94
void
setPing(
int
p);
95
void
setStatus(
Status
s);
96
97
private
:
98
Status
m_status;
99
100
std::string _host;
101
102
std::string _name,
103
_ruleset,
104
_server;
105
106
int
_clients;
107
int
_ping;
108
long
_entities;
109
110
double
_uptime;
111
112
std::string m_version,
113
m_buildDate;
114
};
115
116
}
// of namespace Eris
117
118
#endif
119
Generated by
1.8.4