Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
Go to the source code of this file.
le_msg_ServiceRef_t taf_sim_GetServiceRef | ( | void | ) |
Get the server service reference
le_msg_SessionRef_t taf_sim_GetClientSessionRef | ( | void | ) |
Get the client session reference for the current message
void taf_sim_AdvertiseService | ( | void | ) |
Initialize the server and advertise the service.
taf_sim_NewStateHandlerRef_t taf_sim_AddNewStateHandler | ( | taf_sim_NewStateHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Defines SIM card states. Defines slot ID of the SIM card. Defines all types of card locks using in PIN management APIs. Defines all types of UICC applications, such as SIM, RUIM, USIM, CSIM and ISIM. Card manufacturer. SIM commands. Refer to TS 11.11 9.1. Handler for SIM card state changes. Reference type used by Add/Remove functions for EVENT 'taf_sim_NewState' Handler for PIN PUK changes. Reference type used by Add/Remove functions for EVENT 'taf_sim_AuthenticationResponse' Handler for ICCID change events. Reference type used by Add/Remove functions for EVENT 'taf_sim_IccidChange' Add handler function for EVENT 'taf_sim_NewState'
SIM card state change event.
Add handler function for EVENT 'taf_sim_NewState'
SIM card state change event.
[in] | handlerPtr | State change handler. |
[in] | contextPtr |
void taf_sim_RemoveNewStateHandler | ( | taf_sim_NewStateHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_sim_NewState'
[in] | handlerRef |
taf_sim_AuthenticationResponseHandlerRef_t taf_sim_AddAuthenticationResponseHandler | ( | taf_sim_AuthenticationResponseHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_sim_AuthenticationResponse'
Authentication response.
[in] | handlerPtr | Authentication response handler. |
[in] | contextPtr |
void taf_sim_RemoveAuthenticationResponseHandler | ( | taf_sim_AuthenticationResponseHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_sim_AuthenticationResponse'
[in] | handlerRef |
bool taf_sim_IsPresent | ( | taf_sim_Id_t | slotId | ) |
Checks whether SIM card is present or absent.
[in] | slotId | Slot ID. |
taf_sim_States_t taf_sim_GetState | ( | taf_sim_Id_t | slotId | ) |
Gets the state of the SIM card for the given slotId.
[in] | slotId | Slot ID. |
bool taf_sim_IsReady | ( | taf_sim_Id_t | slotId | ) |
Checks whether the SIM card is ready or not
[in] | slotId | Slot ID. |
le_result_t taf_sim_GetICCID | ( | taf_sim_Id_t | slotId, |
char * | iccid, | ||
size_t | iccidSize | ||
) |
Retrieves the SIM's ICCID.
[in] | slotId | Slot ID. |
[out] | iccid | ICC ID as output. |
[in] | iccidSize |
le_result_t taf_sim_GetIMSI | ( | taf_sim_Id_t | slotId, |
char * | imsi, | ||
size_t | imsiSize | ||
) |
Retrieves the IMSI for the SIM.
[in] | slotId | Slot ID. |
[out] | imsi | IMSI as output. |
[in] | imsiSize |
le_result_t taf_sim_GetHomeNetworkOperator | ( | taf_sim_Id_t | slotId, |
char * | nameStr, | ||
size_t | nameStrSize | ||
) |
Retrieves the name of the carrier on which this subscription is made.
[in] | slotId | Slot ID. |
[out] | nameStr | Network name as output. |
[in] | nameStrSize |
le_result_t taf_sim_GetSubscriberPhoneNumber | ( | taf_sim_Id_t | slotId, |
char * | phoneNumberStr, | ||
size_t | phoneNumberStrSize | ||
) |
Retrieves the phone number for the SIM subscription.
[in] | slotId | Slot ID. |
[out] | phoneNumberStr | Phone number as output. |
[in] | phoneNumberStrSize |
le_result_t taf_sim_GetHomeNetworkMccMnc | ( | taf_sim_Id_t | slotId, |
char * | mccPtr, | ||
size_t | mccPtrSize, | ||
char * | mncPtr, | ||
size_t | mncPtrSize | ||
) |
Retrieves the MNC and MCC of the carrier to which the phone is connected.
[in] | slotId | Slot ID. |
[out] | mccPtr | MCC string as output. |
[in] | mccPtrSize | |
[out] | mncPtr | MNC string as output. |
[in] | mncPtrSize |
taf_sim_Id_t taf_sim_GetSelectedCard | ( | void | ) |
Gets the slotId of currently selected SIM card.
le_result_t taf_sim_SelectCard | ( | taf_sim_Id_t | slotId | ) |
Selects a SIM.
[in] | slotId | Slot ID. |
le_result_t taf_sim_EnterPIN | ( | taf_sim_Id_t | slotId, |
taf_sim_LockType_t | lockType, | ||
const char *LE_NONNULL | pin | ||
) |
Unlocks the Sim card for an app by entering PIN.
[in] | slotId | Slot ID of SIM. |
[in] | lockType | Applicable lock types are PIN1 and PIN2. |
[in] | pin | PIN1/PIN2. |
le_result_t taf_sim_ChangePIN | ( | taf_sim_Id_t | slotId, |
taf_sim_LockType_t | lockType, | ||
const char *LE_NONNULL | oldpin, | ||
const char *LE_NONNULL | newpin | ||
) |
Changes the password used in PIN1/PIN2 lock.
[in] | slotId | Slot ID of SIM. |
[in] | lockType | Applicable lock types are PIN1 and PIN2. |
[in] | oldpin | Old PIN1/PIN2. |
[in] | newpin | New PIN1/PIN2. |
int32_t taf_sim_GetRemainingPINTries | ( | taf_sim_Id_t | slotId | ) |
Gets the available retry count of PIN tries.
[in] | slotId | Slot ID. |
le_result_t taf_sim_GetRemainingPUKTries | ( | taf_sim_Id_t | slotId, |
uint32_t * | remainingPukTriesPtrPtr | ||
) |
Gets the remaining PUK try count.
[in] | slotId | Slot ID. |
[out] | remainingPukTriesPtrPtr | Number of PUK retries remaining. |
le_result_t taf_sim_Unlock | ( | taf_sim_Id_t | slotId, |
taf_sim_LockType_t | lockType, | ||
const char *LE_NONNULL | pin | ||
) |
Disables PIN1 or FDN lock.
[in] | slotId | Slot ID of SIM. |
[in] | lockType | Applicable lock types are PIN1 and FDN. |
[in] | pin | PIN1/PIN2. |
le_result_t taf_sim_Lock | ( | taf_sim_Id_t | slotId, |
taf_sim_LockType_t | lockType, | ||
const char *LE_NONNULL | pin | ||
) |
Enables PIN1 or FDN lock.
[in] | slotId | Slot ID of SIM. |
[in] | lockType | Applicable lock types are PIN1 and FDN. |
[in] | pin | PIN1/PIN2. |
le_result_t taf_sim_Unblock | ( | taf_sim_Id_t | slotId, |
taf_sim_LockType_t | lockType, | ||
const char *LE_NONNULL | puk, | ||
const char *LE_NONNULL | newpin | ||
) |
Unlocks the SIM card for an app by entering PUK and new PIN.
[in] | slotId | Slot ID of SIM. |
[in] | lockType | Applicable lock types are PUK1 and PUK2. |
[in] | puk | PUK1/PUK2. |
[in] | newpin | New PIN1/PIN2. |
le_result_t taf_sim_GetEID | ( | taf_sim_Id_t | slotId, |
char * | eid, | ||
size_t | eidSize | ||
) |
Requests eUICC identifier(EID) for the slot.
[in] | slotId | Slot ID. |
[out] | eid | eID |
[in] | eidSize |
le_result_t taf_sim_SetAutomaticSelection | ( | bool | enable | ) |
Enables or disables the automatic SIM selection.
[in] | enable | Enable flag |
le_result_t taf_sim_GetAutomaticSelection | ( | bool * | enablePtr | ) |
Gets the automatic SIM selection.
[out] | enablePtr | Enable flag as output. |
le_result_t taf_sim_OpenLogicalChannel | ( | taf_sim_Id_t | slotId, |
taf_sim_AppType_t | apptype, | ||
uint8_t * | channelPtrPtr | ||
) |
Opens a logical channel to the SIM.
[in] | slotId | Slot ID. |
[in] | apptype | App type. |
[out] | channelPtrPtr | Channel as output. |
le_result_t taf_sim_CloseLogicalChannel | ( | taf_sim_Id_t | slotId, |
uint8_t | channel | ||
) |
Closes a previously opened logical channel to the SIM.
[in] | slotId | Slot ID. |
[in] | channel | The channel ID to be closed. |
le_result_t taf_sim_SendApduOnChannel | ( | taf_sim_Id_t | simId, |
uint8_t | channel, | ||
const uint8_t * | commandApduPtr, | ||
size_t | commandApduSize, | ||
uint8_t * | responseApduPtr, | ||
size_t * | responseApduSizePtr | ||
) |
Transmits an APDU to the ICC card over a logical channel.
[in] | simId | Slot ID. |
[in] | channel | Channel. |
[in] | commandApduPtr | APDU. |
[in] | commandApduSize | |
[out] | responseApduPtr | Response of APDU as output. |
[in,out] | responseApduSizePtr |
le_result_t taf_sim_SendApdu | ( | taf_sim_Id_t | simId, |
const uint8_t * | commandApduPtr, | ||
size_t | commandApduSize, | ||
uint8_t * | responseApduPtr, | ||
size_t * | responseApduSizePtr | ||
) |
Exchanges APDUs with the SIM on a basic channel.
[in] | simId | Slot ID. |
[in] | commandApduPtr | APDU command. |
[in] | commandApduSize | |
[out] | responseApduPtr | Response of APDU as output. |
[in,out] | responseApduSizePtr |
le_result_t taf_sim_SendCommand | ( | taf_sim_Id_t | simId, |
taf_sim_Command_t | command, | ||
const char *LE_NONNULL | fileIdentifier, | ||
uint8_t | p1, | ||
uint8_t | p2, | ||
uint8_t | p3, | ||
const uint8_t * | dataPtr, | ||
size_t | dataSize, | ||
const char *LE_NONNULL | path, | ||
uint8_t * | sw1Ptr, | ||
uint8_t * | sw2Ptr, | ||
uint8_t * | responsePtr, | ||
size_t * | responseSizePtr | ||
) |
Sends a command to the SIM.
[in] | simId | The SIM identifier. |
[in] | command | The SIM command. |
[in] | fileIdentifier | The file identifier. |
[in] | p1 | Parameter P1 passed to the SIM. |
[in] | p2 | Parameter P2 passed to the SIM. |
[in] | p3 | Parameter P3 passed to the SIM. |
[in] | dataPtr | The command data. |
[in] | dataSize | |
[in] | path | The path to the elementary file. |
[out] | sw1Ptr | Status word 1 received from the SIM. |
[out] | sw2Ptr | Status word 2 received from the SIM. |
[out] | responsePtr | SIM response. |
[in,out] | responseSizePtr |
le_result_t taf_sim_LocalSwapToEmergencyCallSubscription | ( | taf_sim_Id_t | simId, |
taf_sim_Manufacturer_t | manufacturer | ||
) |
Switches the given SIM to the emergency call subscription. The eUICC reboots after switching the profile and the client app must wait for it.
[in] | simId | The SIM identifier. |
[in] | manufacturer | The card manufacturer. |
le_result_t taf_sim_LocalSwapToCommercialSubscription | ( | taf_sim_Id_t | simId, |
taf_sim_Manufacturer_t | manufacturer | ||
) |
Switches the given SIM to the commercial subscription. The eUICC reboots after switching the profile and the client app must wait for it.
[in] | simId | The SIM identifier. |
[in] | manufacturer | The card manufacturer. |
le_result_t taf_sim_SetPower | ( | taf_sim_Id_t | simId, |
le_onoff_t | power | ||
) |
Powers up or down the current SIM.
[in] | simId | The SIM identifier. |
[in] | power | The power state. |
le_result_t taf_sim_Reset | ( | taf_sim_Id_t | simId | ) |
Reset the SIM.
[in] | simId | The SIM identifier. |
le_result_t taf_sim_IsEmergencyCallSubscriptionSelected | ( | taf_sim_Id_t | simId, |
bool * | isEcsPtr | ||
) |
Checks if the emergency profile is activated for the SIM slot.
[in] | simId | The SIM identifier. |
[out] | isEcsPtr | - True – Emergency call subscription (ECS) is selected. |
taf_sim_IccidChangeHandlerRef_t taf_sim_AddIccidChangeHandler | ( | taf_sim_IccidChangeHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_sim_IccidChange'
ICCID information.
[in] | handlerPtr | |
[in] | contextPtr |
void taf_sim_RemoveIccidChangeHandler | ( | taf_sim_IccidChangeHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_sim_IccidChange'
[in] | handlerRef |
taf_sim_FPLMNListRef_t taf_sim_CreateFPLMNList | ( | void | ) |
Creates an empty FPLMN list to insert the FPLMN operators.
le_result_t taf_sim_AddFPLMNOperator | ( | taf_sim_FPLMNListRef_t | fplmnListRef, |
const char *LE_NONNULL | mcc, | ||
const char *LE_NONNULL | mnc | ||
) |
Adds the FPLMN network into the newly created FPLMN list. If fplmnListRef, mcc, or mnc is not valid then this function will kill the calling client.
[in] | fplmnListRef | FPLMN list reference. |
[in] | mcc | Mobile Country Code. |
[in] | mnc | Mobile Network Code. |
le_result_t taf_sim_GetFirstFPLMNOperator | ( | taf_sim_FPLMNListRef_t | fplmnListRef, |
char * | mccPtr, | ||
size_t | mccPtrSize, | ||
char * | mncPtr, | ||
size_t | mncPtrSize | ||
) |
Reads the first FPLMN network from the list of FPLMN objects retrieved with taf_sim_ReadFPLMNList(). If fplmnListRef, mccPtr, or mncPtr is not valid then this function will kill the calling client.
[in] | fplmnListRef | FPLMN list reference. |
[out] | mccPtr | Mobile Country Code. |
[in] | mccPtrSize | |
[out] | mncPtr | Mobile Network Code. |
[in] | mncPtrSize |
le_result_t taf_sim_GetNextFPLMNOperator | ( | taf_sim_FPLMNListRef_t | fplmnListRef, |
char * | mccPtr, | ||
size_t | mccPtrSize, | ||
char * | mncPtr, | ||
size_t | mncPtrSize | ||
) |
Reads the next FPLMN network from the list of FPLMN objects retrieved with le_sim_ReadFPLMNList(). If fplmnListRef, mccPtr, or mncPtr is not valid then this function will kill the calling client.
[in] | fplmnListRef | FPLMN list reference. |
[out] | mccPtr | Mobile Country Code. |
[in] | mccPtrSize | |
[out] | mncPtr | Mobile Network Code. |
[in] | mncPtrSize |
taf_sim_FPLMNListRef_t taf_sim_ReadFPLMNList | ( | taf_sim_Id_t | simId | ) |
Reads the FPLMN list from the SIM.
[in] | simId | SIM identifier. |
void taf_sim_DeleteFPLMNList | ( | taf_sim_FPLMNListRef_t | fplmnListRef | ) |
Deletes the FPLMN list created by le_sim_ReadFPLMNList() or le_sim_CreateFPLMNList(). If fplmnListRef is not valid then this function will kill the calling client.
[in] | fplmnListRef | FPLMN list reference. |
le_result_t taf_sim_WriteFPLMNList | ( | taf_sim_Id_t | simId, |
taf_sim_FPLMNListRef_t | fplmnListRef | ||
) |
Writes the FPLMN list into the SIM. If fplmnListRef is not valid then this function will kill the calling client.
[in] | simId | SIM identifier. |
[in] | fplmnListRef | FPLMN list reference. |
le_result_t taf_sim_GetSlotCount | ( | int32_t * | countPtr | ) |
Retrieves the total number of SIM slots in the device.
[out] | countPtr | Slot count. |