le_mdc_interface.h
Go to the documentation of this file.
41 * le_mdc_GetProfile() must be called with @c LE_MDC_DEFAULT_PROFILE to retrieve the default index43 * le_mdc_GetProfile() must be called with @c LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE to retrieve the56 * identification number (ICCID). If no match is found in the database using the ICCID, the search81 * le_mdc_MapProfileOnNetworkInterface() may be used to map a data session with a network interface.95 * The current state of a data session can be queried using le_mdc_GetSessionState(). An application103 * the application takes responsibility to trigger the data session for that MT PDP request using145 * The amount of received and transmitted data can be retrieved through le_mdc_GetBytesCounters().152 * @note The data statistics collection activation and the data counters are persistent even after192 //--------------------------------------------------------------------------------------------------196 //--------------------------------------------------------------------------------------------------199 //--------------------------------------------------------------------------------------------------202 * Connect the current client thread to the service providing this API. Block until the service is205 * For each thread that wants to use this API, either ConnectService or TryConnectService must be206 * called before any other functions in this API. Normally, ConnectService is automatically called211 //--------------------------------------------------------------------------------------------------217 //--------------------------------------------------------------------------------------------------220 * Try to connect the current client thread to the service providing this API. Return with an error223 * For each thread that wants to use this API, either ConnectService or TryConnectService must be224 * called before any other functions in this API. Normally, ConnectService is automatically called233 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).236 //--------------------------------------------------------------------------------------------------242 //--------------------------------------------------------------------------------------------------246 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants249 //--------------------------------------------------------------------------------------------------256 //--------------------------------------------------------------------------------------------------262 * longer a connection to the service, and the functions in this API can't be used. For details, see267 //--------------------------------------------------------------------------------------------------274 //--------------------------------------------------------------------------------------------------278 //--------------------------------------------------------------------------------------------------281 //--------------------------------------------------------------------------------------------------285 //--------------------------------------------------------------------------------------------------288 //--------------------------------------------------------------------------------------------------292 //--------------------------------------------------------------------------------------------------295 //--------------------------------------------------------------------------------------------------299 //--------------------------------------------------------------------------------------------------302 //--------------------------------------------------------------------------------------------------306 //--------------------------------------------------------------------------------------------------309 //--------------------------------------------------------------------------------------------------313 //--------------------------------------------------------------------------------------------------316 //--------------------------------------------------------------------------------------------------320 //--------------------------------------------------------------------------------------------------323 //--------------------------------------------------------------------------------------------------327 //--------------------------------------------------------------------------------------------------330 //--------------------------------------------------------------------------------------------------334 //--------------------------------------------------------------------------------------------------337 //--------------------------------------------------------------------------------------------------341 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------348 //--------------------------------------------------------------------------------------------------351 //--------------------------------------------------------------------------------------------------355 //--------------------------------------------------------------------------------------------------358 //--------------------------------------------------------------------------------------------------362 //--------------------------------------------------------------------------------------------------365 //--------------------------------------------------------------------------------------------------369 //--------------------------------------------------------------------------------------------------372 //--------------------------------------------------------------------------------------------------376 //--------------------------------------------------------------------------------------------------380 //--------------------------------------------------------------------------------------------------384 //--------------------------------------------------------------------------------------------------459 //--------------------------------------------------------------------------------------------------463 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------482 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------496 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------616 //--------------------------------------------------------------------------------------------------620 //--------------------------------------------------------------------------------------------------624 //--------------------------------------------------------------------------------------------------628 //--------------------------------------------------------------------------------------------------632 //--------------------------------------------------------------------------------------------------636 //--------------------------------------------------------------------------------------------------638 (647 //--------------------------------------------------------------------------------------------------651 //--------------------------------------------------------------------------------------------------653 (660 //--------------------------------------------------------------------------------------------------665 //--------------------------------------------------------------------------------------------------667 (676 //--------------------------------------------------------------------------------------------------680 * This event provides information on data session connection state changes for the given profileRef.683 //--------------------------------------------------------------------------------------------------694 //--------------------------------------------------------------------------------------------------698 //--------------------------------------------------------------------------------------------------705 //--------------------------------------------------------------------------------------------------709 * This event provides information on data session connection state changes for the given profileRef.712 //--------------------------------------------------------------------------------------------------721 //--------------------------------------------------------------------------------------------------725 //--------------------------------------------------------------------------------------------------732 //--------------------------------------------------------------------------------------------------746 //--------------------------------------------------------------------------------------------------753 //--------------------------------------------------------------------------------------------------763 //--------------------------------------------------------------------------------------------------770 //--------------------------------------------------------------------------------------------------783 //--------------------------------------------------------------------------------------------------790 //--------------------------------------------------------------------------------------------------797 //--------------------------------------------------------------------------------------------------808 //--------------------------------------------------------------------------------------------------820 //--------------------------------------------------------------------------------------------------827 //--------------------------------------------------------------------------------------------------834 //--------------------------------------------------------------------------------------------------845 //--------------------------------------------------------------------------------------------------857 //--------------------------------------------------------------------------------------------------864 //--------------------------------------------------------------------------------------------------876 //--------------------------------------------------------------------------------------------------885 //--------------------------------------------------------------------------------------------------897 //--------------------------------------------------------------------------------------------------908 //--------------------------------------------------------------------------------------------------921 //--------------------------------------------------------------------------------------------------932 //--------------------------------------------------------------------------------------------------934 * Get the gateway IPv4 address for the given profile, if the data session is connected and has an945 //--------------------------------------------------------------------------------------------------956 //--------------------------------------------------------------------------------------------------971 //--------------------------------------------------------------------------------------------------986 //--------------------------------------------------------------------------------------------------999 //--------------------------------------------------------------------------------------------------1010 //--------------------------------------------------------------------------------------------------1012 * Get the gateway IPv6 address for the given profile, if the data session is connected and has an1023 //--------------------------------------------------------------------------------------------------1034 //--------------------------------------------------------------------------------------------------1049 //--------------------------------------------------------------------------------------------------1064 //--------------------------------------------------------------------------------------------------1066 * Allow the caller to know if the given profile is actually supporting IPv4, if the data session1074 //--------------------------------------------------------------------------------------------------1081 //--------------------------------------------------------------------------------------------------1083 * Allow the caller to know if the given profile is actually supporting IPv6, if the data session1091 //--------------------------------------------------------------------------------------------------1098 //--------------------------------------------------------------------------------------------------1109 //--------------------------------------------------------------------------------------------------1120 //--------------------------------------------------------------------------------------------------1131 //--------------------------------------------------------------------------------------------------1140 //--------------------------------------------------------------------------------------------------1148 //--------------------------------------------------------------------------------------------------1154 //--------------------------------------------------------------------------------------------------1162 //--------------------------------------------------------------------------------------------------1168 //--------------------------------------------------------------------------------------------------1176 //--------------------------------------------------------------------------------------------------1182 //--------------------------------------------------------------------------------------------------1194 //--------------------------------------------------------------------------------------------------1203 //--------------------------------------------------------------------------------------------------1213 //--------------------------------------------------------------------------------------------------1220 //--------------------------------------------------------------------------------------------------1240 //--------------------------------------------------------------------------------------------------1249 //--------------------------------------------------------------------------------------------------1263 //--------------------------------------------------------------------------------------------------1270 //--------------------------------------------------------------------------------------------------1283 //--------------------------------------------------------------------------------------------------1294 //--------------------------------------------------------------------------------------------------1308 * @note Both PAP and CHAP authentification can be set for 3GPP network: in this case, the device1313 //--------------------------------------------------------------------------------------------------1326 //--------------------------------------------------------------------------------------------------1339 //--------------------------------------------------------------------------------------------------1356 //--------------------------------------------------------------------------------------------------1363 //--------------------------------------------------------------------------------------------------1369 //--------------------------------------------------------------------------------------------------1378 //--------------------------------------------------------------------------------------------------1387 //--------------------------------------------------------------------------------------------------1396 //--------------------------------------------------------------------------------------------------1403 //--------------------------------------------------------------------------------------------------1415 //--------------------------------------------------------------------------------------------------1422 //--------------------------------------------------------------------------------------------------1429 //--------------------------------------------------------------------------------------------------1440 //--------------------------------------------------------------------------------------------------1450 //--------------------------------------------------------------------------------------------------le_result_t le_mdc_GetSessionState(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t *connectionStatePtr)le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler(le_mdc_ProfileRef_t profileRef, le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)le_mdc_Pdp_t le_mdc_GetPDP(le_mdc_ProfileRef_t profileRef)void le_mdc_StartSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)void(* le_mdc_MtPdpSessionStateHandlerFunc_t)(le_mdc_ConState_t ConnectionState, void *contextPtr)Definition: le_mdc_interface.h:653le_result_t le_mdc_GetDataBearerTechnology(le_mdc_ProfileRef_t profileRef, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtrPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtrPtr)le_result_t le_mdc_SetAPN(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL apnStr)struct le_mdc_SessionStateHandler * le_mdc_SessionStateHandlerRef_tDefinition: le_mdc_interface.h:621bool le_mdc_IsIPv4(le_mdc_ProfileRef_t profileRef)void(* le_mdc_SessionStateHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)Definition: le_mdc_interface.h:638le_result_t le_mdc_GetIPv4GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)le_result_t le_mdc_StopSession(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_GetAPN(le_mdc_ProfileRef_t profileRef, char *apnStr, size_t apnStrSize)void le_mdc_SetServerDisconnectHandler(le_mdc_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_mdc_GetIPv4DNSAddresses(le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)le_result_t le_mdc_GetIPv6Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:604void le_mdc_ConnectService(void)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:524void le_mdc_StopSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:594le_result_t le_mdc_GetInterfaceName(le_mdc_ProfileRef_t profileRef, char *interfaceName, size_t interfaceNameSize)le_result_t le_mdc_SetPDP(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdp)bool le_mdc_IsIPv6(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:572le_result_t le_mdc_GetBytesCounters(uint64_t *rxBytesPtr, uint64_t *txBytesPtr)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:544cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:598CDMA2000 HRPD (1xEV-DO)Definition: le_mdc_interface.h:425cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:586le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:566void(* le_mdc_DisconnectHandler_t)(void *)Definition: le_mdc_interface.h:197le_result_t le_mdc_GetAuthentication(le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t *typePtr, char *userName, size_t userNameSize, char *password, size_t passwordSize)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:542void le_mdc_GetPlatformSpecificFailureConnectionReason(le_mdc_ProfileRef_t profileRef, int32_t *failureTypePtr, int32_t *failureCodePtr)void le_mdc_RemoveSessionStateHandler(le_mdc_SessionStateHandlerRef_t handlerRef)void le_mdc_RemoveMtPdpSessionStateHandler(le_mdc_MtPdpSessionStateHandlerRef_t handlerRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:534le_result_t le_mdc_TryConnectService(void)le_mdc_ProfileRef_t le_mdc_GetProfile(uint32_t index)int32_t le_mdc_GetPlatformSpecificDisconnectionCode(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_StartSession(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_ResetBytesCounter(void)void le_mdc_DisconnectService(void)struct le_mdc_MtPdpSessionStateHandler * le_mdc_MtPdpSessionStateHandlerRef_tDefinition: le_mdc_interface.h:629le_result_t le_mdc_GetIPv4Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)le_result_t le_mdc_StartBytesCounter(void)le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler(le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mdc_GetIPv6GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)le_result_t le_mdc_SetAuthentication(le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t type, const char *LE_NONNULL userName, const char *LE_NONNULL password)le_result_t le_mdc_GetProfileFromApn(const char *LE_NONNULL apnStr, le_mdc_ProfileRef_t *profileRefPtr)uint32_t le_mdc_GetProfileIndex(le_mdc_ProfileRef_t profileRef)uint32_t le_mdc_NumProfiles(void)le_result_t le_mdc_SetDefaultAPN(le_mdc_ProfileRef_t profileRef)void(* le_mdc_SessionHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_result_t result, void *contextPtr)Definition: le_mdc_interface.h:667le_result_t le_mdc_StopBytesCounter(void)le_result_t le_mdc_RejectMtPdpSession(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:580CDMA2000 HRPD (1xEV-DO RevA)Definition: le_mdc_interface.h:427le_result_t le_mdc_MapProfileOnNetworkInterface(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL interfaceName)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:568le_result_t le_mdc_GetIPv6DNSAddresses(le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:538cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:536