upload tizen1.0 source
[framework/telephony/libslp-tapi.git] / include / tapi / ITapiPS.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 /**
22  * @open
23  * @ingroup             TelephonyAPI
24  * @addtogroup  GPRS_TAPI       GPRS
25  * @{
26  *
27  * GPRS APIs allow an application to accomplish the following services: @n
28  * - activate , deactivate PDP service @n
29  *
30  */
31
32 #ifndef _ITAPI_PS_H_
33 #define _ITAPI_PS_H_
34
35 #include <TelDefines.h>
36 #include <TelErr.h>
37 #include <TelUtility.h>
38
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #endif
43
44 /* Defining macros for PSMAN profiles */
45 #define TAPI_PDP_ADDR_LEN_MAX           20
46 #define TAPI_PDP_APN_LEN_MAX            101
47 #define TAPI_PDP_NAME_LEN_MAX           16
48 #define TAPI_PDP_MAX_USERNAME_LEN       32
49 #define TAPI_PDP_MAX_PASSWORD_LEN       32
50 #define TAPI_PDP_MAX_DNS_LEN            16
51 #define MAX_PDP_CONTEXTS_ALLOWED        3
52 #define MAX_GPRS_PORT_LIST                      200
53
54 typedef enum {
55      TAPI_GPRS_DEFINE_PDP_CONTEXT=0x01,         /* 0x01 : Define PDP Context */
56      TAPI_GSM_GPRS_QOS,                                         /* 0x02 : Quality of Service Profile */
57      TAPI_GSM_GPRS_PS,                                          /* 0x03 : PS attach or detach */
58      TAPI_GSM_GPRS_PDP_CONTEXT,                         /* 0x04 : PDP context activate or deactivate */
59      TAPI_GSM_GPRS_ENTER_DATA,                          /* 0x05 : Enter data */
60      TAPI_GSM_GPRS_SHOW_PDP_ADDR,                       /* 0x06 : Show PDP address*/
61      TAPI_GSM_GPRS_MS_CLASS,                                    /* 0x07 : GPRS mobile station class*/
62      TAPI_GSM_GPRS_3G_QUAL_SRVC_PROFILE,                /* 0x08 : 3G Quality of service profile */
63      TAPI_GSM_GPRS_IP_CONFIGURATION,                    /* 0x09 : Multiple PDP context IP configuration */
64      TAPI_GSM_GPRS_DEFINE_SEC_PDP_CONTEXT,              /* 0X0A : AT+CGDSCONT   05.10.07 ky.doo EDIT */
65      TAPI_GSM_GPRS_TFT,                                                 /* 0X0B : AT+CGTFT      05.10.07 ky.doo EDIT */
66      TAPI_GSM_GPRS_HSDPA_STATUS,                                /* 0x0C : HSDPA status */
67      TAPI_GSM_GPRS_CURRENT_SESSION_DATA_COUNTER,/* 0x0D : Current data session tx/rx total bytes */
68      TAPI_GSM_GPRS_DATA_DORMANT,                /* 0x0E : Force to set Dormant */
69      TAPI_GSM_GPRS_DUN_PIN_CTRL ,               /* 0x0F : Dial up Networking Pin Control Message */
70      TAPI_GSM_GPRS_CALL_STATUS,                     /* 0x10 : DS TE2 Data Call result(Multiple PDP) */
71      TAPI_GSM_GPRS_PORT_SEL,                            /* 0x11 : PORT SEL */
72      TAPI_GSM_GPRS_MAX
73 } tapi_gprs_type_t;
74
75 typedef enum{
76         TAPI_PDP_MODE_ADD = 0x01,                               /*ADD*/
77         TAPI_PDP_MODE_DEL = 0x02                                        /*Delete*/
78 } tapi_pdp_mode_type_t;
79
80 typedef enum{
81         TAPI_PDP_AUTH_NONE = 0x0,               /* No authentication           */
82         TAPI_PDP_AUTH_PAP  = 0x1,               /* PAP authentication          */
83         TAPI_PDP_AUTH_CHAP = 0x2,               /* CHAP authentication       */
84         TAPI_PDP_AUTH_MAX  = 0xff
85
86 } tapi_pdp_auth_type_t;
87
88 typedef enum {
89         GPRS_PDP_TYPE_UNKNOWN   = 0x00,
90         GPRS_PDP_TYPE_X25               = 0x01,
91         GPRS_PDP_TYPE_IP                = 0x02,
92         GPRS_PDP_TYPE_IHOSP     = 0x03,
93         GPRS_PDP_TYPE_PPP               = 0x04,
94         GPRS_PDP_TYPE_IPV6              = 0x05,
95 } tapi_pdp_type_t;
96
97 /* HSDPA Status Variable */
98 typedef enum {
99   HSDPA_INACTIVE,
100   HSDPA_ACTIVE
101 } tapi_hspda_status_type;
102
103 typedef enum {
104         GPRS_SIGNAL_DCD         = 0x01,
105         GPRS_DATA_SIGNAL_DTR    = 0x04,
106         GPRS_DATA_SIGNAL_DSR    = 0x06,
107         GPRS_DATA_SIGNAL_RTS    = 0x07,
108         GPRS_DATA_SIGNAL_CTS    = 0x08,
109         GPRS_DATA_SIGNAL_RI     = 0x09,
110 } tapi_ps_btdun_pincontrol_signal;
111
112 typedef enum {
113         GPRS_SIGNAL_STATUS_OFF  = 0x00,
114         GPRS_SIGNAL_STATUS_ON   = 0x01,
115 } tapi_ps_btdun_pincontrol_status;
116
117 typedef enum {
118         TAPI_GPRS_PS_STATUS_DETACH = 0x00,
119         TAPI_GPRS_PS_STATUS_ATTACH = 0x01,
120         TAPI_GPRS_PS_STATUS_MAX
121 } tapi_gprs_pdp_status;
122
123 typedef enum {
124         TAPI_GPRS_MO_SMS_SVC_CIRCUIT                    = 0x00,
125         TAPI_GPRS_MO_SMS_SVC_GPRS                               = 0x01,
126         TAPI_GPRS_MO_SMS_SVC_CIRCUITPREFERRED   = 0x02,
127         TAPI_GPRS_MO_SMS_SVC_GPRSPREFERRED              = 0x03,
128 } tapi_gprs_pdp_mo_sms_service;
129
130 typedef enum {
131         TAPI_GPRS_3G_QOS_TYPE_REQUEST                   = 0x01,
132         TAPI_GPRS_3G_QOS_TYPE_MIN_ACCEPT                = 0x02,
133         TAPI_GPRS_3G_QOS_TYPE_NEGOTIATE         = 0x03,
134 } tapi_gprs_pdp_3g_qos_type;
135
136 typedef enum {
137         TAPI_GPRS_3G_QOS_DELI_ORDER_NO                  = 0x00,
138         TAPI_GPRS_3G_QOS_DELI_ORDER_YES                 = 0x01,
139         TAPI_GPRS_3G_QOS_DELI_ORDER_SUBSCRIBE   = 0x02,
140 } tapi_gprs_pdp_3g_qos_deli_order;
141
142 typedef enum {
143         DSTATE_OK                       = 0x00,
144         DSTATE_CONNECT,
145         DSTATE_RING,
146         DSTATE_NO_CARRIER,
147         DSTATE_ERROR,
148         DSTATE_NO_DIALTONE,
149         DSTATE_BUSY,
150         DSTATE_NO_ANSWER,
151         DSTATE_RESULT_FDN,
152         DSTATE_MAX,
153 } tapi_gprs_data_status;
154
155 typedef enum {
156         PDP_ACT_FAILURE_CAUSE_NORMAL                                    = 0x00,                 // 0x00 : Normal Process ( no problem )
157         PDP_ACT_FAILURE_CAUSE_REL_BY_USER                               = 0x01,                 // Call Released by User
158         PDP_ACT_FAILURE_CAUSE_REGULAR_DEACTIVATION              = 0x02,                 // Regular deactivation
159         PDP_ACT_FAILURE_CAUSE_LLC_SNDCP                         = 0x03,                 // LLC SNDCP failure
160         PDP_ACT_FAILURE_CAUSE_INSUFFICIENT_RESOURCE     = 0x04,                 // Insufficient resources
161         PDP_ACT_FAILURE_CAUSE_UNKNOWN_APN                               = 0x05,                 // Missing or unknown apn
162         PDP_ACT_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS               = 0x06,         // Unknown PDP address or type
163         PDP_ACT_FAILURE_CAUSE_USER_AUTH_FAILED                  = 0x07,         // Unknown PDP address or type
164         PDP_ACT_FAILURE_CAUSE_ACT_REJ_GGSN                              = 0x08,                 // Unknown PDP address or type
165         PDP_ACT_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED               = 0x09,                 // Unknown PDP address or type
166         PDP_ACT_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED  = 0x0A,         // Service option not supported
167         PDP_ACT_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                = 0x0B,         // Requested service option not subscribed
168         PDP_ACT_FAILURE_CAUSE_SVC_OPT_OUT_ORDER         = 0x0C,                 // Service out of order
169     PDP_ACT_FAILURE_CAUSE_NSAPI_USED                            = 0x0D,         // NSAPI already used
170         PDP_ACT_FAILURE_CAUSE_QOS_NOT_ACCEPTED                  = 0x0E,         // QoS not accepted
171         PDP_ACT_FAILURE_CAUSE_NETWORK_FAILURE                   = 0x0F,         // Network Failure
172     PDP_ACT_FAILURE_CAUSE_REACT_REQUIRED                        = 0x10,         // Reactivation Required
173         PDP_ACT_FAILURE_CAUSE_REATURE_NOT_SUPPORTED             = 0x11,         // Feature not supported
174         PDP_ACT_FAILURE_CAUSE_TFT_FILTER_ERROR                  = 0x12,         // TFT or filter error
175         PDP_ACT_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                = 0x13,         // Unknown PDP context
176         PDP_ACT_FAILURE_CAUSE_INVALID_MSG                               = 0x14,         // Invalid MSG
177         PDP_ACT_FAILURE_CAUSE_PROTOCOL_ERROR                    = 0x15,         // Protocol error
178         PDP_ACT_FAILURE_CAUSE_MOBILE_FAILURE_ERROR              = 0x16,         // Mobile failure error
179         PDP_ACT_FAILURE_CAUSE_TIMEOUT_ERROR                             = 0x17,         // Timeout error
180         PDP_ACT_FAILURE_CAUSE_UNKNOWN_ERROR                             = 0x18,         // Unknown error
181         PDP_ACT_FAILURE_CAUSE_MAX ,
182 } tapi_gprs_ds_status_reason;
183
184 typedef enum {
185         INTERNAL_PS_CALL = 0x00,
186         EXTERNAL_PS_CALL = 0x01
187 } tapi_gprs_external_status;
188
189 typedef enum {
190         PDP_DEVICE_INFO_GET = 0x00,
191         PDP_DEVICE_INFO_SET = 0x01
192 } tapi_gprs_device_info;
193
194 typedef enum{
195     TAPI_GPRS_PORT_LIST_NOT_USE,    // 0x00
196         TAPI_GPRS_PORT_LIST_WHITE,      // 0x01
197         TAPI_GPRS_PORT_LIST_BLACK,      // 0x02
198 } tapi_gprs_port_list_type;
199
200 typedef enum {
201         TAPI_PDP_STATE_NONE,             /* 0x00 Default state for a given PDP context*/
202     TAPI_PDP_STATE_ACTIVATING,           /* 0x01 TS will be in this state when there is a START PDP Request until it is  activated by modem - This state PDP is not yet UP*/
203     TAPI_PDP_STATE_ACTIVE,           /* 0x02 After PDP activation is completed by modem and sent to PDA - This state PDP is fully UP*/
204     TAPI_PDP_STATE_MODIFYING,        /* 0x03 This state is reserved for future use - When TS support modifying existing PDP*/
205     TAPI_PDP_STATE_DEACTIVATING,     /* 0x04 TS will be in this state when there is STOP PDP request from App until it is deactivated by modem */
206 } tapi_gprs_state;
207
208 typedef enum {
209         TAPI_PDP_DATA_DORMANCY_SUCCESS,
210         TAPI_PDP_DATA_DORMANCY_FAILED
211 } TelTapiGprsDataDormancy_t;
212
213 /* Suspend Reason Type */
214 typedef enum {
215   TAPI_PDP_SUSPEND_NO_SVC                       = 0x01,
216   TAPI_PDP_SUSPEND_RAT_CHANGE           = 0x02,
217   TAPI_PDP_SUSPEND_GPRS_HOLD            = 0x03,
218   TAPI_PDP_SUSPEND_FLOW_CONTROL = 0x04,
219   TAPI_PDP_SUSPEND_GPRS_SUSPEND = 0x05,
220   TAPI_PDP_SUSPEND_RAU                  = 0x06,
221   TAPI_PDP_SUSPEND_LU                       = 0x07,
222   TAPI_PDP_TRANSFER_STATUS_MAX
223 } tapi_gprs_suspend_type;
224
225 typedef struct {
226         tapi_gprs_type_t type;
227         tapi_phone_err_t cause;
228 } tapi_gprs_error_info_t;
229
230 typedef struct {
231         int cont_id;
232         tapi_pdp_err_t err;
233 } tapi_ps_pdp_info_t;
234
235 typedef struct {
236         int cont_id;
237         tapi_pdp_err_t err;
238 } tapi_ps_net_stop_rsp_t;
239
240 typedef struct {
241         int cont_id;
242         tapi_pdp_err_t err;
243 } tapi_ps_net_activation_rsp_t;
244
245 typedef struct {
246         int cont_id;
247         tapi_pdp_err_t err;
248 } tapi_ps_net_stop_ind_t;
249
250 /*      ps attach response      */
251 typedef struct {
252         int     state;
253         int     transfer_status;
254 } tapi_ps_attach_response_t;
255
256 /*      ps call statistics      */
257 typedef struct {
258         unsigned char       cid;        //      call id . for proper bit alignment prefer int than short
259         unsigned long int       rx;     //      total number of bytes received for this cid
260         unsigned long int       tx;             //      total number of bytes transmitted for this cid
261 } tapi_ps_call_statistics_t;
262
263 typedef struct {
264         tapi_ps_btdun_pincontrol_signal signal;
265         tapi_ps_btdun_pincontrol_status status;
266 } tapi_ps_btdun_pincontrol;
267
268 /**
269  * This structure defines PDP information.
270  * @see ps_net_info_t
271  */
272 typedef struct {
273    unsigned short       is_primary_cont;                /*Primary or secondary*/
274    int                          primary_cont;                   /*Primary context id, if the is the context is secondary*/
275    char                 apn[TAPI_PDP_APN_LEN_MAX];
276    unsigned char        pdp_address[TAPI_PDP_ADDR_LEN_MAX];
277    unsigned char        username[TAPI_PDP_MAX_USERNAME_LEN ];
278    unsigned char        password[TAPI_PDP_MAX_PASSWORD_LEN ];
279    unsigned char        dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
280    unsigned char        dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
281    tapi_pdp_auth_type_t auth_type;
282    tapi_pdp_type_t              pdp_type;
283 } tapi_pdp_info_t;
284
285 typedef struct {
286         int cont_id;
287         tapi_pdp_info_t pdp_info;
288 } tapi_ps_net_start_req_t;
289
290 typedef struct {
291         unsigned short  is_primary_cont;  /*Primary or secondary*/
292         unsigned char           username[TAPI_PDP_MAX_USERNAME_LEN ];
293         unsigned char   password[TAPI_PDP_MAX_PASSWORD_LEN ];
294         unsigned char   dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
295         unsigned char   dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
296     tapi_pdp_auth_type_t auth_type;
297 } tapi_pdpdeact_info_t;
298
299 typedef struct {
300         int cont_id;
301         tapi_pdpdeact_info_t pdp_info;
302 } tapi_ps_net_stop_req_t;
303
304 typedef struct {
305         unsigned char field_flag;
306         unsigned char ip_address[4];
307         unsigned char primary_dns[4];
308         unsigned char secondary_dns[4];
309         unsigned char gateway[4];
310         unsigned char subnet_mask[4];
311 } tapi_pdp_resp_info_t;
312
313 typedef struct {
314         int cont_id;
315         tapi_pdp_err_t err;
316         tapi_pdp_resp_info_t pdp_info;
317         char devname[TAPI_PDP_NAME_LEN_MAX];
318 } tapi_ps_net_start_rsp_t;
319
320 typedef struct tagSetPDPActDeact {
321         int cid;
322         unsigned char username[TAPI_PDP_MAX_USERNAME_LEN ];     // @field Context activation user name
323         unsigned char passwd[TAPI_PDP_MAX_PASSWORD_LEN ];               // @field Context activation password
324         unsigned char dns1[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS1
325         unsigned char dns2[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS2
326         tapi_pdp_auth_type_t    auth;
327 } tapi_gprs_pdp_act_deact_set;
328
329 typedef struct {
330         char cid;
331         tapi_gprs_pdp_status state;
332 } tapi_gprs_pdp_status_info;
333
334 typedef struct {
335         char num_act;
336         tapi_gprs_pdp_status_info info[3];
337 } tapi_gprs_pdp_status_res;
338
339 typedef struct {
340         char cid;
341         char address[20];
342 } tapi_gprs_pdp_address_res;
343
344 typedef struct {
345         unsigned char                           cid;
346         tapi_gprs_data_status           status;
347         tapi_gprs_ds_status_reason      reason;
348         unsigned char                           external;
349 } tapi_gprs_pdp_status_reason_info;
350
351 typedef struct {
352     tapi_gprs_port_list_type type;
353     unsigned char len;
354     unsigned short list[MAX_GPRS_PORT_LIST];
355 } tapi_gprs_port_list;
356
357 typedef struct {
358     tapi_gprs_port_list tcp_list;
359     tapi_gprs_port_list udp_list;
360 } tapi_gprs_pdp_port_list_setting_info_t;
361
362 /**
363  * @brief  This API is used to request to Telephony Server to set PDP context define info, PDP activation.
364  *  Access to this API is limited, we recommend you use Data Network API
365  *
366  * This function makes Dbus method call to Telephony Sever and returns immediate value.
367  * However it just means that the API request has been transfered to the CP successfully.
368  * The actual operation result is being delivered in the corresponding event asynchronously.
369  *
370  * @par Sync (or) Async:
371  * This is an Asynchronous API.
372  *
373  * @par Important Notes:
374  * -NONE
375  *
376  * @warning
377  * - None.
378  *
379  * @param[in] pNet_start_req_info
380  * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
381  *
382  * @param [out] pRequestID
383  *   - Unique identifier for a particular request.
384  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
385  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
386  *
387  * @par Async Response Message:
388  * -The event associated is TAPI_EVENT_PS_PDP_ACT_RSP  and the event data is #tapi_ps_pdp_info_t.
389  *
390  *
391  * @pre
392  *  - A dbus connection is established with #tel_init
393  *  - The application name is registered with #tel_register_app_name
394  *  - The application is registered events to listen asynchronous response with #tel_register_event
395  *  - A event loop is running to listen events
396  *
397  * @post
398  *  - None.
399  *
400  * @return Return Type (int) \n
401  * - Integer '0' - indicating that the operation has completed successfully. \n
402  * - Negative integer : it provides an error code (Refer #TapiResult_t)
403  *
404  * @par Prospective Clients:
405  * External Apps.
406  *
407  * @code
408  * #include <ITapiPS.h>
409  *
410  * int ret_status;
411  * int request_id = 0;
412  * tapi_ps_net_start_req_t start_req;
413  *
414  * start_req.cont_id = CONTEXT_ID; //use proper id regarding upper layer usage
415  * strcpy(start_req.pdp_info.apn, APN_ADDRESS);
416  *
417  * ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
418  * @endcode
419  *
420  * @see
421  *  - None.
422  *
423  * @remarks
424  *  - None.
425  */
426 /*================================================================================================*/
427 int     tel_activate_gprs_pdp(const tapi_ps_net_start_req_t *pNet_start_req_info, int *pRequestID);
428
429 /**
430  * @brief  This API is used to request to Telephony Server to deactivate PDP service
431  *  Access to this API is limited, we recommend you use Data Network API
432  *
433  * This function makes Dbus method call to Telephony Sever and returns immediate value.
434  * However it just means that the API request has been transfered to the CP successfully.
435  * The actual operation result is being delivered in the corresponding event asynchronously.
436  *
437  * @par Sync (or) Async:
438  * This is an Asynchronous API.
439  *
440  * @par Important Notes:
441  * -NONE
442  *
443  * @warning
444  * - None.
445  *
446  * @param[in] net_stop_req_info
447  * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
448  *
449  * @param [out] pRequestID
450  *   - Unique identifier for a particular request.
451  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
452  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
453  *
454  * @par Async Response Message:
455  * -The event associated is TAPI_EVENT_PS_PDP_DEACT_RSP  and the event data is #tapi_ps_pdp_info_t.
456  *
457  *
458  * @pre
459  *  - A dbus connection is established with #tel_init
460  *  - The application name is registered with #tel_register_app_name
461  *  - The application is registered events to listen asynchronous response with #tel_register_event
462  *  - A event loop is running to listen events
463  *
464  * @post
465  *  - None.
466  *
467  * @return Return Type (int) \n
468  * - Integer '0' - indicating that the operation has completed successfully. \n
469  * - Negative integer : it provides an error code (Refer #TapiResult_t)
470  *
471  * @par Prospective Clients:
472  * External Apps.
473  *
474  * @code
475  * #include <ITapiPS.h>
476  *
477  * int ret_status;
478  * int request_id = 0;
479  * tapi_ps_net_stop_req_t end_req;
480  *
481  * memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
482  *
483  * end_req.cont_id = CONTEXT_ID;
484  *
485  * ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id); //use context id which is used in activate time
486  * @endcode
487  *
488  * @see
489  *  - None.
490  *
491  * @remarks
492  *  - None.
493  */
494 /*================================================================================================*/
495 int     tel_deactivate_gprs_pdp(const tapi_ps_net_stop_req_t *net_stop_req_info, int *pRequestID);
496
497 /**
498  * @brief  This API is used to send modem data channels to dormant state for power saving when there is no data flowing for certain time
499  *         Access to this API is limited, we recommend you use Data Network API
500  *
501  * This function makes Dbus method call to Telephony Sever and returns immediate value.
502  * However it just means that the API request has been transfered to the CP successfully.
503  * The actual operation result is being delivered in the corresponding event asynchronously.
504  *
505  * @par Sync (or) Async:
506  * This is an Asynchronous API.
507  *
508  * @par Important Notes:
509  * -NONE
510  *
511  * @warning
512  * - None.
513  *
514  * @param [out] pRequestID
515  *   - Unique identifier for a particular request.
516  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
517  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
518  *
519  * @par Async Response Message:
520  *  -The event associated is TAPI_EVENT_PS_DATA_DORMANT_RESP  and the event data is #TelTapiGprsDataDormancy_t.
521  *
522  * @pre
523  *  - A dbus connection is established with #tel_init
524  *  - The application name is registered with #tel_register_app_name
525  *  - The application is registered events to listen asynchronous response with #tel_register_event
526  *  - A event loop is running to listen events
527  *
528  * @post
529  *  - None.
530  *
531  * @return Return Type (int) \n
532  * - Integer '0' - indicating that the operation has completed successfully. \n
533  * - Negative integer : it provides an error code (Refer #TapiResult_t)
534  *
535  * @par Prospective Clients:
536  * External Apps.
537  *
538  * @code
539  * #include <ITapiPS.h>
540  *
541  * int ret_status;
542  * int request_id = 0;
543  *
544  * ret_status = tel_set_gprs_dormant(&request_id); //if user want to dormant state
545  * @endcode
546  *
547  * @see
548  *  - None.
549  *
550  * @remarks
551  *  - None.
552  */
553 /*================================================================================================*/
554 int     tel_set_gprs_dormant(int *pRequestID);
555
556 /**
557  * @brief  This API is used to get port list
558  *         Access to this API is limited, we recommend you use Data Network API
559  *
560  * This function makes Dbus method call to Telephony Sever and returns immediate value.
561  * However it just means that the API request has been transfered to the CP successfully.
562  * The actual operation result is being delivered in the corresponding event asynchronously.
563  *
564  * @par Sync (or) Async:
565  * This is an Asynchronous API.
566  *
567  * @par Important Notes:
568  * -NONE
569  *
570  * @warning
571  * - None.
572  *
573  * @param [out] pRequestID
574  *   - Unique identifier for a particular request.
575  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
576  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
577  *
578  * @par Async Response Message:
579  *  -The event associated is TAPI_EVENT_PS_PDP_GET_PORTLIST_RSP  and the event data is #tapi_gprs_pdp_port_list_setting_info_t.
580  *
581  * @pre
582  *  - A dbus connection is established with #tel_init
583  *  - The application name is registered with #tel_register_app_name
584  *  - The application is registered events to listen asynchronous response with #tel_register_event
585  *  - A event loop is running to listen events
586  *
587  * @post
588  *  - None.
589  *
590  * @return Return Type (int) \n
591  * - Integer '0' - indicating that the operation has completed successfully. \n
592  * - Negative integer : it provides an error code (Refer #TapiResult_t)
593  *
594  * @par Prospective Clients:
595  * External Apps.
596  *
597  * @code
598  * #include <ITapiPS.h>
599  *
600  * int ret_val;
601  * int requestId = 0;
602  *
603  * ret_val = tel_get_gprs_port_list(&requestId); //get port list with async response. current return value means whether request send low layer properly or not
604  * @endcode
605  *
606  * @see
607  *  - None.
608  *
609  * @remarks
610  *  - None.
611  */
612 /*================================================================================================*/
613 int     tel_get_gprs_port_list(int *pRequestID);
614
615 /**
616  * @brief  This API is used to set port list
617  *         Access to this API is limited, we recommend you use Data Network API
618  *
619  * This function makes Dbus method call to Telephony Sever and returns immediate value.
620  * However it just means that the API request has been transfered to the CP successfully.
621  * The actual operation result is being delivered in the corresponding event asynchronously.
622  *
623  * @par Sync (or) Async:
624  * This is an Asynchronous API.
625  *
626  * @par Important Notes:
627  * -NONE
628  *
629  * @warning
630  * - None.
631  *
632  * @param[in] info
633  * - This input has the TCP/UDP port list information info #tapi_gprs_pdp_port_list_setting_info_t
634  *
635  * @param [out] pRequestID
636  *   - Unique identifier for a particular request.
637  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
638  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
639  *
640  * @par Async Response Message:
641  *  -None
642  *
643  * @pre
644  *  - A dbus connection is established with #tel_init
645  *  - The application name is registered with #tel_register_app_name
646  *  - The application is registered events to listen asynchronous response with #tel_register_event
647  *  - A event loop is running to listen events
648  *
649  * @post
650  *  - None.
651  *
652  * @return Return Type (int) \n
653  * - Integer '0' - indicating that the operation has completed successfully. \n
654  * - Negative integer : it provides an error code (Refer #TapiResult_t)
655  *
656  * @par Prospective Clients:
657  * External Apps.
658  *
659  * @code
660  * #include <ITapiPS.h>
661  *
662  * int ret_val;
663  * int requestId = 0;
664  * tapi_gprs_pdp_port_list_setting_info_t test;
665  *
666  * memset(&test, 0, sizeof(tapi_gprs_pdp_port_list_setting_info_t));
667  * test.tcp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
668  * test.tcp_list.len = 1;
669  * test.tcp_list.list[0] = 1004;
670  * test.udp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
671  * test.udp_list.len = 1;
672  * test.udp_list.list[i] = 1111;
673  *
674  * ret_val = tel_set_gprs_port_list(&test, &requestId); //get operation result with async response. current return value means whether request send low layer properly or not
675  *
676  * @endcode
677  *
678  * @see
679  *  - None.
680  *
681  * @remarks
682  *  - None.
683  */
684 /*================================================================================================*/
685 int     tel_set_gprs_port_list(tapi_gprs_pdp_port_list_setting_info_t *info, int *pRequestID);
686
687
688 /**
689  * @brief  This API is used to request BT Dun enable or disable
690  *         Access to this API is limited, we recommend you use Data Network API
691  *
692  * This function makes Dbus method call to Telephony Sever and returns immediate value.
693  * However it just means that the API request has been transfered to the CP successfully.
694  * The actual operation result is being delivered in the corresponding event asynchronously.
695  *
696  * @par Sync (or) Async:
697  * This is an Asynchronous API.
698  *
699  * @par Important Notes:
700  * -NONE
701  *
702  * @warning
703  * - None.
704  *
705  * @param[in] pincontrol
706  * - This input has the BT Dun pin control information #tapi_ps_btdun_pincontrol
707  *
708  * @param [out] pRequestID
709  *   - Unique identifier for a particular request.
710  *   - request_id value can be any value from 0 to 255 if the API is returned successfully
711  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
712  *
713  * @par Async Response Message:
714  * -The event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI or TAPI_EVENT_PS_ERROR_IND.
715  * -In success, the event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI  and the event data is #tapi_ps_btdun_pincontrol.
716  *   In fail, the event associated is TAPI_EVENT_PS_ERROR_IND  and the event data is #tapi_gprs_error_info_t.
717  *
718  * @pre
719  *  - A dbus connection is established with #tel_init
720  *  - The application name is registered with #tel_register_app_name
721  *  - The application is registered events to listen asynchronous response with #tel_register_event
722  *  - A event loop is running to listen events
723  *
724  * @post
725  *  - None.
726  *
727  * @return Return Type (int) \n
728  * - Integer '0' - indicating that the operation has completed successfully. \n
729  * - Negative integer : it provides an error code (Refer #TapiResult_t)
730  *
731  * @par Prospective Clients:
732  * External Apps.
733  *
734  * @code
735  * #include <ITapiPS.h>
736  *
737  * int ret_status;
738  * int request_id = 0;
739  * tapi_ps_btdun_pincontrol bt_control;
740  *
741  * bt_control.signal = GPRS_SIGNAL_DCD;
742  * bt_control.status = GPRS_SIGNAL_STATUS_OFF;
743  *
744  * ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id); //get control result with async response. current return value means whether request send low layer properly or not
745  * @endcode
746  *
747  * @see
748  *  - None.
749  *
750  * @remarks
751  *  - None.
752  */
753 /*================================================================================================*/
754 int tel_control_gprs_btdun_pin(tapi_ps_btdun_pincontrol pincontrol, int *pRequestID);
755
756 #ifdef __cplusplus
757 }
758 #endif
759
760 #endif   //_ITAPI_PS_H_
761
762 /**
763    *  @}
764    */