Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

JID Class Reference

An abstraction of a JID. More...

#include <jid.h>

List of all members.

Public Member Functions

 JID ()
 JID (const std::string &jid)
 ~JID ()
void setJID (const std::string &jid)
const std::string & full () const
const std::string & bare () const
JID bareJID () const
GLOOX_DEPRECATED JID fullJID () const
void setUsername (const std::string &username)
void setServer (const std::string &server)
void setResource (const std::string &resource)
const std::string & username () const
const std::string & server () const
const std::string & serverRaw () const
const std::string & resource () const
GLOOX_DEPRECATED bool empty () const
bool operator== (const JID &right) const
bool operator!= (const JID &right) const
 operator bool () const


Detailed Description

An abstraction of a JID.

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.4

Definition at line 30 of file jid.h.


Constructor & Destructor Documentation

JID  )  [inline]
 

Constructs an empty JID.

Definition at line 37 of file jid.h.

JID const std::string &  jid  )  [inline]
 

Constructs a new JID from a string.

Parameters:
jid The string containing the JID.

Definition at line 43 of file jid.h.

~JID  )  [inline]
 

Destructor.

Definition at line 48 of file jid.h.


Member Function Documentation

const std::string& bare  )  const [inline]
 

Returns the bare (prepped) JID (user@host).

Returns:
The bare JID.

Definition at line 66 of file jid.h.

JID bareJID  )  const [inline]
 

Creates and returns a JID from this JID's node and server parts.

Returns:
The bare JID.
Since:
0.9

Definition at line 73 of file jid.h.

GLOOX_DEPRECATED bool empty  )  const [inline]
 

A JID is empty as long as no server is set.

Returns:
True if the JID is empty, false otherwise.
Deprecated:
Use operator bool() instead

Definition at line 130 of file jid.h.

const std::string& full  )  const [inline]
 

Returns the full (prepped) JID (user@host/resource).

Returns:
The full JID.

Definition at line 60 of file jid.h.

GLOOX_DEPRECATED JID fullJID  )  const [inline]
 

Creates and returns a JID from this JID's node, server and resource parts.

Returns:
The full JID.
Since:
0.9
Deprecated:

Definition at line 81 of file jid.h.

operator bool  )  const [inline]
 

Returns true if the Tag is valid, false otherwise.

Definition at line 147 of file jid.h.

bool operator!= const JID right  )  const [inline]
 

Compares two JIDs.

Parameters:
right The second JID.

Definition at line 142 of file jid.h.

bool operator== const JID right  )  const [inline]
 

Compares two JIDs.

Parameters:
right The second JID.

Definition at line 136 of file jid.h.

const std::string& resource  )  const [inline]
 

Returns the prepped resource.

Returns:
The current resource.

Definition at line 123 of file jid.h.

const std::string& server  )  const [inline]
 

Returns the prepped server name.

Returns:
The current server.

Definition at line 111 of file jid.h.

const std::string& serverRaw  )  const [inline]
 

Returns the raw (unprepped) server name.

Returns:
The raw server name.

Definition at line 117 of file jid.h.

void setJID const std::string &  jid  ) 
 

Sets the JID from a string.

Parameters:
jid The string containing the JID.

Definition at line 21 of file jid.cpp.

void setResource const std::string &  resource  ) 
 

Sets the resource.

Parameters:
resource The new resource.

Definition at line 74 of file jid.cpp.

void setServer const std::string &  server  ) 
 

Sets the server.

Parameters:
server The new server.

Definition at line 67 of file jid.cpp.

void setUsername const std::string &  username  ) 
 

Sets the username.

Parameters:
username The new username.

Definition at line 61 of file jid.cpp.

const std::string& username  )  const [inline]
 

Returns the prepped username.

Returns:
The current username.

Definition at line 105 of file jid.h.


The documentation for this class was generated from the following files:
Generated on Sat Mar 22 09:32:27 2008 for gloox by  doxygen 1.4.1