JIDIdentity Class Reference

A JID identity. More...

#include <xmpputils.h>

Inheritance diagram for JIDIdentity:
RefObject GenObject

List of all members.

Public Types

enum  Category {
  Account, Client, Component, Gateway,
  CategoryUnknown
}
enum  Type {
  AccountRegistered, ClientPhone, ComponentGeneric, ComponentPresence,
  GatewayGeneric, TypeUnknown
}

Public Member Functions

 JIDIdentity (Category c, Type t, const char *name=0)
virtual ~JIDIdentity ()
XMLElementtoXML ()
bool fromXML (const XMLElement *element)
virtual const StringtoString () const
virtual void * getObject (const String &name) const
void setName (const char *name)

Static Public Member Functions

static const char * categoryText (Category c)
static Category categoryValue (const char *c)
static const char * typeText (Type t)
static Type typeValue (const char *t)

Detailed Description

A JID identity.

This class holds an identity for a JID


Member Enumeration Documentation

enum Category

JID category enumeration

enum Type

JID type enumeration


Constructor & Destructor Documentation

JIDIdentity ( Category  c,
Type  t,
const char *  name = 0 
) [inline]

Constructor. Build a JID identity

Parameters:
c The JID's category
t The JID's type
name The name of this identity
virtual ~JIDIdentity (  )  [inline, virtual]

Destructor


Member Function Documentation

static const char* categoryText ( Category  c  )  [inline, static]

Lookup for a text associated with a given category

Returns:
The category's name

References TelEngine::lookup().

static Category categoryValue ( const char *  c  )  [inline, static]

Lookup for a value associated with a given category name

Returns:
The category's value

References TelEngine::lookup().

bool fromXML ( const XMLElement element  ) 

Build this identity from an XML element

Returns:
True on succes
virtual void* getObject ( const String name  )  const [inline, virtual]

Get a pointer from this object

Parameters:
name The requested pointer's name
Returns:
Requested pointer or 0

Reimplemented from GenObject.

References GenObject::getObject().

void setName ( const char *  name  )  [inline]

Set the name of this identity

Parameters:
name New identity name
virtual const String& toString (  )  const [inline, virtual]

Get a string representation of this object

Returns:
This object's name

Reimplemented from GenObject.

XMLElement* toXML (  ) 

Build an XML element from this identity

Returns:
A valid XML element
static const char* typeText ( Type  t  )  [inline, static]

Lookup for a text associated with a given category type

Returns:
The category's type name

References TelEngine::lookup().

static Type typeValue ( const char *  t  )  [inline, static]

Lookup for a value associated with a given category type

Returns:
The category's type value

References TelEngine::lookup().


The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:22:38 2010 for Yate by  doxygen 1.6.3