mqtt_cache.h 688 B

1234567891011121314151617
  1. #ifndef MQTT_CACHE_H
  2. #define MQTT_CACHE_H
  3. #include "mqtt_ringbuffer.h"
  4. int mqtt_cache_open(const char* dir, const char* table_name, void** handle);
  5. int mqtt_cache_read_one_payload(void *handle, const char *table_name, mqtt_ringbuffer_element_t *e, int *idx);
  6. int mqtt_cache_write_one_payload(void *handle, const char *table_name, mqtt_ringbuffer_element_t e);
  7. int mqtt_cache_delete_one_payload(void* handle, const char* table_name,int rowid);
  8. int mqtt_cache_get_payload_nb(void* handle, const char* table_name, int* nb);
  9. int mqtt_cache_get_memory_size(void* handle, long* size);
  10. void mqtt_cache_close(void* handle);
  11. int mqtt_cache_free_memory(void* handle);
  12. #endif /* MQTT_CACHE_H */