0c8c401b8b417a024feadb47e55115a9e5749953
[framework/telephony/tel-plugin-socket_communicator.git] / common / include / tapi_type.h
1 /*
2  * tel-plugin-socket-communicator
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 __TAPI_TYPE_H__
22 #define __TAPI_TYPE_H__
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #define TCORE_REQUEST           0x10000000
29 //#define TCORE_RESPONSE                0x20000000
30 #define TCORE_NOTIFICATION      0x30000000
31
32 #define TAPI_TYPE_SERVER        0x00200000
33 #define TAPI_TYPE_MODEM         0x00300000
34 #define TAPI_TYPE_CALL          0x01000000
35 #define TAPI_TYPE_NETWORK       0x01100000
36 #define TAPI_TYPE_PS            0x01200000
37 #define TAPI_TYPE_PDP           0x01300000
38 #define TAPI_TYPE_SIM           0x01400000
39 #define TAPI_TYPE_SAT           0x01500000
40 #define TAPI_TYPE_SAP           0x01600000
41 #define TAPI_TYPE_SMS           0x01700000
42 #define TAPI_TYPE_PHONEBOOK     0x01800000
43 #define TAPI_TYPE_SS            0x01900000
44 #define TAPI_TYPE_SOUND         0x01A00000
45 #define TAPI_TYPE_GPS           0x01B00000
46 #define TAPI_TYPE_CUSTOM        0x0F000000
47
48 typedef enum {
49         TAPI_SERVICE_UNKNOWN = 0,
50
51         TAPI_SERVICE_MODEM = TCORE_REQUEST | TAPI_TYPE_MODEM,
52         TAPI_SERVICE_MODEM_SET_FLIGHTMODE,
53         TAPI_SERVICE_MODEM_GET_FLIGHTMODE,
54         TAPI_SERVICE_MODEM_GET_IMEI,
55         TAPI_SERVICE_MODEM_GET_VERSION,
56
57         TAPI_SERVICE_CALL = TCORE_REQUEST | TAPI_TYPE_CALL,
58         TAPI_SERVICE_CALL_DIAL,
59         TAPI_SERVICE_ANSWER,
60         TAPI_SERVICE_END,
61         TAPI_SERVICE_HOLD,
62         TAPI_SERVICE_ACTIVE,
63         TAPI_SERVICE_SWAP,
64         TAPI_SERVICE_JOIN,
65         TAPI_SERVICE_SPLIT,
66         TAPI_SERVICE_DEFLECT,
67         TAPI_SERVICE_TRANSFER,
68         TAPI_SERVICE_SEND_DTMF,
69         TAPI_SERVICE_SET_SOUND_PATH,
70         TAPI_SERVICE_GET_SOUND_VOLUME_LEVEL,
71         TAPI_SERVICE_SET_SOUND_VOLUME_LEVEL,
72         TAPI_SERVICE_MUTE,
73         TAPI_SERVICE_UNMUTE,
74         TAPI_SERVICE_GET_MUTE_STATUS,
75
76         TAPI_SERVICE_SIM = TCORE_REQUEST | TAPI_TYPE_SIM,
77         TAPI_SERVICE_SIM_GET_SIMINITINFO,
78         TAPI_SERVICE_SIM_GET_IMSI,
79         TAPI_SERVICE_SIM_GET_TYPE,
80         TAPI_SERVICE_SIM_GET_ECC,
81         TAPI_SERVICE_SIM_GET_ICCID,
82         TAPI_SERVICE_SIM_GET_LANGUAGE,
83         TAPI_SERVICE_SIM_SET_LANGUAGE,
84         TAPI_SERVICE_SIM_GET_CF,
85         TAPI_SERVICE_SIM_SET_CF,
86         TAPI_SERVICE_SIM_GET_MW,
87         TAPI_SERVICE_SIM_SET_MW,
88         TAPI_SERVICE_SIM_GET_MB,
89         TAPI_SERVICE_SIM_SET_MB,
90         TAPI_SERVICE_SIM_GET_CPHSINFO,
91         TAPI_SERVICE_SIM_AUTHENTICATION,
92         TAPI_SERVICE_SIM_VERIFYSEC,
93         TAPI_SERVICE_SIM_VERIFYPUK,
94         TAPI_SERVICE_SIM_CHANGEPIN,
95         TAPI_SERVICE_SIM_DISABLE_FACILITY,
96         TAPI_SERVICE_SIM_ENABLE_FACILITY,
97         TAPI_SERVICE_SIM_GET_FACILITY,
98         TAPI_SERVICE_SIM_APDU,
99         TAPI_SERVICE_SIM_ATR,
100
101         TAPI_SERVICE_SAP = TCORE_REQUEST | TAPI_TYPE_SAP,
102         TAPI_SERVICE_SAP_CONNECT,
103         TAPI_SERVICE_SAP_DISCONNECT,
104         TAPI_SERVICE_SAP_GET_CONNECTSTATUS,
105         TAPI_SERVICE_SAP_GET_ATR,
106         TAPI_SERVICE_SAP_TRANSFER_APDU,
107         TAPI_SERVICE_SAP_SET_PROTOCOL,
108         TAPI_SERVICE_SAP_SET_POWER,
109         TAPI_SERVICE_SAP_GET_READERSTATUS,
110
111         TAPI_SERVICE_PB = TCORE_REQUEST | TAPI_TYPE_PHONEBOOK,
112         TAPI_SERVICE_PB_GET_INITINFO,
113         TAPI_SERVICE_PB_GET_COUNT,
114         TAPI_SERVICE_PB_GET_META,
115         TAPI_SERVICE_PB_READ_RECORD,
116         TAPI_SERVICE_PB_UPDATE_RECORD,
117         TAPI_SERVICE_PB_DELETE_RECORD,
118
119         TAPI_SERVICE_NETWORK = TCORE_REQUEST | TAPI_TYPE_NETWORK,
120         TAPI_SERVICE_NETWORK_SEARCH,
121         TAPI_SERVICE_NETWORK_SET_PLMN_SELECTION_MODE,
122         TAPI_SERVICE_NETWORK_GET_PLMN_SELECTION_MODE,
123         TAPI_SERVICE_NETWORK_SET_SERVICE_DOMAIN,
124         TAPI_SERVICE_NETWORK_GET_SERVICE_DOMAIN,
125         TAPI_SERVICE_NETWORK_SET_BAND,
126         TAPI_SERVICE_NETWORK_GET_BAND,
127         TAPI_SERVICE_NETWORK_SET_PREFERRED_PLMN,
128         TAPI_SERVICE_NETWORK_GET_PREFERRED_PLMN,
129         TAPI_SERVICE_NETWORK_SET_ORDER,
130         TAPI_SERVICE_NETWORK_GET_ORDER,
131         TAPI_SERVICE_NETWORK_SET_POWER_ON_ATTACH,
132         TAPI_SERVICE_NETWORK_GET_POWER_ON_ATTACH,
133         TAPI_SERVICE_NETWORK_SET_CANCEL_MANUAL_SEARCH,
134         TAPI_SERVICE_NETWORK_GET_SERVING_NETWORK,
135
136         TAPI_SERVICE_PS = TCORE_REQUEST | TAPI_TYPE_PS,
137         TAPI_SERVICE_PS_SET_DUN_PIN_CONTROL,
138
139         TAPI_SERVICE_SMS = TCORE_REQUEST | TAPI_TYPE_SMS,
140         TAPI_SERVICE_SMS_SEND_UMTS_MSG, /* Send the SMS-SUBMIT, SMS-COMMAND or SMS-SUBMIT-REPORT message */
141         TAPI_SERVICE_SMS_READ_MSG, /* Read the message from the phone flash or SIM */
142         TAPI_SERVICE_SMS_SAVE_MSG, /* Stores a message to memory storage */
143         TAPI_SERVICE_SMS_DELETE_MSG, /* Deletes message from preferred message storage */
144         TAPI_SERVICE_SMS_GET_COUNT, /* Get SMS Count Stored in Memory */
145         TAPI_SERVICE_SMS_GET_SCA, /* Get SMS Service Center Address */
146         TAPI_SERVICE_SMS_SET_SCA, /* Set SMS Service Center Address */
147         TAPI_SERVICE_SMS_GET_CB_CONFIG, /* Get Cell Broadcast Configuration */
148         TAPI_SERVICE_SMS_SET_CB_CONFIG, /* Set Cell Broadcast Configuration */
149         TAPI_SERVICE_SMS_SET_MEM_STATUS, /* Memory Storage Status message*/
150         TAPI_SERVICE_SMS_GET_PREF_BEARER, /* Get SMS Service Option like CS/PS bearer */
151         TAPI_SERVICE_SMS_SET_PREF_BEARER, /* Set SMS Service Option like CS/PS bearer */
152         TAPI_SERVICE_SMS_SET_DELIVERY_REPORT, /* Send the SMS-DELIVER-REPORT message to the network for the SMS-DELIVER message. */
153         TAPI_SERVICE_SMS_SET_MSG_STATUS, /* SMS Status Stored in Memory message */
154         TAPI_SERVICE_SMS_GET_PARAMS,
155         TAPI_SERVICE_SMS_SET_PARAMS,
156         TAPI_SERVICE_SMS_GET_PARAMCNT,
157         TAPI_SERVICE_SMS_SEND_CDMA_MSG,
158
159         TAPI_SERVICE_CUSTOM =  TCORE_REQUEST | TAPI_TYPE_CUSTOM,
160 } tapi_service_command_e;
161
162 typedef enum {
163         TAPI_NOTI_UNKNOWN = 0,
164
165         TAPI_NOTI_CALL = TCORE_NOTIFICATION | TAPI_TYPE_CALL,
166         TAPI_NOTI_CALL_STATUS_IDLE,
167         TAPI_NOTI_CALL_STATUS_ACTIVE,
168         TAPI_NOTI_CALL_STATUS_HELD,
169         TAPI_NOTI_CALL_STATUS_DIALING,
170         TAPI_NOTI_CALL_STATUS_ALERT,
171         TAPI_NOTI_CALL_STATUS_INCOMING,
172         TAPI_NOTI_CALL_STATUS_WAITING,
173         TAPI_NOTI_CALL_FORWARD,
174         TAPI_NOTI_CALL_BARRING,
175
176         TAPI_NOTI_SIM = TCORE_NOTIFICATION | TAPI_TYPE_SIM,
177         TAPI_NOTI_SIM_STATUS,
178
179         TAPI_NOTI_SAP = TCORE_NOTIFICATION | TAPI_TYPE_SAP,
180         TAPI_NOTI_SAP_STATUS,
181         TAPI_NOTI_SAP_DISCONNECT,
182
183         TAPI_NOTI_PB = TCORE_NOTIFICATION | TAPI_TYPE_PHONEBOOK,
184         TAPI_NOTI_PB_STATUS,
185
186         TAPI_NOTI_NETWORK = TCORE_NOTIFICATION | TAPI_TYPE_NETWORK,
187         TAPI_NOTI_NETWORK_REGISTRATION_STATUS,
188         TAPI_NOTI_NETWORK_LOCATION_CELLINFO,
189         TAPI_NOTI_NETWORK_ICON_INFO,
190         TAPI_NOTI_NETWORK_CHANGE,
191         TAPI_NOTI_NETWORK_TIMEINFO,
192
193         TAPI_NOTI_PS = TCORE_NOTIFICATION | TAPI_TYPE_PS,
194         TAPI_NOTI_PS_DUN_PIN_CONTROL,
195         TAPI_NOTI_PS_EXTERNAL_CALL,
196
197         TAPI_NOTI_SMS = TCORE_NOTIFICATION | TAPI_TYPE_SMS,
198         TAPI_NOTI_SMS_INCOM_MSG,                        /* This is an unsolicited Incoming SMS Event*/
199         TAPI_NOTI_SMS_CB_INCOM_MSG,             /* This is an unsolicited Incoming cell broadcast message*/
200         TAPI_NOTI_SMS_INCOM_EX_MSG,             /* This is an extended unsolicited Incoming SMS Event*/
201         TAPI_NOTI_SMS_CB_INCOM_EX_MSG,  /* This is an extended unsolicited Incoming cell broadcast message*/
202         TAPI_NOTI_SMS_MEMORY_STATUS,            /* This event is an unsolicited event indicating SIM memory status */
203         TAPI_NOTI_SMS_DEVICE_READY,             /* Device Ready indication */
204         TAPI_NOTI_SMS_IND_MAX,
205
206         TAPI_NOTI_CUSTOM =  TCORE_NOTIFICATION | TAPI_TYPE_CUSTOM,
207 } tapi_service_notification_e;
208
209 typedef enum {
210         TAPI_OBJECT_DATA_TYPE_CHAR,
211         TAPI_OBJECT_DATA_TYPE_BOOLEAN,
212         TAPI_OBJECT_DATA_TYPE_INT,
213         TAPI_OBJECT_DATA_TYPE_DOUBLE,
214         TAPI_OBJECT_DATA_TYPE_STRING,
215         TAPI_OBJECT_DATA_TYPE_OBJECT,
216         TAPI_OBJECT_DATA_TYPE_MAX
217 } tapi_object_data_type_e;
218
219 typedef struct _tapi_handle tapi_handle_t;
220 typedef struct _tapi_service_object tapi_service_object_t;
221
222 typedef gboolean (*tapi_cb)(tapi_service_object_t *data, void *cb_data);
223
224 #ifdef __cplusplus
225 }
226 #endif
227
228 #endif