1 #ifndef PERSISTENCE_CLIENT_LIBRARY_HANDLE_H
2 #define PERSISTENCE_CLIENT_LIBRARY_HANDLE_H
4 /******************************************************************************
7 * Company XS Embedded GmbH
8 *****************************************************************************/
9 /******************************************************************************
10 * This Source Code Form is subject to the terms of the
11 * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
12 * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13 ******************************************************************************/
15 * @file persistence_client_library_handle.h
16 * @ingroup Persistence client library
17 * @author Ingo Huerner
18 * @brief Header of the persistence client library handle.
19 * Library provides an API to access persistent data
23 #include "../include_protected/persistence_client_library_data_organization.h"
24 #include "../include_protected/persistence_client_library_rc_table.h"
26 /// handle structure definition
27 typedef struct _PersistenceHandle_s
29 PersistenceInfo_s info; /// persistence info
30 char dbPath[DbPathMaxLen]; /// path to the database
31 char dbKey[DbKeyMaxLen]; /// database key
36 /// persistence handle array
37 extern PersistenceHandle_s gHandleArray[MaxPersHandle];
40 /// open file descriptor handle array
41 extern int gOpenFdArray[MaxPersHandle];
45 * @brief get persistence handle
47 * @return a new handle or 0 if an error occured
49 int get_persistence_handle_idx();
53 * @brief close persistence handle
55 * @param the handle to close
57 void set_persistence_handle_close_idx(int handle);
62 #endif /* PERSISTENCY_CLIENT_LIBRARY_HANDLE_H */