Public Member Functions

Swift::ClientDiscoManager Class Reference

Class responsible for managing outgoing disco information for a client. More...

Collaboration diagram for Swift::ClientDiscoManager:

List of all members.

Public Member Functions

 ClientDiscoManager (IQRouter *iqRouter, PresenceSender *presenceSender)
 Constructs the manager.
 ~ClientDiscoManager ()
void setCapsNode (const std::string &node)
 Needs to be called before calling setDiscoInfo().
void setDiscoInfo (const DiscoInfo &info)
 Sets the capabilities of the client.
PresenceSendergetPresenceSender () const
 Returns the presence sender through which all outgoing presence should be sent.
void handleConnected ()
 Called when the client is connected.

Detailed Description

Class responsible for managing outgoing disco information for a client.

The manager will respond to disco::info requests, and add entity capabilities information to outgoing presence.

To use this class, call setCapsNode() once with the caps URI of the client. After this, call setDiscoInfo() with the capabilities for the client. This can be called whenever the capabilities change.

Definition at line 29 of file ClientDiscoManager.h.


Constructor & Destructor Documentation

Swift::ClientDiscoManager::ClientDiscoManager ( IQRouter iqRouter,
PresenceSender presenceSender 
)

Constructs the manager.

Parameters:
iqRouter the router on which requests will be answered
presenceSender the presence sender to which all outgoing presence (with caps information) will be sent.
Swift::ClientDiscoManager::~ClientDiscoManager (  ) 

Member Function Documentation

PresenceSender* Swift::ClientDiscoManager::getPresenceSender (  )  const [inline]

Returns the presence sender through which all outgoing presence should be sent.

The manager will add the necessary caps information, and forward it to the presence sender passed at construction time.

Definition at line 57 of file ClientDiscoManager.h.

void Swift::ClientDiscoManager::handleConnected (  ) 

Called when the client is connected.

This resets the presence sender, such that it assumes initial presence hasn't been sent yet.

void Swift::ClientDiscoManager::setCapsNode ( const std::string &  node  ) 

Needs to be called before calling setDiscoInfo().

void Swift::ClientDiscoManager::setDiscoInfo ( const DiscoInfo info  ) 

Sets the capabilities of the client.