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 );
159 virtual void handleSearchFields(
const JID& directory,
int fields,
160 const std::string& instructions ) = 0;
168 virtual void handleSearchFields(
const JID& directory,
const DataForm* form ) = 0;
175 virtual void handleSearchResult(
const JID& directory,
const SearchResultList& resultList ) = 0;
182 virtual void handleSearchResult(
const JID& directory,
const DataForm* form ) = 0;
189 virtual void handleSearchError(
const JID& directory,
const Error* error ) = 0;
195 #endif // SEARCHHANDLER_H__