ds_profile_h profile_h = NULL;
- char *profileDirName = "Sync1";
- char *profileName = NULL;
+ //char *profileDirName = "Sync1";
+ int profile_id = 1;
+ char *profile_dir_name = NULL;
+ char *profile_name = NULL;
sync_agent_ds_server_info server_info = { NULL };
sync_agent_ds_sync_info sync_info = { 0, };
GList *category_list = NULL;
int lastSessionStatus = 0, lastSessionTime = 0;
// get profile information
- result = sync_agent_ds_get_profile(profileDirName, &profile_h);
+ result = sync_agent_ds_get_profile(profile_id, &profile_h);
_DEBUG_VERBOSE("----------------------------------");
_DEBUG_VERBOSE("getting profile\n");
}
// 1. get profile dir/name
- result = sync_agent_ds_get_profile_name(profile_h, &profileName);
+ result = sync_agent_ds_get_profile_dir_name(profile_h, &profile_dir_name);
+ if (result == SYNC_AGENT_DS_SUCCESS) {
+ _DEBUG_VERBOSE("Success to get profile_dir_name!");
+ _DEBUG_VERBOSE("profile_dir_name = %s", profile_dir_name);
+ is_test_successful = TRUE;
+ } else {
+ _DEBUG_VERBOSE("Failed to get profile_dir_name!!");
+ is_test_successful = FALSE;
+ }
+
+ result = sync_agent_ds_get_profile_name(profile_h, &profile_name);
if (result == SYNC_AGENT_DS_SUCCESS) {
- _DEBUG_VERBOSE("Success to get profile name!");
- _DEBUG_VERBOSE("get_profileName = %s", profileName);
+ _DEBUG_VERBOSE("Success to get profile_name!");
+ _DEBUG_VERBOSE("profile_name = %s", profile_name);
is_test_successful = TRUE;
} else {
- _DEBUG_VERBOSE("Failed to get profile name!");
+ _DEBUG_VERBOSE("Failed to get profile_name!");
is_test_successful = FALSE;
}
}
// free profile information
- g_free(profileName);
+ g_free(profile_dir_name);
+ g_free(profile_name);
g_free(server_info.addr);
g_free(server_info.id);
GList *iter = NULL;
ds_profile_h profile_h = NULL;
- char *profileName = NULL;
+ int profile_id = -1;
+ char *profile_dir_name = NULL;
+ char *profile_name = NULL;
sync_agent_ds_server_info server_info = { NULL };
sync_agent_ds_sync_info sync_info = { 0, };
GList *category_list = NULL;
for (iter = profile_list; iter != NULL; iter = g_list_next(iter)) {
profile_h = (ds_profile_h) iter->data;
- // 1. get profile dir/name
- result = sync_agent_ds_get_profile_name(profile_h, &profileName);
+ // 1. get profile id / dir_name /name
+ result = sync_agent_ds_get_profile_id(profile_h, &profile_id);
if (result == SYNC_AGENT_DS_SUCCESS) {
- _DEBUG_VERBOSE("Success to get profile name!");
- _DEBUG_VERBOSE("get_profileName = %s", profileName);
+ _DEBUG_VERBOSE("Success to get profile_id!");
+ _DEBUG_VERBOSE("profile_id = %d", profile_id);
is_test_successful = TRUE;
} else {
- _DEBUG_VERBOSE("Failed to get profile name!");
+ _DEBUG_VERBOSE("Failed to get profile_id!");
+ is_test_successful = FALSE;
+ }
+
+ result = sync_agent_ds_get_profile_dir_name(profile_h, &profile_dir_name);
+ if (result == SYNC_AGENT_DS_SUCCESS) {
+ _DEBUG_VERBOSE("Success to get profile_dir_name!");
+ _DEBUG_VERBOSE("profile_dir_name = %s", profile_dir_name);
+ is_test_successful = TRUE;
+ } else {
+ _DEBUG_VERBOSE("Failed to get profile_dir_name!");
+ is_test_successful = FALSE;
+ }
+
+ result = sync_agent_ds_get_profile_name(profile_h, &profile_name);
+ if (result == SYNC_AGENT_DS_SUCCESS) {
+ _DEBUG_VERBOSE("Success to get profile_name!");
+ _DEBUG_VERBOSE("profile_name = %s", profile_name);
+ is_test_successful = TRUE;
+ } else {
+ _DEBUG_VERBOSE("Failed to get profile_name!");
is_test_successful = FALSE;
}
}
// free profile information
- g_free(profileName);
-
+ g_free(profile_dir_name);
+ g_free(profile_name);
g_free(server_info.addr);
g_free(server_info.id);
g_free(server_info.password);
GList *statistics_list = NULL;
- char *profileDirName = "Sync1";
+ int profile_id = 1;
int category_count = 0;
int i = 0;
// get profile information
- result = sync_agent_ds_get_profile(profileDirName, &profile_h);
+ result = sync_agent_ds_get_profile(profile_id, &profile_h);
_DEBUG_VERBOSE("----------------------------------");
_DEBUG_VERBOSE("getting profile\n");
ds_profile_h profile_h = NULL;
- char *profileDirName = "Sync1";
+ int profile_id = 1;
// get profile information
- result = sync_agent_ds_get_profile(profileDirName, &profile_h);
+ result = sync_agent_ds_get_profile(profile_id, &profile_h);
_DEBUG_VERBOSE("----------------------------------");
_DEBUG_VERBOSE("getting profile\n");
ds_profile_h profile_h = NULL;
- char *profileDirName = "Sync1";
+ int profile_id = 1;
// get profile information
- result = sync_agent_ds_get_profile(profileDirName, &profile_h);
+ result = sync_agent_ds_get_profile(profile_id, &profile_h);
_DEBUG_VERBOSE("----------------------------------");
_DEBUG_VERBOSE("getting profile\n");