1 /******************************************************************************* 2 * Copyright (c) 2009, 2018 IBM Corp. 3 * 4 * All rights reserved. This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License v2.0 6 * and Eclipse Distribution License v1.0 which accompany this distribution. 7 * 8 * The Eclipse Public License is available at 9 * https://www.eclipse.org/legal/epl-2.0/ 10 * and the Eclipse Distribution License is available at 11 * http://www.eclipse.org/org/documents/edl-v10.php. 12 * 13 * Contributors: 14 * Ian Craggs - initial API and implementation and/or initial documentation 15 *******************************************************************************/ 16 17 #if !defined(MQTTPERSISTENCEDEFAULT_H) 18 #define MQTTPERSISTENCEDEFAULT_H 19 20 /** Extension of the filename */ 21 #define MESSAGE_FILENAME_EXTENSION ".msg" 22 23 /* prototypes of the functions for the default file system persistence */ 24 int pstopen(void** handle, const char* clientID, const char* serverURI, void* context); 25 int pstclose(void* handle); 26 int pstput(void* handle, char* key, int bufcount, char* buffers[], int buflens[]); 27 int pstget(void* handle, char* key, char** buffer, int* buflen); 28 int pstremove(void* handle, char* key); 29 int pstkeys(void* handle, char*** keys, int* nkeys); 30 int pstclear(void* handle); 31 int pstcontainskey(void* handle, char* key); 32 33 int pstmkdir(char *pPathname); 34 35 #endif 36 37