components/modemServices/platformAdaptor/interfaces/inc/pa_sim.h
Go to the documentation of this file.
00001 
00044 #ifndef LEGATO_PASIM_INCLUDE_GUARD
00045 #define LEGATO_PASIM_INCLUDE_GUARD
00046 
00047 
00048 #include "legato.h"
00049 #include "le_mdm_defs.h"
00050 
00051 //--------------------------------------------------------------------------------------------------
00052 // Symbol and Enum definitions.
00053 //--------------------------------------------------------------------------------------------------
00054 
00055 //--------------------------------------------------------------------------------------------------
00059 //--------------------------------------------------------------------------------------------------
00060 #define PA_SIM_CARDID_MAX_LEN     20
00061 
00062 //--------------------------------------------------------------------------------------------------
00066 //--------------------------------------------------------------------------------------------------
00067 #define PA_SIM_IMSI_MAX_LEN     15
00068 
00069 //--------------------------------------------------------------------------------------------------
00074 //--------------------------------------------------------------------------------------------------
00075 #define PA_SIM_PIN_MAX_LEN     8
00076 
00077 //--------------------------------------------------------------------------------------------------
00082 //--------------------------------------------------------------------------------------------------
00083 #define PA_SIM_PUK_MAX_LEN     8
00084 
00085 //--------------------------------------------------------------------------------------------------
00090 //--------------------------------------------------------------------------------------------------
00091 typedef enum
00092 {
00093     PA_SIM_PIN=0,     
00094     PA_SIM_PIN2       
00095 }
00096 pa_sim_PinType_t;
00097 
00098 //--------------------------------------------------------------------------------------------------
00103 //--------------------------------------------------------------------------------------------------
00104 typedef enum
00105 {
00106     PA_SIM_PUK=0,    
00107     PA_SIM_PUK2      
00108 }
00109 pa_sim_PukType_t;
00110 
00111 
00112 //--------------------------------------------------------------------------------------------------
00116 //--------------------------------------------------------------------------------------------------
00117 typedef char pa_sim_CardId_t[PA_SIM_CARDID_MAX_LEN+1];
00118 
00119 //--------------------------------------------------------------------------------------------------
00123 //--------------------------------------------------------------------------------------------------
00124 typedef char pa_sim_Imsi_t[PA_SIM_IMSI_MAX_LEN+1];
00125 
00126 //--------------------------------------------------------------------------------------------------
00131 //--------------------------------------------------------------------------------------------------
00132 typedef char pa_sim_Pin_t[PA_SIM_PIN_MAX_LEN+1];
00133 
00134 //--------------------------------------------------------------------------------------------------
00139 //--------------------------------------------------------------------------------------------------
00140 typedef char pa_sim_Puk_t[PA_SIM_PUK_MAX_LEN+1];
00141 
00142 //--------------------------------------------------------------------------------------------------
00147 //--------------------------------------------------------------------------------------------------
00148 typedef struct
00149 {
00150     uint32_t         num;     
00151     le_sim_States_t  state;   
00152 }
00153 pa_sim_Event_t;
00154 
00155 //--------------------------------------------------------------------------------------------------
00156 // APIs.
00157 //--------------------------------------------------------------------------------------------------
00158 
00159 //--------------------------------------------------------------------------------------------------
00165 //--------------------------------------------------------------------------------------------------
00166 typedef void (*pa_sim_NewStateHdlrFunc_t)(pa_sim_Event_t* eventPtr);
00167 
00168 //--------------------------------------------------------------------------------------------------
00176 //--------------------------------------------------------------------------------------------------
00177 uint32_t pa_sim_CountSlots
00178 (
00179     void
00180 );
00181 
00182 //--------------------------------------------------------------------------------------------------
00190 //--------------------------------------------------------------------------------------------------
00191 le_result_t pa_sim_SelectCard
00192 (
00193     uint32_t  cardNum     
00194 );
00195 
00196 //--------------------------------------------------------------------------------------------------
00204 //--------------------------------------------------------------------------------------------------
00205 le_result_t pa_sim_GetSelectedCard
00206 (
00207     uint32_t*  cardNumPtr     
00208 );
00209 
00210 //--------------------------------------------------------------------------------------------------
00218 //--------------------------------------------------------------------------------------------------
00219 le_result_t pa_sim_GetCardIdentification
00220 (
00221     pa_sim_CardId_t iccid     
00222 );
00223 
00224 //--------------------------------------------------------------------------------------------------
00232 //--------------------------------------------------------------------------------------------------
00233 le_result_t pa_sim_GetIMSI
00234 (
00235     pa_sim_Imsi_t imsi   
00236 );
00237 
00238 //--------------------------------------------------------------------------------------------------
00246 //--------------------------------------------------------------------------------------------------
00247 le_result_t pa_sim_GetState
00248 (
00249     le_sim_States_t* statePtr    
00250 );
00251 
00252 //--------------------------------------------------------------------------------------------------
00260 //--------------------------------------------------------------------------------------------------
00261 le_event_HandlerRef_t pa_sim_AddNewStateHandler
00262 (
00263     pa_sim_NewStateHdlrFunc_t handler 
00264 );
00265 
00266 //--------------------------------------------------------------------------------------------------
00272 //--------------------------------------------------------------------------------------------------
00273 le_result_t pa_sim_RemoveNewStateHandler
00274 (
00275     le_event_HandlerRef_t handlerRef
00276 );
00277 
00278 //--------------------------------------------------------------------------------------------------
00287 //--------------------------------------------------------------------------------------------------
00288 le_result_t pa_sim_EnterPIN
00289 (
00290     pa_sim_PinType_t   type,  
00291     const pa_sim_Pin_t pin    
00292 );
00293 
00294 //--------------------------------------------------------------------------------------------------
00307 //--------------------------------------------------------------------------------------------------
00308 le_result_t pa_sim_EnterPUK
00309 (
00310     pa_sim_PukType_t   type, 
00311     const pa_sim_Puk_t puk,  
00312     const pa_sim_Pin_t pin   
00313 );
00314 
00315 //--------------------------------------------------------------------------------------------------
00324 //--------------------------------------------------------------------------------------------------
00325 le_result_t pa_sim_GetPINRemainingAttempts
00326 (
00327     pa_sim_PinType_t type,       
00328     uint32_t*        attemptsPtr 
00329 );
00330 
00331 //--------------------------------------------------------------------------------------------------
00340 //--------------------------------------------------------------------------------------------------
00341 le_result_t pa_sim_GetPUKRemainingAttempts
00342 (
00343     pa_sim_PukType_t type,       
00344     uint32_t*        attemptsPtr 
00345 );
00346 
00347 //--------------------------------------------------------------------------------------------------
00356 //--------------------------------------------------------------------------------------------------
00357 le_result_t pa_sim_ChangePIN
00358 (
00359     pa_sim_PinType_t   type,    
00360     const pa_sim_Pin_t oldcode, 
00361     const pa_sim_Pin_t newcode  
00362 );
00363 
00364 //--------------------------------------------------------------------------------------------------
00373 //--------------------------------------------------------------------------------------------------
00374 le_result_t pa_sim_EnablePIN
00375 (
00376     pa_sim_PinType_t   type,  
00377     const pa_sim_Pin_t code   
00378 );
00379 
00380 //--------------------------------------------------------------------------------------------------
00389 //--------------------------------------------------------------------------------------------------
00390 le_result_t pa_sim_DisablePIN
00391 (
00392     pa_sim_PinType_t   type,  
00393     const pa_sim_Pin_t code   
00394 );
00395 
00396 //--------------------------------------------------------------------------------------------------
00405 //--------------------------------------------------------------------------------------------------
00406 le_result_t pa_sim_GetSubscriberPhoneNumber
00407 (
00408     char        *phoneNumberStr,    
00409     size_t       phoneNumberStrSize 
00410 );
00411 
00412 #endif // LEGATO_PASIM_INCLUDE_GUARD
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines