unfinished work
This commit is contained in:
@@ -16,6 +16,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "maat/maat.h"
|
||||
#include "rcu_hash.h"
|
||||
|
||||
struct ex_data_container {
|
||||
@@ -23,6 +24,12 @@ struct ex_data_container {
|
||||
void *custom_data;
|
||||
};
|
||||
|
||||
struct ex_container_ctx {
|
||||
int table_id;
|
||||
void (*custom_data_free)(void *custom_data);
|
||||
struct ex_data_schema *ex_schema;
|
||||
};
|
||||
|
||||
struct ex_data_runtime;
|
||||
|
||||
/* ex_data_runtime API */
|
||||
@@ -42,6 +49,12 @@ size_t ex_data_runtime_cached_row_count(struct ex_data_runtime *ex_data_rt);
|
||||
void ex_data_runtime_clear_row_cache(struct ex_data_runtime *ex_data_rt);
|
||||
|
||||
/* set schema API */
|
||||
struct ex_data_schema *ex_data_schema_new(maat_plugin_ex_new_func_t *new_func,
|
||||
maat_plugin_ex_free_func_t *free_func,
|
||||
maat_plugin_ex_dup_func_t *dup_func,
|
||||
long argl, void *argp);
|
||||
void ex_data_schema_free(struct ex_data_schema *ex_schema);
|
||||
|
||||
void ex_data_runtime_set_schema(struct ex_data_runtime *ex_data_rt, struct ex_data_schema *schema);
|
||||
|
||||
/* set user_ctx API */
|
||||
@@ -49,16 +62,24 @@ void ex_data_runtime_set_ex_container_ctx(struct ex_data_runtime *ex_data_rt, st
|
||||
|
||||
struct ex_container_ctx *ex_data_runtime_get_ex_container_ctx(struct ex_data_runtime *ex_data_rt);
|
||||
|
||||
struct ex_data_container *ex_data_container_new(void *ex_data, void *custom_data);
|
||||
void ex_data_container_free(void *ctx, void *data);
|
||||
|
||||
/* ex_data_runtime ex data API */
|
||||
void *ex_data_runtime_row2ex_data(struct ex_data_runtime *ex_data_rt, const char *row, const char *key, size_t key_len);
|
||||
void *ex_data_runtime_row2ex_data(struct ex_data_runtime *ex_data_rt,
|
||||
const char *row, const char *key, size_t key_len);
|
||||
|
||||
void ex_data_runtime_add_ex_container(struct ex_data_runtime *ex_data_rt, const char *key, size_t key_len, struct ex_data_container *ex_container);
|
||||
int ex_data_runtime_add_ex_container(struct ex_data_runtime *ex_data_rt,
|
||||
const char *key, size_t key_len,
|
||||
struct ex_data_container *ex_container);
|
||||
|
||||
void ex_data_runtime_del_ex_container(struct ex_data_runtime *ex_data_rt, const char *key, size_t key_len, struct log_handle *logger);
|
||||
int ex_data_runtime_del_ex_container(struct ex_data_runtime *ex_data_rt,
|
||||
const char *key, size_t key_len);
|
||||
|
||||
size_t ex_data_runtime_list_updating_ex_container(struct ex_data_runtime *ex_data_rt, struct ex_data_container ***ex_container);
|
||||
size_t ex_data_runtime_list_updating_ex_container(struct ex_data_runtime *ex_data_rt,
|
||||
struct ex_data_container ***ex_container);
|
||||
|
||||
void *ex_data_runtime_dup_ex_data(struct ex_data_runtime *ex_data_rt, const char *key, size_t key_len);
|
||||
void *ex_data_runtime_get_ex_data(struct ex_data_runtime *ex_data_rt, const char *key, size_t key_len);
|
||||
|
||||
void *ex_data_runtime_get_custom_data(struct ex_data_runtime *ex_data_rt, const char *key, size_t key_len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user