Code

switch to sigc++ "release"
[inkscape.git] / src / jabber_whiteboard / defines.h
1 /**
2  * Whiteboard session manager
3  * Definitions
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 __INKSCAPE_WHITEBOARD_DEFINES_H__
14 #define __INKSCAPE_WHITEBOARD_DEFINES_H__
16 #include "jabber_whiteboard/message-tags.h"
17 #include "jabber_whiteboard/internal-constants.h"
19 namespace Inkscape {
21 namespace Whiteboard {
23 // message types
24 // explicitly numbered to aid protocol description later on
25 enum MessageType {
26     // image and internal data
27         CHANGE_NOT_REPEATABLE = 0,
28         CHANGE_REPEATABLE = 1,
29         DUMMY_CHANGE = 2,
30         CHANGE_COMMIT = 3,
31         DOCUMENT_BEGIN = 4,
32         DOCUMENT_END = 5,
34     // 1-1 connections
35         CONNECT_REQUEST_USER = 6,
36         CONNECT_REQUEST_RESPONSE_USER = 7, 
37     // chat connections
38         CONNECT_REQUEST_RESPONSE_CHAT = 8,
40     // chatroom document synchronization
41         CHATROOM_SYNCHRONIZE_REQUEST = 9, 
42         CHATROOM_SYNCHRONIZE_RESPONSE = 10,
44     // requests
45         DOCUMENT_SENDER_REQUEST = 11,
46         DOCUMENT_SENDER_REQUEST_RESPONSE = 12, 
47         DOCUMENT_REQUEST = 13,
49     // notifications
50         CONNECTED_SIGNAL = 14,
51         DISCONNECTED_FROM_USER_SIGNAL = 15,
53     // error responses
54         CONNECT_REQUEST_REFUSED_BY_PEER = 16, 
55         UNSUPPORTED_PROTOCOL_VERSION = 17,
56         ALREADY_IN_SESSION = 18,
57         
58     // error cases, i.e. garbled messages or bad clients.  These should
59     // never actually be transmitted
60         UNKNOWN = 21
61 };
63 extern char const * const MessageString[];
65 // Responses to whiteboard invitations
66 enum InvitationResponses {
67         ACCEPT_INVITATION,
68         DECLINE_INVITATION,
69         PEER_ALREADY_IN_SESSION,
70         UNSUPPORTED_PROTOCOL
71 };
73 // Message handler modes
74 enum HandlerMode {
75         DEFAULT,
76         PRESENCE,
77         ERROR
78 };
80 // Actions to pass to the node tracker when we modify a node in 
81 // the document tree upon event serialization
82 enum NodeTrackerAction {
83         NODE_ADD,
84         NODE_REMOVE,
85         NODE_UNKNOWN
86 };
88 }
90 }
94 #endif
96 /*
97   Local Variables:
98   mode:c++
99   c-file-style:"stroustrup"
100   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
101   indent-tabs-mode:nil
102   fill-column:99
103   End:
104 */
105 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :