summaryrefslogtreecommitdiff
path: root/src/inc/sifter.h
blob: 7f5351476794f7646970cd12cd68b5378c545342 (plain)
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
#ifndef _SIFTER_H
#define _SIFTER_H


#ifndef U_INT32_H
#define U_INT32_H
typedef unsigned int			uint32;
#endif


typedef void* sifter_t;

typedef struct expect_outcome_s
{
	char* 			data;			//not copy, only point to text	
	int   			datalen;	
}expect_outcome_t;

#define TEXT_NAME_LEN     32
typedef struct text_s
{	
	char*			text;
	char			text_name[TEXT_NAME_LEN];				
	uint32			text_len;		
	uchar			text_type;	
}text_t;

#ifdef __cplusplus
extern "C" {
#endif

//file dir, all file is *.sft.
sifter_t create_sifter(const char* sifter_cfg_dir, const char* sifter_log_dir, int maat_stat_swicth, int maat_perf_swicth, int thread_num, void* logger);
void 		destroy_sifter(sifter_t handle);
//return:res num; 
int 		sifter(sifter_t handle, int sftid, 
				   int expect_type, const char* expect_name, int expect_res_num, expect_outcome_t* res, 
				   const text_t* text, int text_num, const char* cont_type, unsigned int cont_type_len, int thread_seq);

#ifdef __cplusplus
}
#endif


#endif