DiscussionManager Class Reference

This manager is in charge of discussions. More...

#include <discussionmanager.h>

Inheritance diagram for DiscussionManager:

BaseManager List of all members.

Public Member Functions

 DiscussionManager (KernelMessenger &rKernel, ListeWidget &rWidget)
 Constructor.
 ~DiscussionManager ()
 Destructor.
void closeDiscussion (const int contactID)
 Closes a discussion. (also close the widget associated).
ClientWidgetstartNewDiscussion (const Contact &contact)
 Open a new discussion widget.
void newMessage (const Contact &contact, const std::string &message)
 Send to the corresponding widget the message received.
void closeAll ()
 Close all discussion.
ClientWidgetgetWidget (const int contactID) const
 Returns the widget corresponding to a contact ID.

Detailed Description

This manager is in charge of discussions.

It stores the current discussion. Hence, when the application receives a new message from a someone, we could put it in the good widget, or create one.

Author:
Sylvain Archenault <sylvain.archenault@laposte.net>

Yves Houpert <yves.houpert@insa-rouen.fr>


Constructor & Destructor Documentation

DiscussionManager::DiscussionManager KernelMessenger rKernel,
ListeWidget rWidget
 

Constructor.

Parameters:
rKernel KernelMessenger instance.
rWidget ListeWidge object.


Member Function Documentation

void DiscussionManager::closeDiscussion const int  contactID  ) 
 

Closes a discussion. (also close the widget associated).

Parameters:
contactID Contact we want to close the discussion.

ClientWidget * DiscussionManager::getWidget const int  contactID  )  const
 

Returns the widget corresponding to a contact ID.

Parameters:
contactID Contact ID we want the discussion widget.
Returns:
The discussion widget.

void DiscussionManager::newMessage const Contact contact,
const std::string &  message
 

Send to the corresponding widget the message received.

This method should be called when a new message is received from a contact ID. If the discussion doesn't yet exist, it creates a new discussion widget, otherwise it sends the message to the corresponding widget.

Parameters:
contact Contact who sent the message.
message Message.

ClientWidget * DiscussionManager::startNewDiscussion const Contact contact  ) 
 

Open a new discussion widget.

It creates a new discussion widget (if doesn't exist) and display

Parameters:
contact Contact used for this discussion.
Returns:
Widget created.


The documentation for this class was generated from the following files:
Generated on Fri May 19 12:15:55 2006 for Bamboo Ch@t by  doxygen 1.4.6