29#ifndef PROTOCORE_EDGE_CACHE_SD_H
30#define PROTOCORE_EDGE_CACHE_SD_H
34#if PROTOCORE_ENABLE_EDGE_CACHE
48 const struct EdgeEntry *e;
51} EdgeCacheSdSerializeArgs;
60} EdgeCacheSdDeserializeArgs;
65 struct protocore_dbm *db;
66 const struct EdgeEntry *e;
75 struct protocore_dbm *db;
76 const uint8_t *digest;
85 struct protocore_dbm *db;
86 const uint8_t *digest;
92 struct protocore_dbm *db;
93 const char *path_prefix;
96} EdgeCacheSdPurgePrefixArgs;
101 struct protocore_dbm *db;
102} EdgeCacheSdPurgeAllArgs;
141 EdgeCacheSdSerializeArgs serialize_args;
142 EdgeCacheSdDeserializeArgs deserialize_args;
143 EdgeCacheSdPutArgs put_args;
144 EdgeCacheSdGetArgs get_args;
145 EdgeCacheSdDelArgs del_args;
146 EdgeCacheSdPurgePrefixArgs purge_prefix_args;
147 EdgeCacheSdPurgeAllArgs purge_all_args;
153#if PROTOCORE_ENABLE_DBM
158extern EdgeCacheSdVars EdgeCacheSdV;
163 void (*
const serialize)(uint8_t *work);
164 void (*
const deserialize)(uint8_t *work);
165 void (*
const put)(uint8_t *work);
166 void (*
const get)(uint8_t *work);
167 void (*
const del)(uint8_t *work);
168 void (*
const purge_prefix)(uint8_t *work);
169 void (*
const purge_all)(uint8_t *work);
174void protocore_edge_cache_sd_serialize(uint8_t *work);
175void protocore_edge_cache_sd_deserialize(uint8_t *work);
176#if PROTOCORE_ENABLE_DBM
177void protocore_edge_cache_sd_put(uint8_t *work);
178void protocore_edge_cache_sd_get(uint8_t *work);
179void protocore_edge_cache_sd_del(uint8_t *work);
180void protocore_edge_cache_sd_purge_prefix(uint8_t *work);
181void protocore_edge_cache_sd_purge_all(uint8_t *work);
188static const EdgeCacheSdNs EdgeCacheSd __attribute__((unused)) = {
189 .serialize = protocore_edge_cache_sd_serialize,
190 .deserialize = protocore_edge_cache_sd_deserialize,
191#if PROTOCORE_ENABLE_DBM
192 .put = protocore_edge_cache_sd_put,
193 .get = protocore_edge_cache_sd_get,
194 .del = protocore_edge_cache_sd_del,
195 .purge_prefix = protocore_edge_cache_sd_purge_prefix,
196 .purge_all = protocore_edge_cache_sd_purge_all,
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS