return APP_CONTROL_ERROR_NONE;
}
+int app_control_set_defapp(app_control_h app_control, const char *defapp)
+{
+ int ret;
+ const char *op;
+ const char *mime_type;
+ const char *uri;
+
+ if (app_control == NULL || defapp == NULL)
+ app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+
+ /* get op */
+ op = appsvc_get_operation(app_control->data);
+ if (op == NULL)
+ app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+
+ /* get mime_type */
+ mime_type = appsvc_get_mime(app_control->data);
+
+ /* get uri */
+ uri = appsvc_get_uri(app_control->data);
+
+ ret = aul_svc_set_defapp(op, mime_type, uri, defapp);
+ if (ret < 0)
+ app_control_error(APP_CONTROL_ERROR_IO_ERROR, __FUNCTION__, NULL);
+
+ return APP_CONTROL_ERROR_NONE;
+}
+
static void __update_launch_pid(int launched_pid, void *data)
{
app_control_h app_control;
* @see #APP_CONTROL_RESULT_APP_STARTED
*/
int app_control_enable_app_started_result_event(app_control_h app_control);
+
+/**
+ * @brief Set the default application(package name) associated with op, uri and mime-type.
+ *
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in] app_control The app_control handle
+ * @param[in] defapp default application
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #APP_CONTROL_ERROR_NONE Successful
+ * @retval #APP_CONTROL_ERROR_IO_ERROR IO error
+ * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ */
+int app_control_set_defapp(app_control_h app_control, const char *defapp);
/**
* @}
*/