20 #if !defined(MQTTPERSISTENCE_H) 21 #define MQTTPERSISTENCE_H 23 #if defined(__cplusplus) 31 #define PERSISTENCE_PUBLISH_SENT "s-" 33 #define PERSISTENCE_PUBREL "sc-" 35 #define PERSISTENCE_PUBLISH_RECEIVED "r-" 38 #define PERSISTENCE_V5_PUBLISH_SENT "s5-" 40 #define PERSISTENCE_V5_PUBREL "sc5-" 42 #define PERSISTENCE_V5_PUBLISH_RECEIVED "r5-" 45 #define PERSISTENCE_COMMAND_KEY "c-" 47 #define PERSISTENCE_V5_COMMAND_KEY "c5-" 49 #define PERSISTENCE_QUEUE_KEY "q-" 51 #define PERSISTENCE_V5_QUEUE_KEY "q5-" 53 #define PERSISTENCE_MAX_STEM_LENGTH 3 55 #define PERSISTENCE_MAX_KEY_LENGTH 9 57 #define PERSISTENCE_SEQNO_LIMIT 1000000 67 char** buffers,
size_t* buflens,
int htype,
int msgId,
int scr,
int MQTTVersion);
int MQTTPersistence_close(Clients *c)
int MQTTPersistence_create(MQTTClient_persistence **per, int type, void *pcontext)
void * MQTTPersistence_restorePacket(int MQTTVersion, char *buffer, size_t buflen)
int MQTTPersistence_restorePackets(Clients *c)
int MQTTPersistence_unpersistQueueEntry(Clients *client, MQTTPersistence_qEntry *qe)
int MQTTPersistence_persistQueueEntry(Clients *aclient, MQTTPersistence_qEntry *qe)
int MQTTPersistence_clear(Clients *c)
int MQTTPersistence_remove(Clients *c, char *type, int qos, int msgId)
void MQTTPersistence_wrapMsgID(Clients *c)
MQTTProperties properties
int MQTTPersistence_initialize(Clients *c, const char *serverURI)
A structure containing the function pointers to a persistence implementation and the context or state...
MQTTPersistence_message * msg
void MQTTPersistence_insertInOrder(List *list, void *content, size_t size)
int MQTTPersistence_putPacket(int socket, char *buf0, size_t buf0len, int count, char **buffers, size_t *buflens, int htype, int msgId, int scr, int MQTTVersion)
int MQTTPersistence_restoreMessageQueue(Clients *c)