2 * Copyright (c) 2014 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.
17 #ifndef __TIZEN_APPFW_APP_CONTROL_INTERNAL_H__
18 #define __TIZEN_APPFW_APP_CONTROL_INTERNAL_H__
22 #include <app_control.h>
29 * @file app_control_internal.h
33 * @addtogroup CAPI_APP_CONTROL_MODULE
38 * @brief Replaces all data in the app_control with the bundle
40 * @remarks This function clears all data in the app_control and adds all key-value pairs in the bundle into the app_control
41 * @param [in] app_control The app_control handle
42 * @param [in] data The bundle handle
43 * @return 0 on success, otherwise a negative error value.
44 * @retval #APP_CONTROL_ERROR_NONE Successful
45 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
46 * @see app_control_export_as_bundle()
50 * #include <app_control.h>
52 * app_control_h app_control = NULL;
53 * app_control_create(&app_control);
54 * app_control_import_from_bundle(app_control, b);
59 int app_control_import_from_bundle(app_control_h app_control, bundle *data);
62 * @brief Returns a new bundle containing all data contained int the app_control
64 * @remarks The @a data must be released with bundle_free() by you.
65 * @param [in] app_control The app_control handle
66 * @param [out] data The bundle handle
67 * @return 0 on success, otherwise a negative error value.
68 * @retval #APP_CONTROL_ERROR_NONE Successful
69 * @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
70 * @see app_control_import_from_bundle()
74 * #include <app_control.h>
77 * app_control_export_as_bundle(app_control, &b);
81 int app_control_export_as_bundle(app_control_h app_control, bundle **data);
83 int app_control_create_request(bundle *data, app_control_h *app_control);
85 int app_control_create_event(bundle *data, app_control_h *app_control);
95 #endif /* __TIZEN_APPFW_APP_CONTROL_INTERNAL_H__ */