Files
system-control/components/ruth/include/persistence.h
Peter Siegmund a0fe4ba538 code optimization
- lifecycle functions for widgets
- persistence functions

Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-06-20 20:53:13 +02:00

25 lines
557 B
C

#pragma once
typedef enum
{
VALUE_TYPE_STRING,
VALUE_TYPE_INT32,
} persistence_value_t;
typedef struct
{
void *handle;
void (*save)(persistence_value_t value_type, const char *key, const void *value);
} persistence_t;
#ifdef __cplusplus
extern "C"
{
#endif
void *persistence_init(const char *namespace_name);
void persistence_save(persistence_value_t value_type, const char *key, const void *value);
void *persistence_load(persistence_value_t value_type, const char *key, void *out);
void persistence_deinit();
#ifdef __cplusplus
}
#endif