tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
storage.h
Go to the documentation of this file.
1
7#if !defined(TETENGO_PROPERTY_STORAGE_H)
8#define TETENGO_PROPERTY_STORAGE_H
9
10#include <stdbool.h>
11#include <stddef.h>
12#include <stdint.h>
13
14
15#if defined(__cplusplus)
16extern "C" {
17#endif
18
19#if !defined(DOCUMENTATION)
20typedef struct tetengo_property_storage_tag tetengo_property_storage_t;
21typedef struct tetengo_property_storageLoader_tag tetengo_property_storageLoader_t;
22#endif
23
24
30void tetengo_property_storage_destroy(const tetengo_property_storage_t* p_storage);
31
42bool tetengo_property_storage_getBool(const tetengo_property_storage_t* p_storage, const char* key, bool* p_value);
43
51void tetengo_property_storage_setBool(tetengo_property_storage_t* p_storage, const char* key, bool value);
52
64 const tetengo_property_storage_t* p_storage,
65 const char* key,
66 uint32_t* p_value);
67
75void tetengo_property_storage_setUint32(tetengo_property_storage_t* p_storage, const char* key, uint32_t value);
76
88 const tetengo_property_storage_t* p_storage,
89 const char* key,
90 char* p_value,
91 size_t value_capacity);
92
100void tetengo_property_storage_setString(tetengo_property_storage_t* p_storage, const char* key, const char* value);
101
107void tetengo_property_storage_save(const tetengo_property_storage_t* p_storage);
108
115
122
129
141tetengo_property_storageLoader_t*
142tetengo_property_storageLoader_createStorageLoaderProxy(tetengo_property_storageLoader_t* p_real_storage_loader);
143
149void tetengo_property_storageLoader_destroy(const tetengo_property_storageLoader_t* p_storage_loader);
150
159tetengo_property_storage_t*
160tetengo_property_storageLoader_load(const tetengo_property_storageLoader_t* p_storage_loader, const char* path);
161
162
163#if defined(__cplusplus)
164}
165#endif
166
167
168#endif
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createStorageLoaderProxy(tetengo_property_storageLoader_t *p_real_storage_loader)
Creates a storage loader proxy.
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createWindowsRegistoryStorageLoader()
Creates a Windows registry storage loader.
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createFileStorageLoader()
Creates a file storage loader.
bool tetengo_property_storage_getBool(const tetengo_property_storage_t *p_storage, const char *key, bool *p_value)
Returns the value in a boolean.
void tetengo_property_storageLoader_destroy(const tetengo_property_storageLoader_t *p_storage_loader)
Destroys a storage loader.
size_t tetengo_property_storage_getString(const tetengo_property_storage_t *p_storage, const char *key, char *p_value, size_t value_capacity)
Returns the value in a string.
tetengo_property_storage_t * tetengo_property_storageLoader_load(const tetengo_property_storageLoader_t *p_storage_loader, const char *path)
Loads a storage.
void tetengo_property_storage_setUint32(tetengo_property_storage_t *p_storage, const char *key, uint32_t value)
Sets a value in an unsigned 32-bit integer.
void tetengo_property_storage_save(const tetengo_property_storage_t *p_storage)
Saves the values.
void tetengo_property_storage_destroy(const tetengo_property_storage_t *p_storage)
Destroys a storage.
bool tetengo_property_storage_getUint32(const tetengo_property_storage_t *p_storage, const char *key, uint32_t *p_value)
Returns the value in an unsigned 32-bit integer.
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createMemoryStorageLoader()
Creates a memory storage loader.
void tetengo_property_storage_setString(tetengo_property_storage_t *p_storage, const char *key, const char *value)
Sets a value in a string.
void tetengo_property_storage_setBool(tetengo_property_storage_t *p_storage, const char *key, bool value)
Sets a value in a boolean.