14 #ifndef SEARCHHANDLER_H__
15 #define SEARCHHANDLER_H__
44 SearchFieldStruct(
const std::string& first,
const std::string& last,
const std::string& nick,
45 const std::string& email )
46 : m_first( first ), m_last( last ), m_nick( nick ), m_email( email )
59 TagList::const_iterator it = l.begin();
60 for( ; it != l.end(); ++it )
62 if( (*it)->name() ==
"first" )
63 m_first = (*it)->cdata();
64 else if( (*it)->name() ==
"last" )
65 m_last = (*it)->cdata();
66 else if( (*it)->name() ==
"email" )
67 m_email = (*it)->cdata();
68 else if( (*it)->name() ==
"nick" )
69 m_nick = (*it)->cdata();
81 const std::string first()
const {
return m_first; }
86 const std::string last()
const {
return m_last; }
91 const std::string email()
const {
return m_email; }
96 const std::string nick()
const {
return m_nick; }
103 Tag* t =
new Tag(
"item" );
105 new Tag( t,
"first", m_first );
106 new Tag( t,
"last", m_last );
107 new Tag( t,
"nick", m_nick );
108 new Tag( t,
"email", m_email );
160 const std::string& instructions ) = 0;
A stanza error abstraction implemented as a StanzaExtension.
bool setJID(const std::string &jid)
const std::string & bare() const
A virtual interface that enables objects to receive Jabber Search (XEP-0055) results.
virtual void handleSearchFields(const JID &directory, int fields, const std::string &instructions)=0
virtual void handleSearchError(const JID &directory, const Error *error)=0
virtual void handleSearchFields(const JID &directory, const DataForm *form)=0
virtual void handleSearchResult(const JID &directory, const SearchResultList &resultList)=0
virtual void handleSearchResult(const JID &directory, const DataForm *form)=0
This is an abstraction of an XML element.
bool addAttribute(Attribute *attr)
bool hasAttribute(const std::string &name, const std::string &value=EmptyString) const
const std::string & findAttribute(const std::string &name) const
const std::string & name() const
const TagList & children() const
The namespace for the gloox library.
std::list< Tag * > TagList
std::list< const SearchFieldStruct * > SearchResultList