4 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
27 * @addtogroup CAPI_TELEPHONY_SERVICE_SS
34 #include <tapi_common.h>
43 * @brief Sends a request to activate/deactivate call barring.
45 * @details This service allows a mobile subscriber to activate barring of certain categories
46 * of outgoing or incoming calls according to a barring program which is selected from a set
47 * of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
48 * with a specific basic service group. Also this API allows deactivating call barring based on categories set.
49 * If the user calls this function with a wrong password 3 times subsequently, the barring service can be blocked.
50 * If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
51 * whether the service request has been granted or not.
53 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
54 * However it just means that the API request has been transfered to the CP successfully.
55 * The actual operation result is delivered with the async response as below.
57 * <b> Sync (or) Async: </b> This is an Asynchronous API.
59 * <b> Prospective Clients: </b> External Apps.
63 * @privilege %http://tizen.org/privilege/telephony.admin
65 * @param[in] handle The handle from tel_init()
67 * @param[in] info The information about call barring
69 * @param[in] callback To register a callback function for result
71 * @param[in] user_data The user data for user specification
73 * @return The return type (int) \n
74 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
75 * Refer #TapiResult_t for failure and error code.
77 * @pre Initialize the Dbus connection with #tel_init.
79 * @see tel_get_ss_barring_status()
80 * @see tel_change_ss_barring_password()
82 int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data);
85 * @brief Gets a call barring status.
87 * @details The mobile subscriber may determine which outgoing or incoming call should be barred
88 * by subscribing a set of one or more unique barring programs.
89 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
90 * The response indicates the service status.
92 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
93 * However it just means that the API request has been transfered to the CP successfully.
94 * The actual operation result is delivered with the async response as below.
96 * <b> Sync (or) Async: </b> This is an Asynchronous API.
98 * <b> Prospective Clients: </b> External Apps.
102 * @privilege %http://tizen.org/privilege/telephony
104 * @param[in] handle The handle from tel_init()
106 * @param[in] ss_class The type of call i.e. Voice call, Video Call, and so on
108 * @param[in] type The barring type i.e. Outgoing international, outgoing all, Incoming all, and so on
110 * @param[in] callback To register a callback function for result
112 * @param[in] user_data The user data for user specification
114 * @return The return type (#TapiResult_t) \n
115 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
116 * Refer #TapiResult_t for failure and error code.
118 * @pre Initialize the Dbus connection with #tel_init.
120 * @see tel_set_ss_barring()
121 * @asee tel_change_ss_barring_password()
123 int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data);
126 * @brief Allows changing of the barring password in the network.
128 * @details The user can request the network to change his own barring password. If the old password is not same as
129 * what the network knows, the request will be rejected by the network. New password should be entered separately twice
130 * to confirm the correctness of the user input. Otherwise, the request must be rejected by the Telephony Server.
131 * If the user calls this function with a wrong old password 3 times subsequently, the barring service can be blocked.
132 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
133 * The response indicates whether the service request has been granted or not.
135 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
136 * However it just means that the API request has been transfered to the CP successfully.
137 * The actual operation result is delivered with the async response as below.
138 * <b> Sync (or) Async: </b> This is an Asynchronous API.
140 * <b> Prospective Clients: </b> External Apps.
143 * @privlevel platform
144 * @privilege %http://tizen.org/privilege/telephony.admin
146 * @remarks Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
147 * at a time and TS might return #TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
149 * @param[in] handle The handle from tel_init()
151 * @param[in] old_password The old password set for Barring in the Network \n
152 * This is a Null terminated string.
154 * @param[in] new_password The new password set for Barring in the Network \n
155 * This is a Null terminated string
157 * @param[in] new_password_again A new password again \n
158 * This is a Null terminated string
160 * @param[in] callback To register a callback function for result
162 * @param[in] user_data The user data for user specification
164 * @return The return type (int) \n
165 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
166 * Refer #TapiResult_t for failure and error code.
168 * @pre Initialize the Dbus connection with #tel_init.
169 * An event loop runs to listen to events.
171 int tel_change_ss_barring_password(TapiHandle *handle,
172 const char *old_password,
173 const char *new_password,
174 const char *new_password_again,
175 tapi_response_cb callback, void *user_data);
179 * @brief Allows to set the (register/erase/activate/deactivate) call forwarding option at the network.
181 * @details This enables to forward the calls to another party. This service permits a called mobile subscriber
182 * to have the network send all incoming calls, or just those associated with a specific Basic service group,
183 * addressed to the called mobile subscriber's directory number and which meets
184 * various call FORWARD conditions, to another directory number.
185 * The ability of the served mobile subscriber to originate calls is unaffected.
186 * If the service is activated, a call is forwarded only if this call forward condition occurs.
187 * An application has to call this API in order to explicitly register/erase/activate/deactivate
188 * call forwarding. Request will be passed irrespective of whether
189 * another SS call forward is already ongoing or not.
191 * If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
192 * whether the service request has been granted or not.
194 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
195 * However it just means that the API request has been transfered to the CP successfully.
196 * The actual operation result is delivered with the async response as below.
198 * <b> Sync (or) Async: </b> This is an Asynchronous API.
200 * <b> Prospective Clients: </b> External Apps.
203 * @privlevel platform
204 * @privilege %http://tizen.org/privilege/telephony.admin
206 * @param[in] handle The handle from tel_init()
208 * @param[in] info The Call forward information such as a forward mode, a forward type, and so on
210 * @param[in] callback To register a callback function for result
212 * @param[in] user_data The user data for user specification
214 * @return The return type (int) \n
215 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
216 * Refer #TapiResult_t for failure and error code.
218 * @pre Initialize the Dbus connection with #tel_init.
220 * @see tel_get_ss_forward_status()
222 int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data);
225 * @brief Provides an option to get the call forwarding status of different calls from the Network.
227 * @details The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
228 * After having requested this procedure the network shall return the following information:\n
229 * - In response to a general data request the served mobile subscriber should be given a list of all Basic service groups
230 * to which call forwarding unconditional is registered, including information on whether or not it is active and operative,
231 * and the associated forwarded-to numbers\n
232 * - In response to a specific request concerning one particular Basic service group,
233 * the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
234 * including information on whether or not it is active and operative for that Basic service group.\n
235 * If CFU is registered, the associated forwarded-to number shall be given.
237 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
238 * The response indicates the service status.
240 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
241 * However it just means that the API request has been transfered to the CP successfully.
242 * The actual operation result is delivered with the async response as below.
243 * <b> Sync (or) Async: </b> This is an Asynchronous API.
245 * <b> Prospective Clients: </b> External Apps.
249 * @privilege %http://tizen.org/privilege/telephony
251 * @param[in] handle The handle from tel_init()
253 * @param[in] ss_class The Forward call type i.e. voice call, Video Call, Data Calls, and so on
255 * @param[in] condition The forward condition i.e. unconditional, when no reply, when busy, when not reachable, and so on
257 * @param[in] callback To register a callback function for result
259 * @param[in] user_data The user data for user specification
261 * @return The return type (int) \n
262 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
263 * Refer #TapiResult_t for failure and error code.
265 * @pre Initialize the Dbus connection with #tel_init.
267 * @see tel_set_ss_forward()
269 int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data);
273 * @brief Activates/deactivates the call waiting service.
275 * @details The call waiting service permits a mobile to be notified of an incoming
276 * call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
277 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
278 * If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
279 * whether the service request has been granted or not.
281 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
282 * However it just means that the API request has been transfered to the CP successfully.
283 * The actual operation result is delivered with the async response as below.
285 * <b> Sync (or) Async: </b> This is an Asynchronous API.
287 * <b> Prospective Clients: </b> External Apps.
290 * @privlevel platform
291 * @privilege %http://tizen.org/privilege/telephony.admin
293 * @param[in] handle The handle from tel_init()
295 * @param[in] info The status of call-waiting service i.e. On (TRUE) or off (FALSE)
297 * @param[in] callback To register a callback function for result
299 * @param[in] user_data The user data for user specification
301 * @return The return type (int) \n
302 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
303 * Refer #TapiResult_t for failure and error code
305 * @pre Initialize the Dbus connection with #tel_init.
307 * @see tel_get_ss_waiting_status()
309 int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data);
312 * @brief Gets the status of the call waiting service.
314 * @details The call waiting service permits a mobile to be notified of an incoming call
315 * (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
316 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
317 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
318 * The response indicates the service status.
320 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
321 * However it just means that the API request has been transfered to the CP successfully.
322 * The actual operation result is delivered with the async response as below.
323 * <b> Sync (or) Async: </b> This is an Asynchronous API.
325 * <b> Prospective Clients: </b> External Apps.
329 * @privilege %http://tizen.org/privilege/telephony
331 * @param[in] handle The handle from tel_init()
333 * @param[in] ss_class The call types
335 * @param[in] callback To register a callback function for result
337 * @param[in] user_data The user data for user specification
339 * @return The return type (int) \n
340 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
341 * Refer #TapiResult_t for failure and error code
343 * @pre Initialize the Dbus connection with #tel_init.
345 * @see tel_set_ss_waiting()
347 int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t ss_class, tapi_response_cb callback, void *user_data);
350 * @brief Activates/deactivates the status of the calling line identity service.
352 * @details The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:\n
353 * CLIP - Calling line identification presentation\n
354 * This Supplementary Service provides the ability to indicate the line identity of the calling party to the called party.
355 * The network shall deliver the calling line identity to the called party at call set-up time,
356 * regardless of the terminal capability to handle the information.\n
357 * CLIR - Calling line identification restriction\n
358 * The CLIR Supplementary Service is a Supplementary Service offered to the calling party
359 * to prevent presentation of the calling party's line identity, to the called party.\n
360 * COLP - Connected line identification presentation\n
361 * This Supplementary Service is not a dialing check but an indication to the calling subscriber
362 * of the connected line identity in a full ISDN/PLMN environment,
363 * the connected line identity shall include all the information necessary to unambiguously identify the connected party.
364 * The network shall deliver the connected line identity to the calling party
365 * regardless of the terminal capability to handle the information.\n
366 * COLR - Connected line identification restriction\n
367 * The COLR Supplementary Service is a Supplementary Service offered
368 * to the connected party to prevent presentation of the connected line identity, to the calling party.
369 * In the case where the calling party has an override category.\n
370 * CDIP - Called line identification presentation\n
371 * CNAP - Calling name presentation\n
372 * This function queries the service status with #TelSsCliType_t.
374 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
375 * The response indicates the service status.
377 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
378 * However it just means that the API request has been transfered to the CP successfully.
379 * The actual operation result is delivered with the async response as below:
381 * <b> Sync (or) Async: </b> This is an Asynchronous API.
383 * <b> Prospective Clients: </b> External Apps.
386 * @privlevel platform
387 * @privilege %http://tizen.org/privilege/telephony.admin
389 * @param[in] handle The handle from tel_init()
391 * @param[in] type The Cli service type
393 * @param[in] status The Cli Status
395 * @param[in] callback To register a callback function for result
397 * @param[in] user_data The user data for user specification
399 * @return The return type (int) \n
400 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
401 * Refer #TapiResult_t for failure and error code
403 * @pre Initialize the Dbus connection with #tel_init.
405 int tel_set_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, TelSsCliStatus_t status, tapi_response_cb callback, void *user_data);
408 * @brief Gets the status of the calling line identity service.
410 * @details The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:\n
411 * CLIP - Calling line identification presentation\n
412 * This Supplementary Service provides the ability to indicate the line identity of the calling party to the called party.
413 * The network shall deliver the calling line identity to the called party at call set-up time,
414 * regardless of the terminal capability to handle the information.\n
415 * CLIR - Calling line identification restriction\n
416 * The CLIR Supplementary Service is a Supplementary Service offered to the calling party
417 * to prevent presentation of the calling party's line identity, to the called party.\n
418 * COLP - Connected line identification presentation\n
419 * This Supplementary Service is not a dialing check but an indication to the calling subscriber
420 * of the connected line identity in a full ISDN/PLMN environment,
421 * the connected line identity shall include all the information necessary to unambiguously identify the connected party.
422 * The network shall deliver the connected line identity to the calling party
423 * regardless of the terminal capability to handle the information.\n
424 * COLR - Connected line identification restriction\n
425 * The COLR Supplementary Service is a Supplementary Service offered
426 * to the connected party to prevent presentation of the connected line identity, to the calling party.
427 * In the case where the calling party has an override category.\n
428 * CDIP - Called line identification presentation\n
429 * CNAP - Calling name presentation\n
430 * This function queries the service status with #TelSsCliType_t.
432 * If this function is called normally, the asynchronous response comes in a few seconds from the network.
433 * The response indicates the service status.
435 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
436 * However it just means that the API request has been transfered to the CP successfully.
437 * The actual operation result is delivered with the async response as below:
439 * <b> Sync (or) Async: </b> This is an Asynchronous API.
441 * <b> Prospective Clients: </b> External Apps.
445 * @privilege %http://tizen.org/privilege/telephony
447 * @param[in] handle The handle from tel_init()
449 * @param[in] type The Cli service type
451 * @param[in] callback To register a callback function for result
453 * @param[in] user_data The user data for user specification
455 * @return The return type (int) \n
456 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
457 * Refer #TapiResult_t for failure and error code
459 * @pre Initialize the Dbus connection with #tel_init.
461 int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data);
464 * @brief Sends a USSD string or User response to the Network.
466 * @details The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
467 * a PLMN operator defined application to communicate in a way which is transparent
468 * to the MS and the intermediate network entities.
469 * The mechanism allows development of PLMN specific supplementary services.
470 * A USSD string is like *109, *109*72348937857623#.
471 * There are two modes of USSD: The MMI-mode and the application mode.
472 * The MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
473 * and for the transparent transport of text strings from the network that are displayed
474 * by the mobile for user information.
475 * The application mode USSD is for the transparent transport of data between the network and the UE.
476 * The application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
478 * If this function is called normally, the asynchronous response comes in a few seconds from the telephony server.
479 * The response indicates whether the sending request is successfully delivered or not.
481 * This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
482 * However it just means that the API request has been transfered to the CP successfully.
483 * The actual operation result is delivered with the async response as below:
485 * <b> Sync (or) Async: </b> This is an Asynchronous API.
487 * <b> Prospective Clients: </b> External Apps.
490 * @privlevel platform
491 * @privilege %http://tizen.org/privilege/telephony.admin
493 * @param[in] handle The handle from tel_init()
495 * @param[in] info The data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038), USSD String data length, ANSI string passed by the client
497 * @param[in] callback To register a callback function for result
499 * @param[in] user_data The user data for user specification
501 * @return The return type (int) \n
502 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
503 * Refer #TapiResult_t for failure and error code
505 * @pre Initialize the Dbus connection with #tel_init.\n
506 * Register the telephony event to be listend with #tel_register_noti_event.\n
507 * An event loop runs to listen to events.
508 * No SS and USSD transaction should be ongoing. If there is an ongoing transaction, a new USSD request will be returned to the application with an error (USSD_BUSY).
511 int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data);
517 #endif /* _ITAPI_SS_H_ */