Changed file and key-value API according GENIVI naming conventions
[profile/ivi/persistence-client-library.git] / src / persistence_client_library_lc_interface.h
1 #ifndef PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_H
2 #define PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_H
3
4 /******************************************************************************
5  * Project         Persistency
6  * (c) copyright   2012
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_lc_interface.h
16  * @ingroup        Persistence client library
17  * @author         Ingo Huerner
18  * @brief          Implementation of the persistence client library lifecycle interface.
19  * @see
20  */
21
22 #include <dbus/dbus.h>
23
24
25 /**
26  * @brief Check if a com.contiautomotive.NodeStateManager.LifecycleConsumer message has been received
27  *
28  * @param connection the debus connection
29  * @param message the dbus message
30  * @param user_data data handed over to this function
31  *
32  * @return DBUS_HANDLER_RESULT_HANDLED or DBUS_HANDLER_RESULT_NOT_YET_HANDLED
33  */
34 DBusHandlerResult checkLifecycleMsg(DBusConnection * connection, DBusMessage * message, void * user_data);
35
36
37 /**
38  * @brief send register message 'RegisterShutdownClient' to com.contiautomotive.NodeStateManager.Consumer
39  *
40  * @return 0 on success or -1 on error
41  */
42 int register_lifecycle();
43
44
45 /**
46  * @brief send register message 'UnRegisterShutdownClient' to com.contiautomotive.NodeStateManager.Consumer
47  *
48  * @return 0 on success or -1 on error
49  */
50 int unregister_lifecycle();
51
52
53 /**
54  * @brief process a shutdown message (close all open files, open databases, ...
55  *
56  * @param requestId the requestID
57  */
58 void process_prepare_shutdown(unsigned char requestId);
59
60
61
62 #endif /* PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_H */