Code

added gui code for whiteboard
[inkscape.git] / src / jabber_whiteboard / inkboard-document.h
1 /**
2  * Inkscape::Whiteboard::InkboardDocument - Inkboard document implementation
3  *
4  * Authors:
5  * David Yip <yipdw@rose-hulman.edu>
6  *
7  * Copyright (c) 2005 Authors
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifndef __INKSCAPE_WHITEBOARD_INKBOARDDOCUMENT_H__
13 #define __INKSCAPE_WHITEBOARD_INKBOARDDOCUMENT_H__
15 #include <glibmm.h>
17 #include "xml/document.h"
18 #include "xml/simple-node.h"
20 #include "jabber_whiteboard/keynode.h"
21 #include "jabber_whiteboard/session-manager.h"
23 namespace Inkscape {
25 namespace Whiteboard {
27 class InkboardDocument : public XML::SimpleNode, public XML::Document {
28 public:
29         explicit InkboardDocument(int code, SessionType type, Glib::ustring const& to);
31         XML::NodeType type() const
32         {
33                 return Inkscape::XML::DOCUMENT_NODE;
34         }
36         void setRecipient(Glib::ustring const& val);
37         Glib::ustring getRecipient() const;
39     void startSessionNegotiation();
40     void terminateSession();
41     void processInkboardEvent(MessageType mtype, unsigned int seqnum, Glib::ustring const& data);
43 protected:
44         /**
45          * Copy constructor.
46          * 
47          * \param orig Instance to copy.
48          */
49         InkboardDocument(InkboardDocument const& orig) :
50                 XML::Node(), XML::SimpleNode(orig), XML::Document(), _recipient(orig._recipient)
51         {
52                 _initBindings();
53         }
55         XML::SimpleNode* _duplicate() const
56         {
57                 return new InkboardDocument(*this);
58         }
60 private:
61         void _initBindings();
63     SessionType _type;
64         Glib::ustring _recipient;
66     KeyNodeTable _tracker;
67 };
69 }
71 }
73 #endif
75 /*
76   Local Variables:
77   mode:c++
78   c-file-style:"stroustrup"
79   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
80   indent-tabs-mode:nil
81   fill-column:99
82   End:
83 */
84 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :