Modified structure tnoti_ps_call_status.
[platform/core/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,
28         PDP_FAILURE_CAUSE_REL_BY_USER,
29         PDP_FAILURE_CAUSE_REGULAR_DEACTIVATION,
30         PDP_FAILURE_CAUSE_LLC_SNDCP,
31         PDP_FAILURE_CAUSE_INSUFFICIENT_RESOURCE,
32         PDP_FAILURE_CAUSE_UNKNOWN_APN,
33         PDP_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS,
34         PDP_FAILURE_CAUSE_USER_AUTH_FAILED,
35         PDP_FAILURE_CAUSE_ACT_REJ_GGSN,
36         PDP_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED,
37         PDP_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED,
38         PDP_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED,
39         PDP_FAILURE_CAUSE_SVC_OPT_OUT_ORDER,
40         PDP_FAILURE_CAUSE_NSAPI_USED,
41         PDP_FAILURE_CAUSE_QOS_NOT_ACCEPTED,
42         PDP_FAILURE_CAUSE_NETWORK_FAILURE,
43         PDP_FAILURE_CAUSE_REACT_REQUIRED,
44         PDP_FAILURE_CAUSE_FEATURE_NOT_SUPPORTED,
45         PDP_FAILURE_CAUSE_TFT_FILTER_ERROR,
46         PDP_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT,
47         PDP_FAILURE_CAUSE_INVALID_MSG,
48         PDP_FAILURE_CAUSE_PROTOCOL_ERROR,
49         PDP_FAILURE_CAUSE_MOBILE_FAILURE_ERROR,
50         PDP_FAILURE_CAUSE_TIMEOUT_ERROR,
51         PDP_FAILURE_CAUSE_UNKNOWN_ERROR,
52         PDP_FAILURE_CAUSE_MAX
53 };
54
55 enum telephony_ps_protocol_status {
56         TELEPHONY_HSDPA_OFF,
57         TELEPHONY_HSDPA_ON,
58         TELEPHONY_HSUPA_ON,
59         TELEPHONY_HSPA_ON
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 enum ps_data_call_status {
71         PS_DATA_CALL_NOT_CONNECTED,
72         PS_DATA_CALL_CONNECTED
73 };
74
75 struct treq_ps_pdp_activate {
76         int context_id;
77         int secondary_context_id;
78         char apn[102];
79         char pdp_address[20];
80         int pdp_type;
81
82         char username[32];
83         char password[32];
84         char dns1[16];
85         char dns2[16];
86         int auth_type;
87 };
88
89 struct tresp_ps_set_pdp_activate {
90         int context_id;
91         int secondary_context_id;
92         int result;
93 };
94
95 struct treq_ps_pdp_deactivate {
96         int context_id;
97         int secondary_context_id;
98
99         char username[32];
100         char password[32];
101         char dns1[16];
102         char dns2[16];
103         int auth_type;
104 };
105
106 struct tresp_ps_set_pdp_deactivate {
107         int context_id;
108         int secondary_context_id;
109         int result;
110 };
111
112 struct tnoti_ps_call_status {
113         unsigned int context_id;
114         enum ps_data_call_status state;
115 };
116
117 struct tnoti_ps_pdp_ipconfiguration {
118         int context_id;
119         int secondary_context_id;
120
121         enum telephony_ps_pdp_err err;
122         unsigned short field_flag;
123         unsigned char ip_address[4];
124         unsigned char primary_dns[4];
125         unsigned char secondary_dns[4];
126         unsigned char gateway[4];
127         unsigned char subnet_mask[4];
128         char devname[16];
129 };
130
131 struct tnoti_ps_external_call {
132 };
133
134 struct tnoti_ps_protocol_status {
135         enum telephony_ps_protocol_status status;
136 };
137
138 __END_DECLS
139
140 #endif