#include <xmpputils.h>
Public Member Functions | |
JabberID () | |
JabberID (const char *jid) | |
JabberID (const char *node, const char *domain, const char *resource=0) | |
const String & | node () const |
const String & | bare () const |
const String & | domain () const |
void | domain (const char *d) |
const String & | resource () const |
bool | isFull () const |
bool | match (const JabberID &src) const |
bool | operator== (const JabberID &src) const |
bool | operator== (const String &src) const |
bool | operator!= (const JabberID &src) const |
bool | operator!= (const String &src) const |
void | resource (const char *res) |
void | set (const char *jid) |
void | set (const char *node, const char *domain, const char *resource=0) |
Static Public Member Functions | |
static bool | valid (const String &value) |
Static Public Attributes | |
static Regexp | s_regExpValid |
This class holds a Jabber ID in form "node@domain/resource" or "node@domain"
JabberID | ( | ) | [inline] |
Constructor
JabberID | ( | const char * | jid | ) | [inline] |
Constructor. Constructs a JID from a given string
jid | The JID string |
JabberID | ( | const char * | node, | |
const char * | domain, | |||
const char * | resource = 0 | |||
) | [inline] |
Constructor. Constructs a JID from user, domain, resource
node | The node | |
domain | The domain | |
resource | The resource |
const String& bare | ( | ) | const [inline] |
Get the bare JID: "node@domain"
Referenced by JabberID::match(), and JabberID::operator==().
void domain | ( | const char * | d | ) | [inline] |
Set the domain part of the JID.
d | The new domain part of the JID. |
const String& domain | ( | ) | const [inline] |
Get the domain part of the JID
bool isFull | ( | ) | const [inline] |
Check if this is a full JID
bool match | ( | const JabberID & | src | ) | const [inline] |
Try to match another JID to this one. If src has a resource compare it too (case sensitive). Otherwise compare just the bare JID (case insensitive)
src | The JID to match |
References JabberID::bare(), String::null(), and JabberID::resource().
const String& node | ( | ) | const [inline] |
Get the node part of the JID
bool operator!= | ( | const String & | src | ) | const [inline] |
Inequality operator
src | The string to compare with |
Reimplemented from String.
bool operator!= | ( | const JabberID & | src | ) | const [inline] |
Inequality operator
src | The JID to compare with |
bool operator== | ( | const String & | src | ) | const [inline] |
Equality operator. Build a temporary JID and compare with it
src | The string to compare with |
Reimplemented from String.
References JabberID::operator==().
Referenced by JabberID::operator==().
bool operator== | ( | const JabberID & | src | ) | const [inline] |
Equality operator. Do a case senitive resource comparison and a case insensitive bare jid comparison
src | The JID to compare with |
References JabberID::bare(), and JabberID::resource().
void resource | ( | const char * | res | ) | [inline] |
Set the resource part of the JID
res | The new resource part of the JID |
const String& resource | ( | ) | const [inline] |
Get the resource part of the JID
Referenced by JabberID::match(), and JabberID::operator==().
void set | ( | const char * | node, | |
const char * | domain, | |||
const char * | resource = 0 | |||
) |
Set the data
node | The node | |
domain | The domain | |
resource | The resource |
void set | ( | const char * | jid | ) |
Set the data
jid | The JID string to assign |
static bool valid | ( | const String & | value | ) | [static] |
Check if the given string contains valid characters
value | The string to check |
Regexp s_regExpValid [static] |
Keep the regexp used to check the validity of a string