2 * Copyright (c) 2014 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_APPFW_APP_CONTROL_H__
19 #define __TIZEN_APPFW_APP_CONTROL_H__
32 * @addtogroup CAPI_APP_CONTROL_MODULE
37 typedef struct _bundle_t bundle;
38 typedef unsigned char bundle_raw;
41 * @brief App Control handle.
42 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
44 typedef struct app_control_s *app_control_h;
48 * @brief Enumeration for App Control Error.
49 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
52 APP_CONTROL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
53 APP_CONTROL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
54 APP_CONTROL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
55 APP_CONTROL_ERROR_APP_NOT_FOUND = TIZEN_ERROR_APPLICATION | 0x21, /**< The application is not found */
56 APP_CONTROL_ERROR_KEY_NOT_FOUND = TIZEN_ERROR_KEY_NOT_AVAILABLE, /**< Specified key is not found */
57 APP_CONTROL_ERROR_KEY_REJECTED = TIZEN_ERROR_KEY_REJECTED, /**< Key is not available */
58 APP_CONTROL_ERROR_INVALID_DATA_TYPE = TIZEN_ERROR_APPLICATION | 0x22, /**< Invalid data type */
59 APP_CONTROL_ERROR_LAUNCH_REJECTED = TIZEN_ERROR_APPLICATION | 0x23, /**< The application cannot be launched now*/
60 APP_CONTROL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
61 APP_CONTROL_ERROR_LAUNCH_FAILED = TIZEN_ERROR_APPLICATION | 0x24, /**< Internal launch error */
62 APP_CONTROL_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Time out */
63 APP_CONTROL_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR /**< IO error */
64 } app_control_error_e;
68 * @brief Enumeration for App Control Result.
69 * @see app_control_enable_app_started_result_event()
70 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
73 APP_CONTROL_RESULT_APP_STARTED = 1, /**< Callee application launched actually (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
74 APP_CONTROL_RESULT_SUCCEEDED = 0, /**< Operation succeeded */
75 APP_CONTROL_RESULT_FAILED = -1, /**< Operation failed by the callee */
76 APP_CONTROL_RESULT_CANCELED = -2, /**< Operation canceled by the platform */
77 } app_control_result_e;
80 * @brief Enumeration for App Control Launch Mode.
81 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
84 APP_CONTROL_LAUNCH_MODE_SINGLE = 0, /**< Prefer to launch an application as single mode */
85 APP_CONTROL_LAUNCH_MODE_GROUP, /**< Prefer to launch an application as group mode */
86 } app_control_launch_mode_e;
89 * @brief Definition for the app_control operation: An explicit launch for a homescreen application.
90 * @details Input: Nothing\n
92 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
94 #define APP_CONTROL_OPERATION_MAIN "http://tizen.org/appcontrol/operation/main"
98 * @brief Definition for the app_control operation: An explicit launch for an application that excludes a homescreen application.
99 * @details Input: Nothing\n
101 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
103 #define APP_CONTROL_OPERATION_DEFAULT "http://tizen.org/appcontrol/operation/default"
107 * @brief Definition for the app_control operation: Provides an editable access to the given data.
108 * @details Input: It depends on application scenario/configuration.\n
109 * Output: It depends on application scenario/configuration.\n
110 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
112 #define APP_CONTROL_OPERATION_EDIT "http://tizen.org/appcontrol/operation/edit"
116 * @brief Definition for the app_control operation: Displays the data.
117 * @details Input: URI is usually used to inform the path to show. In some cases, some other data in Extra can be used (e.g., VIEW operation for viewing Contact, Calendar data).\n
119 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
121 #define APP_CONTROL_OPERATION_VIEW "http://tizen.org/appcontrol/operation/view"
125 * @brief Definition for the app_control operation: Picks items.
126 * @details Input: It depends on application scenario/configuration.\n
127 * Output: APP_CONTROL_DATA_SELECTED in Extra\n
128 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
130 #define APP_CONTROL_OPERATION_PICK "http://tizen.org/appcontrol/operation/pick"
134 * @brief Definition for the app_control operation: Creates contents.
135 * @details Input: It depends on application scenario/configuration.\n
136 * Output: APP_CONTROL_DATA_SELECTED in Extra\n
137 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
139 #define APP_CONTROL_OPERATION_CREATE_CONTENT "http://tizen.org/appcontrol/operation/create_content"
143 * @brief Definition for the app_control operation: Performs a call to someone.
144 * @details Input: URI is the number to be dialed. This is mandatory field.\n
146 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
148 * @privilege %http://tizen.org/privilege/call
149 * @remarks When you request this operation, you must declare this privilege.
151 #define APP_CONTROL_OPERATION_CALL "http://tizen.org/appcontrol/operation/call"
155 * @brief Definition for the app_control operation: Delivers some data to someone else.
156 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
157 * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use #APP_CONTROL_OPERATION_SHARE instead.
159 #define APP_CONTROL_OPERATION_SEND "http://tizen.org/appcontrol/operation/send"
163 * @brief Definition for the app_control operation: Delivers text data to someone else.
164 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
165 * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use #APP_CONTROL_OPERATION_SHARE_TEXT instead.
167 #define APP_CONTROL_OPERATION_SEND_TEXT "http://tizen.org/appcontrol/operation/send_text"
171 * @brief Definition for the app_control operation: Shares an item with someone else.
172 * @details Input: URI is usually used to inform the path to share. In some cases, some other data in Extra can be used (e.g., SHARE operation for sharing Contact data, SHARE operation for sharing an item through Message, Email applications).\n
174 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
176 #define APP_CONTROL_OPERATION_SHARE "http://tizen.org/appcontrol/operation/share"
180 * @brief Definition for the app_control operation: Shares multiple items with someone else.
181 * @details Input: APP_CONTROL_DATA_PATH in Extra is usually used to inform the data to share. In some cases, some other data in Extra can be used (e.g., MULTI_SHARE opeation for sharing Contact data).\n
183 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
185 #define APP_CONTROL_OPERATION_MULTI_SHARE "http://tizen.org/appcontrol/operation/multi_share"
189 * @brief Definition for the app_control operation: Shares text data with someone else.
190 * @details Input: APP_CONTROL_DATA_TEXT in Extra is the text to share\n
192 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
194 #define APP_CONTROL_OPERATION_SHARE_TEXT "http://tizen.org/appcontrol/operation/share_text"
198 * @brief Definition for the app_control operation: Dials a number. This shows a UI with the number to be dialed, allowing the user to explicitly initiate the call.
199 * @details Input: URI is the number to be dialed. If empty, show a UI without number.\n
201 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
203 #define APP_CONTROL_OPERATION_DIAL "http://tizen.org/appcontrol/operation/dial"
207 * @brief Definition for the app_control operation: Performs a search.
208 * @details Input: APP_CONTROL_DATA_TEXT in Extra is the text to search for. If empty, show a search UI.\n
210 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
212 #define APP_CONTROL_OPERATION_SEARCH "http://tizen.org/appcontrol/operation/search"
216 * @brief Definition for the app_control operation: Downloads items.
217 * @details Input: It depends on application scenario/configuration.\n
218 * Output: It depends on application scenario/configuration.\n
219 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
221 * @privilege %http://tizen.org/privilege/download (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)
222 * @remarks When you request this operation, you must declare this privilege. (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)
224 #define APP_CONTROL_OPERATION_DOWNLOAD "http://tizen.org/appcontrol/operation/download"
228 * @brief Definition for the app_control operation: Prints contents.
229 * @details Input: It depends on application scenario/configuration.\n
230 * Output: It depends on application scenario/configuration.\n
231 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
233 #define APP_CONTROL_OPERATION_PRINT "http://tizen.org/appcontrol/operation/print"
236 * @brief Definition for the app_control operation: Composes a message.
237 * @details Input: It depends on application scenario/configuration.\n
239 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
241 #define APP_CONTROL_OPERATION_COMPOSE "http://tizen.org/appcontrol/operation/compose"
244 * @brief Definition for the app_control operation: Can be launched by interested System-Event.
245 * @details Input : URI and extras data defined in Event module.\n
247 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
248 * @remarks This operation is for handling event from the platform. This operation can not be requested via app_control_send_launch_request().
249 * @remarks Refer to Launch-On-Event section of Event module.
251 #define APP_CONTROL_OPERATION_LAUNCH_ON_EVENT "http://tizen.org/appcontrol/operation/launch_on_event"
254 * @brief Definition for the app_control operation: Adds an item.
255 * @details Input: It depends on application scenario/configuration.\n
256 * Output: It depends on application scenario/configuration.\n
257 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
259 #define APP_CONTROL_OPERATION_ADD "http://tizen.org/appcontrol/operation/add"
262 * @brief Definition for the app_control operation: Captures images by camera applications.
263 * @details Input: Nothing\n
264 * Output: APP_CONTROL_DATA_SELECTED in Extra\n
265 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
267 #define APP_CONTROL_OPERATION_IMAGE_CAPTURE "http://tizen.org/appcontrol/operation/image_capture"
270 * @brief Definition for the app_control operation: Captures videos by camera applications.
271 * @details Input: Nothing\n
272 * Output: APP_CONTROL_DATA_SELECTED in Extra\n
273 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
275 #define APP_CONTROL_OPERATION_VIDEO_CAPTURE "http://tizen.org/appcontrol/operation/video_capture"
278 * @brief Definition for the app_control operation: Shows settings to enable Bluetooth.
279 * @details Input: Nothing\n
281 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
283 #define APP_CONTROL_OPERATION_SETTING_BT_ENABLE "http://tizen.org/appcontrol/operation/setting/bt_enable"
286 * @brief Definition for the app_control operation: Shows settings to configure Bluetooth visibility.
287 * @details Input: Nothing\n
289 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
291 #define APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY "http://tizen.org/appcontrol/operation/setting/bt_visibility"
294 * @brief Definition for the app_control operation: Shows settings to allow configuration of current location sources.
295 * @details Input: Nothing\n
297 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
299 #define APP_CONTROL_OPERATION_SETTING_LOCATION "http://tizen.org/appcontrol/operation/setting/location"
302 * @brief Definition for the app_control operation: Shows NFC settings.
303 * @details Input: Nothing\n
305 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
307 #define APP_CONTROL_OPERATION_SETTING_NFC "http://tizen.org/appcontrol/operation/setting/nfc"
310 * @brief Definition for the app_control operation: Shows system settings.
311 * @details Input: Nothing\n
313 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
315 #define APP_CONTROL_OPERATION_SETTING "http://tizen.org/appcontrol/operation/setting"
318 * @brief Definition for the app_control operation: Shows settings to allow configuration of Wi-Fi.
319 * @details Input: Nothing\n
321 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
323 #define APP_CONTROL_OPERATION_SETTING_WIFI "http://tizen.org/appcontrol/operation/setting/wifi"
326 * @brief Definition for the app control operation: Shows VPN service settings.
327 * @details Input: Nothing\n
331 #define APP_CONTROL_OPERATION_SETTING_VPN "http://tizen.org/appcontrol/operation/setting/vpn"
334 * @brief Definition for app_control data: Subject
335 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
337 #define APP_CONTROL_DATA_SUBJECT "http://tizen.org/appcontrol/data/subject"
341 * @brief Definition for app_control data: Recipients
342 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
344 #define APP_CONTROL_DATA_TO "http://tizen.org/appcontrol/data/to"
348 * @brief Definition for app_control data: E-mail addresses that should be carbon copied
349 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
351 #define APP_CONTROL_DATA_CC "http://tizen.org/appcontrol/data/cc"
355 * @brief Definition for app_control data: E-mail addresses that should be blind carbon copied
356 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
358 #define APP_CONTROL_DATA_BCC "http://tizen.org/appcontrol/data/bcc"
362 * @brief Definition for app_control data: Text
363 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
365 #define APP_CONTROL_DATA_TEXT "http://tizen.org/appcontrol/data/text"
369 * @brief Definition for app_control data: Title
370 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
372 #define APP_CONTROL_DATA_TITLE "http://tizen.org/appcontrol/data/title"
376 * @brief Definition for app_control data: Selected items
377 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
379 #define APP_CONTROL_DATA_SELECTED "http://tizen.org/appcontrol/data/selected"
383 * @brief Definition for app_control data: Paths of items
384 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
385 * @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if all added paths with this key are under the caller application's data path which can be obtained by calling app_get_data_path() function, those will be shared to the callee application. Framework will grant a temporary permission to the callee application for those files and revoke it when the callee application is terminated. Paths should be regular files. The callee application can just read them.
387 #define APP_CONTROL_DATA_PATH "http://tizen.org/appcontrol/data/path"
391 * @brief Definition for app_control data: Selection mode. ("single" or "multiple")
392 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
394 #define APP_CONTROL_DATA_SELECTION_MODE "http://tizen.org/appcontrol/data/selection_mode"
398 * @brief Definition for app_control data: All-day mode of event ("true" or "false")
399 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
401 #define APP_CONTROL_DATA_CALENDAR_ALL_DAY "http://tizen.org/appcontrol/data/calendar/all_day"
405 * @brief Definition for app_control data: Start time of event (format: YYYY-MM-DD HH:MM:SS)
406 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
408 #define APP_CONTROL_DATA_CALENDAR_START_TIME "http://tizen.org/appcontrol/data/calendar/start_time"
412 * @brief Definition for app_control data: End time of event (format: YYYY-MM-DD HH:MM:SS)
413 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
415 #define APP_CONTROL_DATA_CALENDAR_END_TIME "http://tizen.org/appcontrol/data/calendar/end_time"
419 * @brief Definition for app_control data: E-mail addresses
420 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
422 #define APP_CONTROL_DATA_EMAIL "http://tizen.org/appcontrol/data/email"
426 * @brief Definition for app_control data: Phone numbers
427 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
429 #define APP_CONTROL_DATA_PHONE "http://tizen.org/appcontrol/data/phone"
433 * @brief Definition for app_control data: URLs
434 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
436 #define APP_CONTROL_DATA_URL "http://tizen.org/appcontrol/data/url"
440 * @brief Definition for app_control data: IDs
441 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
443 #define APP_CONTROL_DATA_ID "http://tizen.org/appcontrol/data/id"
447 * @brief Definition for app_control data: Type
448 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
450 #define APP_CONTROL_DATA_TYPE "http://tizen.org/appcontrol/data/type"
454 * @brief Definition for app_control data: Total count
455 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
457 #define APP_CONTROL_DATA_TOTAL_COUNT "http://tizen.org/appcontrol/data/total_count"
461 * @brief Definition for app_control data: Total size (unit : bytes)
462 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
464 #define APP_CONTROL_DATA_TOTAL_SIZE "http://tizen.org/appcontrol/data/total_size"
467 * @brief Definition for app_control data: Name
468 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
470 #define APP_CONTROL_DATA_NAME "http://tizen.org/appcontrol/data/name"
473 * @brief Called when the reply of the launch request is delivered.
475 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
477 * @remarks The @a request and @a reply must not be deallocated by the application.
479 * @param[in] request The app_control handle of the launch request that has been sent
480 * @param[in] reply The app_control handle in which the results of the callee are contained
481 * @param[in] result The result code of the launch request
482 * @param[in] user_data The user data passed from the callback registration function
483 * @pre When the callee replies to the launch request, this callback will be invoked.
484 * @pre Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if #APP_CONTROL_RESULT_APP_STARTED event is enabled,
485 * this callback also will be invoked when the callee app actually launched.
486 * @see app_control_send_launch_request()
487 * @see app_control_reply_to_launch_request()
488 * @see app_control_enable_app_started_result_event()
489 * @see #APP_CONTROL_RESULT_APP_STARTED
491 typedef void (*app_control_reply_cb) (app_control_h request, app_control_h reply, app_control_result_e result, void *user_data);
495 * @brief Called to retrieve the extra data contained in the app_control.
497 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
499 * @remarks The @a key must not be deallocated by the application.
501 * @param[in] app_control The app_control handle
502 * @param[in] key The key of the value contained in the app_control
503 * @param[in] user_data The user data passed from the foreach function
504 * @return @c true to continue with the next iteration of the loop,
505 * otherwise @c false to break out of the loop
506 * @pre app_control_foreach_extra_data() will invoke this callback.
507 * @see app_control_foreach_extra_data()
509 typedef bool (*app_control_extra_data_cb)(app_control_h app_control, const char *key, void *user_data);
513 * @brief Called once for each matched application that can be launched to handle the given app_control request.
515 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
516 * @param[in] app_control The app_control handle
517 * @param[in] package The package name of the application that can handle the launch request of the given app_control
518 * @param[in] user_data The user data passed from the foreach function
519 * @return @c true to continue with the next iteration of the loop,
520 * otherwise @c false to break out of the loop
521 * @pre app_control_foreach_app_matched() will invoke this callback.
522 * @see app_control_foreach_app_matched()
524 typedef bool (*app_control_app_matched_cb)(app_control_h app_control, const char *appid, void *user_data);
527 typedef int (*app_control_host_res_fn)(void *data);
530 * @brief Creates an app_control handle.
532 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
533 * @remarks The @a app_control must be released using app_control_destroy().
534 * @param[out] app_control The app_control handle to be newly created on success
535 * @return @c 0 on success,
536 * otherwise a negative error value
537 * @retval #APP_CONTROL_ERROR_NONE Successful
538 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
539 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
540 * @see app_control_destroy()
542 int app_control_create(app_control_h *app_control);
546 * @brief Destroys the app_control handle and releases all its resources.
548 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
549 * @param[in] app_control The app_control handle
550 * @return @c 0 on success,
551 * otherwise a negative error value
552 * @retval #APP_CONTROL_ERROR_NONE Successful
553 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
554 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
555 * @see app_control_create()
557 int app_control_destroy(app_control_h app_control);
561 * @brief Sets the operation to be performed.
563 * @details The @a operation is the mandatory information for the launch request.
564 * If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request.
565 * If the operation is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application.
566 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
567 * @param[in] app_control The app_control handle
568 * @param[in] operation The operation to be performed (if the @a operation is @c NULL, it clears the previous value)
569 * @return @c 0 on success,
570 * otherwise a negative error value
571 * @retval #APP_CONTROL_ERROR_NONE Successful
572 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
573 * @see app_control_get_operation()
574 * @see APP_CONTROL_OPERATION_DEFAULT
575 * @see APP_CONTROL_OPERATION_EDIT
576 * @see APP_CONTROL_OPERATION_VIEW
577 * @see APP_CONTROL_OPERATION_PICK
578 * @see APP_CONTROL_OPERATION_CREATE_CONTENT
579 * @see APP_CONTROL_OPERATION_CALL
580 * @see APP_CONTROL_OPERATION_SEND
581 * @see APP_CONTROL_OPERATION_SEND_TEXT
582 * @see APP_CONTROL_OPERATION_DIAL
583 * @see APP_CONTROL_OPERATION_SEARCH
585 int app_control_set_operation(app_control_h app_control, const char *operation);
589 * @brief Gets the operation to be performed.
591 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
592 * @remarks The @a operation must be released using free().
593 * @param[in] app_control The app_control handle
594 * @param[out] operation The operation to be performed
595 * @return @c 0 on success,
596 * otherwise a negative error value
597 * @retval #APP_CONTROL_ERROR_NONE Successful
598 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
599 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
600 * @see app_control_set_operation()
602 int app_control_get_operation(app_control_h app_control, char **operation);
606 * @brief Sets the URI of the data.
608 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
609 * @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if the parameter 'uri' is started with 'file://' and it is a regular file in this application's data path which can be obtained by calling app_get_data_path() function, it will be shared to the callee application. Framework will grant a temporary permission to the callee application for this file and revoke it when the callee application is terminated. The callee application can just read it.
610 * @param[in] app_control The app_control handle
611 * @param[in] uri The URI of the data this app_control is operating on (if the @a uri is @c NULL, it clears the previous value)
612 * @return @c 0 on success,
613 * otherwise a negative error value
614 * @retval #APP_CONTROL_ERROR_NONE Successful
615 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
616 * @see app_control_get_uri()
618 int app_control_set_uri(app_control_h app_control, const char *uri);
622 * @brief Gets the URI of the data.
624 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
625 * @remarks The @a uri must be released using free().
626 * @param[in] app_control The app_control handle
627 * @param[out] uri The URI of the data this app_control is operating on
628 * @return @c 0 on success,
629 * otherwise a negative error value
630 * @retval #APP_CONTROL_ERROR_NONE Successful
631 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
632 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
633 * @see app_control_set_uri()
635 int app_control_get_uri(app_control_h app_control, char **uri);
639 * @brief Sets the explicit MIME type of the data.
641 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
642 * @param[in] app_control The app_control handle
643 * @param[in] mime The explicit MIME type of the data this app_control is operating on (if the @a mime is @c NULL, it clears the previous value)
644 * @return @c 0 on success,
645 * otherwise a negative error value
646 * @retval #APP_CONTROL_ERROR_NONE Successful
647 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
648 * @see app_control_get_mime()
650 int app_control_set_mime(app_control_h app_control, const char *mime);
654 * @brief Gets the explicit MIME type of the data.
656 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
657 * @remarks The @a uri must be released using free().
658 * @param[in] app_control The app_control handle
659 * @param[out] mime The explicit MIME type of the data this app_control is operating on
660 * @return @c 0 on success,
661 * otherwise a negative error value
662 * @retval #APP_CONTROL_ERROR_NONE Successful
663 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
664 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
665 * @see app_control_set_mime()
667 int app_control_get_mime(app_control_h app_control, char **mime);
671 * @brief Sets the explicit category.
673 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
674 * @param[in] app_control The app_control handle
675 * @param[in] category The explicit category (if the @a category is @c NULL, it clears the previous value)
676 * @return @c 0 on success,
677 * otherwise a negative error value
678 * @retval #APP_CONTROL_ERROR_NONE Successful
679 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
680 * @see app_control_get_category()
682 int app_control_set_category(app_control_h app_control, const char *category);
686 * @brief Gets the explicit category.
688 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
689 * @remarks The @a category must be released using free().
690 * @param[in] app_control The app_control handle
691 * @param[out] category The explicit category
692 * @return @c 0 on success,
693 * otherwise a negative error value
694 * @retval #APP_CONTROL_ERROR_NONE Successful
695 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
696 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
697 * @see app_control_set_category()
699 int app_control_get_category(app_control_h app_control, char **category);
703 * @brief Sets the ID of the application to explicitly launch.
705 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
706 * @param[in] app_control The app_control handle
707 * @param[in] app_id The ID of the application to explicitly launch (if the @a app_id is @c NULL, it clears the previous value)
708 * @return @c 0 on success,
709 * otherwise a negative error value
710 * @retval #APP_CONTROL_ERROR_NONE Successful
711 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
712 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
713 * @see app_control_get_app_id()
715 int app_control_set_app_id(app_control_h app_control, const char *app_id);
719 * @brief Gets the ID of the application to explicitly launch.
721 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
722 * @remarks The @a app_id must be released with free().
723 * @param[in] app_control The app_control handle
724 * @param[out] app_id The ID of the application to explicitly launch
725 * @return @c 0 on success,
726 * otherwise a negative error value
727 * @retval #APP_CONTROL_ERROR_NONE Successful
728 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
729 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
730 * @see app_control_set_app_id()
732 int app_control_get_app_id(app_control_h app_control, char **app_id);
735 * @brief Adds extra data to the app_control.
737 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
738 * @remarks The function replaces any existing value for the given key.
739 * @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key or @a value is a zero-length string.
740 * @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with system-defined key.
741 * @param[in] app_control The app_control handle
742 * @param[in] key The name of the extra data
743 * @param[in] value The value associated with the given key
744 * @return @c 0 on success,
745 * otherwise a negative error value
746 * @retval #APP_CONTROL_ERROR_NONE Successful
747 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
748 * @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available
749 * @see app_control_add_extra_data_array()
750 * @see app_control_remove_extra_data()
751 * @see app_control_get_extra_data()
753 int app_control_add_extra_data(app_control_h app_control, const char *key, const char *value);
757 * @brief Adds the extra data array to the app_control.
759 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
760 * @remarks The function replaces any existing value for the given key.
761 * @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key is a zero-length string.
762 * @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with system-defined key.
763 * @param[in] app_control The app_control handle
764 * @param[in] key The name of the extra data
765 * @param[in] value The array value associated with the given key
766 * @param[in] length The length of the array
767 * @return @c 0 on success,
768 * otherwise a negative error value
769 * @retval #APP_CONTROL_ERROR_NONE Successful
770 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
771 * @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available
772 * @see app_control_add_extra_data()
773 * @see app_control_remove_extra_data()
774 * @see app_control_get_extra_data()
776 int app_control_add_extra_data_array(app_control_h app_control, const char *key, const char* value[], int length);
780 * @brief Removes the extra data from the app_control.
782 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
783 * @param[in] app_control The app_control handle
784 * @param[in] key The name of the extra data
785 * @return @c 0 on success,
786 * otherwise a negative error value
787 * @retval #APP_CONTROL_ERROR_NONE Successful
788 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
789 * @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found
790 * @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available
791 * @see app_control_add_extra_data()
792 * @see app_control_add_extra_data_array()
793 * @see app_control_get_extra_data()
795 int app_control_remove_extra_data(app_control_h app_control, const char *key);
799 * @brief Gets the extra data from the app_control.
801 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
802 * @remarks The @a value must be released using free().
803 * @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is of array data type.
804 * @param[in] app_control The app_control handle
805 * @param[in] key The name of the extra data
806 * @param[out] value The value associated with the given key
807 * @return @c 0 on success,
808 * otherwise a negative error value
809 * @retval #APP_CONTROL_ERROR_NONE Successful
810 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
811 * @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found
812 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
813 * @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type
814 * @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available
815 * @see app_control_add_extra_data()
816 * @see app_control_add_extra_data_array()
817 * @see app_control_get_extra_data()
818 * @see app_control_remove_extra_data()
819 * @see app_control_foreach_extra_data()
821 int app_control_get_extra_data(app_control_h app_control, const char *key, char **value);
825 * @brief Gets the extra data array from the app_control.
827 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
828 * @remarks The @a value must be released using free().
829 * @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is not of array data type.
830 * @param[in] app_control The app_control handle
831 * @param[in] key The name of the extra data
832 * @param[out] value The array value associated with the given key
833 * @param[out] length The length of the array
834 * @return @c 0 on success,
835 * otherwise a negative error value
836 * @retval #APP_CONTROL_ERROR_NONE Successful
837 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
838 * @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found
839 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
840 * @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type
841 * @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available
842 * @see app_control_add_extra_data()
843 * @see app_control_add_extra_data_array()
844 * @see app_control_remove_extra_data()
845 * @see app_control_foreach_extra_data()
847 int app_control_get_extra_data_array(app_control_h app_control, const char *key, char ***value, int *length);
851 * @brief Checks whether the extra data associated with the given @a key is of array data type.
853 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
854 * @param[in] app_control The app_control handle
855 * @param[in] key The name of the extra data
856 * @param[out] array If @c true the extra data is of array data type,
858 * @return @c 0 on success,
859 * otherwise a negative error value
860 * @retval #APP_CONTROL_ERROR_NONE Successful
861 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
862 * @see app_control_add_extra_data()
863 * @see app_control_add_extra_data_array()
864 * @see app_control_remove_extra_data()
865 * @see app_control_foreach_extra_data()
867 int app_control_is_extra_data_array(app_control_h app_control, const char *key, bool *array);
871 * @brief Retrieves all extra data contained in app_control.
872 * @details This function calls app_control_extra_data_cb() once for each key-value pair for extra data contained in app_control. \n
873 * If the app_control_extra_data_cb() callback function returns @c false, then iteration will be finished.
875 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
876 * @param[in] app_control The app_control handle
877 * @param[in] callback The iteration callback function
878 * @param[in] user_data The user data to be passed to the callback function
879 * @return @c 0 on success,
880 * otherwise a negative error value
881 * @retval #APP_CONTROL_ERROR_NONE Successful
882 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
883 * @post This function invokes app_control_extra_data_cb().
884 * @see app_control_extra_data_cb()
886 int app_control_foreach_extra_data(app_control_h app_control, app_control_extra_data_cb callback, void *user_data);
890 * @brief Retrieves all applications that can be launched to handle the given app_control request.
892 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
893 * @param[in] app_control The app_control handle
894 * @param[in] callback The iteration callback function
895 * @param[in] user_data The user data to be passed to the callback function
896 * @return @c 0 on success,
897 * otherwise a negative error value
898 * @retval #APP_CONTROL_ERROR_NONE Success
899 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
900 * @post This function invokes app_control_app_matched_cb().
901 * @see app_control_app_matched_cb()
903 int app_control_foreach_app_matched(app_control_h app_control, app_control_app_matched_cb callback, void *user_data);
907 * @brief Sends the launch request.
909 * @details The operation is mandatory information for the launch request. \n
910 * If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used by default.
911 * If the operation is #APP_CONTROL_OPERATION_DEFAULT, the application ID is mandatory to explicitly launch the application.
912 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
914 * @privilege %http://tizen.org/privilege/appmanager.launch
915 * @remarks The function returns #APP_CONTROL_ERROR_LAUNCH_REJECTED if the operation value is #APP_CONTROL_OPERATION_LAUNCH_ON_EVENT which is only for handling the event from the platform or other application, refer to @a Event module.
916 * @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, the launch request of the service application over out of packages is restricted by the platform. Also, implicit launch requests are NOT delivered to service applications since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. To launch a service application, an explicit launch request with application ID given by app_control_set_app_id() MUST be sent.
917 * @param[in] app_control The app_control handle
918 * @param[in] callback The callback function to be called when the reply is delivered
919 * @param[in] user_data The user data to be passed to the callback function
920 * @return @c 0 on success,
921 * otherwise a negative error value
922 * @retval #APP_CONTROL_ERROR_NONE Successful
923 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
924 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
925 * @retval #APP_CONTROL_ERROR_APP_NOT_FOUND The application to run the given launch request is not found
926 * @retval #APP_CONTROL_ERROR_LAUNCH_REJECTED The application cannot be launched in current context
927 * @retval #APP_CONTROL_ERROR_LAUNCH_FAILED Failed to launch the application
928 * @retval #APP_CONTROL_ERROR_TIMED_OUT Failed due to timeout. The application that handles @a app_control may be busy
929 * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
930 * @post If the launch request is sent for the result, the result will come back through app_control_reply_cb() from the callee application. Additional replies may be delivered on app_control_enable_app_started_result_event() called.
931 * @see app_control_reply_to_launch_request()
932 * @see app_control_reply_cb()
933 * @see app_control_enable_app_started_result_event()
935 int app_control_send_launch_request(app_control_h app_control, app_control_reply_cb callback, void *user_data);
939 * @brief Sends the terminate request to the application that is launched by app_control. This API is only effective for some applications that are provided by default for handling platform default app_controls. You are not allowed to terminate other general applications using this API.
941 * @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this API can be used to terminate sub-applications which were launched as group mode by caller application.
942 * Once callee application is being terminated by this API, other applications which were launched by callee application as group mode will be terminated as well.
944 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
945 * @param[in] app_control The app_control handle
946 * @return @c 0 on success,
947 * otherwise a negative error value
948 * @retval #APP_CONTROL_ERROR_NONE Successful
949 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
950 * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
951 * @see app_control_send_launch_request()
952 * @see app_control_set_launch_mode()
954 int app_control_send_terminate_request(app_control_h app_control);
958 * @brief Replies to the launch request sent by the caller.
959 * @details If the caller application sent the launch request to receive the result, the callee application can return the result back to the caller.
961 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
962 * @remarks The function is not allowed to send reply #APP_CONTROL_RESULT_APP_STARTED as @a result which is reserved for platform developers.
963 * @param[in] reply The app_control handle in which the results of the callee are contained
964 * @param[in] request The app_control handle sent by the caller
965 * @param[in] result The result code of the launch request
966 * @return @c 0 on success,
967 * otherwise a negative error value
968 * @retval #APP_CONTROL_ERROR_NONE Successful
969 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
970 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
971 * @see app_control_send_launch_request()
973 int app_control_reply_to_launch_request(app_control_h reply, app_control_h request, app_control_result_e result);
977 * @brief Creates and returns a copy of the given app_control handle.
979 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
980 * @remarks A newly created app_control should be destroyed by calling app_control_destroy() if it is no longer needed.
982 * @param[out] clone If successful, a newly created app_control handle will be returned
983 * @param[in] app_control The app_control handle
984 * @return @c 0 on success,
985 * otherwise a negative error value
986 * @retval #APP_CONTROL_ERROR_NONE Successful
987 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
988 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
989 * @see app_control_destroy()
991 int app_control_clone(app_control_h *clone, app_control_h app_control);
995 * @brief Gets the application ID of the caller from the launch request.
997 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
998 * @remarks The @a app_control must be the launch request from app_control_cb().
999 * @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request.
1000 * @remarks The @a id must be released using free().
1001 * @param[in] app_control The app_control handle from app_control_cb()
1002 * @param[out] id The application ID of the caller
1003 * @return @a 0 on success,
1004 * otherwise a negative error value
1005 * @retval #APP_CONTROL_ERROR_NONE Successful
1006 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1007 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
1009 int app_control_get_caller(app_control_h app_control, char **id);
1013 * @brief Checks whether the caller is requesting a reply from the launch request.
1015 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1016 * @remarks The @a app_control must be the launch request from app_control_cb().
1017 * @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request.
1018 * @param[in] app_control The app_control handle from app_control_cb()
1019 * @param[out] requested If @c true a reply is requested by the caller,
1020 * otherwise @c false
1021 * @return @c 0 on success,
1022 * otherwise a negative error value
1023 * @retval #APP_CONTROL_ERROR_NONE Successful
1024 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1025 * @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
1027 int app_control_is_reply_requested(app_control_h app_control, bool *requested);
1030 * @brief Sets the launch mode of the application.
1032 * @details This function allows callee application to be launched as group or single mode.
1033 * @remarks Although launch_mode were set as #APP_CONTROL_LAUNCH_MODE_GROUP, callee application would be launched as single mode if the manifest file of callee application defined the launch mode as "single".
1034 * This function can just set the preference of caller application to launch an application.
1035 * @remarks Sub-applications which were launched as group mode always have own process.
1037 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1038 * @param[in] app_control The app_control handle
1039 * @param[in] launch_mode The launch mode of app
1041 * @return 0 on success, otherwise a negative error value
1042 * @retval #APP_CONTROL_ERROR_NONE Successful
1043 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1044 * @see app_control_set_launch_mode()
1045 * @see app_control_launch_mode_e
1047 int app_control_set_launch_mode(app_control_h app_control,
1048 app_control_launch_mode_e mode);
1051 * @brief Gets the launch mode of the application.
1053 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1054 * @param[in] app_control The app_control handle
1055 * @param[out] launch_mode The launch mode of app
1057 * @return 0 on success, otherwise a negative error value
1058 * @retval #APP_CONTROL_ERROR_NONE Successful
1059 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1060 * @see app_control_get_launch_mode()
1061 * @see app_control_launch_mode_e
1063 int app_control_get_launch_mode(app_control_h app_control,
1064 app_control_launch_mode_e *mode);
1067 * @brief Enables additional launch result event on launch request.
1069 * @details The function allows to receive #APP_CONTROL_RESULT_APP_STARTED event on\n
1070 * application get launched by app_control.
1071 * @remarks app_control_reply_cb() will be called on APP_CONTROL_RESULT_APP_STARTED event received.
1072 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1073 * @param[in] app_control The app_control handle
1074 * @return 0 on success, otherwise a negative error value
1075 * @retval #APP_CONTROL_ERROR_NONE Successful
1076 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1077 * @see app_control_send_launch_request()
1078 * @see #APP_CONTROL_RESULT_APP_STARTED
1080 int app_control_enable_app_started_result_event(app_control_h app_control);
1084 * @brief Sets the ID of default application associated with operation, mime-type and uri.
1087 * @privlevel platform
1088 * @privilege %http://tizen.org/privilege/systemsettings.admin
1089 * @param[in] app_control The app_control handle
1090 * @param[in] app_id The ID of the application
1092 * @return 0 on success, otherwise a negative error value
1093 * @retval #APP_CONTROL_ERROR_NONE Successful
1094 * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
1095 * @retval #APP_CONTROL_ERROR_IO_ERROR IO error
1096 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1099 int app_control_set_defapp(app_control_h app_control, const char *app_id);
1103 * @brief Unsets default application control setting of an application.
1105 * @details When an user call this API, all the default application settings for the app_id are unset.
1108 * @privlevel platform
1109 * @privilege %http://tizen.org/privilege/systemsettings.admin
1110 * @param[in] app_id The ID of the application
1112 * @return 0 on success, otherwise a negative error value
1113 * @retval #APP_CONTROL_ERROR_NONE Successful
1114 * @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied
1115 * @retval #APP_CONTROL_ERROR_IO_ERROR IO error
1116 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
1119 int app_control_unset_defapp(const char *app_id);
1128 #endif /* __TIZEN_APPFW_APP_CONTROL_H__ */