~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/jabber_whiteboard/defines.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
12
 
 
13
#ifndef __INKSCAPE_WHITEBOARD_DEFINES_CPP__
 
14
#define __INKSCAPE_WHITEBOARD_DEFINES_CPP__
 
15
 
 
16
#include "jabber_whiteboard/defines.h"
 
17
 
 
18
namespace Inkscape {
 
19
 
 
20
namespace Whiteboard {
 
21
 
 
22
namespace Message {
 
23
 
 
24
    Wrapper PROTOCOL       ("protocol");
 
25
    Wrapper NEW            ("new");
 
26
    Wrapper REMOVE         ("remove");
 
27
    Wrapper CONFIGURE      ("configure");
 
28
    Wrapper MOVE           ("move");
 
29
 
 
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
}
 
37
 
 
38
namespace Vars {
 
39
 
 
40
    const std::string DOCUMENT_ROOT_NODE("ROOT"); 
 
41
    const std::string INKBOARD_XMLNS("http://inkscape.org/inkboard"); 
 
42
 
 
43
    const std::string WHITEBOARD_MESSAGE(
 
44
        "<message type='%1' from='%2' to='%3'>"
 
45
            "<wb xmlns='%4' session='%5'>%6</wb>"
 
46
        "</message>"); 
 
47
 
 
48
    const std::string PROTOCOL_MESSAGE(
 
49
        "<%1><%2 /></%1>");
 
50
 
 
51
    const std::string NEW_MESSAGE(
 
52
        "<new parent=\"%1\" id=\"%2\" index=\"%3\" version=\"%4\">%5</new>");
 
53
 
 
54
    const std::string CONFIGURE_MESSAGE(
 
55
        "<configure target=\"%1\" version=\"%2\" attribute=\"%3\" value=\"%4\" />");
 
56
 
 
57
    const std::string CONFIGURE_TEXT_MESSAGE(
 
58
        "<configure target=\"%1\" version=\"%2\"><text>%3</text></configure>");
 
59
 
 
60
    const std::string MOVE_MESSAGE(
 
61
        "<move target=\"%1\" n=\"%2\" />");
 
62
 
 
63
    const std::string REMOVE_MESSAGE(
 
64
        "<remove target=\"%1\" />");
 
65
}
 
66
 
 
67
namespace State {
 
68
 
 
69
    SessionType WHITEBOARD_MUC      ("groupchat"); 
 
70
    SessionType WHITEBOARD_PEER     ("chat");
 
71
 
 
72
}
 
73
 
 
74
// Protocol versions
 
75
char const* MESSAGE_PROTOCOL_V1 =       "1";
 
76
char const* MESSAGE_PROTOCOL_V2 =       "2";
 
77
int const HIGHEST_SUPPORTED =           1;
 
78
 
 
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";
 
84
 
 
85
// Number of chars to allocate for type field (in SessionManager::sendMessage)
 
86
int const TYPE_FIELD_SIZE =                     5;
 
87
 
 
88
// Number of chars to allocate for sequence number field (in SessionManager::sendMessage)
 
89
int const SEQNUM_FIELD_SIZE     =       70;
 
90
 
 
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";
 
96
 
 
97
// Names of these special nodes
 
98
char const* DOCUMENT_ROOT_NAME =                "svg:svg";
 
99
char const* DOCUMENT_NAMEDVIEW_NAME =   "sodipodi:namedview";
 
100
 
 
101
 
 
102
}
 
103
}
 
104
 
 
105
#endif
 
106
 
 
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:encoding=utf-8:textwidth=99 :