#include <jid.h>
|
static std::string | escapeNode (const std::string &node) |
|
static std::string | unescapeNode (const std::string &node) |
|
An abstraction of a JID.
- Author
- Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
- Since
- 0.4
Definition at line 30 of file jid.h.
◆ JID() [1/2]
Constructs an empty JID.
Definition at line 37 of file jid.h.
◆ JID() [2/2]
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()
Destructor.
Definition at line 48 of file jid.h.
◆ bare()
const std::string& bare |
( |
| ) |
const |
|
inline |
Returns the bare (prepped) JID (user@host).
- Returns
- The bare JID.
Definition at line 67 of file jid.h.
◆ bareJID()
Creates and returns a JID from this JID's node and server parts.
- Returns
- The bare JID.
- Since
- 0.9
Definition at line 74 of file jid.h.
◆ escapeNode()
std::string escapeNode |
( |
const std::string & |
node | ) |
|
|
static |
◆ full()
const std::string& full |
( |
| ) |
const |
|
inline |
Returns the full (prepped) JID (user@host/resource).
- Returns
- The full JID.
Definition at line 61 of file jid.h.
◆ operator bool()
Converts to true if the JID is valid, false otherwise.
Definition at line 174 of file jid.h.
◆ operator!=() [1/2]
bool operator!= |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs.
- Parameters
-
Definition at line 140 of file jid.h.
◆ operator!=() [2/2]
bool operator!= |
( |
const std::string & |
right | ) |
const |
|
inline |
Compares a JID with a string.
- Parameters
-
right | The second JID in string representation. |
Definition at line 128 of file jid.h.
◆ operator<()
bool operator< |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs to see if the left is less than the right. Needed for JID to be a key in a map.
- Parameters
-
- Since
- 1.0.4
Definition at line 148 of file jid.h.
◆ operator<=()
bool operator<= |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs to see if the left is less than or equal to the right.
- Parameters
-
- Since
- 1.0.4
Definition at line 155 of file jid.h.
◆ operator==() [1/2]
bool operator== |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs.
- Parameters
-
Definition at line 134 of file jid.h.
◆ operator==() [2/2]
bool operator== |
( |
const std::string & |
right | ) |
const |
|
inline |
Compares a JID with a string.
- Parameters
-
right | The second JID in string representation. |
Definition at line 122 of file jid.h.
◆ operator>()
bool operator> |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs to see if the left is greater than the right.
- Parameters
-
- Since
- 1.0.4
Definition at line 162 of file jid.h.
◆ operator>=()
bool operator>= |
( |
const JID & |
right | ) |
const |
|
inline |
Compares two JIDs to see if the left is greater than the right.
- Parameters
-
- Since
- 1.0.4
Definition at line 169 of file jid.h.
◆ resource()
const std::string& resource |
( |
| ) |
const |
|
inline |
Returns the prepped resource.
- Returns
- The current resource.
Definition at line 116 of file jid.h.
◆ server()
const std::string& server |
( |
| ) |
const |
|
inline |
Returns the prepped server name.
- Returns
- The current server.
Definition at line 104 of file jid.h.
◆ serverRaw()
const std::string& serverRaw |
( |
| ) |
const |
|
inline |
Returns the raw (unprepped) server name.
- Returns
- The raw server name.
Definition at line 110 of file jid.h.
◆ setJID()
bool setJID |
( |
const std::string & |
jid | ) |
|
Sets the JID from a string.
- Parameters
-
jid | The string containing the JID. |
- Returns
- True if the given JID was valid, false otherwise.
Definition at line 21 of file jid.cpp.
◆ setResource()
bool setResource |
( |
const std::string & |
resource | ) |
|
Sets the resource.
- Parameters
-
resource | The new resource. |
Definition at line 64 of file jid.cpp.
◆ setServer()
bool setServer |
( |
const std::string & |
server | ) |
|
Sets the server.
- Parameters
-
Definition at line 56 of file jid.cpp.
◆ setUsername()
bool setUsername |
( |
const std::string & |
username | ) |
|
Sets the username.
- Parameters
-
username | The new username. |
Definition at line 49 of file jid.cpp.
◆ unescapeNode()
std::string unescapeNode |
( |
const std::string & |
node | ) |
|
|
static |
XEP-0106: JID Escaping
- Parameters
-
node | The node to unescape. |
- Returns
- The unescaped node.
Definition at line 105 of file jid.cpp.
◆ username()
const std::string& username |
( |
| ) |
const |
|
inline |
Returns the prepped username.
- Returns
- The current username.
Definition at line 98 of file jid.h.
The documentation for this class was generated from the following files: