Telematics SDK - Interface Specification
v1.38.37
|
Data Structures | |
class | telux::tel::ICardApp |
Represents a single card application. More... | |
struct | telux::tel::IccResult |
class | telux::tel::ICardManager |
class | telux::tel::ICard |
ICard represents currently inserted UICC or eUICC. More... | |
class | telux::tel::ICardChannelCallback |
class | telux::tel::ICardCommandCallback |
class | telux::tel::ICardListener |
struct | telux::tel::CardReaderStatus |
class | telux::tel::ISapCardManager |
ISapCardManager provide APIs for SAP related operations. More... | |
class | telux::tel::IAtrResponseCallback |
class | telux::tel::ISapCardCommandCallback |
class | telux::tel::ICardReaderCallback |
class | telux::tel::ISapCardListener |
This section contains APIs related to Card Services.
class telux::tel::ICardApp |
Represents a single card application.
Public Member Functions | |
virtual AppType | getAppType ()=0 |
virtual AppState | getAppState ()=0 |
virtual std::string | getAppId ()=0 |
virtual telux::common::Status | changeCardPassword (CardLockType lockType, std::string oldPwd, std::string newPwd, PinOperationResponseCb callback)=0 |
virtual telux::common::Status | unlockCardByPuk (CardLockType lockType, std::string puk, std::string newPin, PinOperationResponseCb callback)=0 |
virtual telux::common::Status | unlockCardByPin (CardLockType lockType, std::string pin, PinOperationResponseCb callback)=0 |
virtual telux::common::Status | queryPin1LockState (QueryPin1LockResponseCb callback)=0 |
virtual telux::common::Status | queryFdnLockState (QueryFdnLockResponseCb callback)=0 |
virtual telux::common::Status | setCardLock (CardLockType lockType, std::string password, bool isEnabled, PinOperationResponseCb callback)=0 |
virtual | ~ICardApp () |
|
virtual |
|
pure virtual |
Get Application type like SIM, USIM, RUIM, CSIM or ISIM.
|
pure virtual |
Get Application state like PIN1, PUK required and others.
|
pure virtual |
Get application identifier.
|
pure virtual |
Change the password used in PIN1/PIN2 lock.
[in] | lockType | CardLockType. Applicable lock types are PIN1 and PIN2. |
[in] | oldPwd | Old password |
[in] | newPwd | New password |
[in] | callback | Callback function to get the response of change pin password. |
|
pure virtual |
Unlock the Sim card for an app by entering PUK and new pin.
[in] | lockType | CardLockType. Applicable lock types are PUK1 and PUK2 |
[in] | puk | PUK1/PUK2 |
[in] | pin | New PIN1/PIN2 |
[in] | callback | Callback function to get the response of unlock card lock. |
|
pure virtual |
Unlock the Sim card for an app by entering PIN.
[in] | lockType | CardLockType. Applicable lock types are PIN1 and PIN2. |
[in] | pin | New PIN1/PIN2 |
[in] | callback | Callback function to get the response of unlock card lock. |
|
pure virtual |
Query Pin1 lock state.
[in] | callback | Callback function to get the response of query pin1 lock state. |
|
pure virtual |
Query FDN lock state.
[in] | callback | Callback function to get the response of query fdn lock state. |
|
pure virtual |
Enable or disable FDN or Pin1 lock.
[in] | lockType | CardLockType. Applicable lock type such as PIN1 and FDN |
[in] | password | Password of PIN1 and FDN |
[in] | isEnabled | If true then enable else disable. |
[in] | callback | Callback function to get the response of set card lock. |
struct telux::tel::IccResult |
The APDU response with status for transmit APDU operation.
Public Member Functions | |
const std::string | toString () const |
Data Fields | |
int | sw1 |
int | sw2 |
std::string | payload |
std::vector< int > | data |
const std::string telux::tel::IccResult::toString | ( | ) | const |
int telux::tel::IccResult::sw1 |
Status word 1 for command processing status
int telux::tel::IccResult::sw2 |
Status word 2 for command processing qualifier
std::string telux::tel::IccResult::payload |
response as a hex string
std::vector<int> telux::tel::IccResult::data |
vector of raw data received as part of response to the card services request
class telux::tel::ICardManager |
ICardManager provide APIs for slot count, retrieve slot ids, get card state and get card.
Public Member Functions | |
virtual bool | isSubsystemReady ()=0 |
virtual std::future< bool > | onSubsystemReady ()=0 |
virtual telux::common::Status | getSlotCount (int &count)=0 |
virtual telux::common::Status | getSlotIds (std::vector< int > &slotIds)=0 |
virtual std::shared_ptr< ICard > | getCard (int slotId=DEFAULT_SLOT_ID, telux::common::Status *status=nullptr)=0 |
virtual telux::common::Status | registerListener (std::shared_ptr< ICardListener > listener)=0 |
virtual telux::common::Status | removeListener (std::shared_ptr< ICardListener > listener)=0 |
virtual | ~ICardManager () |
|
virtual |
|
pure virtual |
Checks the status of telephony subsystems and returns the result.
|
pure virtual |
Wait for telephony subsystem to be ready.
|
pure virtual |
Get SIM slot count.
[out] | count | SIM slot count. |
|
pure virtual |
Get list of SIM slots.
[out] | slotIds | List of SIM slot ids. |
|
pure virtual |
Get the Card corresponding to SIM slot.
[in] | slotId | Slot id corresponding to the card. |
[out] | status | Status of getCard i.e. success or suitable status code. |
|
pure virtual |
Register a listener for card events.
[in] | listener | Pointer to ICardListener object that processes the notification. |
|
pure virtual |
Remove a previously added listener.
[in] | listener | Pointer to ICardListener object that needs to be removed. |
class telux::tel::ICard |
ICard represents currently inserted UICC or eUICC.
Public Member Functions | |
virtual telux::common::Status | getState (CardState &cardState)=0 |
virtual std::vector< std::shared_ptr< ICardApp > > | getApplications (telux::common::Status *status=nullptr)=0 |
virtual telux::common::Status | openLogicalChannel (std::string applicationId, std::shared_ptr< ICardChannelCallback > callback=nullptr)=0 |
virtual telux::common::Status | closeLogicalChannel (int channelId, std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0 |
virtual telux::common::Status | transmitApduLogicalChannel (int channel, uint8_t cla, uint8_t instruction, uint8_t p1, uint8_t p2, uint8_t p3, std::vector< uint8_t > data, std::shared_ptr< ICardCommandCallback > callback=nullptr)=0 |
virtual telux::common::Status | transmitApduBasicChannel (uint8_t cla, uint8_t instruction, uint8_t p1, uint8_t p2, uint8_t p3, std::vector< uint8_t > data, std::shared_ptr< ICardCommandCallback > callback=nullptr)=0 |
virtual telux::common::Status | exchangeSimIO (uint16_t fileId, uint8_t command, uint8_t p1, uint8_t p2, uint8_t p3, std::string filePath, std::vector< uint8_t > data, std::string pin2, std::string aid, std::shared_ptr< ICardCommandCallback > callback=nullptr)=0 |
virtual int | getSlotId ()=0 |
virtual telux::common::Status | requestEid (EidResponseCallback=nullptr)=0 |
|
pure virtual |
Get the card state for the slot id.
[out] | cardState | CardState - state of the card. |
|
pure virtual |
Get card applications.
[out] | status | Status of getApplications i.e. success or suitable status code. |
|
pure virtual |
Open a logical channel to the SIM.
[in] | applicationId | Application Id. |
[in] | callback | Optional callback pointer to get the response of open logical channel request. |
|
pure virtual |
Close a previously opened logical channel to the SIM.
[in] | channelId | The channel ID to be closed. |
[in] | callback | Optional callback pointer to get the response of close logical channel request. |
|
pure virtual |
Transmit an APDU to the ICC card over a logical channel.
[in] | channel | Channel Id of the channel to use for communication. Has to be greater than zero. |
[in] | cla | Class of the APDU command. |
[in] | instruction | Instruction of the APDU command. |
[in] | p1 | Instruction Parameter 1 value of the APDU command. |
[in] | p2 | Instruction Parameter 2 value of the APDU command. |
[in] | p3 | Number of bytes present in the data field of the APDU command. If p3 is negative, a 4 byte APDU is sent to the SIM. |
[in] | data | Data to be sent with the APDU. |
[in] | callback | Optional callback pointer to get the response of transmit APDU request. |
|
pure virtual |
Exchange APDUs with the SIM on a basic channel.
[in] | cla | Class of the APDU command. |
[in] | instruction | Instruction of the APDU command. |
[in] | p1 | Instruction Param1 value of the APDU command. |
[in] | p2 | Instruction Param1 value of the APDU command. |
[in] | p3 | Number of bytes present in the data field of the APDU command. If p3 is negative, a 4 byte APDU is sent to the SIM. |
[in] | data | Data to be sent with the APDU. |
[in] | callback | Optional callback pointer to get the response of transmit APDU request. |
|
pure virtual |
Performs SIM IO operation, This is similar to the TS 27.007 "restricted SIM" operation where it assumes all of the EF selection will be done by the callee
[in] | fileId | Elementary File Identifier |
[in] | command | APDU Command for SIM IO operation |
[in] | p1 | Instruction Param1 value of the APDU command |
[in] | p2 | Instruction Param2 value of the APDU command |
[in] | p3 | Number of bytes present in the data field of APDU command. If p3 is negative, a 4 byte APDU is sent to the SIM. |
[in] | filePath | Path of the file |
[in] | data | Data to be sent with the APDU, send empty or null string in case no data |
[in] | pin2 | Pin value of the SIM. Invalid attempt of PIN2 value will lock the SIM. send empty or null string in case of no Pin2 value |
[in] | aid | Application identifier, send empty or null string in case of no aid |
[in] | callback | Optional callback pointer to get the response of SIM IO request |
|
pure virtual |
Get associated slot id for ICard
|
pure virtual |
Request eUICC identifier of eUICC card.
[in] | callback | Callback function to get the result of request eid. |
class telux::tel::ICardChannelCallback |
Interface for Card callback object. Client needs to implement this interface to get single shot responses for commands like open logical channel and close logical channel.
The methods in callback can be invoked from multiple different threads. The implementation should be thread safe.
Public Member Functions | |
virtual void | onChannelResponse (int channel, IccResult result, telux::common::ErrorCode error)=0 |
![]() | |
virtual | ~ICommandCallback () |
|
pure virtual |
This function is called with the response to the open logical channel operation.
[in] | channel | Channel Id for the logical channel. |
[in] | result | IccResult of open logical channel. |
[in] | error | ErrorCode of the request. |
class telux::tel::ICardCommandCallback |
Public Member Functions | |
virtual void | onResponse (IccResult result, telux::common::ErrorCode error)=0 |
![]() | |
virtual | ~ICommandCallback () |
|
pure virtual |
class telux::tel::ICardListener |
Interface for SIM Card Listener object. Client needs to implement this interface to get access to card services notifications on card state change.
The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.
Public Member Functions | |
virtual void | onCardInfoChanged (int slotId) |
virtual | ~ICardListener () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
|
virtual |
This function is called when info of card gets updated.
[in] | slotId | Slot identifier. |
struct telux::tel::CardReaderStatus |
Structure contains identity of card reader status
class telux::tel::ISapCardManager |
ISapCardManager provide APIs for SAP related operations.
|
virtual |
|
pure virtual |
Checks the status of SIM access profile(SAP) subsystem and returns the result.
|
pure virtual |
Wait for IM access profile(SAP) subsystem to be ready.
|
pure virtual |
Get SIM access profile (SAP) client connection state.
[out] | sapState | SapState of the SIM Card |
|
pure virtual |
Get SIM access profile(SAP) client connection state.
[out] | callback | Callback function pointer to get the response of requestSapState. |
|
pure virtual |
Establishes SIM access profile (SAP) client connection with SIM Card.
[in] | sapCondition | Condition to enable sap connection. |
[in] | callback | Optional callback to get the response of open sap connection request or possible error codes i.e.
|
|
pure virtual |
Releases a SAP connection to SIM Card.
[in] | callback | Optional callback to get the response of close sap connection request or possible error codes i.e.
|
|
pure virtual |
Request for SAP Answer To Reset command.
[in] | callback | Optional callback to get the response of requestAtr. |
|
pure virtual |
Send the Apdu on SAP mode.
[in] | cla | Class of the APDU command. |
[in] | instruction | Instruction of the APDU command. |
[in] | p1 | Instruction Parameter 1 value of the APDU command. |
[in] | p2 | Instruction Parameter 1 value of the APDU command. |
[in] | lc | Number of bytes present in the data field of the APDU command. If lc is negative, a 4 byte APDU is sent to the SIM. |
[in] | data | List of data to be sent with the APDU. |
[in] | le | Maximum number of bytes expected in the data field of the response to the command. |
[in] | callback | Optional callback to send APDU in SAP mode. |
|
pure virtual |
Send the SAP SIM power off request.
[in] | callback | Optional callback to get the response for SIM power off. |
|
pure virtual |
Send the SAP SIM power on request.
[in] | callback | Optional callback to get the response for SIM power on. |
|
pure virtual |
Send the SAP SIM reset request.
[in] | callback | Optional callback to get the response for SIM reset |
|
pure virtual |
Send the SAP Card Reader Status request command.
[in] | callback | Optional callback to get the response for card reader status |
|
pure virtual |
Get associated slot id for the SapCardManager.
|
pure virtual |
Register a listener for SAP events.
[in] | listener | Pointer to ISapCardListener object that processes the notification. |
|
pure virtual |
Remove a previously added listener.
[in] | listener | Pointer to ISapCardListener object that needs to be removed. |
class telux::tel::IAtrResponseCallback |
Public Member Functions | |
virtual void | atrResponse (std::vector< int > responseAtr, telux::common::ErrorCode error)=0 |
![]() | |
virtual | ~ICommandCallback () |
|
pure virtual |
This function is called in response to requestAtr() request.
[in] | responseAtr | response ATR values |
[in] | error | ErrorCode of the request possible error codes are
|
class telux::tel::ISapCardCommandCallback |
Public Member Functions | |
virtual void | onResponse (IccResult result, telux::common::ErrorCode error)=0 |
![]() | |
virtual | ~ICommandCallback () |
|
pure virtual |
class telux::tel::ICardReaderCallback |
Public Member Functions | |
virtual void | cardReaderResponse (CardReaderStatus cardReaderStatus, telux::common::ErrorCode error)=0 |
![]() | |
virtual | ~ICommandCallback () |
|
pure virtual |
This function is called in response to requestCardReaderStatus() method.
[in] | cardReaderStatus | Structure contains the identity of the card reader |
[in] | error | ErrorCode of the request |
class telux::tel::ISapCardListener |
Interface for SAP Listener object. Client needs to implement this interface to get access to SAP service notifications like service status change.
The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.
Public Member Functions | |
virtual | ~ISapCardListener () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
|
strong |
Defines all state of Card like absent, present etc
|
strong |
Defines the reasons for error in CardState
|
strong |
enum telux::tel::AppType |
Defines all type of UICC application such as SIM, RUIM, USIM, CSIM and ISIM.
enum telux::tel::AppState |
Defines all application states.
|
strong |
Defines all SIM access profile (SAP) connection states.
|
strong |
Indicates type of connection required, default behavior is to block a SAP connection when a voice or data call is active.