Yate
JIDIdentity Class Reference

A JID identity. More...

#include <xmpputils.h>

Inheritance diagram for JIDIdentity:
GenObject

Public Member Functions

 JIDIdentity (const char *c, const char *t, const char *name=0)
 
 JIDIdentity (XmlElement *identity)
 
XmlElement * toXml () const
 
void fromXml (XmlElement *identity)
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Static Public Member Functions

static XmlElement * createIdentity (const char *category, const char *type, const char *name)
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Public Attributes

String m_category
 
String m_type
 
String m_name
 

Detailed Description

A JID identity.

This class holds an identity for a JID See http://xmpp.org/registrar/disco-categories.html for identity categories and associated types

Constructor & Destructor Documentation

◆ JIDIdentity() [1/2]

JIDIdentity ( const char * c,
const char * t,
const char * name = 0 )
inline

Constructor. Build a JID identity

Parameters
cThe JID's category
tThe JID's type
nameOptional identity (JID) name

◆ JIDIdentity() [2/2]

JIDIdentity ( XmlElement * identity)
inline

Constructor. Build a JID identity from xml

Parameters
identityThe identity element

References fromXml().

Member Function Documentation

◆ createIdentity()

static XmlElement * createIdentity ( const char * category,
const char * type,
const char * name )
static

Create an 'identity' element

Parameters
categoryThe 'category' attribute
typeThe 'type' attribute
nameThe 'name' attribute
Returns
A valid XmlElement pointer

Referenced by toXml().

◆ fromXml()

void fromXml ( XmlElement * identity)

Update this identity from an XML element

Parameters
identityThe source element

Referenced by JIDIdentity().

◆ toXml()

XmlElement * toXml ( ) const
inline

Build an XML element from this identity

Returns
XmlElement pointer or 0 if category or type are empty

References createIdentity().


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