1 #ifndef PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_H
2 #define PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_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_lc_interface.h
16 * @ingroup Persistence client library
17 * @author Ingo Huerner
18 * @brief Implementation of the persistence client library lifecycle interface.
22 #include <dbus/dbus.h>
26 * @brief Check if a com.contiautomotive.NodeStateManager.LifecycleConsumer message has been received
28 * @param connection the debus connection
29 * @param message the dbus message
30 * @param user_data data handed over to this function
32 * @return DBUS_HANDLER_RESULT_HANDLED or DBUS_HANDLER_RESULT_NOT_YET_HANDLED
34 DBusHandlerResult checkLifecycleMsg(DBusConnection * connection, DBusMessage * message, void * user_data);
38 * @brief send register message 'RegisterShutdownClient' to com.contiautomotive.NodeStateManager.Consumer
40 * @return 0 on success or -1 on error
42 int register_lifecycle();
46 * @brief send register message 'UnRegisterShutdownClient' to com.contiautomotive.NodeStateManager.Consumer
48 * @return 0 on success or -1 on error
50 int unregister_lifecycle();
54 * @brief process a shutdown message (close all open files, open databases, ...
56 * @param requestId the requestID
58 void process_prepare_shutdown(unsigned char requestId);
62 #endif /* PERSISTENCE_CLIENT_LIBRARY_LC_INTERFACE_H */