gloox  0.9.9.12
searchhandler.h
1 /*
2  Copyright (c) 2006-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 #ifndef SEARCHHANDLER_H__
15 #define SEARCHHANDLER_H__
16 
17 #include "stanza.h"
18 #include "dataform.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
30  {
31  std::string first;
32  std::string last;
33  std::string nick;
34  std::string email;
35  JID jid;
36  };
37 
42  {
47  };
48 
52  typedef std::list<SearchFieldStruct> SearchResultList;
53 
62  class GLOOX_API SearchHandler
63  {
64  public:
68  virtual ~SearchHandler() {}
69 
77  virtual void handleSearchFields( const JID& directory, int fields,
78  const std::string& instructions ) = 0;
79 
87  virtual void handleSearchFields( const JID& directory, DataForm *form ) = 0;
88 
94  virtual void handleSearchResult( const JID& directory, const SearchResultList& resultList ) = 0;
95 
102  virtual void handleSearchResult( const JID& directory, const DataForm *form ) = 0;
103 
109  virtual void handleSearchError( const JID& directory, Stanza *stanza ) = 0;
110 
111  };
112 
113 }
114 
115 #endif // SEARCHHANDLER_H__