Code

fix crash when simplifying an lpe path: deleting the list didn't release the referenc...
[inkscape.git] / src / jabber_whiteboard / defines.h
index e1cc8cb8b3e7bd07d4b3cb316ede47cbda5d7c41..a9bc80ca6b1072193d6fa60bfe98fe921551867b 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __INKSCAPE_WHITEBOARD_DEFINES_H__
 #define __INKSCAPE_WHITEBOARD_DEFINES_H__
 
+#include "xml/node.h"
 #include "jabber_whiteboard/message-tags.h"
 
 #include <algorithm>
@@ -26,8 +27,6 @@
 #include <glibmm.h>
 #include <sigc++/sigc++.h>
 
-#include "jabber_whiteboard/keynode.h"
-
 #include "gc-alloc.h"
 
 // Various specializations of std::less for XMLNodeTracker maps.
@@ -42,10 +41,10 @@ using Inkscape::XML::Node;
 template<>
 struct less< Node* > : public binary_function < Node*, Node*, bool >
 {
-       bool operator()(Node* _x, Node* _y) const
-       {
-               return _x < _y;
-       }
+    bool operator()(Node* _x, Node* _y) const
+    {
+        return _x < _y;
+    }
 
 };
 
@@ -67,8 +66,8 @@ namespace Whiteboard {
 
 namespace Message {
 
-    typedef char const* Wrapper;
-    typedef char const* Message;
+    typedef const std::string Wrapper;
+    typedef std::string Message;
 
     extern Wrapper PROTOCOL;
     extern Wrapper NEW;
@@ -87,13 +86,23 @@ namespace Message {
 
 namespace Vars {
 
-    extern char const* INKBOARD_XMLNS; 
+    extern const std::string DOCUMENT_ROOT_NODE;
+
+    extern const std::string INKBOARD_XMLNS; 
+
+    extern const std::string WHITEBOARD_MESSAGE; 
+    extern const std::string PROTOCOL_MESSAGE; 
+    extern const std::string NEW_MESSAGE; 
+    extern const std::string CONFIGURE_MESSAGE; 
+    extern const std::string CONFIGURE_TEXT_MESSAGE; 
+    extern const std::string MOVE_MESSAGE; 
+    extern const std::string REMOVE_MESSAGE; 
 
 }
 
 namespace State {
 
-    typedef char const* SessionType;
+    typedef const std::string SessionType;
 
     extern SessionType WHITEBOARD_MUC; 
     extern SessionType WHITEBOARD_PEER;
@@ -123,10 +132,10 @@ namespace Dialog {
 
 }
 
-// message types
-// explicitly numbered to aid protocol description later on
-
+class KeyNodePair;
+class KeyNodeTable;
 
+typedef std::pair<Glib::ustring, Glib::ustring> Configure;
 
 // Message handler modes
 enum HandlerMode {
@@ -233,26 +242,6 @@ extern char const* DOCUMENT_NAMEDVIEW_NODE;
 extern char const* DOCUMENT_ROOT_NAME;
 extern char const* DOCUMENT_NAMEDVIEW_NAME;
 
-// Inkboard client states
-extern int const IN_WHITEBOARD;
-extern int const LOGGED_IN;
-extern int const IN_CHATROOM;
-extern int const WAITING_FOR_INVITE_RESPONSE;
-extern int const CONNECTING_TO_CHAT;
-extern int const WAITING_TO_SYNC_TO_CHAT;
-extern int const SYNCHRONIZING_WITH_CHAT;
-extern int const OPEN_FOR_DOC;
-extern int const PLAYING_SESSION_FILE;
-
-// update this if any other status flags are added
-
-// TODO: make this user-configurable, within sane limits
-// ("sane" limits being roughly in the range (10, 100], from personal testing)
-// Based on discussions with Ted, it seems that we're going to make the Jabber guys
-// accomodate Inkscape, not the other way around...
-// Dispatch interval (in milliseconds)
-extern int const SEND_TIMEOUT;
-
 }
 
 }