xmppd::jabberid Class Reference

#include <jabberdlib.h>

Inheritance diagram for xmppd::jabberid:

xmppd::jabberid_pool

Public Member Functions

 jabberid (const Glib::ustring &jid)
void set_node (const Glib::ustring &node)
void set_domain (const Glib::ustring &domain)
void set_resource (const Glib::ustring &resource)
const Glib::ustring & get_node ()
bool has_node ()
const Glib::ustring & get_domain ()
const Glib::ustring & get_resource ()
bool has_resource ()
bool operator== (const jabberid &otherjid)
bool compare (const jabberid &otherjid, bool compare_resource=false, bool compare_node=true, bool compare_domain=true)
jabberid get_user ()
Glib::ustring full ()

Detailed Description

The jabberid class represents a jid address on the xmpp network

Constructor & Destructor Documentation

xmppd::jabberid::jabberid ( const Glib::ustring &  jid  ) 

create a new jabberid instance initializing the address by parsing a string

Parameters:
jid the initial address value
Exceptions:
std::invalid_argument if the jid cannot be prepared

References set_domain(), set_node(), and set_resource().


Member Function Documentation

void xmppd::jabberid::set_node ( const Glib::ustring &  node  ) 

sets the node part of a jabberid

Parameters:
node the node to set (empty string to clear node)
Exceptions:
std::invalid_argument if the node cannot be prepared

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_node().

Referenced by jabberid(), and xmppd::jabberid_pool::set_node().

void xmppd::jabberid::set_domain ( const Glib::ustring &  domain  ) 

sets the domain part of a jabberid

Parameters:
domain the domain to set
Exceptions:
std::invalid_argument if the domain cannot be prepared

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_domain().

Referenced by jabberid(), and xmppd::jabberid_pool::set_domain().

void xmppd::jabberid::set_resource ( const Glib::ustring &  resource  ) 

sets the resource part of a jabberid

Parameters:
resource the resource to set (empty string to clear resource)
Exceptions:
std::invalid_argument if the resource cannot be prepared

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_resource().

Referenced by get_user(), jabberid(), and xmppd::jabberid_pool::set_resource().

const Glib::ustring& xmppd::jabberid::get_node (  )  [inline]

get the node part of a jabberid

Returns:
the node part, empty string if no node

Referenced by _js_jidscanner(), _js_users_del(), js_user(), and xdb_file_phandler().

bool xmppd::jabberid::has_node (  )  [inline]

const Glib::ustring& xmppd::jabberid::get_domain (  )  [inline]

const Glib::ustring& xmppd::jabberid::get_resource (  )  [inline]

bool xmppd::jabberid::has_resource (  )  [inline]

returns if a jabberid has a resource

Returns:
true if the jabberid has a resource

Referenced by _js_jidscanner(), _js_routed_error_packet(), dialback_in_read_db(), js_authreg(), js_session_new(), and xdb_file_phandler().

bool xmppd::jabberid::operator== ( const jabberid otherjid  ) 

compare jabberid instance with another instance

Parameters:
otherjid the other jabberid to compare with
Returns:
true if both jabberid instances represent the same JIDs, false else

References compare().

bool xmppd::jabberid::compare ( const jabberid otherjid,
bool  compare_resource = false,
bool  compare_node = true,
bool  compare_domain = true 
)

compare some parts of two jabberid instances

Parameters:
otherjid the other jabberid to compare with
compare_resource true if the resource part should get compared
compare_node true if the node part should get compared
compare_domain true if the domain part should get compared
Returns:
true if the compared parts of the jabberid instances are matching

References domain, node, and resource.

Referenced by jid_cmpx(), and operator==().

jabberid xmppd::jabberid::get_user (  ) 

get a copy of the jid without the resource

Returns:
new jabberid instance representing the same jabberid but without resource

References set_resource().

Referenced by jid_user_pool().

Glib::ustring xmppd::jabberid::full (  ) 

get the textual representation of a jabberid

Returns:
the textual representation

Referenced by xmppd::jabberid_pool::full_pooled().


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

Generated on Wed Sep 10 01:59:48 2008 for jabberd14 by  doxygen 1.5.5