|
|
This class holds the roster for a local user.
~XMPPUserRoster ()
| ~XMPPUserRoster |
[virtual]
Destructor. Remove this roster from engine's queue.
const JabberID& jid ()
| jid |
[const]
Get the local user's jid.
Returns: The local user's jid.
JBPresence* engine ()
| engine |
Get the presence engine this user belongs to.
Returns: Pointer to the presence engine this user belongs to.
inline JIDResourceList& resources ()
| resources |
Get the list of available resources belonging to the same user
Returns: The list of available resources
inline ObjList& users ()
| users |
Get the list of remote users
Returns: The list of remote users
XMPPUser* getUser (const JabberID& jid, bool add = false, bool* added = 0)
| getUser |
Get a remote user. This method is thread safe.
Parameters:
jid | User's jid. |
add | True to add if not found. |
added | Optional flag to set if added a new user. |
Returns: Referenced pointer to the user or 0.
bool removeUser (const JabberID& remote)
| removeUser |
Remove a remote user. This method is thread safe.
Parameters:
remote | The user to remove. |
Returns: False if no more users.
inline void cleanup ()
| cleanup |
() Clear remote user list.
bool timeout (u_int64_t time)
| timeout |
Check timeout. This method is thread safe.
Parameters:
time | Current time. |
Returns: True to remove the roster.
inline XMLElement* createDiscoInfoResult (const char* from, const char* to,
const char* id)
| createDiscoInfoResult |
Create an iq result to respond to disco info. Add user's features and identity
Parameters:
from | The from attribute |
to | The to attribute |
id | The id attribute |
Returns: XMLElement pointer
XMPPUserRoster (JBPresence* engine, const char* node, const char* domain,
JBEngine::Protocol proto = JBEngine::Component)
| XMPPUserRoster |
[protected]
Constructor.
Parameters:
engine | Pointer to the presence engine this user belongs to |
node | User's name |
domain | User's domain |
proto | Protocol. Used to create identity |
Generated by: paulc on bussard on Wed Oct 21 01:57:30 2009, using kdoc 2.0a54. |