56 #if !defined(MQTTCLIENTPERSISTENCE_H) 58 #define MQTTCLIENTPERSISTENCE_H 65 #define MQTTCLIENT_PERSISTENCE_DEFAULT 0 70 #define MQTTCLIENT_PERSISTENCE_NONE 1 75 #define MQTTCLIENT_PERSISTENCE_USER 2 81 #define MQTTCLIENT_PERSISTENCE_ERROR -2 109 typedef int (*
Persistence_open)(
void** handle,
const char* clientID,
const char* serverURI,
void* context);
136 typedef int (*
Persistence_put)(
void* handle,
char* key,
int bufcount,
char* buffers[],
int buflens[]);
Persistence_containskey pcontainskey
Definition: MQTTClientPersistence.h:247
int(* Persistence_get)(void *handle, char *key, char **buffer, int *buflen)
Retrieve the specified data from the persistent store.
Definition: MQTTClientPersistence.h:152
Persistence_put pput
Definition: MQTTClientPersistence.h:227
Persistence_remove premove
Definition: MQTTClientPersistence.h:235
Persistence_clear pclear
Definition: MQTTClientPersistence.h:243
Persistence_get pget
Definition: MQTTClientPersistence.h:231
Persistence_open popen
Definition: MQTTClientPersistence.h:219
int(* Persistence_clear)(void *handle)
Clears the persistence store, so that it no longer contains any persisted data.
Definition: MQTTClientPersistence.h:193
Persistence_close pclose
Definition: MQTTClientPersistence.h:223
int(* Persistence_containskey)(void *handle, char *key)
Returns whether any data has been persisted using the specified key.
Definition: MQTTClientPersistence.h:204
void * context
Definition: MQTTClientPersistence.h:215
Persistence_keys pkeys
Definition: MQTTClientPersistence.h:239
int(* Persistence_keys)(void *handle, char ***keys, int *nkeys)
Returns the keys in this persistent data store.
Definition: MQTTClientPersistence.h:182
int(* Persistence_open)(void **handle, const char *clientID, const char *serverURI, void *context)
Initialize the persistent store.
Definition: MQTTClientPersistence.h:109
int(* Persistence_close)(void *handle)
Close the persistent store referred to by the handle.
Definition: MQTTClientPersistence.h:119
int(* Persistence_remove)(void *handle, char *key)
Remove the data for the specified key from the store.
Definition: MQTTClientPersistence.h:165
int(* Persistence_put)(void *handle, char *key, int bufcount, char *buffers[], int buflens[])
Put the specified data into the persistent store.
Definition: MQTTClientPersistence.h:136
A structure containing the function pointers to a persistence implementation and the context or state...
Definition: MQTTClientPersistence.h:211