summaryrefslogtreecommitdiffstats
path: root/src/map.h
blob: ec32f4bfe0135858858194d94ccb84d2def65689 (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
struct plugin_state;
struct slapi_pblock;
/* Functions to pull data out of maps. */
void map_startup(struct plugin_state *state);
void map_init(struct slapi_pblock *pb, struct plugin_state *state);
PRBool map_supports_domain(struct plugin_state *state,
			   const char *domain,
			   PRBool *supported);
PRBool map_supports_map(struct plugin_state *state,
			const char *domain,
			const char *map,
			PRBool *supported);
PRBool map_match(struct plugin_state *state,
		 const char *domain, const char *map,
		 unsigned int key_len, char *key,
		 unsigned int *value_len, char **value);
PRBool map_first(struct plugin_state *state,
		 const char *domain, const char *map,
		 unsigned int *first_key_len, char **first_key,
		 unsigned int *first_value_len, char **first_value);
PRBool map_next(struct plugin_state *state,
		const char *domain, const char *map,
		unsigned int prev_len, const char *prev,
		unsigned int *next_key_len, char **next_key,
		unsigned int *next_value_len, char **next_value);
PRBool map_order(struct plugin_state *state,
		 const char *domain, const char *map,
		 unsigned int *order);
/* Functions to push data into maps. */
void map_data_clear_map(struct plugin_state *state,
			const char *domain_name, const char *map_name);
void map_data_unset_map(struct plugin_state *state,
			const char *domain_name, const char *map_name);
void map_data_set_map(struct plugin_state *state,
		      const char *domain_name, const char *map_name);
void map_data_unset_entry_key(struct plugin_state *state,
			      const char *domain_name, const char *map_name,
			      unsigned int key_len, const char *key);
void map_data_unset_entry_id(struct plugin_state *state,
			     const char *domain_name, const char *map_name,
			     const char *id);
void map_data_set_entry(struct plugin_state *state,
			const char *domain_name, const char *map_name,
			const char *id,
			unsigned int key_len, char *key,
			unsigned int value_len, char *value);