00001 00040 #ifndef LEGATO_PARC_INCLUDE_GUARD 00041 #define LEGATO_PARC_INCLUDE_GUARD 00042 00043 #include "legato.h" 00044 #include "le_mdm_defs.h" 00045 00046 //-------------------------------------------------------------------------------------------------- 00047 // Symbol and Enum definitions. 00048 //-------------------------------------------------------------------------------------------------- 00049 00050 //-------------------------------------------------------------------------------------------------- 00051 //-------------------------------------------------------------------------------------------------- 00056 //-------------------------------------------------------------------------------------------------- 00057 #define PA_MRC_METWORK_MASK_GSM 1<<0 00058 #define PA_MRC_METWORK_MASK_UTMS 1<<1 00059 #define PA_MRC_METWORK_MASK_LTE 1<<2 00060 #define PA_MRC_METWORK_MASK_TD_SCDMA 1<<3 00061 00062 //-------------------------------------------------------------------------------------------------- 00067 //-------------------------------------------------------------------------------------------------- 00068 #define PA_MRC_METWORK_RATMASK_GSM 1<<0 00069 #define PA_MRC_METWORK_RATMASK_UTMS 1<<1 00070 #define PA_MRC_METWORK_RATMASK_LTE 1<<2 00071 #define PA_MRC_METWORK_RATMASK_GSMCOMPACT 1<<3 00072 00073 //-------------------------------------------------------------------------------------------------- 00078 //-------------------------------------------------------------------------------------------------- 00079 typedef enum 00080 { 00081 PA_MRC_DISABLE_REG_NOTIFICATION = 0, 00082 00083 PA_MRC_ENABLE_REG_NOTIFICATION = 1, 00084 PA_MRC_ENABLE_REG_LOC_NOTIFICATION = 2, 00085 00086 00087 } 00088 pa_mrc_NetworkRegSetting_t; 00089 00090 //-------------------------------------------------------------------------------------------------- 00095 //-------------------------------------------------------------------------------------------------- 00096 typedef enum 00097 { 00098 PA_MRC_SCAN_PLMN = 0, 00099 PA_MRC_SCAN_CSG, 00100 } 00101 le_mrc_ScanType_t; 00102 00103 //-------------------------------------------------------------------------------------------------- 00108 //-------------------------------------------------------------------------------------------------- 00109 typedef struct 00110 { 00111 char mcc[LE_MRC_MCC_BYTES]; 00112 char mnc[LE_MRC_MNC_BYTES]; 00113 } 00114 pa_mrc_MobileCode_t; 00115 00116 //-------------------------------------------------------------------------------------------------- 00121 //-------------------------------------------------------------------------------------------------- 00122 typedef struct 00123 { 00124 pa_mrc_MobileCode_t mobileCode; 00125 uint32_t ratMask; 00126 le_dls_Link_t link; 00127 } 00128 pa_mrc_PreferredNetwork_t; 00129 00130 //-------------------------------------------------------------------------------------------------- 00135 //-------------------------------------------------------------------------------------------------- 00136 typedef struct 00137 { 00138 pa_mrc_MobileCode_t mobileCode; 00139 uint32_t rat; 00140 uint32_t networkStatus; 00141 le_dls_Link_t link; 00142 } 00143 pa_mrc_ScanInformation_t; 00144 00145 //-------------------------------------------------------------------------------------------------- 00151 //-------------------------------------------------------------------------------------------------- 00152 typedef void (*pa_mrc_NetworkRegHdlrFunc_t)(le_mrc_NetRegState_t* regState); 00153 00154 00155 //-------------------------------------------------------------------------------------------------- 00156 // APIs. 00157 //-------------------------------------------------------------------------------------------------- 00158 00159 //-------------------------------------------------------------------------------------------------- 00166 //-------------------------------------------------------------------------------------------------- 00167 le_result_t pa_mrc_SetRadioPower 00168 ( 00169 le_onoff_t power 00170 ); 00171 00172 //-------------------------------------------------------------------------------------------------- 00179 //-------------------------------------------------------------------------------------------------- 00180 le_result_t pa_mrc_GetRadioPower 00181 ( 00182 le_onoff_t* powerPtr 00183 ); 00184 00185 //-------------------------------------------------------------------------------------------------- 00193 //-------------------------------------------------------------------------------------------------- 00194 le_event_HandlerRef_t pa_mrc_AddNetworkRegHandler 00195 ( 00196 pa_mrc_NetworkRegHdlrFunc_t regStateHandler 00197 00198 ); 00199 00200 //-------------------------------------------------------------------------------------------------- 00206 //-------------------------------------------------------------------------------------------------- 00207 le_result_t pa_mrc_RemoveNetworkRegHandler 00208 ( 00209 le_event_HandlerRef_t handlerRef 00210 ); 00211 00212 //-------------------------------------------------------------------------------------------------- 00220 //-------------------------------------------------------------------------------------------------- 00221 le_result_t pa_mrc_ConfigureNetworkReg 00222 ( 00223 pa_mrc_NetworkRegSetting_t setting 00224 ); 00225 00226 //-------------------------------------------------------------------------------------------------- 00234 //-------------------------------------------------------------------------------------------------- 00235 le_result_t pa_mrc_GetNetworkRegConfig 00236 ( 00237 pa_mrc_NetworkRegSetting_t* settingPtr 00238 ); 00239 00240 //-------------------------------------------------------------------------------------------------- 00248 //-------------------------------------------------------------------------------------------------- 00249 le_result_t pa_mrc_GetNetworkRegState 00250 ( 00251 le_mrc_NetRegState_t* statePtr 00252 ); 00253 00254 //-------------------------------------------------------------------------------------------------- 00263 //-------------------------------------------------------------------------------------------------- 00264 le_result_t pa_mrc_GetSignalQuality 00265 ( 00266 int32_t* rssiPtr 00267 ); 00268 00269 //-------------------------------------------------------------------------------------------------- 00278 //-------------------------------------------------------------------------------------------------- 00279 le_result_t pa_mrc_GetHomeNetworkName 00280 ( 00281 char *nameStr, 00282 size_t nameStrSize 00283 ); 00284 00285 //-------------------------------------------------------------------------------------------------- 00290 //-------------------------------------------------------------------------------------------------- 00291 void pa_mrc_DeleteScanInformation 00292 ( 00293 le_dls_List_t *scanInformationListPtr 00294 ); 00295 00296 00297 //-------------------------------------------------------------------------------------------------- 00307 //-------------------------------------------------------------------------------------------------- 00308 le_result_t pa_mrc_PerformNetworkScan 00309 ( 00310 uint32_t networkMask, 00311 le_mrc_ScanType_t scanType, 00312 le_dls_List_t *scanInformationListPtr 00313 ); 00314 00315 //-------------------------------------------------------------------------------------------------- 00323 //-------------------------------------------------------------------------------------------------- 00324 le_result_t pa_mrc_GetScanInformationCode 00325 ( 00326 pa_mrc_ScanInformation_t *scanInformationPtr, 00327 pa_mrc_MobileCode_t *mobileCodePtr 00328 ); 00329 00330 00331 //-------------------------------------------------------------------------------------------------- 00340 //-------------------------------------------------------------------------------------------------- 00341 le_result_t pa_mrc_GetScanInformationName 00342 ( 00343 pa_mrc_ScanInformation_t *scanInformationPtr, 00344 char *namePtr, 00345 size_t nameSize 00346 ); 00347 00348 00349 //-------------------------------------------------------------------------------------------------- 00357 //-------------------------------------------------------------------------------------------------- 00358 le_result_t pa_mrc_GetScanInformationRat 00359 ( 00360 pa_mrc_ScanInformation_t *scanInformationPtr, 00361 le_mrc_Rat_t *ratPtr 00362 ); 00363 00364 //-------------------------------------------------------------------------------------------------- 00372 //-------------------------------------------------------------------------------------------------- 00373 le_result_t pa_mrc_GetScanInformationInUse 00374 ( 00375 pa_mrc_ScanInformation_t *scanInformationPtr, 00376 bool *inUsePtr 00377 ); 00378 00379 00380 //-------------------------------------------------------------------------------------------------- 00388 //-------------------------------------------------------------------------------------------------- 00389 le_result_t pa_mrc_GetScanInformationAvailable 00390 ( 00391 pa_mrc_ScanInformation_t *scanInformationPtr, 00392 bool *isAvailablePtr 00393 ); 00394 00395 00396 //-------------------------------------------------------------------------------------------------- 00404 //-------------------------------------------------------------------------------------------------- 00405 le_result_t pa_mrc_GetScanInformationHome 00406 ( 00407 pa_mrc_ScanInformation_t *scanInformationPtr, 00408 bool *isHomePtr 00409 ); 00410 00411 //-------------------------------------------------------------------------------------------------- 00419 //-------------------------------------------------------------------------------------------------- 00420 le_result_t pa_mrc_GetScanInformationForbidden 00421 ( 00422 pa_mrc_ScanInformation_t *scanInformationPtr, 00423 bool *isForbiddenPtr 00424 ); 00425 00426 00427 //-------------------------------------------------------------------------------------------------- 00435 //-------------------------------------------------------------------------------------------------- 00436 le_result_t pa_mrc_AddPreferredNetwork 00437 ( 00438 le_dls_List_t *PreferredNetworkListPtr, 00439 char mcc[LE_MRC_MCC_BYTES], 00440 char mnc[LE_MRC_MNC_BYTES], 00441 uint32_t ratMask 00442 ); 00443 00444 00445 //-------------------------------------------------------------------------------------------------- 00453 //-------------------------------------------------------------------------------------------------- 00454 le_result_t pa_mrc_ClearPreferedList 00455 ( 00456 le_dls_List_t *PreferredNetworkListPtr 00457 ); 00458 00459 00460 //-------------------------------------------------------------------------------------------------- 00468 //-------------------------------------------------------------------------------------------------- 00469 le_result_t pa_mrc_SavePreferredList 00470 ( 00471 le_dls_List_t *PreferredNetworkListPtr 00472 ); 00473 00474 00475 //-------------------------------------------------------------------------------------------------- 00483 //-------------------------------------------------------------------------------------------------- 00484 le_result_t pa_mrc_ConnectNetwork 00485 ( 00486 const char *mccPtr, 00487 const char *mncPtr 00488 ); 00489 00490 00491 //-------------------------------------------------------------------------------------------------- 00499 //-------------------------------------------------------------------------------------------------- 00500 le_result_t pa_mrc_SetAutomaticNetworkRegistration 00501 ( 00502 void 00503 ); 00504 00505 00506 #endif // LEGATO_PARC_INCLUDE_GUARD