4 * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __TIZEN_CONVERGENCE_SERVICE_FLOW_H__
21 #define __TIZEN_CONVERGENCE_SERVICE_FLOW_H__
24 #define API __attribute__ ((visibility("default")))
47 * \#include <svcflow.h>
54 * @brief Enumerations of result code for Service Flow
56 typedef enum _svcflow_result_e
58 SVCFLOW_RESULT_SUCCEEDED = 0,
62 * @brief Describes service group about Service Flow
64 typedef struct _svcflow_service_group_s
67 } svcflow_service_group_s;
70 * @brief The handle for service group of Service Flow
72 typedef svcflow_service_group_s *svcflow_service_group_h;
75 * @brief Describes service control about Service Flow
77 typedef struct _svcflow_service_control_s
80 } svcflow_service_control_s;
83 * @brief The handle for service control of Service Flow
85 typedef svcflow_service_control_s *svcflow_service_control_h;
88 * @brief Callback for svcflow_service_control_{transfer/defer/notify}_launch_request API
90 * @param[in] reply specifies reply handle of service control
91 * @param[in] user_data specifies user_data of svcflow_profiles_list_foreach_profile_info()
93 * @pre svcflow_service_control_{transfer/defer/notify}_launch_request() will invoke this callback.
96 typedef void (*svcflow_service_control_reply_cb)(svcflow_service_control_h reply,
97 svcflow_result_e result,
100 /*==================================================================================================
102 ==================================================================================================*/
105 * @brief Connects Service Flow
108 * @return 0 on success, otherwise a negative error value
109 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
111 int svcflow_connect();
114 * @brief Disconnects Service Flow
117 * @return 0 on success, otherwise a negative error value
118 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
120 int svcflow_disconnect();
123 * @brief Creates Service Group
126 * @return 0 on success, otherwise a negative error value
127 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
129 int svcflow_service_group_create(svcflow_service_group_h *service_group);
132 * @brief Destroies Service Group
135 * @return 0 on success, otherwise a negative error value
136 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
138 int svcflow_service_group_destroy(svcflow_service_group_h service_group);
141 * @brief Adds Service Information in Service Group
144 * @return 0 on success, otherwise a negative error value
145 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
147 int svcflow_service_group_add(svcflow_service_group_h service_group,
148 svcbox_service_info_h service_info);
151 * @brief Removes Service Information in Service Group
154 * @return 0 on success, otherwise a negative error value
155 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
157 int svcflow_service_group_remove(svcflow_service_group_h service_group,
158 svcbox_service_info_h service_info);
161 * @brief Creates Service Control
164 * @return 0 on success, otherwise a negative error value
165 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
167 int svcflow_service_control_create(svcflow_service_control_h *service_control);
170 * @brief Destroies Service Control
173 * @return 0 on success, otherwise a negative error value
174 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
176 int svcflow_service_control_destroy(svcflow_service_control_h service_control);
179 * @brief Sets Service Control URI
182 * @return 0 on success, otherwise a negative error value
183 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
185 int svcflow_service_control_set_uri(svcflow_service_control_h service_control,
189 * @brief Gets Service Control URI
192 * @return 0 on success, otherwise a negative error value
193 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
195 int svcflow_service_control_get_uri(svcflow_service_control_h service_control,
199 * @brief Sets Service Control Name
202 * @return 0 on success, otherwise a negative error value
203 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
205 int svcflow_service_control_set_name(svcflow_service_control_h service_control,
209 * @brief Gets Service Control Name
212 * @return 0 on success, otherwise a negative error value
213 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
215 int svcflow_service_control_get_name(svcflow_service_control_h service_control,
219 * @brief Sets Publication Service Group
222 * @return 0 on success, otherwise a negative error value
223 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
225 int svcflow_service_control_set_publication_group(svcflow_service_control_h service_control,
226 svcflow_service_group_h service_group);
229 * @brief Gets Publication Service Group
232 * @return 0 on success, otherwise a negative error value
233 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
235 int svcflow_service_control_get_publication_group(svcflow_service_control_h service_control,
236 svcflow_service_group_h *service_group);
239 * @brief Sets Subscription Service Group
242 * @return 0 on success, otherwise a negative error value
243 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
245 int svcflow_service_control_set_subscription_group(svcflow_service_control_h service_control,
246 svcflow_service_group_h service_group);
249 * @brief Gets Subscription Service Group
252 * @return 0 on success, otherwise a negative error value
253 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
255 int svcflow_service_control_get_subscription_group(svcflow_service_control_h service_control,
256 svcflow_service_group_h *service_group);
259 * @brief Transfers Launch Request
262 * @return 0 on success, otherwise a negative error value
263 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
265 int svcflow_service_control_transfer_launch_request(svcflow_service_control_h service_control,
266 svcflow_service_control_reply_cb callback,
270 * @brief Transfers Termination Request
273 * @return 0 on success, otherwise a negative error value
274 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
276 int svcflow_service_control_transfer_termination_request(svcflow_service_control_h service_control);
279 * @brief Defers Launch Request
282 * @return 0 on success, otherwise a negative error value
283 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
285 int svcflow_service_control_defer_launch_request(svcflow_service_control_h service_control,
286 svcflow_service_control_reply_cb callback,
290 * @brief Defers Termination Request
293 * @return 0 on success, otherwise a negative error value
294 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
296 int svcflow_service_control_defer_termination_request(svcflow_service_control_h service_control);
299 * @brief Notifies Launch Request
302 * @return 0 on success, otherwise a negative error value
303 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
305 int svcflow_service_control_notify_launch_request(svcflow_service_control_h service_control,
306 svcflow_service_control_reply_cb callback,
310 * @brief Notifies Termination Request
313 * @return 0 on success, otherwise a negative error value
314 * @retval error code defined in svcflow_result_e - SVCBOX_RESULT_SUCCEEDED if Successful
316 int svcflow_service_control_notify_termination_request(svcflow_service_control_h service_control);
326 #endif /* __TIZEN_CONVERGENCE_SERVICE_BOX_H__ */