4 * Copyright (c) 2011 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.
23 * @ingroup TelephonyAPI
24 * @addtogroup Network_TAPI Network
29 @brief This file serves as a "C" header file and defines structures for Tapi Network Services\n
30 It contains a sample set of constants, enums, structs that would be required by applications.
33 #ifndef _TEL_NETWORK_H_
34 #define _TEL_NETWORK_H_
41 #define TAPI_NETWORK_ORDER_MAX 5 /**< Maximum network order */
42 #define TAPI_NETWORK_LIST_MAX 15 /**< Maximum network list */
43 #define TAPI_NETWORK_PLMN_LEN_MAX 6 /**< Maximum PLMN length*/
44 #define TAPI_NETWORK_NAME_LEN_MAX 40 /**< Maximum network name or PLMN name length*/
45 #define TAPI_NETWORK_SPN_LEN_MAX 20 /**< Maximum network service provider name length */
46 #define TAPI_PREFERRED_PLMN_RECORDS_MAX 150 /**< Maximum record length for preferred plmn list*/
47 #define TAPI_NETWORK_DISPLAY_INFO_ELEMENTS 4 /**< Maximum network Display info element length */
48 #define TAPI_NETWORK_HOMEZONE_TAG_MAX_LEN 13 /**< Maximum Network Home zone tag length */
49 #define TAPI_NETWORK_CS_DISP_INDEX 0 /**< Maximum Network CS display index length */
50 #define TAPI_NETWORK_PS_DISP_INDEX 1 /**< Maximum Network PS display index length */
51 #define TAPI_NETWORK_SVC_DISP_INDEX 2 /**< Maximum Network SVC display index length */
52 #define TAPI_NETWORK_ROAM_DISP_INDEX 3 /**< Maximum Network roaming display index length */
53 #define TAPI_NETWORK_SUBS_SVC_NUM_MAX 6 /**< Maximum number of the Subscriber's services */
54 #define TAPI_NETWORK_SUBS_NUM_LEN_MAX 40 /**< Maximum Subscriber Number Length */
55 #define TAPI_NETWORK_SUBS_ALPHA_LEN_MAX 16 /**< Maximum Subscriber Name Length */
56 #define TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX 6 /**< Maximum GERAN neighboring cell list */
57 #define TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX 24 /**< Maximum UMTS neighboring cell list */
59 /* This value defines the network mode */
60 #define TAPI_NETWORK_MODE_AUTO 0x00 /**< Set Network mode to AUTOMATIC */
61 #define TAPI_NETWORK_MODE_GSM 0x01 /**< Set Network mode to GSM */
62 #define TAPI_NETWORK_MODE_WCDMA 0x02 /**< Set Network mode to WCDMA */
63 #define TAPI_NETWORK_MODE_CDMA 0x04 /**< Set Network mode to CDMA */
64 #define TAPI_NETWORK_MODE_LTE 0x08 /**< Set Network mode to LTE */
67 * @enum TelNetworkSelectionMode_t
68 * This enumeration defines the network selection modes.
71 TAPI_NETWORK_SELECTIONMODE_AUTOMATIC, /**< Network selection is in Automatic selection mode*/
72 TAPI_NETWORK_SELECTIONMODE_MANUAL /**< Network selection is in Manual selection mode */
73 } TelNetworkSelectionMode_t;
76 * @enum TelNetworkServiceDomain_t
77 * This enumeration defines the network service domains .
80 TAPI_NETWORK_SERVICE_DOMAIN_COMBINED, /**< This member sets the Circuit switch and Packet Switch domain */
81 TAPI_NETWORK_SERVICE_DOMAIN_PS, /**< This member sets the Packet Switch service domain */
82 TAPI_NETWORK_SERVICE_DOMAIN_CS, /**< This member sets the Circuit Switch service domain */
83 TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC /**< This member sets the service domain to Circuit Switch and Packet Switch or Circuit Switch or Packet Switch domain */
84 } TelNetworkServiceDomain_t;
87 * @enum TelNetworkServiceLevel_t
88 * This enumeration defines the status of network service.
91 TAPI_NETWORK_SERVICE_LEVEL_NO, /**< No service available in the network ME is camped */
92 TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY, /**< Only emergency service available in the network ME is camped */
93 TAPI_NETWORK_SERVICE_LEVEL_FULL, /**< FULL service available in the network ME is camped */
94 TAPI_NETWORK_SERVICE_LEVEL_SEARCH /**< Searching for service */
95 } TelNetworkServiceLevel_t;
98 * @enum TelNetworkServiceLevel_t
99 * This enumeration defines the service types of TAPI.
102 TAPI_NETWORK_SERVICE_TYPE_NO_SVE, /**< No service (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
103 TAPI_NETWORK_SERVICE_TYPE_LIMITED, /**< Limited service available in the camped network (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
104 TAPI_NETWORK_SERVICE_TYPE_CS, /**< CS service available in the camped network */
105 TAPI_NETWORK_SERVICE_TYPE_PS, /**< PS service available in the camped network */
106 TAPI_NETWORK_SERVICE_TYPE_COMBINED /**< Both CS and PS services available in the camped network */
107 } TelNetworkServiceType_t;
110 * @enum TelNetworkSystemType_t
111 * This enumeration defines the system types of TAPI.
115 TAPI_NETWORK_SYSTEM_NO_SRV, /**< No Service available */
116 TAPI_NETWORK_SYSTEM_GSM, /**< Available service is GSM */
117 TAPI_NETWORK_SYSTEM_GPRS, /**< Available service is GPRS */
118 TAPI_NETWORK_SYSTEM_EGPRS, /**< Available service is EGPRS */
119 TAPI_NETWORK_SYSTEM_PCS1900, /**< Available service is PCS1900 band */
120 TAPI_NETWORK_SYSTEM_UMTS, /**< Available service is UMTS */
121 TAPI_NETWORK_SYSTEM_GSM_AND_UMTS, /**< Both GSM and UMTS systems available */
122 TAPI_NETWORK_SYSTEM_HSDPA, /**< Available service is hsdpa */
123 TAPI_NETWORK_SYSTEM_IS95A, /**< Available service is IS95A */
124 TAPI_NETWORK_SYSTEM_IS95B, /**< Available service is IS95B */
125 TAPI_NETWORK_SYSTEM_CDMA_1X, /**< Available service is CDMA 1X */
126 TAPI_NETWORK_SYSTEM_EVDO_REV_0, /**< Available service is EV-DO rev0 */
127 TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID, /**< Available service is 1X and EV-DO rev0 */
128 TAPI_NETWORK_SYSTEM_EVDO_REV_A, /**< Available service is EV-DO revA */
129 TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID, /**< Available service is 1X and EV-DO revA */
130 TAPI_NETWORK_SYSTEM_EVDV, /**< Available service is EV-DV */
131 TAPI_NETWORK_SYSTEM_LTE /**< Available service is LTE */
132 } TelNetworkSystemType_t;
135 * @enum TelNetworkBandPreferred_t
136 * This enumeration defines the operations that can be done on network Band.
140 TAPI_NETWORK_BAND_MODE_PREFERRED = 0x01, /**< Preferred band. (If preferred Band is not available, then underlying modem can search on other bands) */
141 TAPI_NETWORK_BAND_MODE_ONLY = 0x02, /**< This allows only particular band. */
142 } TelNetworkBandPreferred_t;
145 * @enum TelNetworkBand_t
146 * This enumeration defines different network Bands.
150 TAPI_NETWORK_BAND_TYPE_ANY = 0x00, /**< All bands can be tried. */
151 TAPI_NETWORK_BAND_TYPE_GSM850, /**< This member sets the band to GSM 850 */
152 TAPI_NETWORK_BAND_TYPE_GSM_900_1800, /**< This member sets the band to GSM 900_1800 */
153 TAPI_NETWORK_BAND_TYPE_GSM1900, /**< GSM 1900*/
154 TAPI_NETWORK_BAND_TYPE_GSM, /**< This member sets all GSM bands */
155 TAPI_NETWORK_BAND_TYPE_WCDMA, /**< This member sets all WCDMA bands */
156 TAPI_NETWORK_BAND_TYPE_WCDMA850, /**< This member sets the band to WCDMA 850 */
157 TAPI_NETWORK_BAND_TYPE_WCDMA1900, /**< This member sets the band to WCDMA 1900 */
158 TAPI_NETWORK_BAND_TYPE_WCDMA2100, /**< This member sets the band to WCDMA 2100 */
159 TAPI_NETWORK_BAND_TYPE_GSM900, /**< GSM 900*/
160 TAPI_NETWORK_BAND_TYPE_GSM1800, /**< This member sets the band to GSM 1800 */
161 TAPI_NETWORK_BAND_TYPE_GSM_850_1900, /**< This member sets the band to GSM 850_1900 */
162 TAPI_NETWORK_BAND_TYPE_LTE_BAND_4, /**< This member sets the band to LTE BAND 4*/
163 TAPI_NETWORK_BAND_TYPE_LTE_BAND_17 /**< This member sets the band to LTE BAND 17 */
167 * @enum TelNetworkOperationCause_t
168 * This enumeration defines different network operation cause.
172 TAPI_NETWORK_NO_ERR = 0x00, /**< There is no error for any network operation. */
173 TAPI_NETWORK_OPERATION_FAILED, /**< There is an error for any network operation. */
174 TAPI_NETWORK_PHONE_IN_USE_ERR, /**< This error will be returned when any network operation is tried while phone is in use(eg, Voice / Data call in progress due to which network operation failed) */
175 TAPI_NETWORK_OFFLINE_ERR, /**< This error is sent when any network option is tried when phone is in offline mode */
176 TAPI_NETWORK_CONFIG_SETTINGS_FAILURE_ERR, /**< This error is sent when modem is unable to process the config settings information. */
177 TAPI_NETWORK_INTERNAL_FAILURE_ERR, /**< This error to indicate internal failure */
178 TAPI_NETWORK_MEMORY_FULL_ERR /**< This error is caused by memory full */
179 } TelNetworkOperationCause_t;
183 * @enum TelNetworkPreferredPlmnOp_t
184 * This enumeration defines the operation that can be done on preferred PLMN.
188 TAPI_NETWORK_PREF_PLMN_ADD=0x01, /**< Addition to Network Preferred Plmn list*/
189 TAPI_NETWORK_PREF_PLMN_EDIT, /**< Edit the network Preferred Plmn list */
190 TAPI_NETWORK_PREF_PLMN_DELETE /**< Delete the entry to network Preferred Plmn list*/
191 } TelNetworkPreferredPlmnOp_t;
194 * @enum TelNetworkPowerOnAttach_t
195 * This enumeration defines operation that can be done on power on attach.
196 * It is used on CDMA.
200 TAPI_NETWORK_SERVING_CARRIER_TEST = 0x00, /**< TestBed */
201 TAPI_NETWORK_SERVING_CARRIER_SKT, /**< Korea SKT */
202 TAPI_NETWORK_SERVING_CARRIER_KTF, /**< Korea KTF */
203 TAPI_NETWORK_SERVING_CARRIER_LGT, /**< Korea LGT */
204 TAPI_NETWORK_SERVING_CARRIER_VERIZON = 0x11, /**< US VERIZON */
205 TAPI_NETWORK_SERVING_CARRIER_SPRINT, /**< US SPRINT */
206 TAPI_NETWORK_SERVING_CARRIER_ALLTEL, /**< US ALLTEL */
207 TAPI_NETWORK_SERVING_CARRIER_METRO_PCS, /**< US METRO_PCS */
208 TAPI_NETWORK_SERVING_CARRIER_CELLULAR, /**< US CELLULAR */
209 TAPI_NETWORK_SERVING_CARRIER_CRIKET, /**< US CRIKET */
210 TAPI_NETWORK_SERVING_CARRIER_TELUS = 0x21, /**< CANADA TELUS */
211 TAPI_NETWORK_SERVING_CARRIER_BMC, /**< CANADA BMC */
212 TAPI_NETWORK_SERVING_CARRIER_BWA, /**< CANADA BWA */
213 TAPI_NETWORK_SERVING_CARRIER_CTC = 0x31, /**< CHINA CTC */
214 TAPI_NETWORK_SERVING_CARRIER_UNKNOWN = 0xFF /**< SERVING NETWORK UNKNOWN */
215 } TelNetworkServCarrierType_t;
218 * @enum TelNetworkPlmnType_t
219 * This structure defines Network Plmn type.
223 TAPI_UNKNOWN_PLMN=0, /**< Network Plmn type Unknown */
224 TAPI_HOME_PLMN , /**< Network Plmn type Home Plmn */
225 TAPI_AVAILABLE_PLMN, /**< Network Plmn Available */
226 TAPI_FORBIDDEN_PLMN, /**< Network Plmn Forbidden */
227 }TelNetworkPlmnType_t;
230 * @enum TelNetworkHomeZoneCommand_t
231 * This enumeration defines network home zone command.
235 TAPI_NETWORK_ZONEINFO_NONE, /**< Network Zone info none */
236 TAPI_NETWORK_ZONEINFO_IND, /**< Network Zone info indication */
237 TAPI_NETWORK_ZONEINFO_CLEAR /**< Network Zone info clear */
238 }TelNetworkHomeZoneCommand_t;
241 * @enum TelNetworkHomeZone_t
242 * This enumeration defines network home zone type.
246 TAPI_NETWORK_ZONE_NONE, /**< Network Zone Type none */
247 TAPI_NETWORK_ZONETYPE_HOMEZONE, /**< Network Zone Type Home zone */
248 TAPI_NETWORK_ZONETYPE_CITYZONE, /**< Network Zone Type City zone */
249 }TelNetworkHomeZone_t;
252 * @enum TelNetworkNameDispCondition_t
253 * This enumeration defines network name display condition type.
257 TAPI_NETWORK_DISP_INVALID= 0x00,
258 TAPI_NETWORK_DISP_SPN = 0x01,
259 TAPI_NETWORK_DISP_PLMN = 0x02,
260 TAPI_NETWORK_DISP_SPN_PLMN = 0x03,
261 }TelNetworkNameDispCondition_t;
264 * @enum TelNetworkPrefNetType_t
265 * This enumeration defines CDMA Preferred Network Type(CDMA only).
269 TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC = 0x01, /**< 0x01 : AUTOMATIC */
270 TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A, /**< 0x02 : AUTOMATIC A */
271 TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B, /**< 0x03 : AUTOMATIC B */
272 TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY, /**< 0x04 : HOME ONLY */
273 TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY, /**< 0x05 : ROAM ONLY */
274 } TelNetworkPrefNetType_t;
277 * @enum TelNetworkPrlPrefOnly_t
278 * This enumeration defines CDMA PRL Preferred Only field stored in the PRL(CDMA only).
282 TAPI_NETWORK_PRL_PREF_ONLY_OFF, /**< Preferred Only is FALSE */
283 TAPI_NETWORK_PRL_PREF_ONLY_ON, /**< Preferred Only is TRUE */
284 TAPI_NETWORK_PRL_PREF_ONLY_NONE /**< There isn't Preferred Only Option */
285 } TelNetworkPrlPrefOnly_t;
288 * @enum TelNetworkCDMAHybridMode_t
289 * This enumeration defines CDMA Hybrid Mode State(CDMA only).
293 TAPI_NETWORK_CDMA_HYBRID = 0x01, /**< 0x01 : HYBRID(1X + EVDO) */
294 TAPI_NETWORK_CDMA_1X_ONLY, /**< 0x02 : 1X ONLY */
295 TAPI_NETWORK_CDMA_EVDO_ONLY, /**< 0x03 : EVDO ONLY */
296 }TelNetworkCDMAHybridMode_t;
300 * This structure has information related to cdma system.
303 TelNetworkServCarrierType_t carrier; /**< for CDMA, Optional */
304 unsigned short system_id; /**< for CDMA, Mandatory */
305 unsigned short network_id; /**< for CDMA, Mandatory */
306 unsigned short base_station_id; /**< for CDMA, Mandatory */
307 unsigned short base_station_latitude; /**< for CDMA, Mandatory */
308 unsigned short base_station_longitude; /**< for CDMA, Mandatory */
309 unsigned short registration_zone; /**< for CDMA, Optional */
310 unsigned short pilot_offset; /**< for CDMA, Optional */
311 } TelNetworkCDMASysInfo_t;
315 * This structure defines the preferred plmn information.
318 unsigned char Index; /**< Network Preferred Plmn list index */
319 char Plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1]; /**< Network Preferred Plmn */
320 char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name */
321 char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
322 TelNetworkSystemType_t SystemType; /**< Network system type */
323 } TelNetworkPreferredPlmnInfo_t;
327 * This structure defines the preferred plmn list.
330 unsigned int NumOfPrefPlmns; /**< Number of preferred plmns in the list */
331 TelNetworkPreferredPlmnInfo_t PrefPlmnRecord[TAPI_PREFERRED_PLMN_RECORDS_MAX]; /**< preferred plmns list */
332 } TelNetworkPreferredPlmnList_t;
336 * This structure defines the location area code and cell id.
339 unsigned short LocationAreaCode; /**< Network Location area code */
340 unsigned long CellId; /**< Network Cell Id */
341 } TelNetworkLocationCellInfo_t;
345 * This structure defines the network status .
348 unsigned char svctype; /**< Network svc type */
349 unsigned char roaming; /**< Network roaming */
350 } TelNetworkStatus_t;
354 * This structure defines the network Cs,Ps status.
357 unsigned char cstype; /**< Network Cs type */
358 unsigned char pstype; /**< Network Ps type */
359 } TelNetworkCsPsStatus_t;
362 * TelNetworkIdentity_t
363 * This structure defines the network identity.
366 char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name */
367 char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
368 unsigned int plmn_id; /**< PLMN ID */
369 char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1]; /**< PLMN ID */
370 TelNetworkPlmnType_t type_of_plmn; /**< PLMN type */
371 TelNetworkSystemType_t access_technology; /**< Access technology */
372 } TelNetworkIdentity_t;
376 * This structure defines the network Plmn list.
379 char networks_count; /**< Network Plmn count */
380 TelNetworkIdentity_t network_list[TAPI_NETWORK_LIST_MAX]; /**< Network list */
381 } TelNetworkPlmnList_t;
385 * This structure defines the network display info.
388 int DisplayInfo[TAPI_NETWORK_DISPLAY_INFO_ELEMENTS]; /**< Network display info */
389 } TelNetworkDisplayInfo_t;
392 TelNetworkNameDispCondition_t DispCondition; /*Display condition of SPN & PLMN*/
393 unsigned char Spn[TAPI_NETWORK_SPN_LEN_MAX + 1]; /*Spn value*/
394 unsigned char Plmn[TAPI_NETWORK_NAME_LEN_MAX + 1]; /*PLMN value, In 2G case if DispPlmn is true and the PLMN value is null then Network module has to display registered PLMN*/
395 } TelNetworkSpnPlmnDisplayInfo_t;
398 * * @struct TelNetworkSpnMccMncInfo_t
399 * This structure defines the network Spn, Mcc and Mnc info.
402 int mcc; /**< Network mcc */
403 int mnc; /**< Network Mnc */
404 char bDispCondition; /**<Display condition */
405 char short_network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network short Name */
406 char spn_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network spn Name */
407 } TelNetworkSpnMccMncInfo_t;
411 TelNetworkSystemType_t act; /**< Access technology */
412 char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
414 } TelNetworkServing_t;
417 int cell_id; /* Cell ID (-1 indicates cell ID information not present)*/
418 int lac; /* Location area code (this field is ignored when cell_id not present)*/
419 int bcch; /* Broadcast Control Channel Frequency number */
420 int bsic; /* Base Station Identification Code */
421 int rxlev; /* Received Signal Strength level. Valid values are (0-63, 99)
422 * Reference: 33GPP TS 45.008 [20] subclause 8.1.4
423 - Rxlev 0 is a signal strength less than -110 dBm
424 - Rxlev 1 is -110 dBm to -109 dBm
425 - Rxlev 2 is -109 dBm to -108 dBm
427 - Rxlev 62 is -49 dBm to -48 dBm
428 - Rxlev 63 is greater than -48 dBm
429 - Rxlev 99 is not known or not detectable
431 } TelNetworkGeranNeighboringCellInfo_t;
434 int cell_id; /* Cell ID (-1 indicates cell ID information not present)*/
435 int lac; /* Location area code (this field is ignored when cell_id not present)*/
436 int arfcn; /* UTRA Absolute RF Channel Number */
437 int psc; /* Primary scrambling Code */
438 int rscp; /* Received Signal Code Power. Valid values are (0-96, 255)
439 * Reference : 3GPP TS 25.133 [95] subclause 9.1.1.3 and 3GPP TS 25.123 [96] subclause 9.1.1.1.3)
440 - Rscp 0 is a signal strength less than -120 dBm
441 - Rscp 1 is -120 dBm to -119 dBm
442 - Rscp 2 is -119 dBm to -118 dBm
444 - Rscp 95 is -26 dBm to -25 dBm
445 - Rscp 96 is greater than -25 dBm
446 - Rscp 255 is not known or not detectable
448 } TelNetworkUmtsNeighboringCellInfo_t;
451 int geran_list_count;
452 TelNetworkGeranNeighboringCellInfo_t geran_list[TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX];
454 TelNetworkUmtsNeighboringCellInfo_t umts_list[TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX];
455 } TelNetworkNeighboringCellInfo_t;
461 struct tel_noti_network_registration_status {
468 struct tel_noti_network_info {
473 struct tel_noti_network_cell_info {
478 struct tel_noti_network_change {
479 TelNetworkSystemType_t act; /**< Access technology */
480 char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
484 struct tel_noti_network_time_info {
495 char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
498 struct tel_noti_network_identity {
499 char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
504 struct tel_noti_network_neighboring_cell_info {
505 TelNetworkNeighboringCellInfo_t info;
512 #endif // _TEL_NETWORK_H_