13 #include "subscription.h"
19 static const char* msgTypeStringValues[] =
21 "subscribe",
"subscribed",
"unsubscribe",
"unsubscribed"
26 return util::lookup( type, msgTypeStringValues );
30 : Stanza( tag ), m_subtype( Invalid ), m_stati( 0 )
32 if( !tag || tag->name() !=
"presence" )
35 m_subtype = (S10nType)util::lookup( tag->findAttribute(
TYPE ), msgTypeStringValues );
37 const ConstTagList& c = tag->findTagList(
"/presence/status" );
38 ConstTagList::const_iterator it = c.begin();
39 for( ; it != c.end(); ++it )
40 setLang( &m_stati, m_status, (*it) );
44 const std::string& xmllang )
45 :
Stanza( to ), m_subtype( type ), m_stati( 0 )
47 setLang( &m_stati, m_status, status, xmllang );
60 Tag* t =
new Tag(
"presence" );
68 getLangs( m_stati, m_status,
"status", t );
70 StanzaExtensionList::const_iterator it = m_extensionList.begin();
71 for( ; it != m_extensionList.end(); ++it )