3327c2e6de37e270205edc515289295dbd9ea564
[profile/ivi/persistence-client-library.git] / include / persistence_client_library.h
1 #ifndef PERSISTENCY_CLIENT_LIBRARY_H
2 #define PERSISTENCY_CLIENT_LIBRARY_H
3
4 /******************************************************************************
5  * Project         Persistency
6  * (c) copyright   2011
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 ******************************************************************************/
14  /**
15  * \file           persistence_client_library_key.h
16  * \ingroup        Persistence client library
17  * \author         Ingo Huerner (XSe) / Guy Sagnes (Continental)
18  * \brief          Header of the persistence client library.
19  *                 Library provides an API to access persistent data
20  * \par change history
21  * Date     Author          Version
22  * 25/06/13 Ingo Hürner     1.0.0 - Rework of Init functions
23  *
24  */
25 /** \ingroup GEN_PERS */
26 /** \defgroup PERS_CLIENT Client: initialisation access
27  *  \{
28  */
29 /** \defgroup PERS_CLIENT_INTERFACE API document
30  *  \{
31  */
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /** \defgroup PCL_DEFINES_API Defines, Struct, Enum
38  * \{
39  */
40
41 #define  PERSIST_API_INTERFACE_VERSION   (0x01010000U)
42
43 /** \} */
44
45
46 /** \defgroup PCL_OVERALL functions for Library Initialisation
47  * The following functions have to be called to allow intialisation of the internal interfaces.
48  * \{
49  */
50
51
52 #define PCL_SHUTDOWN_TYPE_FAST   2      /// Client registered for fast lifecycle shutdown
53 #define PCL_SHUTDOWN_TYPE_NORMAL 1      /// Client registered for normal lifecycle shutdown
54
55
56 /**
57  * @brief initalize client library
58  *
59  * @attention This function is currently  N O T  part of the GENIVI compliance specification
60  *
61  * @param appname application name, the name must be a unique name in the system
62  * @param shutdownMode shutdown mode ::PCL_SHUTDOWN_TYPE_FAST or ::PCL_SHUTDOWN_TYPE_NORMAL
63  *
64  * @return positive value: success;
65  *   On error a negative value will be returned with th follwoing error codes:
66  *   ::EPERS_LOCKFS, ::EPERS_NOT_INITIALIZED
67  */
68 int pclInitLibrary(const char* appname, int shutdownMode);
69
70
71 /**
72  * @brief deinitialize client library
73  *
74  * @attention This function is currently  N O T  part of the GENIVI compliance specification
75  *
76  * @return positive value: success;
77  *   On error a negative value will be returned with th follwoing error codes: ::EPERS_LOCKFS
78  */
79 int pclDeinitLibrary(void);
80
81 /** \} */
82
83 /** \} */ /* End of API */
84 /** \} */ /* End of MODULE */
85
86 #endif /* PERSISTENCY_CLIENT_LIBRARY_H */