725391deb8ab810ec7f525cdc6a2002b0a568f60
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 ("protocol");
25 Wrapper NEW ("new");
26 Wrapper REMOVE ("remove");
27 Wrapper CONFIGURE ("configure");
28 Wrapper MOVE ("move");
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 const std::string INKBOARD_XMLNS("http://inkscape.org/inkboard");
42 const std::string WHITEBOARD_MESSAGE(
43 "<message type='%1' from='%2' to='%3'>"
44 "<wb xmlns='%4' session='%5'>%6</wb>"
45 "</message>");
47 const std::string PROTOCOL_MESSAGE("<%1><%2 /></%1>");
49 }
51 namespace State {
53 SessionType WHITEBOARD_MUC ("groupchat");
54 SessionType WHITEBOARD_PEER ("chat");
56 }
58 // Protocol versions
59 char const* MESSAGE_PROTOCOL_V1 = "1";
60 char const* MESSAGE_PROTOCOL_V2 = "2";
61 int const HIGHEST_SUPPORTED = 1;
63 // Node types (as strings)
64 char const* NODETYPE_DOCUMENT_STR = "document";
65 char const* NODETYPE_ELEMENT_STR = "element";
66 char const* NODETYPE_TEXT_STR = "text";
67 char const* NODETYPE_COMMENT_STR = "comment";
69 // Number of chars to allocate for type field (in SessionManager::sendMessage)
70 int const TYPE_FIELD_SIZE = 5;
72 // Number of chars to allocate for sequence number field (in SessionManager::sendMessage)
73 int const SEQNUM_FIELD_SIZE = 70;
75 // Designators for certain "special" nodes in the document
76 // These nodes are "special" because they are generally present in all documents,
77 // and we generally only want one copy of them
78 char const* DOCUMENT_ROOT_NODE = "ROOT";
79 char const* DOCUMENT_NAMEDVIEW_NODE = "NAMEDVIEW";
81 // Names of these special nodes
82 char const* DOCUMENT_ROOT_NAME = "svg:svg";
83 char const* DOCUMENT_NAMEDVIEW_NAME = "sodipodi:namedview";
86 }
87 }
89 #endif
91 /*
92 Local Variables:
93 mode:c++
94 c-file-style:"stroustrup"
95 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
96 indent-tabs-mode:nil
97 fill-column:99
98 End:
99 */
100 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :