15 #include "annotations.h"
16 #include "clientbase.h"
24 m_annotationsHandler( 0 )
36 AnnotationsList::const_iterator it = aList.begin();
37 for( ; it != aList.end(); ++it )
39 Tag* n =
new Tag( s,
"note", (*it).note );
60 TagList::const_iterator it = l.begin();
61 for( ; it != l.end(); ++it )
63 if( (*it)->name() ==
"note" )
65 const std::string& jid = (*it)->findAttribute(
"jid" );
66 const std::string& note = (*it)->cdata();
68 if( !jid.empty() && !note.empty() )
70 const std::string& cdate = (*it)->findAttribute(
"cdate" );
71 const std::string& mdate = (*it)->findAttribute(
"mdate" );
77 aList.push_back( item );
82 if( m_annotationsHandler )
const TagList & children() const
std::string requestXML(const std::string &tag, const std::string &xmlns, PrivateXMLHandler *pxh)
virtual void handlePrivateXMLResult(const std::string &uid, PrivateXMLResult pxResult)
std::string storeXML(const Tag *tag, PrivateXMLHandler *pxh)
std::list< AnnotationsListItem > AnnotationsList
void storeAnnotations(const AnnotationsList &aList)
std::list< Tag * > TagList
The namespace for the gloox library.
void requestAnnotations()
This class implements XEP-0049 (Private XML Storage).
bool addAttribute(Attribute *attr)
Annotations(ClientBase *parent)
virtual void handleAnnotations(const AnnotationsList &aList)=0
virtual void handlePrivateXML(const Tag *xml)
const std::string XMLNS_ANNOTATIONS
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
This is an abstraction of an XML element.