res = vconf_get_bool(MODE_URL, ¤t_multiple);
if (0 == res) {
*multiple = current_multiple;
+ LOGI("multiple mode(%d)", current_multiple);
return MA_ERROR_NONE;
} else {
+ LOGE("Operation Failed");
return MA_ERROR_OPERATION_FAILED;
}
}
+
+ LOGE("Invalid parameter");
return MA_ERROR_INVALID_PARAMETER;
}
int ma_settings_set_multiple_mode(bool multiple) {
if (0 == vconf_set_bool(MODE_URL, multiple)) {
+ LOGI("multiple mode(%d)", multiple);
return MA_ERROR_NONE;
}
+
+ LOGE("Operation Failed");
return MA_ERROR_OPERATION_FAILED;
}
int res = MA_ERROR_NONE;
res = ma_settings_is_multiple_mode(&multiple);
+ LOGI("multiple mode(%d)", multiple);
if (MA_ERROR_NONE != res) return res;
char* previous_assistant = vconf_get_str(DEFAULT_ASSISTANT_URL);
if (!multiple && previous_assistant && app_id) {
*app_id = previous_assistant;
+ LOGI("appid: %s", *app_id);
res = MA_ERROR_NONE;
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
if (previous_assistant) free(previous_assistant);
}
int res = MA_ERROR_NONE;
res = ma_settings_is_multiple_mode(&multiple);
+ LOGD("multiple mode(%d). Error(%x)", multiple, res);
if (MA_ERROR_NONE != res) return res;
if (!multiple && app_id) {
if (0 == vconf_set_str(DEFAULT_ASSISTANT_URL, app_id)) {
+ LOGI("appid: %s", app_id);
res = MA_ERROR_NONE;
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
-
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
if (MA_ERROR_NONE != res) return res;
if (!multiple) {
+ LOGE("Not supported");
return MA_ERROR_NOT_SUPPORTED;
}
if (NULL != app_id) {
if (NULL != enabled_assistants) {
char* tmp = strstr(enabled_assistants, app_id);
if (tmp) {
+ LOGE("Not supported");
res = MA_ERROR_NOT_SUPPORTED;
} else {
char assistants[MAX_LEN] = "";
if (0 == vconf_set_str(ENABLED_ASSISTANT_URL, assistants)) {
res = MA_ERROR_NONE;
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
}
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
} else {
strncat(assistants, as, strlen(as));
strncat(assistants, ";", 1);
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
if (enabled_assistants) {
free(enabled_assistants);
if (0 == vconf_set_str(ENABLED_ASSISTANT_URL, assistants)) {
res = MA_ERROR_NONE;
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
} else {
+ LOGE("Not support");
res = MA_ERROR_NOT_SUPPORTED;
}
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
}
free(enabled_assistants);
}
} else {
+ LOGE("Engine not found");
res = MA_ERROR_ENGINE_NOT_FOUND;
}
return res;
int res = MA_ERROR_NONE;
res = ma_settings_is_multiple_mode(&multiple);
+ LOGD("multiple mode(%d). Error(%x)", multiple, res);
+
if (MA_ERROR_NONE != res) return res;
char* previous_assistant = vconf_get_str(DEFAULT_ASSISTANT_URL);
if (multiple && previous_assistant && app_id) {
*app_id = previous_assistant;
+ LOGI("Succeeded. app id(%s)", *app_id);
res = MA_ERROR_NONE;
} else {
res = MA_ERROR_OPERATION_FAILED;
+ LOGE("Operation failed");
if (previous_assistant) free(previous_assistant);
}
+
+ LOGD("error(%x)", res);
return res;
}
int res = MA_ERROR_NONE;
res = ma_settings_is_multiple_mode(&multiple);
+ LOGD("multiple mode(%d). Error(%x)", multiple, res);
if (MA_ERROR_NONE != res) return res;
if (multiple && app_id) {
if (0 == vconf_set_str(DEFAULT_ASSISTANT_URL, app_id)) {
+ LOGI("Succeeded. app id(%s)", app_id);
res = MA_ERROR_NONE;
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
} else {
+ LOGE("Operation failed");
res = MA_ERROR_OPERATION_FAILED;
}
return res;
}
-//LCOV_EXCL_STOP
\ No newline at end of file
+//LCOV_EXCL_STOP