gloox
0.9.9.12
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
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
29
struct
SearchFieldStruct
30
{
31
std::string
first
;
32
std::string
last
;
33
std::string
nick
;
34
std::string
email
;
35
JID
jid
;
36
};
37
41
enum
SearchFieldEnum
42
{
43
SearchFieldFirst
= 1,
44
SearchFieldLast
= 2,
45
SearchFieldNick
= 4,
46
SearchFieldEmail
= 8
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__
Generated on Thu Jun 27 2013 13:05:48 for gloox by
1.8.1.2