1 #ifndef PERSISTENCE_CLIENT_LIBRARY_PAS_INTERFACE_H
2 #define PERSISTENCE_CLIENT_LIBRARY_PAS_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_pas_interface.h
16 * @ingroup Persistence client library
17 * @author Ingo Huerner
18 * @brief Definition of the persistence client library persistence
19 * administration service interface.
23 #include <dbus/dbus.h>
27 * @brief Check if a org.genivi.persistence.admin message has been received
29 * @param connection the debus connection
30 * @param message the dbus message
31 * @param user_data data handed over to this function
33 * @return DBUS_HANDLER_RESULT_HANDLED or DBUS_HANDLER_RESULT_NOT_YET_HANDLED
35 DBusHandlerResult checkPersAdminMsg(DBusConnection * connection, DBusMessage * message, void * user_data);
37 //DBusHandlerResult checkPersAdminSignal(DBusConnection * connection, DBusMessage * message, void * user_data);
40 int signal_persModeChange(DBusConnection *connection, DBusMessage *message);
42 /// synchronize data back to memory device
43 int pers_data_sync(void);
46 /// lock access to persistence data
47 void pers_lock_access(void);
50 /// unlock access to persistent data
51 void pers_unlock_access(void);
55 * @brief check if access to persistent data is locked
57 * @return 1 if access is locked, 0 if access is possible
59 int isAccessLocked(void);
62 /// block persistence access and write data back to device
63 void process_block_and_write_data_back(unsigned int requestID);
67 * @brief send registration message 'RegisterPersAdminNotification' to org.genivi.persistence.admin
69 * @return 0 on success or -1 on error
71 int register_pers_admin_service(void);
75 * @brief send registration message 'UnRegisterPersAdminNotification' to org.genivi.persistence.admin
77 * @return 0 on success or -1 on error
79 int unregister_pers_admin_service(void);
83 #endif /* PERSISTENCE_CLIENT_LIBRARY_PAS_INTERFACE_H */