JabberID Class Reference

A Jabber ID. More...

#include <xmpputils.h>

Inheritance diagram for JabberID:

String GenObject

List of all members.

Public Member Functions

 JabberID ()
 JabberID (const char *jid)
 JabberID (const char *node, const char *domain, const char *resource=0)
const Stringnode () const
const Stringbare () const
const Stringdomain () const
void domain (const char *d)
const Stringresource () 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


Detailed Description

A Jabber ID.

This class holds a Jabber ID in form "node@domain/resource" or "node@domain"


Constructor & Destructor Documentation

JabberID (  )  [inline]

Constructor

JabberID ( const char *  jid  )  [inline]

Constructor. Constructs a JID from a given string

Parameters:
jid The JID string

JabberID ( const char *  node,
const char *  domain,
const char *  resource = 0 
) [inline]

Constructor. Constructs a JID from user, domain, resource

Parameters:
node The node
domain The domain
resource The resource


Member Function Documentation

const String& node (  )  const [inline]

Get the node part of the JID

Returns:
The node part of the JID

const String& bare (  )  const [inline]

Get the bare JID: "node@domain"

Returns:
The bare JID

Referenced by JabberID::match(), and JabberID::operator==().

const String& domain (  )  const [inline]

Get the domain part of the JID

Returns:
The domain part of the JID

void domain ( const char *  d  )  [inline]

Set the domain part of the JID.

Parameters:
d The new domain part of the JID.

const String& resource (  )  const [inline]

Get the resource part of the JID

Returns:
The resource part of the JID

Referenced by JabberID::match(), and JabberID::operator==().

bool isFull (  )  const [inline]

Check if this is a full JID

Returns:
True 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)

Parameters:
src The JID to match
Returns:
True if matched

References JabberID::bare(), String::null(), and JabberID::resource().

bool operator== ( const JabberID src  )  const [inline]

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

References JabberID::bare(), and JabberID::resource().

bool operator== ( const String src  )  const [inline]

Equality operator. Build a temporary JID and compare with it

Parameters:
src The string to compare with
Returns:
True if equal

Reimplemented from String.

bool operator!= ( const JabberID src  )  const [inline]

Inequality operator

Parameters:
src The JID to compare with
Returns:
True if not equal

bool operator!= ( const String src  )  const [inline]

Inequality operator

Parameters:
src The string to compare with
Returns:
True if not equal

Reimplemented from String.

void resource ( const char *  res  )  [inline]

Set the resource part of the JID

Parameters:
res The new resource part of the JID

void set ( const char *  jid  ) 

Set the data

Parameters:
jid The JID string to assign

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

Set the data

Parameters:
node The node
domain The domain
resource The resource

static bool valid ( const String value  )  [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


Member Data Documentation

Keep the regexp used to check the validity of a string


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 16:17:53 2008 for Yate by  doxygen 1.5.6