annotations.h
/*
Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef ANNOTATIONS_H__
#define ANNOTATIONS_H__
#include "macros.h"
#include "annotationshandler.h"
#include "privatexml.h"
#include "privatexmlhandler.h"
#include <string>
#include <list>
namespace gloox
{
class Tag;
class GLOOX_API Annotations : public PrivateXML, public PrivateXMLHandler
{
public:
Annotations( ClientBase* parent );
virtual ~Annotations();
void storeAnnotations( const AnnotationsList& aList );
void requestAnnotations();
void registerAnnotationsHandler( AnnotationsHandler* ah )
{ m_annotationsHandler = ah; }
void removeAnnotationsHandler()
{ m_annotationsHandler = 0; }
// reimplemented from PrivateXMLHandler
virtual void handlePrivateXML( const Tag* xml );
// reimplemented from PrivateXMLHandler
virtual void handlePrivateXMLResult( const std::string& uid, PrivateXMLResult pxResult );
private:
AnnotationsHandler* m_annotationsHandler;
};
}
#endif // ANNOTATIONS_H__
gloox::AnnotationsHandler
A virtual interface which can be reimplemented to receive notes with help of the Annotations object.
Definition annotationshandler.h:50
gloox::Annotations::registerAnnotationsHandler
void registerAnnotationsHandler(AnnotationsHandler *ah)
Definition annotations.h:125
gloox::Annotations::Annotations
Annotations(ClientBase *parent)
Definition annotations.cpp:22
gloox::Annotations::storeAnnotations
void storeAnnotations(const AnnotationsList &aList)
Definition annotations.cpp:32
gloox::Annotations::requestAnnotations
void requestAnnotations()
Definition annotations.cpp:48
gloox::Annotations::removeAnnotationsHandler
void removeAnnotationsHandler()
Definition annotations.h:131
gloox::ClientBase
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition clientbase.h:79
gloox::PrivateXMLHandler
A virtual interface which can be reimplemented to store and receive private XML data.
Definition privatexmlhandler.h:36
gloox::PrivateXML::PrivateXML
PrivateXML(ClientBase *parent)
Definition privatexml.cpp:54
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::AnnotationsList
std::list< AnnotationsListItem > AnnotationsList
Definition annotationshandler.h:40