mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-19 03:13:14 +00:00
* improvements for cross-platform compiling * moved tactility-core to libs/ * splitup improvements * remove git/gitmodules from freertos * better platformbetter platform checks * added build scripts * delete mbedtls * re-add mbedtls * fixes and improvements * added pc build * simplify build scripts * revert build scrpit * updated builds * fix for pc * fix for pc * fix for build
35 lines
956 B
C
35 lines
956 B
C
/**
|
|
* @brief key-value storage for general purpose.
|
|
* Maps strings on a fixed set of data types.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void* Bundle;
|
|
|
|
Bundle tt_bundle_alloc();
|
|
Bundle tt_bundle_alloc_copy(Bundle source);
|
|
void tt_bundle_free(Bundle bundle);
|
|
|
|
bool tt_bundle_get_bool(Bundle bundle, const char* key);
|
|
int tt_bundle_get_int(Bundle bundle, const char* key);
|
|
const char* tt_bundle_get_string(Bundle bundle, const char* key);
|
|
|
|
bool tt_bundle_opt_bool(Bundle bundle, const char* key, bool* out);
|
|
bool tt_bundle_opt_int(Bundle bundle, const char* key, int* out);
|
|
bool tt_bundle_opt_string(Bundle bundle, const char* key, char** out);
|
|
|
|
void tt_bundle_put_bool(Bundle bundle, const char* key, bool value);
|
|
void tt_bundle_put_int(Bundle bundle, const char* key, int value);
|
|
void tt_bundle_put_string(Bundle bundle, const char* key, const char* value);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|