jabberd14 1.6.2
Public Member Functions
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:
jidthe initial address value
Exceptions:
std::invalid_argumentif the jid cannot be prepared

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


Member Function Documentation

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:
otherjidthe other jabberid to compare with
compare_resourcetrue if the resource part should get compared
compare_nodetrue if the node part should get compared
compare_domaintrue if the domain part should get compared
Returns:
true if the compared parts of the jabberid instances are matching

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

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

get the textual representation of a jabberid

Returns:
the textual representation

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

const Glib::ustring& xmppd::jabberid::get_domain ( ) [inline]
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(), deliver(), js_user(), and xdb_file_phandler().

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

get the resource part of a jabberid

Returns:
the resource part, empty string if no resource

Referenced by _dialback_miod_hash_cleanup(), _js_jidscanner(), _js_routed_packet(), dialback_in_verify(), dialback_out_connection(), dialback_out_read(), js_sc_session_new(), js_session_new(), and xdb_file_phandler().

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().

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

returns if a jabberid has a node

Returns:
true if the jabberid has a node

Referenced by _js_authreg_register(), _js_jidscanner(), deliver(), dialback_in_read_db(), js_authreg(), js_deliver(), js_islocal(), js_session_new(), js_user(), and xdb_file_phandler().

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:
otherjidthe other jabberid to compare with
Returns:
true if both jabberid instances represent the same JIDs, false else

References compare().

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

sets the domain part of a jabberid

Parameters:
domainthe domain to set
Exceptions:
std::invalid_argumentif the domain cannot be prepared

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_domain().

Referenced by jabberid().

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

sets the node part of a jabberid

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

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_node().

Referenced by jabberid().

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

sets the resource part of a jabberid

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

Reimplemented in xmppd::jabberid_pool.

References xmppd::preparation_cache::prepare_resource().

Referenced by get_user(), and jabberid().


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