gloox  1.0.22
bookmarkstorage.h
1 /*
2  Copyright (c) 2005-2017 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 BOOKMARKSTORAGE_H__
16 #define BOOKMARKSTORAGE_H__
17 
18 #include "macros.h"
19 
20 #include "bookmarkhandler.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 
97  class GLOOX_API BookmarkStorage : public PrivateXML, public PrivateXMLHandler
98  {
99  public:
104  BookmarkStorage( ClientBase* parent );
105 
109  virtual ~BookmarkStorage();
110 
117  void storeBookmarks( const BookmarkList& bList, const ConferenceList& cList );
118 
123  void requestBookmarks();
124 
130  { m_bookmarkHandler = bmh; }
131 
136  { m_bookmarkHandler = 0; }
137 
138  // reimplemented from PrivateXMLHandler
139  virtual void handlePrivateXML( const Tag* xml );
140 
141  // reimplemented from PrivateXMLHandler
142  virtual void handlePrivateXMLResult( const std::string& uid, PrivateXMLResult pxResult );
143 
144  private:
145  BookmarkHandler* m_bookmarkHandler;
146  };
147 
148 }
149 
150 #endif // BOOKMARKSTORAGE_H__
gloox::BookmarkStorage::registerBookmarkHandler
void registerBookmarkHandler(BookmarkHandler *bmh)
Definition: bookmarkstorage.h:129
gloox::BookmarkList
std::list< BookmarkListItem > BookmarkList
Definition: bookmarkhandler.h:50
gloox::PrivateXML
This class implements XEP-0049 (Private XML Storage).
Definition: privatexml.h:37
gloox::BookmarkStorage
This is an implementation of XEP-0048 (Bookmark Storage).
Definition: bookmarkstorage.h:97
gloox::BookmarkHandler
A virtual interface which can be reimplemented to receive bookmarks with help of a BookmarkStorage ob...
Definition: bookmarkhandler.h:64
gloox::PrivateXMLHandler
A virtual interface which can be reimplemented to store and receive private XML data.
Definition: privatexmlhandler.h:35
gloox
The namespace for the gloox library.
Definition: adhoc.cpp:27
gloox::ConferenceList
std::list< ConferenceListItem > ConferenceList
Definition: bookmarkhandler.h:55
gloox::Tag
This is an abstraction of an XML element.
Definition: tag.h:46
gloox::ClientBase
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:76
gloox::BookmarkStorage::removeBookmarkHandler
void removeBookmarkHandler()
Definition: bookmarkstorage.h:135