summaryrefslogtreecommitdiff
path: root/Administrator/inc/private
diff options
context:
space:
mode:
Diffstat (limited to 'Administrator/inc/private')
-rw-r--r--Administrator/inc/private/ssw_pers_admin_access_lib.h85
-rw-r--r--Administrator/inc/private/ssw_pers_admin_common.h96
-rw-r--r--Administrator/inc/private/ssw_pers_admin_config.h377
-rw-r--r--Administrator/inc/private/ssw_pers_admin_database_helper.h84
-rw-r--r--Administrator/inc/private/ssw_pers_admin_dbus.h68
-rw-r--r--Administrator/inc/private/ssw_pers_admin_files_helper.h192
-rw-r--r--Administrator/inc/private/ssw_pers_admin_pcl.h74
-rw-r--r--Administrator/inc/private/ssw_pers_admin_service.h150
8 files changed, 1126 insertions, 0 deletions
diff --git a/Administrator/inc/private/ssw_pers_admin_access_lib.h b/Administrator/inc/private/ssw_pers_admin_access_lib.h
new file mode 100644
index 0000000..251b669
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_access_lib.h
@@ -0,0 +1,85 @@
+#ifndef PERSADMIN_ACCESS_LIB_H
+#define PERSADMIN_ACCESS_LIB_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Ionut.Ieremie@continental-corporation.com
+*
+* Interface: private - persistence admin service access lib
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.04.15 uidu0250 2.0.0.0 CSP_WZ#3424: Add IF extension for "restore to default"
+* 2012.11.16 uidl9757 1.0.0.0 CSP_WZ#1280: persadmin_response_msg_s: rename bResult to result and change type to long
+* 2012.11.12 uidl9757 1.0.0.0 CSP_WZ#1280: Member "type" in persadmin_request_msg_s must be PersASSelectionType_e
+* 2012.11.13 uidl9757 1.0.0.0 CSP_WZ#1280: Created
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "persComTypes.h"
+#include "persistence_admin_service.h"
+#include "persComDataOrg.h"
+
+#define PERSADMIN_ACCESSLIB_REQUEST_MAX_PATH (PERS_ORG_MAX_LENGTH_PATH_FILENAME + 1)//256
+
+/* named synchronization objects */
+#define PERSADMIN_ACCESSLIB_MSG_QUEUE_REQUEST "/PersadminAccessLibRequest"
+#define PERSADMIN_ACCESSLIB_MSG_QUEUE_RESPONSE "/PersadminAccessLibResponse"
+#define PERSADMIN_ACCESSLIB_SYNC_SEMAPHORE "/PersadminAccessLibSync"
+
+/* supported opperations */
+typedef enum
+{
+ PAS_Req_DataBackupCreate = 0,
+ PAS_Req_DataBackupRecovery,
+ PAS_Req_DataFolderExport,
+ PAS_Req_DataFolderImport,
+ PAS_Req_ResourceConfigAdd,
+ PAS_Req_ResourceConfigChangeProperties,
+ PAS_Req_UserDataCopy,
+ PAS_Req_UserDataDelete,
+ PAS_Req_DataRestoreToDefault,
+ /* add new definitions here*/
+ PAS_Req_LastEntry
+}persadmin_request_e ;
+
+/* used to pass client's request to the processing thread */
+typedef struct
+{
+ persadmin_request_e eRequest ;
+ PersASSelectionType_e type ;
+ PersASDefaultSource_e defaultSource ;
+ char path1[PERSADMIN_ACCESSLIB_REQUEST_MAX_PATH] ; /* for backup_name, dst_folder, src_folder, resource_file */
+ char path2[PERSADMIN_ACCESSLIB_REQUEST_MAX_PATH] ; /* applicationID */
+ unsigned int user_no ;
+ unsigned int seat_no ;
+ unsigned int src_user_no ;
+ unsigned int src_seat_no ;
+ unsigned int dest_user_no ;
+ unsigned int dest_seat_no ;
+}persadmin_request_msg_s ;
+
+/* used to pass response from processing thread to the client who made the request */
+typedef struct
+{
+ long result ;
+}persadmin_response_msg_s ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PERSADMIN_ACCESS_LIB_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_common.h b/Administrator/inc/private/ssw_pers_admin_common.h
new file mode 100644
index 0000000..2d44631
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_common.h
@@ -0,0 +1,96 @@
+#ifndef SSW_PERS_ADMIN_COMMON_H
+#define SSW_PERS_ADMIN_COMMON_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Ionut.Ieremie@continental-corporation.com
+*
+* Interface: private - other common functionality
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.03.21 uidu0250 1.0.0.0 CSP_WZ#2250: Provide compress/uncompress functionality
+* 2013.02.07 uidu0250 1.0.0.0 CSP_WZ#2220: Removed persadmin_get_hash_for_file declaration
+* 2013.01.22 uidn3591 1.0.0.0 CSP_WZ#2250: Implemented wrappers over libarchive to compress/uncompress files into/from an archive
+* 2013.01.04 uidu0250 1.0.0.0 CSP_WZ#2060: Changed CRC32 to CRC16 provided by HelpLibs
+* 2013.01.03 uidl9757 1.0.0.0 CSP_WZ#2060: Common interface to be used by both PCL and PAS
+* 2012.12.11 uidu0250 1.0.0.0 CSP_WZ#1280: Added declaration for persadmin_get_hash_for_file
+* 2012.11.16 uidn3565 1.0.0.0 CSP_WZ#1280: Added declarations for persadmin_list_application_folders & persadmin_list_application_folders_get_size
+* 2012.11.16 uidl9757 1.0.0.0 CSP_WZ#1280: Created
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* #ifdef __cplusplus */
+
+#include "persComTypes.h"
+
+#define BACKUP_LOCATION ("/tmp/backups/")
+#define BACKUP_FORMAT (".arch.tar.gz")
+
+extern const char StringTerminator;
+extern const char PathSeparator;
+
+/*
+* export the application's information about links (to groups and public data)
+* returns the number of exported links, or a negative value in case of error
+*/
+sint_t persadmin_export_links(pstr_t absPathApplicationFolder, pstr_t absPathExportFolder) ;
+
+/*
+* install links (to groups and public data) into the application folder(indicated by absPathApplicationFolder)
+* based on information available inside the import folder (indicated by absPathImportFolder)
+* returns the number of installed links, or a negative value in case of error
+*/
+sint_t persadmin_import_links(pstr_t absPathImportFolder, pstr_t absPathApplicationFolder) ;
+
+/**
+ * @brief List all application folders under the given root data path.
+ *
+ * @param rootPath [in] Absolute path to the folder storing applications' data; the final path separator is not required - e.g. "/Data/mnt-c"
+ * @param list [out] Buffer receiving the list of application folders; entries are relative to rootPath, are separated by '\0' and are ended with a double '\0'
+ * @param listSize [in] Size in bytes of of list; should be at least equal to the positive return value of persadmin_list_application_folders_get_size()
+ * @return Positive value - the size of data written in list, negative - error.
+ * TODO: define error codes
+ */
+sint_t persadmin_list_application_folders( pconststr_t rootPath, pstr_t list, sint_t listSize );
+
+/**
+ * @brief Compute the size of the buffer needed to accommodate the list of application folders
+ *
+ * @param rootPath [in] Absolute path to the folder storing applications' data; the final path separator is not required - e.g. "/Data/mnt-c"
+ * @return Positive value - the size in bytes of application data folders listing, negative - error.
+ * TODO: define error codes
+ */
+sint_t persadmin_list_application_folders_get_size( pconststr_t rootPath );
+
+/**
+ * @brief Saves files together into a single archive.
+ *
+ * @return 0 for success, negative value otherwise.
+ */
+sint_t persadmin_compress(pstr_t compressTo, pstr_t compressFrom);
+
+/**
+ * @brief Restore files from an archive.
+ *
+ * @return 0 for success, negative value otherwise.
+ */
+sint_t persadmin_uncompress(pstr_t extractFrom, pstr_t extractTo);
+
+
+#ifdef __cplusplus
+}
+#endif /* extern "C" { */
+
+#endif /*SSW_PERS_ADMIN_COMMON_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_config.h b/Administrator/inc/private/ssw_pers_admin_config.h
new file mode 100644
index 0000000..319ab85
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_config.h
@@ -0,0 +1,377 @@
+#ifndef OSS_PERSISTENCE_ADMIN_CONFIG_H
+#define OSS_PERSISTENCE_ADMIN_CONFIG_H
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Ionut.Ieremie@continental-corporation.com
+*
+* Interface: protected - Access to configuration files (json, xml)
+*
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Reason
+* 2013.03.25 uidl9757 1.0.0.0 Created
+*
+**********************************************************************************************************************/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* #ifdef __cplusplus */
+
+#include "persComDataOrg.h"
+#include "persComDbAccess.h"
+#include "persComRct.h"
+
+
+/*
+ * Structure of uncompressed WebTool's output
+ *
+ * []resource
+ * ...[]public
+ * . ...installRules.json
+ * . ...[]public
+ * . ...[]file
+ * . . []defaultData
+ * . . []configurableDefaultData
+ * . . []initialData
+ * . ...[]key
+ * . . factoryDefaultData.json
+ * . . configurableDefaultData.json
+ * . . initialDefault.json
+ * . ...installExceptions.json
+ * . ...resourceconfiguration.json
+ * ...[]groups
+ * . ...installRules.json
+ * . ...[]10
+ * . ...[]file
+ * . . []defaultData
+ * . . []configurableDefaultData
+ * . . []initialData
+ * . ...[]key
+ * . . factoryDefaultData.json
+ * . . configurableDefaultData.json
+ * . . initialDefault.json
+ * . ...GroupContent.json
+ * . ...installExceptions.json
+ * . ...resourceconfiguration.json
+ * . []20
+ * ...[]apps
+ * ...installRules.json
+ * ...[]one_application
+ * . ...[]file
+ * . . []defaultData
+ * . . []configurableDefaultData
+ * . . []initialData
+ * . ...[]key
+ * . . factoryDefaultData.json
+ * . . configurableDefaultData.json
+ * . . initialDefault.json
+ * . . installExceptions.json
+ * . ...resourceconfiguration.json
+ * ...[]another_application
+ */
+
+#define PERSADM_CFG_RESOURCE_ROOT_FOLDER_NAME "resource"
+#define PERSADM_CFG_RESOURCE_PUBLIC_FOLDER_NAME "public"
+#define PERSADM_CFG_RESOURCE_PUBLIC_FOLDER_PATHNAME PERSADM_CFG_RESOURCE_ROOT_FOLDER_NAME"/"PERSADM_CFG_RESOURCE_PUBLIC_FOLDER_NAME
+#define PERSADM_CFG_RESOURCE_GROUPS_FOLDER_NAME "groups"
+#define PERSADM_CFG_RESOURCE_GROUPS_FOLDER_PATHNAME PERSADM_CFG_RESOURCE_ROOT_FOLDER_NAME"/"PERSADM_CFG_RESOURCE_GROUPS_FOLDER_NAME
+#define PERSADM_CFG_RESOURCE_APPS_FOLDER_NAME "apps"
+#define PERSADM_CFG_RESOURCE_APPS_FOLDER_PATHNAME PERSADM_CFG_RESOURCE_ROOT_FOLDER_NAME"/"PERSADM_CFG_RESOURCE_APPS_FOLDER_NAME
+
+#define PERSADM_CFG_RESOURCE_RCT_FILENAME "resourceconfiguration.json"
+#define PERSADM_CFG_RESOURCE_INSTALL_RULES_FILENAME "installRules.json"
+#define PERSADM_CFG_RESOURCE_INSTALL_EXCEPTIONS_FILENAME "installExceptions.json"
+#define PERSADM_CFG_RESOURCE_GROUP_CONTENT_FILENAME "GroupContent.json"
+
+#define PERSADM_CFG_RESOURCE_ROOT_FILEDATA_FOLDER_NAME "file"
+#define PERSADM_CFG_RESOURCE_FACTORY_DEFAULT_FILEDATA_FOLDER_NAME PERS_ORG_DEFAULT_DATA_FOLDER_NAME
+#define PERSADM_CFG_RESOURCE_CONFIG_DEFAULT_FILEDATA_FOLDER_NAME PERS_ORG_CONFIG_DEFAULT_DATA_FOLDER_NAME
+#define PERSADM_CFG_RESOURCE_NON_DEFAULT_FILEDATA_FOLDER_NAME "initialData.json"
+
+#define PERSADM_CFG_RESOURCE_ROOT_KEYDATA_FOLDER_NAME "key"
+#define PERSADM_CFG_RESOURCE_FACTORY_DEFAULT_KEYDATA_FILENAME "factoryDefaultData.json"
+#define PERSADM_CFG_RESOURCE_CONFIG_KEYDEFAULT_DATA_FILENAME "configurableDefaultData.json"
+#define PERSADM_CFG_RESOURCE_NON_DEFAULT_KEYDATA_FILENAME "initialDefault.json"
+
+
+/** types of configuration files */
+typedef enum PersAdminCfgFileTypes_e_
+{
+ PersAdminCfgFileType_InstallRules = 0, /**< config rules for all the applications or groups */
+ PersAdminCfgFileType_InstallExceptions, /**< config rules for a single application or group */
+ PersAdminCfgFileType_RCT, /**< resource configuration table */
+ PersAdminCfgFileType_Database, /**< database with default or init values for resourceIDs */
+ PersAdminCfgFileType_GroupContent, /**< list with the applications that are member of a group */
+
+ /** insert new entries here ... */
+ PersAdminCfgFileType_LastEntry /**< last entry */
+} PersAdminCfgFileTypes_e;
+
+
+/** global rules */
+typedef enum PersAdminCfgInstallRules_e_
+{
+ PersAdminCfgInstallRules_NewInstall = 0, /**< delete existent data and install the new data */
+ PersAdminCfgInstallRules_Uninstall, /**< remove the existent data */
+ PersAdminCfgInstallRules_DontTouch, /**< don't touch the application/group/resource */
+ PersAdminCfgInstallRules_UpdateAll, /**< update(merge) the existent data with new data (factory-default, config-default and non-default) */
+ PersAdminCfgInstallRules_UpdateAllSkipDefaultFactory, /**< update(merge) the existent data with new data (config-default and non-default) */
+ PersAdminCfgInstallRules_UpdateAllSkipDefaultConfig, /**< update(merge) the existent data with new data (factory-default and non-default) */
+ PersAdminCfgInstallRules_UpdateAllSkipDefaultAll, /**< update(merge) the existent data with new data (non-default) */
+ PersAdminCfgInstallRules_UpdateDefaultFactory, /**< update(merge) the existent data with new data (factory-default) */
+ PersAdminCfgInstallRules_UpdateDefaultConfig, /**< update(merge) the existent data with new data (config-default) */
+ PersAdminCfgInstallRules_UpdateDefaultAll, /**< update(merge) the existent data with new data (factory-default, config-default) */
+ PersAdminCfgInstallRules_UpdateSetOfResources, /**< update/remove data for a set of resources (factory-default, config-default and non-default) */
+ PersAdminCfgInstallRules_UninstallNonDefault, /**< uninstall non-default data (similar to reset to default) */
+
+ /** insert new entries here ... */
+ PersAdminCfgInstallRules_LastEntry /**< last entry */
+} PersAdminCfgInstallRules_e;
+
+
+/** local rules */
+typedef enum PersAdminCfgInstallExceptions_e_
+{
+ PersAdminCfgInstallExceptions_Update = 0, /**< update(merge) the resource's existent data with new data */
+ PersAdminCfgInstallExceptions_DontTouch, /**< don't touch the resource's data */
+ PersAdminCfgInstallExceptions_Delete, /**< remove the resource's existent data */
+
+ /** insert new entries here ... */
+ PersAdminCfgInstallExceptions_LastEntry /**< last entry */
+} PersAdminCfgInstallExceptions_e;
+
+
+/** entry in global rules file */
+typedef struct PersAdminCfgInstallRulesEntry_s_
+{
+ char responsible[PERS_RCT_MAX_LENGTH_RESPONSIBLE]; /**< name of the application/group */
+ PersAdminCfgInstallRules_e eRule; /**< config rule for itemIdentifier */
+} PersAdminCfgInstallRulesEntry_s;
+
+/** entry in local rules file */
+typedef struct PersAdminCfgRuleLocalEntry_s_
+{
+ char itemIdentifier[PERS_DB_MAX_LENGTH_KEY_NAME]; /**< name of the resource */
+ PersAdminCfgInstallExceptions_e eRule; /**< config rule for itemIdentifier */
+} PersAdminCfgRuleLocalEntry_s;
+
+/** entry in database */
+typedef struct PersAdminCfgDbEntry_s_
+{
+ char itemIdentifier[PERS_DB_MAX_LENGTH_KEY_NAME]; /**< name of the resource */
+ char data[PERS_DB_MAX_SIZE_KEY_DATA]; /**< config rule for itemIdentifier */
+} PersAdminCfgDbEntry_s ;
+
+
+/** entry in group content */
+typedef struct PersAdminCfgGroupContentEntry_s_
+{
+ char appName[PERS_RCT_MAX_LENGTH_RESPONSIBLE]; /**< name of the application that is member of the group */
+} PersAdminCfgGroupContentEntry_s ;
+
+/** entry in resource config table */
+typedef struct PersAdminCfgRctEntry_s_
+{
+ char resourceID[PERS_RCT_MAX_LENGTH_RESOURCE_ID]; /**< identifier of the resource */
+ PersistenceConfigurationKey_s sConfig ; /**< configuration for resourceID */
+} PersAdminCfgRctEntry_s ;
+
+/** entry in config files for key type resources */
+typedef struct PersAdminCfgKeyDataEntry_s_
+{
+ char identifier[PERS_DB_MAX_LENGTH_KEY_NAME]; /**< identifier of the resource */
+ int dataSize ; /**< size of data */
+ char data[PERS_DB_MAX_SIZE_KEY_DATA]; /**< init/default data for the key type resource */
+} PersAdminCfgKeyDataEntry_s ;
+
+
+/***********************************************************************************************************************************
+*********************************************** General usage **********************************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief Obtain a handler to config file (RCT, rules, DB) indicated by cfgFilePathname
+ *
+ * \param cfgFilePathname [in] absolute path to config file (length limited to \ref PERS_ORG_MAX_LENGTH_PATH_FILENAME)
+ * \param eCfgFileType [in] absolute path to config file (length limited to \ref PERS_ORG_MAX_LENGTH_PATH_FILENAME)
+ *
+ * \return >= 0 for valid handler, negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgFileOpen(char const * filePathname, PersAdminCfgFileTypes_e eCfgFileType) ;
+
+/**
+ * \brief Close handler to config file
+ *
+ * \param handlerCfgFile [in] handler obtained with persCfgFileOpen
+ *
+ * \return 0 for success, negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgFileClose(signed int handlerCfgFile) ;
+
+/***********************************************************************************************************************************
+*********************************************** RCT related ************************************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief read a resourceID's configuration from RCT
+ *
+ * \param handlerRCT [in] handler obtained with persAdmCfgFileOpen
+ * \param resourceID [in] resource's identifier (length limited to \ref PERS_RCT_MAX_LENGTH_RESOURCE_ID)
+ * \param psConfig_out [out]where to return the configuration for resourceID
+ *
+ * \return 0 for success, or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRctRead(signed int handlerRCT, char const * resourceID, PersistenceConfigurationKey_s* psConfig_out) ;
+
+
+/**
+ * \brief Find the buffer's size needed to accommodate the list of resourceIDs in RCT
+ * \note : resourceIDs in the list are separated by '\0'
+ *
+ * \param handlerRCT [in] handler obtained with persAdmCfgFileOpen
+ *
+ * \return needed size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRctGetSizeResourcesList(signed int handlerRCT) ;
+
+/**
+ * \brief Get the list of the resourceIDs in RCT
+ * \note : resourceIDs in the list are separated by '\0'
+ *
+ * \param handlerRCT [in] handler obtained with persAdmCfgFileOpen
+ * \param listBuffer_out [out]buffer where to return the list of resourceIDs
+ * \param listBufferSize [in] size of listBuffer_out
+ *
+ * \return list size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRctGetResourcesList(signed int handlerRCT, char* listBuffer_out, signed int listBufferSize) ;
+
+
+/***********************************************************************************************************************************
+*********************************************** Install Rules related **************************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief Find the buffer's size needed to accommodate the list of apps/groups names in install rules file
+ * \note : the items in the list are separated by '\0'
+ *
+ * \param handlerRulesFile [in] handler obtained with persAdmCfgFileOpen
+ *
+ * \return needed size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRulesGetSizeFoldersList(signed int handlerRulesFile) ;
+
+/**
+ * \brief Get the list of apps/groups names in install rules file
+ * \note : the items in the list are separated by '\0'
+ *
+ * \param handlerRulesFile [in] handler obtained with persAdmCfgFileOpen
+ * \param listBuffer_out [out]buffer where to return the list of apps/groups names
+ * \param listBufferSize [in] size of listBuffer_out
+ *
+ * \return list size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRulesGetFoldersList(signed int handlerRulesFile, char* listBuffer_out, signed int listBufferSize) ;
+
+/**
+ * \brief Get the rule for the app/group install folder
+ *
+ * \param handlerRulesFile [in] handler obtained with persAdmCfgFileOpen
+ * \param folderName [in] name of the app/group install folder
+ * \param peRule_out [out]buffer where to return the rule for the folder
+ *
+ * \return 0 for success, or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgRulesGetRuleForFolder(signed int handlerRulesFile, char* folderName, PersAdminCfgInstallRules_e* peRule_out) ;
+
+
+/***********************************************************************************************************************************
+*********************************************** Install Exceptions related *********************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief Find the buffer's size needed to accommodate the list of resources in install exceptions file
+ * \note : the items in the list are separated by '\0'
+ *
+ * \param handlerExceptionsFile [in] handler obtained with persAdmCfgFileOpen
+ *
+ * \return needed size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgExcGetSizeResourcesList(signed int handlerExceptionsFile) ;
+
+/**
+ * \brief Get the list of resources in install exceptions file
+ * \note : the items in the list are separated by '\0'
+ *
+ * \param handlerExceptionsFile [in] handler obtained with persAdmCfgFileOpen
+ * \param listBuffer_out [out]buffer where to return the list of apps/groups names
+ * \param listBufferSize [in] size of listBuffer_out
+ *
+ * \return list size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgExcGetFoldersList(signed int handlerExceptionsFile, char* listBuffer_out, signed int listBufferSize) ;
+
+/**
+ * \brief Get the rule for the app/group install folder
+ *
+ * \param handlerRulesFile [in] handler obtained with persAdmCfgFileOpen
+ * \param resource [in] identifier of the resource affected by the exception
+ * \param peException_out [out]buffer where to return the exception for the resource
+ *
+ * \return 0 for success, or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgExcGetExceptionForResource(signed int handlerExceptionsFile, char* resource, PersAdminCfgInstallExceptions_e* peException_out) ;
+
+/***********************************************************************************************************************************
+*********************************************** Group content related **************************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief Find the buffer's size needed to accomodate the list of members in the group
+ *
+ * \param handlerGroupContent [in] handler obtained with persAdmCfgFileOpen
+ *
+ * \return needed size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgGroupContentGetSizeMembersList(signed int handlerGroupContent) ;
+
+
+/**
+ * \brief Get the list of members in the group
+ * \note : resourceIDs in the list are separated by '\0'
+ *
+ * \param handlerGroupContent [in] handler obtained with persAdmCfgFileOpen
+ * \param listBuffer_out [out]buffer where to return the list of resourceIDs
+ * \param listBufferSize [in] size of listBuffer_out
+ *
+ * \return list size [byte], or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgGroupContentGetMembersList(signed int handlerGroupContent, char* listBuffer_out, signed int listBufferSize) ;
+
+
+/***********************************************************************************************************************************
+*********************************************** Default data related **************************************************************
+***********************************************************************************************************************************/
+
+/**
+ * \brief Get the default value for the key type resourceID
+ *
+ * \param hDefaultDataFile [in] handler obtained with persAdmCfgFileOpen
+ *
+ * \return size of default data (0 means there is no default data for the key), or negative value for error (\ref PERSADM_CFG_ERROR_CODES_DEFINES)
+ */
+signed int persAdmCfgReadDefaultData(signed int hDefaultDataFile, char const * resourceID, char* defaultDataBuffer_out, signed int bufferSize) ;
+
+
+#ifdef __cplusplus
+}
+#endif /* extern "C" { */
+
+#endif /* OSS_PERSISTENCE_ADMIN_CONFIG_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_database_helper.h b/Administrator/inc/private/ssw_pers_admin_database_helper.h
new file mode 100644
index 0000000..0452f66
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_database_helper.h
@@ -0,0 +1,84 @@
+#ifndef SSW_PERS_ADMIN_DATABASE_HELPER_H
+#define SSW_PERS_ADMIN_DATABASE_HELPER_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Ana.Chisca@continental-corporation.com
+*
+* Interface: private - common functionality for database manipulation
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.01.19 uidn3591 1.0.0.0 CSP_WZ#2060: Fix delete and copy keys by filter to conform to requirements
+* 2013.01.03 uidl9757 1.0.0.0 CSP_WZ#2060: Use pers_resource_config_table_if.h
+* 2012.11.12 uidn3591 1.0.0.0 CSP_WZ#1280: Created
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* #ifdef __cplusplus */
+
+#include "persComTypes.h"
+
+#include "persistence_admin_service.h"
+#include "persComRct.h"
+
+/**
+ * @brief get the names of an application's databases based on the databases' type (local/shared)
+ * @usage:
+ *
+ * @param pchDBRootPath [in] path to the folder where to look for the databases
+ * @param pchAppName [in] application for which the databases are requested
+ * @param eStorage [in] the type of the requested databases
+ * @param pchDBPaths_out [out] pointer to a buffer where to store the databases' names [the databases' names are separated by '\0']
+ * @param bufSize [in] size of buffer
+ *
+ * @return positive value: size of data passed in pchDBPaths_out ; negative value - error
+ * TODO: define error codes
+ */
+sint_t persadmin_get_all_db_paths_with_names(pconststr_t pchDBRootPath, pconststr_t pchAppName, PersistenceStorage_e eStorage, pstr_t pchDBPaths_out, sint_t bufSize);
+
+
+/**
+ * @brief deletes keys filtered by user name and seat number
+ *
+ * @param pchDBPath[in] path to where the DB can be located
+ * @param user_no [in] the user ID
+ * @param seat_no [in] the seat number (seat 1 to 4; 0 is for all seats)
+ *
+ * @return 0 for success, negative value otherwise;
+ * TODO: define error codes
+ */
+sint_t persadmin_delete_keys_by_filter(PersASSelectionType_e type, pstr_t pchDBPath, uint32_t user_no, uint32_t seat_no);
+
+
+/**
+ * @brief copies keys filtered by user name and seat number
+ *
+ * @param pchdestDBPath [in] destination DB path
+ * @param pchsourceDBPath[in] source DB path
+ * @param user_no [in] the user ID
+ * @param seat_no [in] the seat number (seat 1 to 4; 0 is for all seats)
+ *
+ * @return 0 for success, negative value otherwise;
+ * TODO: define error codes
+ */
+sint_t persadmin_copy_keys_by_filter(PersASSelectionType_e type, pstr_t pchdestDBPath, pstr_t pchsourceDBPath, uint32_t user_no, uint32_t seat_no);
+
+
+
+#ifdef __cplusplus
+}
+#endif /* extern "C" { */
+
+#endif /*SSW_PERS_ADMIN_DATABASE_HELPER_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_dbus.h b/Administrator/inc/private/ssw_pers_admin_dbus.h
new file mode 100644
index 0000000..46e69ac
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_dbus.h
@@ -0,0 +1,68 @@
+#ifndef SSW_PERS_ADMIN_DBUS_H
+#define SSW_PERS_ADMIN_DBUS_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Petrica.Manoila@continental-corporation.com
+*
+* Interface: private - persistence admin service DBus access interface
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013-09-17 uidu0250 1.0.0.0 CSP_WZ#5633: Added persadmin_IsRegisteredToNSM function
+* 2013-03-09 uidu0250 1.0.0.0 CSP_WZ#4480: Added persadmin_QuitDBusMainLoop function
+* 2013.04.04 uidu0250 1.0.0.0 CSP_WZ#2739: Using PersCommonIPC for requests to PCL
+* 2012.11.13 uidu0250 1.0.0.0 CSP_WZ#1280: Initial version
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "persComTypes.h"
+
+/*
+ * DBus identification of Persistence Administrator Service (PAS)
+ */
+#define PERSISTENCE_ADMIN_SVC_BUS_TYPE G_BUS_TYPE_SYSTEM
+#define PERSISTENCE_ADMIN_SVC_BUS_NAME "org.genivi.persistence.admin_svc"
+#define PERSISTENCE_ADMIN_SVC_OBJ_PATH "/org/genivi/persistence/admin"
+
+
+/**
+ * \brief Initializes the DBus connection and enters the main DBus loop. Returns when the DBus connection is closed
+ *
+ * \return void
+ */
+void persadmin_RunDBusMainLoop(void);
+
+/**
+ * \brief Quits the main DBus loop
+ *
+ * \return void
+ */
+void persadmin_QuitDBusMainLoop(void);
+
+
+/**
+ * \brief Check if the registration to NSM was performed successfully.
+ *
+ * \return true if registered to NSM, false otherwise
+ */
+bool_t persadmin_IsRegisteredToNSM(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SSW_PERS_ADMIN_DBUS_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_files_helper.h b/Administrator/inc/private/ssw_pers_admin_files_helper.h
new file mode 100644
index 0000000..8b35457
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_files_helper.h
@@ -0,0 +1,192 @@
+#ifndef SSW_PERS_ADMIN_FILES_HELPER_H
+#define SSW_PERS_ADMIN_FILES_HELPER_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Ionut.Ieremie@continental-corporation.com
+*
+* Interface: private - common functionality for files/folder manipulation
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.02.07 uidu0250 1.0.0.0 CSP_WZ#1280: Added persadmin_check_for_same_file_content to check for identical file content
+* 2012.11.16 uidv2833 1.0.0.0 CSP_WZ#1280: persadmin_delete_folder and persadmin_delete_file return the number of bytes deleted
+* 2012.11.15 uidl9757 1.0.0.0 CSP_WZ#1280: Some extensions:
+ - persadmin_copy_folder and persadmin_copy_file return the number of bytes copied
+ - added persadmin_check_if_file_exist and persadmin_check_if_file_exist
+* 2012.11.12 uidl9757 1.0.0.0 CSP_WZ#1280: Created
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* #ifdef __cplusplus */
+
+#include "persComTypes.h"
+#include "persComDataOrg.h"
+
+#define PERSADMIN_MAX_PATH_LENGHT (PERS_ORG_MAX_LENGTH_PATH_FILENAME + 1) //256
+#define PERSADMIN_MAX_NESTING_DEPTH 12
+
+typedef enum
+{
+ PersadminFilterAll = 0, /* all folders and files are selectes */
+ PersadminFilterFilesAll, /* only files are selected (folders are skipped )*/
+ PersadminFilterFilesRegular, /* only regular files are selected (folders and link files are skipped )*/
+ PersadminFilterFilesLink, /* only link files are selected (folders and regular files are skipped )*/
+ PersadminFilterFoldersAndRegularFiles, /* only folders and regular files are selected */
+ PersadminFilterFoldersAndLinkFiles, /* only folders and link files are selected */
+ PersadminFilterFolders, /* only folders are selected */
+}PersadminFilterMode_e ;
+
+/*
+* filePath can be absolute or relative
+* it is not checked if the file indicated by filePath actually exist
+* returns in fileName_out the part of filePath after the last '/' (or the complete filePath if there is no '/')
+*/
+sint_t persadmin_get_filename(pstr_t filePath, pstr_t fileName_out, sint_t size);
+
+/*
+* filePath can be absolute or relative
+* it is not checked if the file indicated by filePath actually exist
+* returns the part of filePath after the last '.' (but must be after the last '/')
+*/
+sint_t persadmin_get_file_extension(pstr_t filePath, pstr_t fileExtension_out, sint_t size);
+
+
+/*
+* filePath can be absolute or relative
+* it is not checked if the file indicated by filePath actually exist
+* returns the part of filePath before (and including) the last '/'
+*/
+sint_t persadmin_get_folder_path(pstr_t filePath, pstr_t folderPath_out, sint_t size);
+
+/*
+* check if file/folder indicated by pathname exist
+* if (bIsFolder==true) it is checked the existence of the folder, otherway the existence of the file
+* returns 0 if the file/folder exist, a negative value other way
+*/
+sint_t persadmin_check_if_file_exists(pstr_t pathname, bool_t bIsFolder) ;
+
+/*
+* create a link in the path indicated by pathLink which points to path indeicated by pathTarget
+* there is no check if pathTarget actually exist (or is valid)
+* the intermediate folders in pathLink are created if they do not exist
+* returns 0 if the file/folder exist, a negative value other way
+*/
+sint_t persadmin_create_symbolic_link(pstr_t pathLink, pstr_t pathTarget) ;
+
+/**
+ * \brief copy the folder indicated by absPathSource into the folder indicated by absPathDestination
+ * \usage : persadmin_copy_folder("/Data/mnt-c/App-1/", "/var/Pers/bkup/App_1_bkup/")
+ * : copy the content of /Data/mnt-c/App-1/ into /var/Pers/bkup/App_1_bkup/
+ *
+ * \param absPathSource [in] absolute path of source folder
+ * \param absPathDestination [in] absolute path of destination folder
+ * \param eFilter [in] specify what to list (see PersadminFilterMode_e)
+ * \param bRecursive [in] if true, a recursive listing is performed
+ * \return number of bytes copied, negative value for error
+ * TODO: define error codes
+ */
+sint_t persadmin_copy_folder(pstr_t absPathSource, pstr_t absPathDestination, PersadminFilterMode_e eFilter, bool_t bRecursive);
+
+
+/**
+ * \brief create a folder as indicated by absPath
+ * \usage : persadmin_create_folder("/var/Pers/bkup/App_1_bkup/")
+ * \note : all the missing folders in the path are created (i.e. /var/Pers/, /var/Pers/bkup/)
+ *
+ * \param absPath [in] absolute path to folder to be created
+ * \return 0 for success, negative value otherwise;
+ * TODO: define error codes
+ */
+sint_t persadmin_create_folder(pstr_t absPath);
+
+/**
+ * \brief delete a folder
+ * \usage : persadmin_delete_folder("/var/Pers/bkup/App_1_bkup/")
+ *
+ * \param absPath [in] absolute path to folder to be deleted
+ * \return positive value: number of bytes deleted; negative value: error
+ * TODO: define error codes
+ */
+sint_t persadmin_delete_folder(pstr_t absPath);
+
+/**
+ * \brief copy a file (with posibility to rename the copy)
+ * \usage : persadmin_copy_file("/Data/mnt-c/shared/public/cached.itz", "/var/Pers/bkup/CACHED.itz")
+ * : content of /Data/mnt-c/shared/public/cached.itz is copied into /var/Pers/bkup/CACHED.itz
+ *
+ * \param absPathSource [in] absolute path to the source file
+ * \param absPathDestination [in] absolute path to the destination file
+ * \return number of bytes copied, negative value for error
+ * TODO: define error codes
+ */
+sint_t persadmin_copy_file(pstr_t absPathSource, pstr_t absPathDestination);
+
+/**
+ * \brief delete a file
+ * \usage : persadmin_delete_file("/Data/mnt-c/shared/public/cached.itz")
+ *
+ * \param absPath [in] absolute path to the file to be deleted
+ * \return positive value: number of bytes deleted; negative value: error
+ * TODO: define error codes
+ */
+sint_t persadmin_delete_file(pstr_t absPath);
+
+/**
+ * \brief list the content of a folder
+ *
+ * \param folderPath [in] absolute path to the folder to be listed
+ * \param buffer_out [out] where the listing is save ; entries are relative to folderPath and separated by '\0'
+ * \param bufSize [in] size of buffer_out
+ * \param eFilter [in] specify what to list (see PersadminFilterMode_e)
+ * \param bRecursive [in] if true, a recursive listing is performed
+ * \return positive value - the size of data passed in buffer_out, negative - error;
+ * TODO: define error codes
+ */
+sint_t persadmin_list_folder(pconststr_t folderPath, pstr_t buffer_out, sint_t bufSize, PersadminFilterMode_e eFilter, bool_t bRecursive) ;
+
+/**
+ * \brief find the buffer size needed to accommodate the output of a list folder request
+ *
+ * \param folderPath [in] absolute path to the folder to be listed
+ * \param eListingMode [in] specify what to list (see PersadminFilterMode_e)
+ * \param bRecursive [in] if true, a recursive listing is performed
+ * \return positive value - the size needed, negative - error;
+ * TODO: define error codes
+ */
+sint_t persadmin_list_folder_get_size(pconststr_t folderPath, PersadminFilterMode_e eListingMode, bool_t bRecursive) ;
+
+/**
+ * \brief Computes the size in bytes of all files located under the specified folder path. The file search is done recursively.
+ *
+ * \param folderPath [in] absolute path to the folder to be queried
+ * \return positive value - the size in bytes of all files, negative - error;
+ * TODO: define error codes
+ */
+sint_t persadmin_get_folder_size( pconststr_t folderPath );
+
+/**
+ * \brief Checks if the files specified have identical contents (without the usage of checksums)
+ *
+ * \param file1Path [in] absolute path to one of the files to be checked
+ * \param file2Path [in] absolute path to the other file to be checked
+ * \return true - if the files have identical contents, false - otherwise;
+ */
+bool_t persadmin_check_for_same_file_content(pstr_t file1Path, pstr_t file2Path);
+
+#ifdef __cplusplus
+}
+#endif /* extern "C" { */
+
+#endif /*SSW_PERS_ADMIN_FILES_HELPER_H */ \ No newline at end of file
diff --git a/Administrator/inc/private/ssw_pers_admin_pcl.h b/Administrator/inc/private/ssw_pers_admin_pcl.h
new file mode 100644
index 0000000..0dac256
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_pcl.h
@@ -0,0 +1,74 @@
+#ifndef SSW_PERS_ADMIN_PCL_H
+#define SSW_PERS_ADMIN_PCL_H
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Petrica.Manoila@continental-corporation.com
+*
+* Interface: private - persistence admin service PCL access interface (lock/unlock/sync)
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.04.04 uidu0250 1.0.0.0 CSP_WZ#2739: Using PersCommonIPC for requests to PCL
+* 2012.11.13 uidu0250 1.0.0.0 CSP_WZ#1280: Initial version
+*
+**********************************************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "persComTypes.h"
+
+
+
+/**
+ * \brief Init the PAS IPC module
+ *
+ * \return 0 for success, negative value for error (see persComErrors.h)
+ */
+sint_t persadmin_InitIpc(void);
+
+
+
+/**
+ * \brief Request the PCL to sync and lock the memory access
+ *
+ * \return 0 for success, negative value for error (see persComErrors.h)
+ */
+sint_t persadmin_SendLockAndSyncRequestToPCL(void);
+
+
+
+/**
+ * \brief Request the PCL to unlock the memory access
+ *
+ * \return 0 for success, negative value for error (see persComErrors.h)
+ */
+sint_t persadmin_SendUnlockRequestToPCL(void);
+
+
+
+/**
+ * \brief Check if the memory access is already locked
+ *
+ * \return true if the memory access is locked, false otherwise
+ */
+bool_t persadmin_IsPCLAccessLocked(void);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SSW_PERS_ADMIN_DBUS_H */
diff --git a/Administrator/inc/private/ssw_pers_admin_service.h b/Administrator/inc/private/ssw_pers_admin_service.h
new file mode 100644
index 0000000..f73ee49
--- /dev/null
+++ b/Administrator/inc/private/ssw_pers_admin_service.h
@@ -0,0 +1,150 @@
+#ifndef SSW_PERS_ADMIN_SERVICE_H_
+#define SSW_PERS_ADMIN_SERVICE_H_
+
+/**********************************************************************************************************************
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Petrica.Manoila@continental-corporation.com
+*
+* Interface: private - persistence admin service
+*
+* The file defines contains the defines according to
+* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Version Reason
+* 2013.09.23 uidl9757 2.1.0.0 CSP_WZ#5781: Watchdog timeout of pas-daemon
+* 2013.04.19 uidu0250 2.0.0.0 CSP_WZ#3424: Add IF extension for "restore to default"
+* 2013.03.26 uidu0250 1.0.0.0 CSP_WZ#3171: Update PAS registration to NSM
+* 2012.11.12 uidl9757 1.0.0.0 CSP_WZ#1280: Initial version
+*
+**********************************************************************************************************************/
+
+#include "persistence_admin_service.h"
+
+/**
+ * \brief Re-trigger systemd watchdog
+ *
+ * \return none
+ **/
+void persadmin_RetriggerWatchdog(void);
+
+/**
+ * @brief Allow the export of data from specified folder to the system following different levels (application, user or complete)
+ *
+ * @param type represents the quality of the data to backup: all, application, user
+ * @param dst_folder name of the destination folder of the data
+ *
+ * @return positive value: number of bytes imported; negative value: error code
+ */
+long persadmin_data_folder_export(PersASSelectionType_e type, pconststr_t dst_folder);
+
+/**
+ * @brief Allow recovery of from backup on different level (application, user or complete)
+ *
+ * @param type represents the quality of the data to backup: all, application, user
+ * @param backup_name name of the backup to allow identification
+ * @param applicationID the application identifier
+ * @param user_no the user ID
+ * @param seat_no the seat number (seat 1 to 4, 0xFF for all)
+ *
+ * @return positive value: number of written bytes; negative value: error code
+ */
+long persadmin_data_backup_create(PersASSelectionType_e type, char* backup_name, char* applicationID, unsigned int user_no, unsigned int seat_no);
+
+/**
+ * @brief Allow the import of data from specified folder to the system respecting different level (application, user or complete)
+ *
+ * @param type represent the quality of the data to backup: all, application, user
+ * @param src_folder name of the source folder of the data
+ *
+ * @return positive value: number of bytes imported; negative value: error code
+ */
+long persadmin_data_folder_import(PersASSelectionType_e type, pconststr_t src_folder);
+
+/**
+ * @brief Allow recovery of from backup on different level (application, user or complete)
+ *
+ * @param type represent the quality of the data to backup: all, application, user
+ * @param backup_name name of the backup to allow identification
+ * @param applicationID the application identifier
+ * @param user_no the user ID
+ * @param seat_no the seat number (seat 1 to 4)
+ *
+ * @return positive value: number of bytes restored; negative value: error code
+ */
+long persadmin_data_backup_recovery(PersASSelectionType_e type, char* backup_name, char* applicationID, unsigned int user_no, unsigned int seat_no);
+
+/**
+* \brief Allows restore of default values on different level (application, user or complete)
+*
+* \param type represents the quality of the data to backup: all, application, user
+* \param defaultSource source of the default to allow reset
+* \param applicationID the application identifier
+* \param user_no the user ID
+* \param seat_no the seat number (seat 0 to 3)
+*
+* \return positive value: number of bytes restored; negative value: error code (\ref PAS_RETURNS)
+*/
+long persadmin_data_restore_to_default(PersASSelectionType_e type, PersASDefaultSource_e defaultSource, const char* applicationID, unsigned int user_no, unsigned int seat_no);
+
+
+/**
+ * @brief Delete user data
+ *
+ * @param type represent the quality of the data to backup: all, application, user
+ * @param user_no the user ID
+ * @param seat_no the seat number (seat 1 to 4)
+ *
+ * @return positive value: number of deleted bytes; negative value: error code
+ */
+long persadmin_user_data_delete(unsigned int user_no, unsigned int seat_no);
+
+
+/**
+ * @brief Allow to extend the configuration for persistency of data from specified level (application, user).
+ * Used during new persistency entry installation
+ *
+ * @param resource_file name of the persistency resource configuration to integrate
+ *
+ * @return positive value: number of modified entries in the resource configuration; negative value: error code
+ */
+long persadmin_resource_config_add(char* resource_file);
+
+
+/**
+ * @brief Allow the modification of the resource properties from data (key-values and files)
+ *
+ * @param resource_config_file name of the persistency resource configuration to integrate
+ *
+ * @return positive value: number of modified properties in the resource configuration; negative value: error code
+ */
+long persadmin_resource_config_change_properties(char* resource_config_file);
+
+
+/**
+ * @brief Allow the copy of user related data between different users
+ *
+ * @param src_user_no the user ID source
+ * @param src_seat_no the seat number source (seat 0 to 3)
+ * @param dest_user_no the user ID destination
+ * @param dest_seat_no the seat number destination (seat 0 to 3)
+ *
+ * @return positive value: number of bytes copied; negative value: error code
+ */
+long persadmin_user_data_copy(unsigned int src_user_no, unsigned int src_seat_no, unsigned int dest_user_no, unsigned int dest_seat_no);
+
+/**
+ * @brief Set PAS shutdown state
+ *
+ * @param state the shutdown state : true if the shutdown is pending, false otherwise
+ *
+ * @return : void
+ */
+void persadmin_set_shutdown_state(bool_t state);
+
+#endif /* SSW_PERS_ADMIN_SERVICE_H_ */