diff options
author | WuKong <rebirthmonkey@gmail.com> | 2015-09-04 09:25:34 +0200 |
---|---|---|
committer | WuKong <rebirthmonkey@gmail.com> | 2015-09-04 09:25:34 +0200 |
commit | 3baeb11a8fbcfcdbc31976d421f17b85503b3ecd (patch) | |
tree | 04891d88c1127148f1b390b5a24414e85b270aee /moon-abe/pbc-0.5.14/misc/symtab.h | |
parent | 67c5b73910f5fc437429c356978081b252a59480 (diff) |
init attribute-based encryption
Change-Id: Iba1a3d722110abf747a0fba366f3ebc911d25b25
Diffstat (limited to 'moon-abe/pbc-0.5.14/misc/symtab.h')
-rw-r--r-- | moon-abe/pbc-0.5.14/misc/symtab.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/moon-abe/pbc-0.5.14/misc/symtab.h b/moon-abe/pbc-0.5.14/misc/symtab.h new file mode 100644 index 00000000..39f255c3 --- /dev/null +++ b/moon-abe/pbc-0.5.14/misc/symtab.h @@ -0,0 +1,43 @@ +#ifndef __PBC_SYMTAB_H__ +#define __PBC_SYMTAB_H__ + +#include "darray.h" + +#pragma GCC visibility push(hidden) + +struct symtab_s { + darray_t list; +}; +typedef struct symtab_s symtab_t[1]; +typedef struct symtab_s *symtab_ptr; + +/*@manual symtab +Initialize symbol table 't'. Must be called before 't' is used. +*/ +void symtab_init(symtab_t t); + +/*@manual symtab +Clears symbol table 't'. Should be called after 't' is no longer needed. +*/ +void symtab_clear(symtab_t t); + +/*@manual symtab +Puts 'value' at 'key' in 't'. +*/ +void symtab_put(symtab_t t, void *value, const char *key); + +/*@manual symtab +Returns true if 't' contains key 'key'. +*/ +int symtab_has(symtab_t t, const char *key); + +/*@manual symtab +Returns pointer at key 'key' in 't'. +*/ +void *symtab_at(symtab_t t, const char *key); + +void symtab_forall_data(symtab_t t, void (*func)(void *)); + +#pragma GCC visibility pop + +#endif //__PBC_SYMTAB_H__ |