return res;
}
+int ma_settings_get_voice_assistant_enabled(const char* app_id, bool *enabled) {
+ bool multiple = false;
+ int res = ma_settings_is_multiple_mode(&multiple);
+ if (MA_ERROR_NONE != res) return res;
+
+ if (!multiple) {
+ LOGE("Not supported");
+ return MA_ERROR_NOT_SUPPORTED;
+ }
+
+ if (!enabled || !app_id) {
+ LOGE("Invalid parameter");
+ return MA_ERROR_INVALID_PARAMETER;
+ }
+
+ char* enabled_assistants = vconf_get_str(ENABLED_ASSISTANT_URL);
+ if (vconf_get_ext_errno() != VCONF_OK) {
+ LOGE("Operation Failed");
+ return MA_ERROR_OPERATION_FAILED;
+ }
+
+ if (enabled_assistants) {
+ char* tmp = strstr(enabled_assistants, app_id);
+ *enabled = tmp ? true : false;
+ } else {
+ *enabled = false;
+ }
+
+ if (enabled_assistants) {
+ free(enabled_assistants);
+ }
+
+ return res;
+}
+
int ma_settings_set_voice_assistant_enabled(const char* app_id, bool enabled) {
bool multiple = false;
*/
int ma_settings_change_voice_assistant(const char* app_id);
+/**
+ * @brief Get whether the specific voice assistant should be enabled or not.
+ * @since_tizen 7.0
+ * @privlevel public
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MA_ERROR_NONE Successful
+ * @retval #MA_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MA_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @param[in] app_id The app id of the voice assistant
+ * @param[out] enabled The enabled state of the voice assistant
+ */
+int ma_settings_get_voice_assistant_enabled(const char* app_id, bool *enabled);
+
/**
* @brief En/Disable a specific voice assistant.
* @since_tizen 5.5