| CE Gobi SDK 2.7 GobiApi

- Main Page
- Modules
- Classes
- Files

- File List

GobiUIMMgmtAPI.h
1 /*===========================================================================
2 FILE:
3 GobiUimMgmtAPI.h
4
5 DESCRIPTION:
6 Sierra Wireless UIM APIs
7
8 Copyright (C) 2014 Sierra Wireless Incorporated. All rights reserved.
9 Sierra Wireless Proprietary/GTDR
10 ==========================================================================*/
11
12 #ifndef GobiUimMgmtAPI_H
13 #define GobiUimMgmtAPI_H
14 /*=========================================================================*/
15 // Definitions
16 /*=========================================================================*/
17 #ifdef GOBIAPI_EXPORTS
18 #define IMPORTGOBI extern "C" __declspec( dllexport )
19 #else //GOBIAPI_EXPORTS
20 #ifdef __cplusplus
21 /* C++ callable DLL */
22 #define IMPORTGOBI extern "C" __declspec( dllimport )
23 #else
24 /* C callable DLL */
25 #define IMPORTGOBI __declspec( dllimport )
26 #endif
27 #endif //GOBIAPI_EXPORTS
28
29 // Calling convention for API
30 #define GOBICALLBACK __stdcall
31 #define GOBICMAPI __stdcall
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
41
42 /*=========================================================================*/
43 // Structs
44 /*=========================================================================*/
45 //QMI_UIM_GET_CARD_STATUS_RESP
46 typedef struct
47 {
48 BYTE app_type; //• 0 – Unknown
49 //• 1 – SIM card
50 //• 2 – USIM application
51 //• 3 – RUIM card
52 //• 4 – CSIM application
53 //• 5 – ISIM application
54 //Other values are reserved for the future
55 //and are to be handled as “Unknown”.
56 BYTE app_state; //• 0 – Unknown
57 //• 1 – Detected
58 //• 2 – PIN1 or UPIN is required
59 //• 3 – PUK1 or PUK for UPIN is required
60 //• 4 – Personalization state must be checked
61 //• 5 – PIN1 is blocked
62 //• 6 – Illegal
63 //• 7 – Ready
64 BYTE perso_state;//• 0 – Unknown
65 //• 1 – Personalization operation is in progress
66 //• 2 – Ready
67 //• 3 – Personalization code is required
68 //• 4 – PUK for personalization code is required
69 //• 5 – Permanently blocked
70 BYTE perso_feature; //• 0 – GW network personalization
71 //• 1 – GW network subset personalization
72 //• 2 – GW service provider
73 //personalization
74 //• 3 – GW corporate personalization
75 //• 4 – GW UIM personalization
76 //• 5 – 1X network type 1 personalization
77 //• 6 – 1X network type 2 personalization
78 //• 7 – 1X HRPD personalization
79 //• 8 – 1X service provider personalization
80 //• 9 – 1X corporate personalization
81 //• 10 – 1X RUIM personalization
82 //• 11 – Unknown
83 BYTE perso_retries;
84 BYTE perso_unblock_retries;
85 BYTE aid_len;
86 CHAR aid_value[255];
87 BYTE univ_pin; //• 0 – PIN1 is used
88 //• 1 – UPIN replaces PIN1
89 BYTE pin1_state;//• 0 – Unknown
90 //• 1 – Enabled and not verified
91 //• 2 – Enabled and verified
92 //• 3 – Disabled
93 //• 4 – Blocked
94 //• 5 – Permanently blocked
95 BYTE pin1_retries;
96 BYTE puk1_retries;
97 BYTE pin2_state;//• 0 – Unknown
98 //• 1 – Enabled and not verified
99 //• 2 – Enabled and verified
100 //• 3 – Disabled
101 //• 4 – Blocked
102 //• 5 – Permanently blocked
103 BYTE pin2_retries;
104 BYTE puk2_retries;
105 //not supported
106 //BYTE extended_hot_swap_len;
107 //BYTE *extended_hot_swap;
108
109
110
111 }QMI_UIM_GET_CARD_STATUS_RESP_APPL;
112
113 #define QMI_UIM_GET_CARD_STATUS_MAX_APPL 4
114 typedef struct
115 {
116 BYTE card_state;
117 BYTE upin_state;//0:unknown
118 //1:enabled and not verified
119 //2:enabled and verified
120 //3:disabled
121 //4:blocked
122 //5:permanently blocked
123 BYTE upin_retries;
124 BYTE upuk_retries;
125 BYTE error_code;//• 0 - Unknown
126 //• 1 - Power down
127 //• 2 - Poll error
128 //• 3 - No ATR received
129 //• 4 - Volt mismatch
130 //• 5 - Parity error
131 //• 6 - Unknown; possibly removed
132 //• 7 - Card returned technical problems
133 //Other values are possible and reserved
134 //for future use. When an unknown value
135 //is received, it is to be handled as
136 //“Unknown”.
137 BYTE num_app;
138 QMI_UIM_GET_CARD_STATUS_RESP_APPL appls[QMI_UIM_GET_CARD_STATUS_MAX_APPL];
139 }QMI_UIM_GET_CARD_STATUS_RESP_SLOT;
140
141 #define QMI_UIM_GET_CARD_STATUS_MAX_SLOT 2
142 typedef struct {
143 WORD index_gw_pri;
144 WORD index_1x_pri;
145 WORD index_gw_sec;
146 WORD index_1x_sec;
147 BYTE num_slot;
148 QMI_UIM_GET_CARD_STATUS_RESP_SLOT slots[QMI_UIM_GET_CARD_STATUS_MAX_SLOT];
149 }QMI_UIM_GET_CARD_STATUS_RESP;
150
151 //QMI_UIM_STATUS_CHANGE_IND
152 #define QMI_UIM_CARD_STATUS QMI_UIM_GET_CARD_STATUS_RESP
153 #define QMI_UIM_STATUS_CHANGE_IND_RESP QMI_UIM_CARD_STATUS
154
155 //QMI_UIM_VERIFY_PIN_REQ
156 typedef struct
157 {
158 BYTE session_type; //Primary GW provisioning 0 Accesses the GSM DF (for ICC) or USIM application
159 //(for UICC) used to acquire a GSM, a WCDMA or an
160 //LTE network.
161 //Primary 1X provisioning 1 Accesses the CDMA DF (for ICC) or CSIM application
162 //(for UICC) used to acquire a 1X/DO network.
163 //Secondary GW provisioning 2 Accesses the GSM DF (for ICC) or USIM application
164 //(for UICC) used to acquire a GSM, a WCDMA or an
165 //LTE network (Dual Standby).
166 //Secondary 1X provisioning 3 Accesses the CDMA DF (for ICC) or CSIM application
167 //(for UICC) used to acquire 1X/DO network (Dual
168 //Standby).
169 BYTE aid_len;
170 BYTE aid[255];
171 }QMI_UIM_VERIFY_PIN_REQ_SESSION_INFORMATION;
172 typedef struct
173 {
174 BYTE pin_id; //• 1 - PIN1 (also called PIN)
175 //• 2 - PIN2
176 //• 3 - Universal PIN
177 //• 4 - Hidden key
178 BYTE pin_len;
179 char pin_value[255];//ASCII
180 }QMI_UIM_VERIFY_PIN_REQ_VERIFY_PIN;
181
182 typedef struct
183 {
184 BYTE verify_left;
185 BYTE unblock_left;
186 }QMI_UIM_VERIFY_PIN_RESP_RETRIES_REMAINING;
187
188
189 typedef struct
190 {
191 BYTE session_type; //Primary GW provisioning 0 Accesses the GSM DF (for ICC) or USIM application
192 //(for UICC) used to acquire a GSM, a WCDMA or an
193 //LTE network.
194 //Primary 1X provisioning 1 Accesses the CDMA DF (for ICC) or CSIM application
195 //(for UICC) used to acquire a 1X/DO network.
196 //Secondary GW provisioning 2 Accesses the GSM DF (for ICC) or USIM application
197 //(for UICC) used to acquire a GSM, a WCDMA or an
198 //LTE network (Dual Standby).
199 //Secondary 1X provisioning 3 Accesses the CDMA DF (for ICC) or CSIM application
200 //(for UICC) used to acquire 1X/DO network (Dual
201 //Standby).
202 BYTE aid_len;
203 BYTE aid[255];
204 }QMI_UIM_UNBLOCK_PIN_REQ_SESSION_INFORMATION;
205
206 typedef struct
207 {
208 BYTE pin_id; //• 1 - PIN1 (also called PIN)
209 //• 2 - PIN2
210 //• 3 - Universal PIN
211 BYTE puk_len;
212 char puk_value[255];//ascii
213 BYTE new_pin_len;
214 char new_pin_value[255];
215 }QMI_UIM_UNBLOCK_PIN_REQ_UNBLOCK_PIN;
216
217 typedef struct
218 {
219 BYTE verify_left;
220 BYTE unblock_left;
221 }QMI_UIM_UNBLOCK_PIN_RESP_RETRIES_REMAINING;
222
223 typedef struct
224 {
225 BYTE session_type; //Primary GW provisioning 0 Accesses the GSM DF (for ICC) or USIM application
226 //(for UICC) used to acquire a GSM, a WCDMA or an
227 //LTE network.
228 //Primary 1X provisioning 1 Accesses the CDMA DF (for ICC) or CSIM application
229 //(for UICC) used to acquire a 1X/DO network.
230 //Secondary GW provisioning 2 Accesses the GSM DF (for ICC) or USIM application
231 //(for UICC) used to acquire a GSM, a WCDMA or an
232 //LTE network (Dual Standby).
233 //Secondary 1X provisioning 3 Accesses the CDMA DF (for ICC) or CSIM application
234 //(for UICC) used to acquire 1X/DO network (Dual
235 //Standby).
236 BYTE aid_len;
237 BYTE aid[255];
238 }QMI_UIM_SET_PIN_PROTECTION_REQ_SESSION_INFORMATION;
239
240 typedef struct
241 {
242 BYTE pin_id; //• 1 - PIN1 (also called PIN)
243 //• 2 - PIN2
244 //• 3 - Universal PIN
245 //• 4 - Hidden key
246 BYTE pin_operation;//• 0 - disable the pin
247 //• 1 - enable the pin
248 BYTE pin_len;
249 char pin_value[255];
250 }QMI_UIM_SET_PIN_PROTECTION_REQ_SET_PIN_PROTECTION;
251
252 typedef struct
253 {
254 BYTE verify_left;
255 BYTE unblock_left;
256 }QMI_UIM_SET_PIN_PROTECTION_RESP_RETRIES_REMAINING;
257
258
259
260 typedef struct
261 {
262 BYTE session_type; //Primary GW provisioning 0 Accesses the GSM DF (for ICC) or USIM application
263 //(for UICC) used to acquire a GSM, a WCDMA or an
264 //LTE network.
265 //Primary 1X provisioning 1 Accesses the CDMA DF (for ICC) or CSIM application
266 //(for UICC) used to acquire a 1X/DO network.
267 //Secondary GW provisioning 2 Accesses the GSM DF (for ICC) or USIM application
268 //(for UICC) used to acquire a GSM, a WCDMA or an
269 //LTE network (Dual Standby).
270 //Secondary 1X provisioning 3 Accesses the CDMA DF (for ICC) or CSIM application
271 //(for UICC) used to acquire 1X/DO network (Dual
272 //Standby).
273 BYTE aid_len;
274 BYTE aid[255];
275 }QMI_UIM_CHANGE_PIN_REQ_SESSION_INFORMATION;
276
277 typedef struct
278 {
279 BYTE pin_id; //• 1 - PIN1 (also called PIN)
280 //• 2 - PIN2
281 //• 3 - Universal PIN
282 //• 4 - Hidden key
283 BYTE old_pin_len;
284 char old_pin_value[255];
285 BYTE new_pin_len;
286 char new_pin_value[255];
287 }QMI_UIM_CHANGE_PIN_REQ_CHANGE_PIN;
288
289 typedef struct
290 {
291 BYTE verify_left;
292 BYTE unblock_left;
293 }QMI_UIM_CHANGE_PIN_RESP_RETRIES_REMAINING;
294
295 /*=========================================================================*/
296 // Callbacks
297 /*=========================================================================*/
298 typedef void (GOBICALLBACK * tFNUIMStatusChangeIndCallback)(
299 //parameters
300 QMI_UIM_CARD_STATUS* pCardStatus);
301
302
303 #ifdef __cplusplus
304 };
305 #endif
306
307 /*=========================================================================*/
308 // Prototypes
309 /*=========================================================================*/
326 IMPORTGOBI ULONG GOBICMAPI UIMSetPINProtection(
327 QMI_UIM_SET_PIN_PROTECTION_REQ_SESSION_INFORMATION *pSessionInformation,
328 QMI_UIM_SET_PIN_PROTECTION_REQ_SET_PIN_PROTECTION* pSetPINProtection,
329 QMI_UIM_SET_PIN_PROTECTION_RESP_RETRIES_REMAINING * pRetriesRemaining
330 );
331
332
349 IMPORTGOBI ULONG GOBICMAPI UIMVerifyPIN(
350 QMI_UIM_VERIFY_PIN_REQ_SESSION_INFORMATION *pSessionInformation,
351 QMI_UIM_VERIFY_PIN_REQ_VERIFY_PIN* pVerifyPIN,
352 QMI_UIM_VERIFY_PIN_RESP_RETRIES_REMAINING * pRetriesRemaining
353 );
354
355
372 IMPORTGOBI ULONG GOBICMAPI UIMUnblockPIN(
373 QMI_UIM_UNBLOCK_PIN_REQ_SESSION_INFORMATION *pSessionInformation,
374 QMI_UIM_UNBLOCK_PIN_REQ_UNBLOCK_PIN* pUnblockPIN,
375 QMI_UIM_UNBLOCK_PIN_RESP_RETRIES_REMAINING * pRetriesRemaining
376 );
377
378
395 IMPORTGOBI ULONG GOBICMAPI UIMChangePIN(
396 QMI_UIM_CHANGE_PIN_REQ_SESSION_INFORMATION *pSessionInformation,
397 QMI_UIM_CHANGE_PIN_REQ_CHANGE_PIN* pChangePIN,
398 QMI_UIM_CHANGE_PIN_RESP_RETRIES_REMAINING * pRetriesRemaining
399 );
400
401
418 IMPORTGOBI ULONG GOBICMAPI UIMGetCardStatus(
419 BOOL *pExtendedCardStatus,
420 QMI_UIM_GET_CARD_STATUS_RESP* pCardStatus
421 );
422
423
434 IMPORTGOBI ULONG GOBICMAPI SetUIMStatusChangeCallback(
435 tFNUIMStatusChangeIndCallback pCallback );
436
437
438 // End of UIM group
440
441 #endif //GobiUimMgmtAPI_H
UIMVerifyPIN
IMPORTGOBI ULONG GOBICMAPI UIMVerifyPIN(QMI_UIM_VERIFY_PIN_REQ_SESSION_INFORMATION *pSessionInformation, QMI_UIM_VERIFY_PIN_REQ_VERIFY_PIN *pVerifyPIN, QMI_UIM_VERIFY_PIN_RESP_RETRIES_REMAINING *pRetriesRemaining)
QMI_UIM_SET_PIN_PROTECTION_REQ_SESSION_INFORMATION
Definition: GobiUIMMgmtAPI.h:223
QMI_UIM_VERIFY_PIN_RESP_RETRIES_REMAINING
Definition: GobiUIMMgmtAPI.h:182
QMI_UIM_GET_CARD_STATUS_RESP
Definition: GobiUIMMgmtAPI.h:142
QMI_UIM_UNBLOCK_PIN_REQ_SESSION_INFORMATION
Definition: GobiUIMMgmtAPI.h:189
UIMSetPINProtection
IMPORTGOBI ULONG GOBICMAPI UIMSetPINProtection(QMI_UIM_SET_PIN_PROTECTION_REQ_SESSION_INFORMATION *pSessionInformation, QMI_UIM_SET_PIN_PROTECTION_REQ_SET_PIN_PROTECTION *pSetPINProtection, QMI_UIM_SET_PIN_PROTECTION_RESP_RETRIES_REMAINING *pRetriesRemaining)
QMI_UIM_SET_PIN_PROTECTION_REQ_SET_PIN_PROTECTION
Definition: GobiUIMMgmtAPI.h:240
QMI_UIM_UNBLOCK_PIN_REQ_UNBLOCK_PIN
Definition: GobiUIMMgmtAPI.h:206
QMI_UIM_GET_CARD_STATUS_RESP_APPL
Definition: GobiUIMMgmtAPI.h:46
QMI_UIM_VERIFY_PIN_REQ_SESSION_INFORMATION
Definition: GobiUIMMgmtAPI.h:156
QMI_UIM_CHANGE_PIN_REQ_CHANGE_PIN
Definition: GobiUIMMgmtAPI.h:277
QMI_UIM_UNBLOCK_PIN_RESP_RETRIES_REMAINING
Definition: GobiUIMMgmtAPI.h:217
QMI_UIM_SET_PIN_PROTECTION_RESP_RETRIES_REMAINING
Definition: GobiUIMMgmtAPI.h:252
UIMChangePIN
IMPORTGOBI ULONG GOBICMAPI UIMChangePIN(QMI_UIM_CHANGE_PIN_REQ_SESSION_INFORMATION *pSessionInformation, QMI_UIM_CHANGE_PIN_REQ_CHANGE_PIN *pChangePIN, QMI_UIM_CHANGE_PIN_RESP_RETRIES_REMAINING *pRetriesRemaining)
QMI_UIM_GET_CARD_STATUS_RESP_SLOT
Definition: GobiUIMMgmtAPI.h:114
UIMUnblockPIN
IMPORTGOBI ULONG GOBICMAPI UIMUnblockPIN(QMI_UIM_UNBLOCK_PIN_REQ_SESSION_INFORMATION *pSessionInformation, QMI_UIM_UNBLOCK_PIN_REQ_UNBLOCK_PIN *pUnblockPIN, QMI_UIM_UNBLOCK_PIN_RESP_RETRIES_REMAINING *pRetriesRemaining)
SetUIMStatusChangeCallback
IMPORTGOBI ULONG GOBICMAPI SetUIMStatusChangeCallback(tFNUIMStatusChangeIndCallback pCallback)
UIMGetCardStatus
IMPORTGOBI ULONG GOBICMAPI UIMGetCardStatus(BOOL *pExtendedCardStatus, QMI_UIM_GET_CARD_STATUS_RESP *pCardStatus)
QMI_UIM_CHANGE_PIN_RESP_RETRIES_REMAINING
Definition: GobiUIMMgmtAPI.h:289
QMI_UIM_CHANGE_PIN_REQ_SESSION_INFORMATION
Definition: GobiUIMMgmtAPI.h:260
QMI_UIM_VERIFY_PIN_REQ_VERIFY_PIN
Definition: GobiUIMMgmtAPI.h:172