14 #include "privatexml.h"
15 #include "clientbase.h"
22 PrivateXML::Query::Query(
const Tag* tag )
30 if( tag->children().size() )
31 m_privateXML = tag->children().front()->clone();
37 const std::string& PrivateXML::Query::filterString()
const
39 static const std::string filter =
"/iq/query[@xmlns='" +
XMLNS_PRIVATE_XML +
"']";
43 Tag* PrivateXML::Query::tag()
const
45 Tag* t =
new Tag(
"query" );
48 t->addChild( m_privateXML->clone() );
77 const std::string&
id = m_parent->
getID();
83 m_parent->
send( iq,
this, RequestXml );
90 const std::string&
id = m_parent->
getID();
96 m_parent->
send( iq,
this, StoreXml );
103 TrackMap::iterator t = m_track.find( iq.
id() );
104 if( t == m_track.end() )
109 if( context == RequestXml )
113 (*t).second->handlePrivateXML( q->privateXML() );
115 else if( context == StoreXml )
120 if( context == RequestXml )
122 else if( context == StoreXml )