libmsn 4.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
MSN::SwitchboardServerConnection Class Reference

`#include <switchboardserver.h>`

Inheritance diagram for MSN::SwitchboardServerConnection:

List of all members.

## Classes
class | AuthData
struct | MultiPacketSession
## Public Types
enum | SwitchboardServerState { SB_DISCONNECTED, SB_CONNECTING, SB_CONNECTED, SB_WAITING_FOR_USERS, SB_READY }
## Public Member Functions
| SwitchboardServerConnection (AuthData &auth_, NotificationServerConnection &)
virtual void | dispatchCommand (std::vector< std::string > &args)
Connection * | connectionWithSocket (void *sock)
void | addFileTransferConnectionP2P (FileTransferConnectionP2P *)
void | removeFileTransferConnectionP2P (FileTransferConnectionP2P *)
void | sendTypingNotification ()
void | sendAction (std::string action)
void | sendVoiceClip (std::string msnobject)
void | sendWink (std::string msnobject)
void | sendInk (std::string image)
void | sendEmoticon (std::string alias, std::string file)
void | sendNudge ()
void | sendKeepAlive ()
void | sendFile (MSN::fileTransferInvite ft)
void | inviteUser (Passport userName)
void | fileTransferResponse (unsigned int sessionID, std::string filename, bool response)
void | cancelFileTransfer (unsigned int sessionID)
virtual void | connect (const std::string &hostname, unsigned int port)
virtual void | disconnect ()
virtual int | sendMessage (const Message *msg)
virtual int | sendMessage (const std::string &s)
virtual void | addCallback (SwitchboardServerCallback, int trid, void *data)
virtual void | addP2PCallback (SwitchboardServerCallback2, int trid, unsigned int sessionID)
virtual void | removeCallback (int trid)
virtual void | removeP2PCallback (int trid)
virtual void | socketConnectionCompleted ()
SwitchboardServerState | connectionState () const
virtual NotificationServerConnection * | myNotificationServer ()
void | callback_continueTransfer (std::vector< std::string > &args, int trid, unsigned int sessionID)
void | requestEmoticon (unsigned int id, std::string filename, std::string msnobject, std::string alias)
void | requestVoiceClip (unsigned int id, std::string filename, std::string msnobject)
void | requestWink (unsigned int id, std::string filename, std::string msnobject)
void | requestDisplayPicture (unsigned int id, std::string filename, std::string msnobject)
void | message_ink (std::vector< std::string > &args, std::string mime, std::string body)
## Public Attributes
SwitchboardServerConnection::AuthData | auth
std::list< Passport > | users
P2P | p2p
std::map< std::string, MultiPacketSession > | MultiPacketSessions
## Protected Member Functions
virtual void | handleIncomingData ()
void | setConnectionState (SwitchboardServerState s)
void | assertConnectionStateIs (SwitchboardServerState s)
void | assertConnectionStateIsNot (SwitchboardServerState s)
void | assertConnectionStateIsAtLeast (SwitchboardServerState s)
## Protected Attributes
SwitchboardServerState | _connectionState
## Friends
class | Connection

## Detailed Description

Represents a connection to a MSN switchboard.

## Member Function Documentation

void MSN::SwitchboardServerConnection::addCallback | ( | SwitchboardServerCallback | callback,
|  | int | trid,
|  | void * | data
| ) |  | `[virtual]`

Add cb as a callback that will be called when a response is received a transaction ID of trid.

void MSN::SwitchboardServerConnection::addFileTransferConnectionP2P | ( | FileTransferConnectionP2P * | c | ) |

Add a FileTransferConnection to the list of associated connections.

void MSN::SwitchboardServerConnection::cancelFileTransfer | ( | unsigned int | sessionID | ) |

Cancel a file transfer in progress

void MSN::SwitchboardServerConnection::connect | ( | const std::string & | hostname,
|  | unsigned int | port
| ) |  | `[virtual]`

Connect ourself to hostname on port.

Implements MSN::Connection.

Connection * MSN::SwitchboardServerConnection::connectionWithSocket | ( | void * | sock | ) |

Return a connection that is associated with fd.

If fd is equal to `sock`, `this` is returned. Otherwise connectionWithSocket is sent to each FileTransferConnection until a match is found.

Returns:
  The matching connection, if found. Otherwise, `NULL`.

void MSN::SwitchboardServerConnection::dispatchCommand | ( | std::vector< std::string > & | args | ) | `[virtual]`

Dispatch a command to its appropriate handler routines based on args.

Parameters:

  args | A vector of strings containing arguments, returned from readLine.

Implements MSN::Connection.

void MSN::SwitchboardServerConnection::fileTransferResponse | ( | unsigned int | sessionID,
|  | std::string | filename,
|  | bool | response
| ) |  |

Response to a file transfer invitation

void MSN::SwitchboardServerConnection::inviteUser | ( | Passport | userName | ) |

Invite userName into this conversation.

void MSN::SwitchboardServerConnection::removeCallback | ( | int | trid | ) | `[virtual]`

Remove callbacks for transaction ID trid.

void MSN::SwitchboardServerConnection::removeFileTransferConnectionP2P | ( | FileTransferConnectionP2P * | c | ) |

Remove a FileTransferConnection from the list of associated connections.

void MSN::SwitchboardServerConnection::requestDisplayPicture | ( | unsigned int | id,
|  | std::string | filename,
|  | std::string | msnobject
| ) |  |

Request a display picture

void MSN::SwitchboardServerConnection::requestEmoticon | ( | unsigned int | id,
|  | std::string | filename,
|  | std::string | msnobject,
|  | std::string | alias
| ) |  |

Request an emoticon

void MSN::SwitchboardServerConnection::requestVoiceClip | ( | unsigned int | id,
|  | std::string | filename,
|  | std::string | msnobject
| ) |  |

Request a voice clip

void MSN::SwitchboardServerConnection::requestWink | ( | unsigned int | id,
|  | std::string | filename,
|  | std::string | msnobject
| ) |  |

Request a wink

void MSN::SwitchboardServerConnection::sendAction | ( | std::string | action | ) |

Send a text action

void MSN::SwitchboardServerConnection::sendEmoticon | ( | std::string | alias,
|  | std::string | file
| ) |  |

Send an emoticon

void MSN::SwitchboardServerConnection::sendFile | ( | MSN::fileTransferInvite | ft | ) |

Send a file

void MSN::SwitchboardServerConnection::sendInk | ( | std::string | image | ) |

Send Ink

void MSN::SwitchboardServerConnection::sendKeepAlive | ( |  | ) |

Send a keep alive message

int MSN::SwitchboardServerConnection::sendMessage | ( | const Message * | msg | ) | `[virtual]`

Send formatted message, returns the trID

int MSN::SwitchboardServerConnection::sendMessage | ( | const std::string & | s | ) | `[virtual]`

Send plain text message, returns the trID

void MSN::SwitchboardServerConnection::sendNudge | ( |  | ) |

Send a nudge

void MSN::SwitchboardServerConnection::sendTypingNotification | ( |  | ) |

Send a typing notification to the switchboard server.

void MSN::SwitchboardServerConnection::sendVoiceClip | ( | std::string | msnobject | ) |

Send a Voice Clip

void MSN::SwitchboardServerConnection::sendWink | ( | std::string | msnobject | ) |

Send a Wink

void MSN::SwitchboardServerConnection::socketConnectionCompleted | ( |  | ) | `[virtual]`

The connection has been established.

Reimplemented from MSN::Connection.

## Member Data Documentation

std::list<Passport> MSN::SwitchboardServerConnection::users

A list of the users in this switchboard session.

The documentation for this class was generated from the following files:

- /home/salem/libmsn/tags/libmsn-4.2/msn/switchboardserver.h
- /home/salem/libmsn/tags/libmsn-4.2/msn/switchboardserver.cpp

All Classes Namespaces Functions Variables Enumerations Enumerator