summaryrefslogtreecommitdiff
path: root/src/persistence_client_library_db_access.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/persistence_client_library_db_access.c')
-rw-r--r--src/persistence_client_library_db_access.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/persistence_client_library_db_access.c b/src/persistence_client_library_db_access.c
index 97f8f1e..41b5e3c 100644
--- a/src/persistence_client_library_db_access.c
+++ b/src/persistence_client_library_db_access.c
@@ -79,19 +79,19 @@ static int database_get(PersistenceInfo_s* info, const char* dbPath)
if(PersistencePolicy_wt == info->configKey.policy) /// write through database
{
- snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalWt);
+ snprintf(path, DbPathMaxLen, "%s%s", dbPath, plugin_gLocalWt);
}
else if(PersistencePolicy_wc == info->configKey.policy) // cached database
{
- snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalCached);
+ snprintf(path, DbPathMaxLen, "%s%s", dbPath, plugin_gLocalCached);
}
else if(PersistencePolicy_cd == info->configKey.policy) // configurable default database
{
- snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalConfigurableDefault);
+ snprintf(path, DbPathMaxLen, "%s%s", dbPath, plugin_gLocalConfigurableDefault);
}
else if(PersistencePolicy_d == info->configKey.policy) // default database
{
- snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalFactoryDefault);
+ snprintf(path, DbPathMaxLen, "%s%s", dbPath, plugin_gLocalFactoryDefault);
}
else
{
@@ -100,7 +100,7 @@ static int database_get(PersistenceInfo_s* info, const char* dbPath)
if (handleDB == -1)
{
- handleDB = persComDbOpen(path, 0x01);
+ handleDB = plugin_persComDbOpen(path, 0x01);
if(handleDB >= 0)
{
gHandlesDB[arrayIdx][info->configKey.policy] = handleDB ;
@@ -145,11 +145,11 @@ int pers_get_defaults(char* dbPath, char* key, PersistenceInfo_s* info, unsigned
{
if (PersGetDefault_Data == job)
{
- read_size = persComDbReadKey(handleDefaultDB, key, (char*)buffer, buffer_size);
+ read_size = plugin_persComDbReadKey(handleDefaultDB, key, (char*)buffer, buffer_size);
}
else if (PersGetDefault_Size == job)
{
- read_size = persComDbGetKeySize(handleDefaultDB, key);
+ read_size = plugin_persComDbGetKeySize(handleDefaultDB, key);
}
else
{
@@ -225,7 +225,7 @@ void database_close_all()
{
if(gHandlesDBCreated[i][j] == 1)
{
- int iErrorCode = persComDbClose(gHandlesDB[i][j]);
+ int iErrorCode = plugin_persComDbClose(gHandlesDB[i][j]);
if (iErrorCode < 0)
{
DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_close_all => failed to close db => persComDbClose"));
@@ -252,7 +252,7 @@ int persistence_get_data(char* dbPath, char* key, const char* resourceID, Persis
int handleDB = database_get(info, dbPath);
if(handleDB >= 0)
{
- read_size = persComDbReadKey(handleDB, key, (char*)buffer, buffer_size);
+ read_size = plugin_persComDbReadKey(handleDB, key, (char*)buffer, buffer_size);
if(read_size < 0)
{
read_size = pers_get_defaults(dbPath, (char*)resourceID, info, buffer, buffer_size, PersGetDefault_Data); /* 0 ==> Get data */
@@ -357,7 +357,7 @@ int persistence_set_data(char* dbPath, char* key, PersistenceInfo_s* info, unsig
handleDB = database_get(info, dbPath);
if(handleDB >= 0)
{
- write_size = persComDbWriteKey(handleDB, key, (char*)buffer, buffer_size) ;
+ write_size = plugin_persComDbWriteKey(handleDB, key, (char*)buffer, buffer_size) ;
if(write_size < 0)
{
DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_set_data ==> persComDbWriteKey() failure"));
@@ -473,7 +473,7 @@ int persistence_get_data_size(char* dbPath, char* key, const char* resourceID, P
if(handleDB >= 0)
{
- read_size = persComDbGetKeySize(handleDB, key);
+ read_size = plugin_persComDbGetKeySize(handleDB, key);
if(read_size < 0)
{
read_size = pers_get_defaults( dbPath, (char*)resourceID, info, NULL, 0, PersGetDefault_Size);
@@ -569,7 +569,7 @@ int persistence_delete_data(char* dbPath, char* key, PersistenceInfo_s* info)
int handleDB = database_get(info, dbPath);
if(handleDB >= 0)
{
- ret = persComDbDeleteKey(handleDB, key) ;
+ ret = plugin_persComDbDeleteKey(handleDB, key) ;
if(ret < 0)
{
DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_delete_data => persComDbDeleteKey failed: "), DLT_STRING(key));
@@ -751,7 +751,7 @@ void pers_rct_close_all()
{
if(get_resource_cfg_table_by_idx(i) != -1)
{
- if(persComRctClose(get_resource_cfg_table_by_idx(i)) != 0)
+ if(plugin_persComRctClose(get_resource_cfg_table_by_idx(i)) != 0)
{
DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_prepare_shutdown => failed to close db => index:"), DLT_INT(i));
}