ESAPI-C 1.0
The OWASP Enterprise Security API for C

properties.h

Go to the documentation of this file.
00001 
00017 #ifndef PROPERTIES_H_
00018 #define PROPERTIES_H_
00019 
00020 #include "uthash.h"
00021 #include "esapi.h"
00022 
00023 #define MAX_PROPERTY_LINE_LENGTH 4096
00024 
00028 #define KEY_LEN 64
00029 
00030 struct Map_t {
00031         char key[KEY_LEN];
00032         char *val;
00033         UT_hash_handle hh; // hash handle
00034 };
00035 
00039 typedef struct Map_t map_t;
00040 
00047 extern char *get_property(map_t *, struct esapi_ctx *, const char *);
00048 
00055 extern char *get_property_or_default(map_t *, struct esapi_ctx *, const char *,
00056                 const char *);
00057 
00064 extern char *set_property(map_t **, struct esapi_ctx *, const char *,
00065                 const char *);
00066 
00072 extern char **keys(map_t *);
00073 
00079 extern map_t *load_properties(const char *);
00080 
00084 extern void store_properties(map_t *, const char *);
00085 
00086 #endif /* PROPERTIES_H_ */
 All Data Structures Files Functions Variables Typedefs Defines