24 : m_parent( parent ), m_flexibleOfflineHandler( 0 )
50 const std::string&
id = m_parent->
getID();
54 Tag *o =
new Tag( iq,
"offline" );
57 if( msgs.size() == 0 )
58 new Tag( o,
"fetch" );
61 StringList::const_iterator it = msgs.begin();
62 for( ; it != msgs.end(); ++it )
64 Tag *i =
new Tag( o,
"item" );
70 m_parent->
trackID(
this,
id, FORequestMsgs );
76 const std::string&
id = m_parent->
getID();
80 Tag *o =
new Tag( iq,
"offline" );
83 if( msgs.size() == 0 )
84 new Tag( o,
"purge" );
87 StringList::const_iterator it = msgs.begin();
88 for( ; it != msgs.end(); ++it )
90 Tag *i =
new Tag( o,
"item" );
96 m_parent->
trackID(
this,
id, FORemoveMsgs );
102 m_flexibleOfflineHandler = foh;
107 m_flexibleOfflineHandler = 0;
112 if( !m_flexibleOfflineHandler )
125 if( f.hasField(
"number_of_messages" ) )
126 num = atoi( f.field(
"number_of_messages" )->value().c_str() );
135 if( context == FORequestHeaders && m_flexibleOfflineHandler )
142 Tag::TagList::const_iterator it = l.begin();
143 for( ; it != l.end(); ++it )
145 m[(*it)->findAttribute(
"node" )] = (*it)->findAttribute(
"name" );
158 if( !m_flexibleOfflineHandler )
170 switch( stanza->
error() )
194 switch( stanza->
error() )