-
Notifications
You must be signed in to change notification settings - Fork 7
/
XMPPSearchModule.h
50 lines (39 loc) · 1.31 KB
/
XMPPSearchModule.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// XMPPSearchModule.h
// SOP2p
//
// Created by zrz on 12-8-7.
// Copyright (c) 2012年 Sctab. All rights reserved.
//
#import "XMPPModule.h"
#import "XMPPSearchReported.h"
#import "XMPPSearchResult.h"
@class XMPPIQ;
@interface XMPPSearchModule : XMPPModule {
NSMutableDictionary *_searchUserDatas;
}
@property (nonatomic, strong) NSString *searchHost;
// Get the template, using it after invoke -askForFields and
// -searchModelGetFields be invoked.
@property (nonatomic, readonly) XMPPSearchResult *result;
/*
Request for searching.
@params fields
fields is NSArray of XMPPSearchNode. get from
-[XMPPSearchResault copyForSingleFields] or
-[XMPPSearchResault copyForTableFields]. And can
make the NSArray yourself, too.
@params userData
The params will be the third params in
-searchModel:result:userData:
*/
- (void)searchWithFields:(NSArray*)fields
userData:(id)userData;
//Request for template from server, -searchModelGetFields
//will be invoked when server response this request.
- (void)askForFields;
@end
@protocol XMPPSearchModuleDelegate <NSObject>
- (void)searchModel:(XMPPSearchModule*)searchModul result:(XMPPSearchReported*)result userData:(id)userData;
- (void)searchModelGetFields:(XMPPSearchModule *)searchModul;
@end