summaryrefslogtreecommitdiffstats
path: root/src/map.h
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2008-06-17 16:41:04 -0400
committerNalin Dahyabhai <nalin@dahyabhai.net>2008-06-17 16:41:04 -0400
commitcd158d753a24f84a096d1c2211cd1da400a66036 (patch)
tree332e0c12dc8e3cc7a8aa021e53aefa2a55ca85bf /src/map.h
parent4f5e14211ff8238f62cb15186379b6b9ecffef51 (diff)
downloadslapi-nis-cd158d753a24f84a096d1c2211cd1da400a66036.tar.gz
slapi-nis-cd158d753a24f84a096d1c2211cd1da400a66036.tar.xz
slapi-nis-cd158d753a24f84a096d1c2211cd1da400a66036.zip
- 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
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h17
1 files changed, 9 insertions, 8 deletions
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,