gloox  1.0.27
annotations.h
1 /*
2  Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 
15 #ifndef ANNOTATIONS_H__
16 #define ANNOTATIONS_H__
17 
18 #include "macros.h"
19 
20 #include "annotationshandler.h"
21 #include "privatexml.h"
22 #include "privatexmlhandler.h"
23 
24 #include <string>
25 #include <list>
26 
27 namespace gloox
28 {
29 
30  class Tag;
31 
94  class GLOOX_API Annotations : public PrivateXML, public PrivateXMLHandler
95  {
96  public:
101  Annotations( ClientBase* parent );
102 
106  virtual ~Annotations();
107 
113  void storeAnnotations( const AnnotationsList& aList );
114 
119  void requestAnnotations();
120 
126  { m_annotationsHandler = ah; }
127 
132  { m_annotationsHandler = 0; }
133 
134  // reimplemented from PrivateXMLHandler
135  virtual void handlePrivateXML( const Tag* xml );
136 
137  // reimplemented from PrivateXMLHandler
138  virtual void handlePrivateXMLResult( const std::string& uid, PrivateXMLResult pxResult );
139 
140  private:
141  AnnotationsHandler* m_annotationsHandler;
142 
143  };
144 
145 }
146 
147 #endif // ANNOTATIONS_H__
A virtual interface which can be reimplemented to receive notes with help of the Annotations object.
This is an implementation of XEP-0145 (Annotations).
Definition: annotations.h:95
void registerAnnotationsHandler(AnnotationsHandler *ah)
Definition: annotations.h:125
void removeAnnotationsHandler()
Definition: annotations.h:131
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:79
A virtual interface which can be reimplemented to store and receive private XML data.
This class implements XEP-0049 (Private XML Storage).
Definition: privatexml.h:38
This is an abstraction of an XML element.
Definition: tag.h:47
The namespace for the gloox library.
Definition: adhoc.cpp:28
std::list< AnnotationsListItem > AnnotationsList