Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

jabberoo::JID Class Reference

JabberIDs consist of a username, a server (host), and a resource. More...

#include <JID.hh>

List of all members.

Static Public Member Functions

std::string getResource (const std::string &jid)
 Get the resource part of a JabberID.

std::string getUserHost (const std::string &jid)
 Get the username and the server (host) from a JabberID.

std::string getHost (const std::string &jid)
 Get the server from a JabberID.

std::string getUser (const std::string &jid)
 Get the username from a JabberID.

bool isValidUser (const std::string &user)
 Determine whether the username is valid.

bool isValidHost (const std::string &host)
 Determine whether the hostname is valid.

int compare (const std::string &ljid, const std::string &rjid)
 Compare two JabberIDs.


Detailed Description

JabberIDs consist of a username, a server (host), and a resource.

This class provides functionality for obtaining the strings of the pieces. Currently the format is user/resource.

Definition at line 45 of file JID.hh.


Member Function Documentation

int jabberoo::JID::compare const std::string &    ljid,
const std::string &    rjid
[static]
 

Compare two JabberIDs.

Since the username and server (host) are not case sensitive, but the resource is, this function is available to compare JabberIDs.

Returns:
The result of a compare, similar to strcompare

Definition at line 113 of file jabberoo-JID.cpp.

std::string jabberoo::JID::getHost const std::string &    jid [static]
 

Get the server from a JabberID.

Returns:
The server (host).

Definition at line 56 of file jabberoo-JID.cpp.

std::string jabberoo::JID::getResource const std::string &    jid [static]
 

Get the resource part of a JabberID.

Returns:
the resource.

Definition at line 35 of file jabberoo-JID.cpp.

std::string jabberoo::JID::getUser const std::string &    jid [static]
 

Get the username from a JabberID.

Returns:
The username.

Definition at line 71 of file jabberoo-JID.cpp.

std::string jabberoo::JID::getUserHost const std::string &    jid [static]
 

Get the username and the server (host) from a JabberID.

Returns:
The username and server in the form user

Definition at line 45 of file jabberoo-JID.cpp.

bool jabberoo::JID::isValidHost const std::string &    host [static]
 

Determine whether the hostname is valid.

Returns:
true if the hostname is valid.

Definition at line 97 of file jabberoo-JID.cpp.

bool jabberoo::JID::isValidUser const std::string &    user [static]
 

Determine whether the username is valid.

Returns:
true if the username is valid.

Definition at line 80 of file jabberoo-JID.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 13:31:52 2003 for jabberoo by doxygen1.3-rc3