30 #ifndef ECHOLINK_STATION_DATA_INCLUDED 31 #define ECHOLINK_STATION_DATA_INCLUDED 40 #include <netinet/in.h> 51 #include <AsyncIpAddress.h> 160 const std::string&
callsign(
void)
const {
return m_callsign; }
185 Status
status(
void)
const {
return m_status; }
203 const std::string&
time(
void)
const {
return m_time; }
215 const std::string&
description(
void)
const {
return m_description; }
227 int id(
void)
const {
return m_id; }
239 const Async::IpAddress
ip(
void)
const {
return m_ip; }
245 std::string
ipStr(
void)
const {
return m_ip.toString(); }
259 std::string
code(
void)
const {
return m_code; }
270 return m_callsign < rhs.m_callsign;
278 friend std::ostream&
operator<<(std::ostream& os,
285 std::string m_callsign;
288 std::string m_description;
290 Async::IpAddress m_ip;
293 void removeTrailingSpaces(std::string& str);
294 std::string callToCode(
const std::string& call);
static const int MAXID
The maximum length of the id field.
StationData(void)
Default constructor.
void setId(int id)
Set the EchoLink ID number.
const std::string & time(void) const
Get the time.
const std::string & description(void) const
Get the description/location string.
const Async::IpAddress ip(void) const
Get the IP address.
friend std::ostream & operator<<(std::ostream &os, const StationData &station)
Output stream operator.
static const int MAXDESC
The maximum length of a description.
std::string statusStr(void) const
Return the string representation of the status.
static const int MAXCALL
The maximum length of a callsign.
void clear(void)
Clear the contents and reset to default values.
int id(void) const
Get the EchoLink ID number.
A class for representing data for a station.
void setTime(const std::string &time)
Set the time.
static const int MAXIP
The maximum length of the ip address.
std::string ipStr(void) const
Get the string representation of the IP address.
StationData(const StationData &rhs)
Copy constructor.
bool operator<(const StationData &rhs) const
StationData & operator=(const StationData &rhs)
Assignment operator.
void setDescription(const std::string &desc)
Set the description/location string.
static const int MAXDATA
The maximum length of the data field.
void setStatus(Status status)
Set the status.
const std::string & callsign(void) const
Get the callsign.
Status status(void) const
Get the status.
void setCallsign(const std::string &callsign)
Set the callsign.
Namespace to encapsulate EchoLink communication classes.
void setIp(const Async::IpAddress &ip)
Set the IP address.
std::string code(void) const
Get the code representation of the callsign.
void setData(const char *data)
Set station data from a string as represented in the directory server.