Code

Export. Fix PS/EPS export (Bug #698340, PS Level Restriction reversed.
[inkscape.git] / src / jabber_whiteboard / defines.cpp
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 DOCUMENT_ROOT_NODE("ROOT"); 
41     const std::string INKBOARD_XMLNS("http://inkscape.org/inkboard"); 
43     const std::string WHITEBOARD_MESSAGE(
44         "<message type='%1' from='%2' to='%3'>"
45             "<wb xmlns='%4' session='%5'>%6</wb>"
46         "</message>"); 
48     const std::string PROTOCOL_MESSAGE(
49         "<%1><%2 /></%1>");
51     const std::string NEW_MESSAGE(
52         "<new parent=\"%1\" id=\"%2\" index=\"%3\" version=\"%4\">%5</new>");
54     const std::string CONFIGURE_MESSAGE(
55         "<configure target=\"%1\" version=\"%2\" attribute=\"%3\" value=\"%4\" />");
57     const std::string CONFIGURE_TEXT_MESSAGE(
58         "<configure target=\"%1\" version=\"%2\"><text>%3</text></configure>");
60     const std::string MOVE_MESSAGE(
61         "<move target=\"%1\" n=\"%2\" />");
63     const std::string REMOVE_MESSAGE(
64         "<remove target=\"%1\" />");
65 }
67 namespace State {
69     SessionType WHITEBOARD_MUC      ("groupchat"); 
70     SessionType WHITEBOARD_PEER     ("chat");
72 }
74 // Protocol versions
75 char const* MESSAGE_PROTOCOL_V1 =       "1";
76 char const* MESSAGE_PROTOCOL_V2 =       "2";
77 int const HIGHEST_SUPPORTED =           1;
79 // Node types (as strings)
80 char const* NODETYPE_DOCUMENT_STR =     "document";
81 char const* NODETYPE_ELEMENT_STR =      "element";
82 char const* NODETYPE_TEXT_STR =         "text";
83 char const* NODETYPE_COMMENT_STR =      "comment";
85 // Number of chars to allocate for type field (in SessionManager::sendMessage)
86 int const TYPE_FIELD_SIZE =                     5;
88 // Number of chars to allocate for sequence number field (in SessionManager::sendMessage)
89 int const SEQNUM_FIELD_SIZE     =       70;
91 // Designators for certain "special" nodes in the document
92 // These nodes are "special" because they are generally present in all documents,
93 // and we generally only want one copy of them
94 char const* DOCUMENT_ROOT_NODE =                "ROOT";
95 char const* DOCUMENT_NAMEDVIEW_NODE =   "NAMEDVIEW";
97 // Names of these special nodes
98 char const* DOCUMENT_ROOT_NAME =                "svg:svg";
99 char const* DOCUMENT_NAMEDVIEW_NAME =   "sodipodi:namedview";
105 #endif
107 /*
108   Local Variables:
109   mode:c++
110   c-file-style:"stroustrup"
111   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
112   indent-tabs-mode:nil
113   fill-column:99
114   End:
115 */
116 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :