e816f9bdaaa7f462b2e00629ce36de38e8cca0e6
[framework/telephony/libtcore.git] / include / type / ps.h
1 /*
2  * libtcore
3  *
4  * Copyright (c) 2012 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 #ifndef __TYPE_PS_H__
22 #define __TYPE_PS_H__
23
24 __BEGIN_DECLS
25
26 enum telephony_ps_pdp_err {
27         PDP_FAILURE_CAUSE_NORMAL                                                = 0x00,                   // 0x00 : Normal Process ( no problem )
28         PDP_FAILURE_CAUSE_REL_BY_USER                                   = 0x01,                   // Call Released by User
29         PDP_FAILURE_CAUSE_REGULAR_DEACTIVATION                  = 0x02,                   // Regular deactivation
30         PDP_FAILURE_CAUSE_LLC_SNDCP                                     = 0x03,                   // LLC SNDCP failure
31         PDP_FAILURE_CAUSE_INSUFFICIENT_RESOURCE         = 0x04,                   // Insufficient resources
32         PDP_FAILURE_CAUSE_UNKNOWN_APN                                   = 0x05,                   // Missing or unkown apn
33         PDP_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS                   = 0x06,                   // Unknown pdp address or type
34         PDP_FAILURE_CAUSE_USER_AUTH_FAILED                              = 0x07,                   // Unknown pdp address or type
35         PDP_FAILURE_CAUSE_ACT_REJ_GGSN                                  = 0x08,                   // Unknown pdp address or type
36         PDP_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED                   = 0x09,                   // Unknown pdp address or type
37         PDP_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED              = 0x0A,                   // Service option not supported
38         PDP_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                    = 0x0B,                   // Requested service option not subscribed
39         PDP_FAILURE_CAUSE_SVC_OPT_OUT_ORDER                     = 0x0C,                   // Service out of order
40     PDP_FAILURE_CAUSE_NSAPI_USED                                        = 0x0D,                   // NSAPI already used
41         PDP_FAILURE_CAUSE_QOS_NOT_ACCEPTED                              = 0x0E,                   // QoS not accepted
42         PDP_FAILURE_CAUSE_NETWORK_FAILURE                               = 0x0F,                   // Network Failure
43     PDP_FAILURE_CAUSE_REACT_REQUIRED                            = 0x10,                   // Reactivation Required
44         PDP_FAILURE_CAUSE_FEATURE_NOT_SUPPORTED         = 0x11,                   // Feature not supported
45         PDP_FAILURE_CAUSE_TFT_FILTER_ERROR                              = 0x12,                   // TFT or filter error
46         PDP_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                    = 0x13,                   // Unkown PDP context
47         PDP_FAILURE_CAUSE_INVALID_MSG                                   = 0x14,                   // Invalied MSG
48         PDP_FAILURE_CAUSE_PROTOCOL_ERROR                                = 0x15,                   // Protocol error
49         PDP_FAILURE_CAUSE_MOBILE_FAILURE_ERROR                  = 0x16,                   // Mobile failure error
50         PDP_FAILURE_CAUSE_TIMEOUT_ERROR                         = 0x17,                   // Timeout error
51         PDP_FAILURE_CAUSE_UNKNOWN_ERROR                         = 0x18,                   // Unknown error
52         PDP_FAILURE_CAUSE_MAX,
53 };
54
55 enum telephony_ps_protocol_status {
56         TELEPHONY_HSDPA_OFF = 0x00,
57         TELEPHONY_HSDPA_ON = 0x01,
58         TELEPHONY_HSUPA_ON = 0x02,
59         TELEPHONY_HSPA_ON = 0x03,
60 };
61
62 enum telephony_ps_state {
63         TELEPHONY_PS_ON,
64         TELEPHONY_PS_3G_OFF,
65         TELEPHONY_PS_ROAMING_OFF,
66         TELEPHONY_PS_FLIGHT_MODE,
67         TELEPHONY_PS_NO_SERVICE
68 };
69
70 struct treq_ps_pdp_activate {
71         int context_id;
72         int secondary_context_id;
73         char apn[102];
74         char pdp_address[20];
75         int pdp_type;
76
77         char username[32];
78         char password[32];
79         char dns1[16];
80         char dns2[16];
81         int auth_type;
82 };
83
84 struct tresp_ps_set_pdp_activate {
85         int context_id;
86         int secondary_context_id;
87         int result;
88 };
89
90
91 struct treq_ps_pdp_deactivate {
92         int context_id;
93         int secondary_context_id;
94
95         char username[32];
96         char password[32];
97         char dns1[16];
98         char dns2[16];
99         int auth_type;
100 };
101
102 struct tresp_ps_set_pdp_deactivate {
103         int context_id;
104         int secondary_context_id;
105         int result;
106 };
107
108 struct tnoti_ps_call_status {
109         int context_id;
110         int state;
111         int result;
112 };
113
114 struct tnoti_ps_pdp_ipconfiguration {
115         int context_id;
116         int secondary_context_id;
117
118         enum telephony_ps_pdp_err err;
119         unsigned short field_flag;
120         unsigned char ip_address[4];
121         unsigned char primary_dns[4];
122         unsigned char secondary_dns[4];
123         unsigned char gateway[4];
124         unsigned char subnet_mask[4];
125         char devname[16];
126 };
127
128 struct tnoti_ps_external_call {
129 };
130
131 struct tnoti_ps_protocol_status {
132         enum telephony_ps_protocol_status status;
133 };
134
135 __END_DECLS
136
137 #endif