Code

2eec08c782a3dcc2dc797ffe7c3dfa00a0330f23
[inkscape.git] / src / jabber_whiteboard / jabber-handlers.h
1 /**
2  * Whiteboard session manager
3  * C-style Loudmouth callbacks
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_LOUDMOUTH_CALLBACKS__
14 #define __WHITEBOARD_LOUDMOUTH_CALLBACKS__
16 extern "C" {
17 #include <loudmouth/loudmouth.h>
18 }
20 #include <glib.h>
22 namespace Inkscape {
24 namespace Whiteboard {
26 /**
27  * C-style callback for Loudmouth to handle received presence messages.
28  *
29  * \param handler The LmMessageHandler handling this event.
30  * \param connection The LmConnection with which the LmMessageHandler is associated.
31  * \param message The Jabber message received that triggered this handler.
32  * \param user_data A pointer to an instance of Inkscape::Whiteboard::MessageHandler, which performs
33  * the real message processing work.
34  */
35 LmHandlerResult presence_handler(LmMessageHandler* handler, LmConnection* connection, LmMessage* message, gpointer user_data);
37 /**
38  * C-style callback for Loudmouth to handle received messages.
39  *
40  * This handler handles messages that are not presence or error messages.
41  *
42  * \param handler The LmMessageHandler handling this event.
43  * \param connection The LmConnection with which the LmMessageHandler is associated.
44  * \param message The Jabber message received that triggered this handler.
45  * \param user_data A pointer to an instance of Inkscape::Whiteboard::MessageHandler, which performs
46  * the real message processing work.
47  */
48 LmHandlerResult default_handler(LmMessageHandler* handler, LmConnection* connection, LmMessage* message, gpointer user_data);
50 /**
51  * C-style callback for Loudmouth to handle received error messages.
52  *
53  * \param handler The LmMessageHandler handling this event.
54  * \param connection The LmConnection with which the LmMessageHandler is associated.
55  * \param message The Jabber message received that triggered this handler.
56  * \param user_data A pointer to an instance of Inkscape::Whiteboard::MessageHandler, which performs
57  * the real message processing work.
58  */
59 LmHandlerResult stream_error_handler(LmMessageHandler* handler, LmConnection* connection, LmMessage* message, gpointer user_data);
61 /**
62  * C-style callback for Loudmouth to handle SSL errors.
63  * 
64  * \param ssl The SSL data structure used by Loudmouth.
65  * \param status The error code representing the error that occurred.
66  * \param user_data A pointer to the SessionManager instance handling associated with the connection attempt that 
67  * threw the SSL error.
68  */
69 LmSSLResponse ssl_error_handler(LmSSL* ssl, LmSSLStatus status, gpointer user_data);
71 }
73 }
75 #endif
77 /*
78   Local Variables:
79   mode:c++
80   c-file-style:"stroustrup"
81   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
82   indent-tabs-mode:nil
83   fill-column:99
84   End:
85 */
86 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :