All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pa_sim.h
Go to the documentation of this file.
1 
44 #ifndef LEGATO_PASIM_INCLUDE_GUARD
45 #define LEGATO_PASIM_INCLUDE_GUARD
46 
47 
48 #include "legato.h"
49 #include "interfaces.h"
50 
51 //--------------------------------------------------------------------------------------------------
52 // Symbol and Enum definitions.
53 //--------------------------------------------------------------------------------------------------
54 
55 //--------------------------------------------------------------------------------------------------
59 //--------------------------------------------------------------------------------------------------
60 #define PA_SIM_CARDID_MAX_LEN 20
61 
62 //--------------------------------------------------------------------------------------------------
66 //--------------------------------------------------------------------------------------------------
67 #define PA_SIM_IMSI_MAX_LEN 15
68 
69 //--------------------------------------------------------------------------------------------------
74 //--------------------------------------------------------------------------------------------------
75 #define PA_SIM_PIN_MAX_LEN 8
76 
77 //--------------------------------------------------------------------------------------------------
82 //--------------------------------------------------------------------------------------------------
83 #define PA_SIM_PUK_MAX_LEN 8
84 
85 //--------------------------------------------------------------------------------------------------
90 //--------------------------------------------------------------------------------------------------
91 typedef enum
92 {
95 }
97 
98 //--------------------------------------------------------------------------------------------------
103 //--------------------------------------------------------------------------------------------------
104 typedef enum
105 {
108 }
110 
111 
112 //--------------------------------------------------------------------------------------------------
116 //--------------------------------------------------------------------------------------------------
118 
119 //--------------------------------------------------------------------------------------------------
123 //--------------------------------------------------------------------------------------------------
125 
126 //--------------------------------------------------------------------------------------------------
131 //--------------------------------------------------------------------------------------------------
133 
134 //--------------------------------------------------------------------------------------------------
139 //--------------------------------------------------------------------------------------------------
141 
142 //--------------------------------------------------------------------------------------------------
147 //--------------------------------------------------------------------------------------------------
148 typedef struct
149 {
150  uint32_t num;
152 }
154 
155 //--------------------------------------------------------------------------------------------------
156 // APIs.
157 //--------------------------------------------------------------------------------------------------
158 
159 //--------------------------------------------------------------------------------------------------
165 //--------------------------------------------------------------------------------------------------
166 typedef void (*pa_sim_NewStateHdlrFunc_t)(pa_sim_Event_t* eventPtr);
167 
168 //--------------------------------------------------------------------------------------------------
176 //--------------------------------------------------------------------------------------------------
177 uint32_t pa_sim_CountSlots
178 (
179  void
180 );
181 
182 //--------------------------------------------------------------------------------------------------
190 //--------------------------------------------------------------------------------------------------
192 (
193  uint32_t cardNum
194 );
195 
196 //--------------------------------------------------------------------------------------------------
204 //--------------------------------------------------------------------------------------------------
206 (
207  uint32_t* cardNumPtr
208 );
209 
210 //--------------------------------------------------------------------------------------------------
218 //--------------------------------------------------------------------------------------------------
220 (
221  pa_sim_CardId_t iccid
222 );
223 
224 //--------------------------------------------------------------------------------------------------
232 //--------------------------------------------------------------------------------------------------
234 (
235  pa_sim_Imsi_t imsi
236 );
237 
238 //--------------------------------------------------------------------------------------------------
246 //--------------------------------------------------------------------------------------------------
248 (
249  le_sim_States_t* statePtr
250 );
251 
252 //--------------------------------------------------------------------------------------------------
260 //--------------------------------------------------------------------------------------------------
262 (
264 );
265 
266 //--------------------------------------------------------------------------------------------------
272 //--------------------------------------------------------------------------------------------------
274 (
275  le_event_HandlerRef_t handlerRef
276 );
277 
278 //--------------------------------------------------------------------------------------------------
287 //--------------------------------------------------------------------------------------------------
289 (
290  pa_sim_PinType_t type,
291  const pa_sim_Pin_t pin
292 );
293 
294 //--------------------------------------------------------------------------------------------------
307 //--------------------------------------------------------------------------------------------------
309 (
310  pa_sim_PukType_t type,
311  const pa_sim_Puk_t puk,
312  const pa_sim_Pin_t pin
313 );
314 
315 //--------------------------------------------------------------------------------------------------
324 //--------------------------------------------------------------------------------------------------
326 (
327  pa_sim_PinType_t type,
328  uint32_t* attemptsPtr
329 );
330 
331 //--------------------------------------------------------------------------------------------------
340 //--------------------------------------------------------------------------------------------------
342 (
343  pa_sim_PukType_t type,
344  uint32_t* attemptsPtr
345 );
346 
347 //--------------------------------------------------------------------------------------------------
356 //--------------------------------------------------------------------------------------------------
358 (
359  pa_sim_PinType_t type,
360  const pa_sim_Pin_t oldcode,
361  const pa_sim_Pin_t newcode
362 );
363 
364 //--------------------------------------------------------------------------------------------------
373 //--------------------------------------------------------------------------------------------------
375 (
376  pa_sim_PinType_t type,
377  const pa_sim_Pin_t code
378 );
379 
380 //--------------------------------------------------------------------------------------------------
389 //--------------------------------------------------------------------------------------------------
391 (
392  pa_sim_PinType_t type,
393  const pa_sim_Pin_t code
394 );
395 
396 //--------------------------------------------------------------------------------------------------
405 //--------------------------------------------------------------------------------------------------
407 (
408  char *phoneNumberStr,
409  size_t phoneNumberStrSize
410 );
411 
412 #endif // LEGATO_PASIM_INCLUDE_GUARD
le_result_t pa_sim_GetSelectedCard(uint32_t *cardNumPtr)
PUK id.
Definition: pa_sim.h:106
#define PA_SIM_IMSI_MAX_LEN
Definition: pa_sim.h:67
char pa_sim_Imsi_t[PA_SIM_IMSI_MAX_LEN+1]
Definition: pa_sim.h:124
PIN id.
Definition: pa_sim.h:93
le_result_t
Definition: le_basics.h:34
Definition: pa_sim.h:148
le_result_t pa_sim_EnablePIN(pa_sim_PinType_t type, const pa_sim_Pin_t code)
le_sim_States_t
Definition: le_sim_interface.h:222
PIN2 id.
Definition: pa_sim.h:94
pa_sim_PukType_t
Definition: pa_sim.h:104
le_result_t pa_sim_GetPUKRemainingAttempts(pa_sim_PukType_t type, uint32_t *attemptsPtr)
#define PA_SIM_PIN_MAX_LEN
Definition: pa_sim.h:75
#define PA_SIM_CARDID_MAX_LEN
Definition: pa_sim.h:60
uint32_t num
The SIM card number.
Definition: pa_sim.h:150
#define PA_SIM_PUK_MAX_LEN
Definition: pa_sim.h:83
PUK2 id.
Definition: pa_sim.h:107
void(* pa_sim_NewStateHdlrFunc_t)(pa_sim_Event_t *eventPtr)
Definition: pa_sim.h:166
le_result_t pa_sim_RemoveNewStateHandler(le_event_HandlerRef_t handlerRef)
char pa_sim_CardId_t[PA_SIM_CARDID_MAX_LEN+1]
Definition: pa_sim.h:117
le_result_t pa_sim_EnterPIN(pa_sim_PinType_t type, const pa_sim_Pin_t pin)
le_result_t pa_sim_GetIMSI(pa_sim_Imsi_t imsi)
uint32_t pa_sim_CountSlots(void)
le_sim_States_t state
The SIM state.
Definition: pa_sim.h:151
le_result_t pa_sim_GetCardIdentification(pa_sim_CardId_t iccid)
char pa_sim_Puk_t[PA_SIM_PUK_MAX_LEN+1]
Definition: pa_sim.h:140
le_result_t pa_sim_SelectCard(uint32_t cardNum)
le_result_t pa_sim_DisablePIN(pa_sim_PinType_t type, const pa_sim_Pin_t code)
struct le_event_Handler * le_event_HandlerRef_t
Definition: le_eventLoop.h:752
le_result_t pa_sim_ChangePIN(pa_sim_PinType_t type, const pa_sim_Pin_t oldcode, const pa_sim_Pin_t newcode)
le_event_HandlerRef_t pa_sim_AddNewStateHandler(pa_sim_NewStateHdlrFunc_t handler)
le_result_t pa_sim_GetState(le_sim_States_t *statePtr)
pa_sim_PinType_t
Definition: pa_sim.h:91
char pa_sim_Pin_t[PA_SIM_PIN_MAX_LEN+1]
Definition: pa_sim.h:132
le_result_t pa_sim_EnterPUK(pa_sim_PukType_t type, const pa_sim_Puk_t puk, const pa_sim_Pin_t pin)
le_result_t pa_sim_GetSubscriberPhoneNumber(char *phoneNumberStr, size_t phoneNumberStrSize)
le_result_t pa_sim_GetPINRemainingAttempts(pa_sim_PinType_t type, uint32_t *attemptsPtr)