|
Public Types |
enum | NotificationServerState {
NS_DISCONNECTED,
NS_CONNECTING,
NS_CONNECTED,
NS_SYNCHRONISING,
NS_ONLINE
} |
Public Member Functions |
| NotificationServerConnection (AuthData &auth_, Callbacks &cb) |
| Create a NotificationServerConnection with the specified authentication data.
|
| NotificationServerConnection (Passport username, std::string password, Callbacks &cb) |
| Create a NotificationServerConnection with the specified username and password.
|
| NotificationServerConnection (Callbacks &cb) |
| Create a NotificationServerConnection with no specified username or password.
|
virtual | ~NotificationServerConnection () |
virtual void | dispatchCommand (std::vector< std::string > &args) |
| Dispatch a command to its appropriate handler routines based on args.
|
const std::list< SwitchboardServerConnection * > & | switchboardConnections () |
| Return a list of SwitchboardServerConnection's that have been started from this NotificationServerConnection.
|
void | addSwitchboardConnection (SwitchboardServerConnection *) |
| Add a SwitchboardServerConnection to the list of connections that have been started from this connection.
|
void | removeSwitchboardConnection (SwitchboardServerConnection *) |
| Remove a SwitchboardServerConnection from the list of connections that have beep started from this connection.
|
Connection * | connectionWithSocket (int fd) |
| Return a connection that is associated with fd.
|
SwitchboardServerConnection * | switchboardWithOnlyUser (Passport username) |
| Return a SwitchboardServerConnection that has exactly one user whose username is username.
|
void | checkReverseList (ListSyncInfo *) |
virtual void | connect (const std::string &hostname, unsigned int port) |
| Connect ourself to hostname on port.
|
virtual void | connect (const std::string &hostname, unsigned int port, const Passport &username, const std::string &password) |
virtual void | disconnect () |
virtual void | addCallback (NotificationServerCallback cb, int trid, void *data) |
| Add a callback of cb to this connection for response with ID of trid.
|
virtual void | removeCallback (int trid) |
| Remove callbacks assocated with responses with ID of trid.
|
virtual void | socketConnectionCompleted () |
| The connection has been established.
|
NotificationServerState | connectionState () const |
virtual NotificationServerConnection * | myNotificationServer () |
|
These methods all perform actions on the notification server.
|
void | setState (BuddyStatus state) |
| Set our online state to state.
|
void | setBLP (char setting) |
void | setGTC (char setting) |
void | setFriendlyName (std::string friendlyName) throw (std::runtime_error) |
| Set our friendly name to friendlyName.
|
void | addToList (std::string list, Passport buddyName) |
| Add buddy named buddyName to the list named list.
|
void | removeFromList (std::string list, Passport buddyName) |
| Remove buddy named budydName from the list named list.
|
void | addToGroup (Passport, int groupID) |
void | removeFromGroup (Passport buddyName, int groupID) |
void | addGroup (std::string groupName) |
void | removeGroup (int groupId) |
void | renameGroup (int groupId, std::string newGroupName) |
void | synchronizeLists (int version=0) |
| Request the server side buddy list.
|
void | sendPing () |
| Send a 'keep-alive' ping to the server.
|
void | requestSwitchboardConnection (const void *tag) |
| Request a switchboard connection.
|
Public Attributes |
Callbacks & | externalCallbacks |
Protected Member Functions |
virtual void | handleIncomingData () |
void | setConnectionState (NotificationServerState s) |
void | assertConnectionStateIs (NotificationServerState s) |
void | assertConnectionStateIsNot (NotificationServerState s) |
void | assertConnectionStateIsAtLeast (NotificationServerState s) |
Protected Attributes |
NotificationServerState | _connectionState |
Classes |
class | AuthData |