31 TagList::const_iterator it = l.begin();
32 for( ; it != l.end(); ++it )
34 if( (*it)->name() !=
"header" || !(*it)->hasAttribute(
"name" ) )
37 m_headers.insert( std::make_pair( (*it)->findAttribute(
"name" ), (*it)->cdata() ) );
47 static const std::string filter =
"/presence/headers[@xmlns='" +
XMLNS_SHIM +
"']"
48 "|/message/headers[@xmlns='" +
XMLNS_SHIM +
"']"
55 if( !m_headers.size() )
58 Tag* t =
new Tag(
"headers" );
61 HeaderList::const_iterator it = m_headers.begin();
62 for( ; it != m_headers.end(); ++it )
64 Tag* h =
new Tag( t,
"header" );
const TagList & children() const
bool setXmlns(const std::string &xmlns, const std::string &prefix=EmptyString)
virtual const std::string & filterString() const
std::list< Tag * > TagList
bool setCData(const std::string &cdata)
The namespace for the gloox library.
This class abstracts a stanza extension, which is usually an element in a specific namespace...
const std::string & xmlns() const
std::map< std::string, std::string > HeaderList
bool addAttribute(Attribute *attr)
const std::string & name() const
virtual Tag * tag() const
SHIM(const HeaderList &hl)
This is an abstraction of an XML element.
const std::string XMLNS_SHIM