Return "single" launch mode with default
[platform/core/api/application.git] / include / app_control_internal.h
index 54502c2..26f4217 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -56,6 +56,13 @@ extern "C" {
 #define APP_CONTROL_DATA_RECYCLE "__K_RECYCLE"
 
 /**
+ * @brief Definition for app_control data : The value for supporting relocating launched app under the callee app.
+ * @details By default, this value is NULL. Once it is set to app ID, that application will be relocated under the callee app after callee app is resumed.
+ * @remarks The value should be an app ID for main app which has been launched before, otherwise it will be ignored.
+ */
+#define APP_CONTROL_DATA_RELOCATE_BELOW "__K_RELOCATE_BELOW"
+
+/**
  * @brief Replaces all data in the app_control with the bundle
  *
  * @remarks This function clears all data in the app_control and adds all key-value pairs in the bundle into the app_control
@@ -154,6 +161,44 @@ int app_control_get_window(app_control_h app_control, unsigned int *id);
 int app_control_request_transient_app(app_control_h app_control, unsigned int callee_id, app_control_host_res_fn cbfunc, void *data);
 
 /**
+ * @platform
+ * @brief Sets the ID of default application associated with operation, mime-type and uri.
+ *
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in] app_control The app_control handle
+ * @param[in] app_id The ID of the application
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #APP_CONTROL_ERROR_NONE Successful
+ * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
+ * @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 *app_id);
+
+/**
+ * @platform
+ * @brief Unsets default application control setting of an application.
+ *
+ * @details When an user call this API, all the default application settings for the app_id are unset.
+ *
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in] app_id The ID of the application
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #APP_CONTROL_ERROR_NONE Successful
+ * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #APP_CONTROL_ERROR_IO_ERROR IO error
+ * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ */
+int app_control_unset_defapp(const char *app_id);
+/**
  * @}
  */
 
@@ -162,3 +207,4 @@ int app_control_request_transient_app(app_control_h app_control, unsigned int ca
 #endif
 
 #endif /* __TIZEN_APPFW_APP_CONTROL_INTERNAL_H__ */
+