]>
Commit | Line | Data |
---|---|---|
4ea9375d CP |
1 | /* |
2 | * thastrust functionality | |
3 | */ | |
4 | ||
5 | #include "../../newsearch/newsearch.h" | |
6 | #include "../trusts.h" | |
7 | ||
8 | #include <stdlib.h> | |
9 | ||
10 | void *thastrust_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput); | |
11 | void thastrust_free(searchCtx *ctx, struct searchNode *thenode); | |
12 | ||
13 | struct searchNode *thastrust_parse(searchCtx *ctx, int argc, char **argv) { | |
14 | struct searchNode *thenode; | |
15 | ||
16 | if(!(thenode=(struct searchNode *)malloc(sizeof (struct searchNode)))) { | |
17 | parseError = "malloc: could not allocate memory for this search."; | |
18 | return NULL; | |
19 | } | |
20 | ||
21 | thenode->returntype = RETURNTYPE_BOOL; | |
22 | thenode->exe = thastrust_exe; | |
23 | thenode->free = thastrust_free; | |
24 | ||
25 | return thenode; | |
26 | } | |
27 | ||
28 | void *thastrust_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) { | |
29 | nick *np = theinput; | |
30 | trusthost *th = gettrusthost(np); | |
31 | ||
32 | if(!th) | |
33 | return (void *)0; | |
34 | ||
35 | return (void *)1; | |
36 | } | |
37 | ||
38 | void thastrust_free(searchCtx *ctx, struct searchNode *thenode) { | |
39 | free(thenode); | |
40 | } | |
41 |