14 #include "capabilities.h"
27 m_hash(
"sha-1" ), m_valid( false )
68 Disco::IdentityList::const_iterator it = il.begin();
69 for( ; it != il.end(); ++it )
71 std::string
id = (*it)->category();
83 StringList::const_iterator it2 = sl.begin();
84 for( ; it2 != sl.end(); ++it2 )
93 for( ; it2 != f.end(); ++it2 )
101 DataForm::FieldList::const_iterator it3 = form->
fields().begin();
102 typedef std::map<std::string, StringList> MapSSL;
105 for( ; it3 != form->
fields().end(); ++it3 )
107 if( (*it3)->name() ==
"FORM_TYPE" )
109 s += (*it3)->value();
113 m.insert( std::make_pair( (*it3)->name(), (*it3)->values() ) );
116 MapSSL::iterator it4 = m.begin();
117 for( ; it4 != m.end(); ++it4 )
121 it2 = it4->second.begin();
122 for( ; it2 != it4->second.end(); ++it2 )
132 std::string Capabilities::generate(
const Disco::Info* info )
134 return info ? generate( info->identities(), info->features(), info->form() ) :
EmptyString;
137 std::string Capabilities::generate(
const Disco* disco )
139 return disco ? generate( disco->identities(), disco->features(), disco->form() ) :
EmptyString;
144 static const std::string filter =
"/presence/c[@xmlns='" +
XMLNS_CAPS +
"']";
150 if( !m_valid || m_node.empty() )
170 Disco::IdentityList::const_iterator it = il.begin();
171 for( ; it != il.end(); ++it )