d97520d55892fe7999698915a7a7cf387a03d4e5
1 /**
2 * Whiteboard session manager
3 * Definitions
4 *
5 * Authors:
6 * Dale Harvey <harveyd@gmail.com>
7 *
8 * Copyright (c) 2006 Authors
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
13 #ifndef __INKSCAPE_WHITEBOARD_DEFINES_CPP__
14 #define __INKSCAPE_WHITEBOARD_DEFINES_CPP__
16 #include "jabber_whiteboard/defines.h"
18 namespace Inkscape {
20 namespace Whiteboard {
22 namespace Message {
24 Wrapper PROTOCOL = 0;
25 Wrapper NEW = 1;
26 Wrapper REMOVE = 2;
27 Wrapper CONFIGURE = 3;
28 Wrapper MOVE = 4;
30 Message CONNECT_REQUEST = "connect-request";
31 Message CONNECTED = "connected";
32 Message ACCEPT_INVITATION = "accept-invitation";
33 Message DECLINE_INVITATION = "decline-invitation";
34 Message DOCUMENT_BEGIN = "document-begin";
35 Message DOCUMENT_END = "document-end";
36 }
38 namespace Vars {
40 char const* INKBOARD_XMLNS = "http://inkscape.org/inkboard";
42 }
44 namespace State {
46 SessionType WHITEBOARD_MUC = "groupchat";
47 SessionType WHITEBOARD_PEER = "chat";
49 }
51 // Protocol versions
52 char const* MESSAGE_PROTOCOL_V1 = "1";
53 char const* MESSAGE_PROTOCOL_V2 = "2";
54 int const HIGHEST_SUPPORTED = 1;
56 // Node types (as strings)
57 char const* NODETYPE_DOCUMENT_STR = "document";
58 char const* NODETYPE_ELEMENT_STR = "element";
59 char const* NODETYPE_TEXT_STR = "text";
60 char const* NODETYPE_COMMENT_STR = "comment";
62 // Number of chars to allocate for type field (in SessionManager::sendMessage)
63 int const TYPE_FIELD_SIZE = 5;
65 // Number of chars to allocate for sequence number field (in SessionManager::sendMessage)
66 int const SEQNUM_FIELD_SIZE = 70;
68 // Designators for certain "special" nodes in the document
69 // These nodes are "special" because they are generally present in all documents,
70 // and we generally only want one copy of them
71 char const* DOCUMENT_ROOT_NODE = "ROOT";
72 char const* DOCUMENT_NAMEDVIEW_NODE = "NAMEDVIEW";
74 // Names of these special nodes
75 char const* DOCUMENT_ROOT_NAME = "svg:svg";
76 char const* DOCUMENT_NAMEDVIEW_NAME = "sodipodi:namedview";
78 // Inkboard client states
79 int const IN_WHITEBOARD = 0;
80 int const LOGGED_IN = 1;
81 int const IN_CHATROOM = 2;
82 int const WAITING_FOR_INVITE_RESPONSE = 3;
83 int const CONNECTING_TO_CHAT = 4;
84 int const WAITING_TO_SYNC_TO_CHAT = 5;
85 int const SYNCHRONIZING_WITH_CHAT = 6;
86 int const OPEN_FOR_DOC = 7;
87 int const PLAYING_SESSION_FILE = 8;
89 // TODO: make this user-configurable, within sane limits
90 // ("sane" limits being roughly in the range (10, 100], from personal testing)
91 // Based on discussions with Ted, it seems that we're going to make the Jabber guys
92 // accomodate Inkscape, not the other way around...
93 // Dispatch interval (in milliseconds)
94 int const SEND_TIMEOUT = 35;
96 }
97 }
99 #endif
101 /*
102 Local Variables:
103 mode:c++
104 c-file-style:"stroustrup"
105 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
106 indent-tabs-mode:nil
107 fill-column:99
108 End:
109 */
110 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :