#include <kernelmessenger.h>
Public Types | |
| enum | MessageBoxTypes { InformationBox, SorryBox, ErrorBox, QuestionBox } |
| Message box types. More... | |
Public Member Functions | |
| void | closeConnection () |
| Closes the connection. | |
| void | addContact (const Contact &contact) |
| Adds a contact to the list. | |
| void | removeContact (const Contact &contact) |
| Removes a contact from the list. | |
| void | removeContact (const int ID) |
| Removes a contact from the list. | |
| void | setUser (const Contact &contact) |
| Sets the User. | |
| const Contact & | getUser () const |
| Returns the program user. | |
| void | setContactList (const ContactList &list) |
| Sets the user contact list. | |
| void | writeMessage (const BaseMessage &message) |
| Writes a message to the socket. | |
| void | newMessage (const int fromID, const std::string message) |
| Method called when a new messge is received. | |
| void | connectionEstablished (const bool bResult, const Contact &contact) |
| Method called when the authentification to the server is established. | |
| void | contactListReceived (const bool bResult, const ContactList &list) |
| Method called when the contact list is received. | |
| void | newConnection (const std::string &username, const std::string &password) |
| Starts a new connection process. | |
| void | setConnectionOptions (const std::string &hostname, const int port) |
| Changes connection parameters. | |
| void | stopDiscussion (const int contactID) |
| Stops the discussion with a contact. | |
| void | newDiscussion (const Contact &contact) |
| Starts a new discussion with the Contact contact. | |
| void | changeContactStatus (const int contactID, const Contact::Status newStatus) |
| Changes the status of a contact. | |
| void | changeUserStatus (Contact::Status newStatus) |
| Changes the user status. | |
| const Contact *const | getContact (int contactID) const |
| Returns contact whose ID is contactID. | |
| virtual | ~KernelMessenger () |
| Destructor. | |
| void | errorReceived (const std::string &sDescription) |
| Method to call when an error is received. | |
| int | popup (const MessageBoxTypes type, const std::string &message, const std::string &title) const |
| Popups a Message box. | |
| void | parsingError (const SAXParseException *e) |
| It reports a error during parsing XML. | |
Static Public Member Functions | |
| static KernelMessenger & | getInstance () |
| Returns a reference to the KernelMessenger singleton. | |
| static std::auto_ptr< KernelMessenger > | createKernelMessenger (ListeWidget *pWidget) |
| Builds a new KernelMessenger object. | |
Friends | |
| class | ConnectionManager |
| class | Socket |
Yves Houpert <yves.houpert@insa-rouen.fr>
|
|
Message box types.
|
|
|
Adds a contact to the list.
|
|
||||||||||||
|
Changes the status of a contact.
|
|
|
Changes the user status.
|
|
||||||||||||
|
Method called when the authentification to the server is established. If the authentificatoin failed, bResult is false and contact is not a valid reference and should not be access.
|
|
||||||||||||
|
Method called when the contact list is received. If an error has occured, bResult is false and list is not a valid reference.
|
|
|
Builds a new KernelMessenger object.
|
|
|
Method to call when an error is received.
|
|
|
Returns contact whose ID is contactID.
|
|
|
Returns a reference to the KernelMessenger singleton.
|
|
|
Returns the program user.
|
|
||||||||||||
|
Starts a new connection process.
|
|
|
Starts a new discussion with the Contact contact.
|
|
||||||||||||
|
Method called when a new messge is received.
|
|
|
It reports a error during parsing XML.
|
|
||||||||||||||||
|
Popups a Message box.
|
|
|
Removes a contact from the list.
|
|
|
Removes a contact from the list.
|
|
||||||||||||
|
Changes connection parameters.
|
|
|
Sets the user contact list.
|
|
|
Sets the User. It's the contact object representing the contact user.
|
|
|
Stops the discussion with a contact.
|
|
|
Writes a message to the socket.
|
1.4.6