Code

added functionality to for users to register jabber accounts within the whiteboard...
[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 __WHITEBOARD_DEFINES_H__
14 #define __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,
33     // 1-1 connections
34     CONNECT_REQUEST_USER = 6,
35         CONNECT_REQUEST_RESPONSE_USER = 7, 
36     // chat connections
37     CONNECT_REQUEST_RESPONSE_CHAT = 8,
38         // chatroom document synchronization
39         CHATROOM_SYNCHRONIZE_REQUEST = 9, 
40         CHATROOM_SYNCHRONIZE_RESPONSE = 10,
41     // requests
42     DOCUMENT_SENDER_REQUEST = 11,
43         DOCUMENT_SENDER_REQUEST_RESPONSE = 12, 
44         DOCUMENT_REQUEST = 13,
45     // notifications
46     CONNECTED_SIGNAL = 14,
47         DISCONNECTED_FROM_USER_SIGNAL = 15,
48         // error responses
49         CONNECT_REQUEST_REFUSED_BY_PEER = 16, 
50         UNSUPPORTED_PROTOCOL_VERSION = 17,
51         ALREADY_IN_SESSION = 18,
52         
53         // error cases, i.e. garbled messages or bad clients.  These should
54         // never actually be transmitted
55         UNKNOWN = 21
56 };
58 // Responses to whiteboard invitations
59 enum InvitationResponses {
60         ACCEPT_INVITATION,
61         ACCEPT_INVITATION_IN_NEW_WINDOW,
62         DECLINE_INVITATION,
63         PEER_ALREADY_IN_SESSION
64 };
66 // Message handler modes
67 enum HandlerMode {
68         DEFAULT,
69         PRESENCE,
70         ERROR
71 };
73 // Actions to pass to the node tracker when we modify a node in 
74 // the document tree upon event serialization
75 enum NodeTrackerAction {
76         NODE_ADD,
77         NODE_REMOVE,
78         NODE_UNKNOWN
79 };
81 }
83 }
87 #endif
89 /*
90   Local Variables:
91   mode:c++
92   c-file-style:"stroustrup"
93   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
94   indent-tabs-mode:nil
95   fill-column:99
96   End:
97 */
98 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :