Yate
|
A Jabber ID. More...
#include <xmpputils.h>
Public Member Functions | |
JabberID () | |
JabberID (const char *jid) | |
JabberID (const String &jid) | |
JabberID (const String *jid) | |
JabberID (const char *node, const char *domain, const char *resource=0) | |
JabberID (const JabberID &src) | |
bool | valid () const |
const String & | node () const |
const String & | bare () const |
const String & | domain () const |
void | domain (const char *d) |
const String & | resource () const |
bool | isFull () const |
void | clear () |
bool | match (const JabberID &src) const |
JabberID & | operator= (const JabberID &src) |
JabberID & | operator= (const String &src) |
JabberID & | operator= (const String *src) |
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 const JabberID & | empty () |
static bool | valid (const String &value) |
Static Public Attributes | |
static Regexp | s_regExpValid |
A Jabber ID.
This class holds a Jabber ID
JabberID | ( | ) | [inline] |
Constructor
JabberID | ( | const char * | jid | ) | [inline] |
Constructor. Constructs a JID from a given string
jid | The JID string |
Constructor. Constructs a JID from a given string
jid | The JID string |
Constructor. Constructs a JID from a given string
jid | The JID string |
References TelEngine::c_safe().
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 |
Get the bare JID: "node@domain"
Referenced by JabberID::match(), and JabberID::operator==().
void clear | ( | ) | [inline] |
Get the domain part of the JID
void domain | ( | const char * | d | ) | [inline] |
Set the domain part of the JID.
d | The new domain part of the JID. |
Get an empty JabberID
Reimplemented from String.
Referenced by JBEngine::setExiting().
bool isFull | ( | ) | const [inline] |
Check if this is a full JID
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().
bool operator!= | ( | const JabberID & | src | ) | const [inline] |
Inequality operator
src | The JID to compare with |
bool operator!= | ( | const String & | src | ) | const [inline] |
Inequality operator
src | The string to compare with |
Reimplemented from String.
Assignement operator from String pointer
src | The string |
Reimplemented from String.
References TelEngine::c_safe().
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().
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==().
Get the resource part of the JID
Referenced by JabberID::match(), and JabberID::operator==().
void resource | ( | const char * | res | ) | [inline] |
Set the resource part of the JID
res | The new resource part of the JID |
void set | ( | const char * | jid | ) |
void set | ( | const char * | node, |
const char * | domain, | ||
const char * | resource = 0 |
||
) |
Set the data
node | The node |
domain | The domain |
resource | The resource |
bool valid | ( | ) | const [inline] |
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