From cd158d753a24f84a096d1c2211cd1da400a66036 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 17 Jun 2008 16:41:04 -0400 Subject: - get most of the tree in shape to handle multiple keys per entry - make map_next() not expose entry IDs or key indices, because it has to do all of the heavy lifting anyway --- src/map.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index f7cb49d..b0e4a5c 100644 --- a/src/map.h +++ b/src/map.h @@ -41,7 +41,7 @@ bool_t map_match(struct plugin_state *state, unsigned int *value_len, char **value, const char **id); bool_t map_match_id(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, - const char *id_in, + const char *id_in, int id_index, unsigned int *key_len, char **key, unsigned int *value_len, char **value, const char **id); @@ -49,19 +49,18 @@ bool_t map_first(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, unsigned int *first_key_len, char **first_key, unsigned int *first_value_len, char **first_value, - const char **id); + const char **first_id, int *first_key_index); bool_t map_next(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, unsigned int prev_len, const char *prev, unsigned int *next_key_len, char **next_key, - unsigned int *next_value_len, char **next_value, - const char **next_id); + unsigned int *next_value_len, char **next_value); bool_t map_next_id(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, - const char *prev_id, + const char *prev_id, int prev_index, unsigned int *next_key_len, char **next_key, unsigned int *next_value_len, char **next_value, - const char **next_id); + const char **next_id, int *next_key_index); bool_t map_order(struct plugin_state *state, const char *domain, const char *map, bool_t *map_secure, unsigned int *order); @@ -80,7 +79,8 @@ void map_data_unset_entry_id(struct plugin_state *state, 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 n_keys, + unsigned int *key_len, char **key, unsigned int value_len, char *value); bool_t map_data_check_entry(struct plugin_state *state, const char *domain_name, const char *map_name, @@ -93,7 +93,8 @@ bool_t map_data_foreach_entry_id(struct plugin_state *state, const char *id, unsigned int key_len, const char *value, unsigned int value_len, - const char *id, void *cbdata), + const char *id, int key_index, + void *cbdata), void *cbdata); bool_t map_data_foreach_map(struct plugin_state *state, const char *domain_name, bool_t (*fn)(const char *domain, -- cgit