59 #if !defined(MQTTCLIENTPERSISTENCE_H) 60 #define MQTTCLIENTPERSISTENCE_H 69 #define MQTTCLIENT_PERSISTENCE_DEFAULT 0 74 #define MQTTCLIENT_PERSISTENCE_NONE 1 79 #define MQTTCLIENT_PERSISTENCE_USER 2 85 #define MQTTCLIENT_PERSISTENCE_ERROR -2 113 typedef int (*
Persistence_open)(
void** handle,
const char* clientID,
const char* serverURI,
void* context);
140 typedef int (*
Persistence_put)(
void* handle,
char* key,
int bufcount,
char* buffers[],
int buflens[]);
Persistence_containskey pcontainskey
int(* Persistence_get)(void *handle, char *key, char **buffer, int *buflen)
Retrieve the specified data from the persistent store.
Persistence_remove premove
int(* Persistence_clear)(void *handle)
Clears the persistence store, so that it no longer contains any persisted data.
int(* Persistence_containskey)(void *handle, char *key)
Returns whether any data has been persisted using the specified key.
int(* Persistence_keys)(void *handle, char ***keys, int *nkeys)
Returns the keys in this persistent data store.
int(* Persistence_open)(void **handle, const char *clientID, const char *serverURI, void *context)
Initialize the persistent store.
int MQTTPersistence_afterRead(void *context, char **buffer, int *buflen)
int(* Persistence_close)(void *handle)
Close the persistent store referred to by the handle.
int(* Persistence_remove)(void *handle, char *key)
Remove the data for the specified key from the store.
int(* Persistence_put)(void *handle, char *key, int bufcount, char *buffers[], int buflens[])
Put the specified data into the persistent store.
A structure containing the function pointers to a persistence implementation and the context or state...
int MQTTPersistence_beforeWrite(void *context, int bufcount, char *buffers[], int buflens[])