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 )
virtual void handleAnnotations(const AnnotationsList &aList)=0
virtual void handlePrivateXML(const Tag *xml)
Annotations(ClientBase *parent)
void storeAnnotations(const AnnotationsList &aList)
void requestAnnotations()
virtual void handlePrivateXMLResult(const std::string &uid, PrivateXMLResult pxResult)
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
This class implements XEP-0049 (Private XML Storage).
std::string requestXML(const std::string &tag, const std::string &xmlns, PrivateXMLHandler *pxh)
std::string storeXML(const Tag *tag, PrivateXMLHandler *pxh)
This is an abstraction of an XML element.
bool addAttribute(Attribute *attr)
const TagList & children() const
The namespace for the gloox library.
std::list< Tag * > TagList
const std::string XMLNS_ANNOTATIONS
std::list< AnnotationsListItem > AnnotationsList