# class JabberID | A Jabber ID. More...
Full name | `TelEngine::JabberID`
Definition | `#include <libs/yjabber/xmpputils.h>`
Inherits | TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline JabberID ()
- inline JabberID (const char* jid)
- inline JabberID (const String& jid)
- inline JabberID (const String* jid)
- inline JabberID (const char* node, const char* domain, const char* resource = 0)
- inline JabberID (const JabberID& src)
- inline bool valid () const
- inline const String& node () const
- inline const String& bare () const
- inline const String& domain () const
- inline void domain (const char* d)
- inline const String& resource () const
- inline bool isFull () const
- inline void clear ()
- inline bool match (const JabberID& src) const
- JabberID& operator= (const JabberID& src)
- inline JabberID& operator= (const String& src)
- inline JabberID& operator= (const String* src)
- inline bool operator== (const JabberID& src) const
- inline bool operator== (const String& src) const
- inline bool operator!= (const JabberID& src) const
- inline bool operator!= (const String& src) const
- inline void resource (const char* res)
- void set (const char* jid)
- void set (const char* node, const char* domain, const char* resource = 0)

#### Public Static Methods

- static const JabberID& empty ()
- static bool valid (const String& value)

#### Public Members

- static Regexp s_regExpValid

## Detailed Description

This class holds a Jabber ID

inline JabberID () | ### JabberID

Constructor

inline JabberID (const char* jid) | ### JabberID

Constructor. Constructs a JID from a given string

Parameters:

jid | The JID string

inline JabberID (const String& jid) | ### JabberID

Constructor. Constructs a JID from a given string

Parameters:

jid | The JID string

inline JabberID (const String* jid) | ### JabberID

Constructor. Constructs a JID from a given string

Parameters:

jid | The JID string

inline JabberID (const char* node, const char* domain, const char* resource = 0) | ### JabberID

Constructor. Constructs a JID from user, domain, resource

Parameters:

node | The node
domain | The domain
resource | The resource

inline JabberID (const JabberID& src) | ### JabberID

Copy constructor

Parameters:

src | Source Jabber ID

inline bool valid () | ### valid

[const]

Check if this is a valid JID

Returns: True if this JID is a valid one

inline const String& node () | ### node

[const]

Get the node part of the JID

Returns: The node part of the JID

inline const String& bare () | ### bare

[const]

Get the bare JID: "node@domain"

Returns: The bare JID

inline const String& domain () | ### domain

[const]

Get the domain part of the JID

Returns: The domain part of the JID

inline void domain (const char* d) | ### domain

Set the domain part of the JID.

Parameters:

d | The new domain part of the JID.

inline const String& resource () | ### resource

[const]

Get the resource part of the JID

Returns: The resource part of the JID

inline bool isFull () | ### isFull

[const]

Check if this is a full JID

Returns: True if this is a full JID

inline void clear () | ### clear

Clear content

Reimplemented from String.

inline bool match (const JabberID& src) | ### match

[const]

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)

Parameters:

src | The JID to match

Returns: True if matched

JabberID& operator= (const JabberID& src) | ### operator=

Assignement operator from JabberID

Parameters:

src | The JID to copy from

Returns: This object

Reimplemented from String.

inline JabberID& operator= (const String& src) | ### operator=

Assignement operator from String

Parameters:

src | The string

Returns: This object

Reimplemented from String.

inline JabberID& operator= (const String* src) | ### operator=

Assignement operator from String pointer

Parameters:

src | The string

Returns: This object

Reimplemented from String.

inline bool operator== (const JabberID& src) | ### operator==

[const]

Equality operator. Do a case senitive resource comparison and a case insensitive bare jid comparison

Parameters:

src | The JID to compare with

Returns: True if equal

Reimplemented from String.

inline bool operator== (const String& src) | ### operator==

[const]

Equality operator. Build a temporary JID and compare with it

Parameters:

src | The string to compare with

Returns: True if equal

Reimplemented from String.

inline bool operator!= (const JabberID& src) | ### operator!=

[const]

Inequality operator

Parameters:

src | The JID to compare with

Returns: True if not equal

Reimplemented from String.

inline bool operator!= (const String& src) | ### operator!=

[const]

Inequality operator

Parameters:

src | The string to compare with

Returns: True if not equal

Reimplemented from String.

inline void resource (const char* res) | ### resource

Set the resource part of the JID

Parameters:

res | The new resource part of the JID

void set (const char* jid) | ### set

Set the data

Parameters:

jid | The JID string to assign

void set (const char* node, const char* domain, const char* resource = 0) | ### set

Set the data

Parameters:

node | The node
domain | The domain
resource | The resource

const JabberID& empty () | ### empty

[static]

Get an empty JabberID

Returns: A global empty JabberID

Reimplemented from String.

bool valid (const String& value) | ### valid

[static]

Check if the given string contains valid characters

Parameters:

value | The string to check

Returns: True if value is valid or 0. False if value is a non empty invalid string

static Regexp s_regExpValid | ### s_regExpValid

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.