1 /**
2 * Whiteboard session manager
3 * Message dispatch devices and timeout triggers
4 *
5 * Authors:
6 * David Yip <yipdw@rose-hulman.edu>
7 *
8 * Copyright (c) 2005 Authors
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
13 #ifndef __WHITEBOARD_CALLBACKS_H__
14 #define __WHITEBOARD_CALLBACKS_H__
16 #include <glibmm.h>
18 namespace Inkscape {
20 namespace Whiteboard {
22 class SessionManager;
23 class SessionData;
25 /**
26 * Callback methods used in timers to dispatch MessageNodes from message queues.
27 */
28 class Callbacks {
29 public:
30 /**
31 * Constructor.
32 *
33 * \param sm The SessionManager to associate with.
34 */
35 Callbacks(SessionManager* sm);
36 ~Callbacks();
38 /**
39 * Dispatch a message from the send queue to the associated SessionManager object.
40 *
41 * The SessionManager object handles the task of actually sending out a Jabber message.
42 *
43 * \see Inkscape::Whiteboard::SessionManager::sendMessage
44 * \return Whether or not this callback should be called again by the timer routine.
45 */
46 bool dispatchSendQueue();
48 /**
49 * Dispatch a message from the receive queue to the associated SessionManager object.
50 *
51 * The SessionManager object handles the task of actually processing a Jabber message.
52 *
53 * \see Inkscape::Whiteboard::SessionManager::receiveChange
54 * \return Whether or not this callback should be called again by the timer routine.
55 */
56 bool dispatchReceiveQueue();
58 private:
59 SessionManager* _sm;
60 SessionData* _sd;
61 };
64 }
66 }
68 #endif
70 /*
71 Local Variables:
72 mode:c++
73 c-file-style:"stroustrup"
74 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
75 indent-tabs-mode:nil
76 fill-column:99
77 End:
78 */
79 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :