1 /**
2 * Whiteboard session manager
3 * Internal constants
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 #include "jabber_whiteboard/internal-constants.h"
15 namespace Inkscape {
17 namespace Whiteboard {
18 // Protocol versions
19 char const* MESSAGE_PROTOCOL_V1 = "1";
20 char const* MESSAGE_PROTOCOL_V2 = "2";
21 int const HIGHEST_SUPPORTED = 1;
23 // Node types (as strings)
24 char const* NODETYPE_DOCUMENT_STR = "document";
25 char const* NODETYPE_ELEMENT_STR = "element";
26 char const* NODETYPE_TEXT_STR = "text";
27 char const* NODETYPE_COMMENT_STR = "comment";
29 // Number of chars to allocate for type field (in SessionManager::sendMessage)
30 int const TYPE_FIELD_SIZE = 5;
32 // Number of chars to allocate for sequence number field (in SessionManager::sendMessage)
33 int const SEQNUM_FIELD_SIZE = 70;
35 // Designators for certain "special" nodes in the document
36 // These nodes are "special" because they are generally present in all documents,
37 // and we generally only want one copy of them
38 char const* DOCUMENT_ROOT_NODE = "ROOT";
39 char const* DOCUMENT_NAMEDVIEW_NODE = "NAMEDVIEW";
41 // Names of these special nodes
42 char const* DOCUMENT_ROOT_NAME = "svg:svg";
43 char const* DOCUMENT_NAMEDVIEW_NAME = "sodipodi:namedview";
45 // Inkboard client states
46 int const IN_WHITEBOARD = 0;
47 int const LOGGED_IN = 1;
48 int const IN_CHATROOM = 2;
49 int const WAITING_FOR_INVITE_RESPONSE = 3;
50 int const CONNECTING_TO_CHAT = 4;
51 int const WAITING_TO_SYNC_TO_CHAT = 5;
52 int const SYNCHRONIZING_WITH_CHAT = 6;
53 int const OPEN_FOR_DOC = 7;
54 int const PLAYING_SESSION_FILE = 8;
56 // TODO: make this user-configurable, within sane limits
57 // ("sane" limits being roughly in the range (10, 100], from personal testing)
58 // Based on discussions with Ted, it seems that we're going to make the Jabber guys
59 // accomodate Inkscape, not the other way around...
60 // Dispatch interval (in milliseconds)
61 int const SEND_TIMEOUT = 35;
62 }
64 }
67 /*
68 Local Variables:
69 mode:c++
70 c-file-style:"stroustrup"
71 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
72 indent-tabs-mode:nil
73 fill-column:99
74 End:
75 */
76 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :