Telematics SDK - Interface Specification  v1.26.3
SIM Card Services

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
 

Enumerations

enum  telux::tel::CardState {
  telux::tel::CardState::CARDSTATE_UNKNOWN = -1, telux::tel::CardState::CARDSTATE_ABSENT = 0, telux::tel::CardState::CARDSTATE_PRESENT = 1, telux::tel::CardState::CARDSTATE_ERROR = 2,
  telux::tel::CardState::CARDSTATE_RESTRICTED = 3
}
 
enum  telux::tel::CardLockType {
  telux::tel::CardLockType::PIN1 = 0, telux::tel::CardLockType::PIN2 = 1, telux::tel::CardLockType::PUK1 = 2, telux::tel::CardLockType::PUK2 = 3,
  telux::tel::CardLockType::FDN = 4
}
 
enum  telux::tel::AppType {
  telux::tel::APPTYPE_UNKNOWN = 0, telux::tel::APPTYPE_SIM = 1, telux::tel::APPTYPE_USIM = 2, telux::tel::APPTYPE_RUIM = 3,
  telux::tel::APPTYPE_CSIM = 4, telux::tel::APPTYPE_ISIM = 5
}
 
enum  telux::tel::AppState {
  telux::tel::APPSTATE_UNKNOWN = 0, telux::tel::APPSTATE_DETECTED = 1, telux::tel::APPSTATE_PIN = 2, telux::tel::APPSTATE_PUK = 3,
  telux::tel::APPSTATE_SUBSCRIPTION_PERSO = 4, telux::tel::APPSTATE_READY = 5
}
 
enum  telux::tel::SapState {
  telux::tel::SapState::SAP_STATE_NOT_ENABLED = 0x00, telux::tel::SapState::SAP_STATE_CONNECTING = 0x01, telux::tel::SapState::SAP_STATE_CONNECTED_SUCCESSFULLY = 0x02, telux::tel::SapState::SAP_STATE_CONNECTION_ERROR = 0x03,
  telux::tel::SapState::SAP_STATE_DISCONNECTING = 0x04, telux::tel::SapState::SAP_STATE_DISCONNECTED_SUCCESSFULLY = 0x05
}
 
enum  telux::tel::SapCondition { telux::tel::SapCondition::SAP_CONDITION_BLOCK_VOICE_OR_DATA = 0x00, telux::tel::SapCondition::SAP_CONDITION_BLOCK_DATA = 0x01, telux::tel::SapCondition::SAP_CONDITION_BLOCK_VOICE = 0x02, telux::tel::SapCondition::SAP_CONDITION_BLOCK_NONE = 0x03 }
 

Detailed Description

This section contains APIs related to Card Services.


Data Structure Documentation

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 ()
 

Constructor & Destructor Documentation

virtual telux::tel::ICardApp::~ICardApp ( )
virtual

Member Function Documentation

virtual AppType telux::tel::ICardApp::getAppType ( )
pure virtual

Get Application type like SIM, USIM, RUIM, CSIM or ISIM.

Returns
AppType.
virtual AppState telux::tel::ICardApp::getAppState ( )
pure virtual

Get Application state like PIN1, PUK required and others.

Returns
AppState.
virtual std::string telux::tel::ICardApp::getAppId ( )
pure virtual

Get application identifier.

Returns
Application Id.
virtual telux::common::Status telux::tel::ICardApp::changeCardPassword ( CardLockType  lockType,
std::string  oldPwd,
std::string  newPwd,
PinOperationResponseCb  callback 
)
pure virtual

Change the password used in PIN1/PIN2 lock.

Parameters
[in]lockTypeCardLockType. Applicable lock types are PIN1 and PIN2.
[in]oldPwdOld password
[in]newPwdNew password
[in]callbackCallback function to get the response of change pin password.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICardApp::unlockCardByPuk ( CardLockType  lockType,
std::string  puk,
std::string  newPin,
PinOperationResponseCb  callback 
)
pure virtual

Unlock the Sim card for an app by entering PUK and new pin.

Parameters
[in]lockTypeCardLockType. Applicable lock types are PUK1 and PUK2
[in]pukPUK1/PUK2
[in]pinNew PIN1/PIN2
[in]callbackCallback function to get the response of unlock card lock.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICardApp::unlockCardByPin ( CardLockType  lockType,
std::string  pin,
PinOperationResponseCb  callback 
)
pure virtual

Unlock the Sim card for an app by entering PIN.

Parameters
[in]lockTypeCardLockType. Applicable lock types are PIN1 and PIN2.
[in]pinNew PIN1/PIN2
[in]callbackCallback function to get the response of unlock card lock.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICardApp::queryPin1LockState ( QueryPin1LockResponseCb  callback)
pure virtual

Query Pin1 lock state.

Parameters
[in]callbackCallback function to get the response of query pin1 lock state.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICardApp::queryFdnLockState ( QueryFdnLockResponseCb  callback)
pure virtual

Query FDN lock state.

Parameters
[in]callbackCallback function to get the response of query fdn lock state.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICardApp::setCardLock ( CardLockType  lockType,
std::string  password,
bool  isEnabled,
PinOperationResponseCb  callback 
)
pure virtual

Enable or disable FDN or Pin1 lock.

Parameters
[in]lockTypeCardLockType. Applicable lock type such as PIN1 and FDN
[in]passwordPassword of PIN1 and FDN
[in]isEnabledIf true then enable else disable.
[in]callbackCallback function to get the response of set card lock.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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
 

Member Function Documentation

const std::string telux::tel::IccResult::toString ( ) const

Field Documentation

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< ICardgetCard (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 ()
 

Constructor & Destructor Documentation

virtual telux::tel::ICardManager::~ICardManager ( )
virtual

Member Function Documentation

virtual bool telux::tel::ICardManager::isSubsystemReady ( )
pure virtual

Checks the status of telephony subsystems and returns the result.

Returns
If true then CardManager is ready for service.
virtual std::future<bool> telux::tel::ICardManager::onSubsystemReady ( )
pure virtual

Wait for telephony subsystem to be ready.

Returns
A future that caller can wait on to be notified when card manager is ready.
virtual telux::common::Status telux::tel::ICardManager::getSlotCount ( int &  count)
pure virtual

Get SIM slot count.

Parameters
[out]countSIM slot count.
Returns
Status of getSlotCount i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICardManager::getSlotIds ( std::vector< int > &  slotIds)
pure virtual

Get list of SIM slots.

Parameters
[out]slotIdsList of SIM slot ids.
Returns
Status of getSlotIds i.e. success or suitable status code.
virtual std::shared_ptr<ICard> telux::tel::ICardManager::getCard ( int  slotId = DEFAULT_SLOT_ID,
telux::common::Status status = nullptr 
)
pure virtual

Get the Card corresponding to SIM slot.

Parameters
[in]slotIdSlot id corresponding to the card.
[out]statusStatus of getCard i.e. success or suitable status code.
Returns
Pointer to ICard object.
virtual telux::common::Status telux::tel::ICardManager::registerListener ( std::shared_ptr< ICardListener listener)
pure virtual

Register a listener for card events.

Parameters
[in]listenerPointer to ICardListener object that processes the notification.
Returns
Status of registerListener i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICardManager::removeListener ( std::shared_ptr< ICardListener listener)
pure virtual

Remove a previously added listener.

Parameters
[in]listenerPointer to ICardListener object that needs to be removed.
Returns
Status of removeListener i.e. success or suitable status code.
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
 

Member Function Documentation

virtual telux::common::Status telux::tel::ICard::getState ( CardState cardState)
pure virtual

Get the card state for the slot id.

Parameters
[out]cardStateCardState - state of the card.
Returns
Status of getCardState i.e. success or suitable status code.
virtual std::vector<std::shared_ptr<ICardApp> > telux::tel::ICard::getApplications ( telux::common::Status status = nullptr)
pure virtual

Get card applications.

Parameters
[out]statusStatus of getApplications i.e. success or suitable status code.
Returns
List of card applications.
virtual telux::common::Status telux::tel::ICard::openLogicalChannel ( std::string  applicationId,
std::shared_ptr< ICardChannelCallback callback = nullptr 
)
pure virtual

Open a logical channel to the SIM.

Parameters
[in]applicationIdApplication Id.
[in]callbackOptional callback pointer to get the response of open logical channel request.
Returns
Status of openLogicalChannel i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICard::closeLogicalChannel ( int  channelId,
std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr 
)
pure virtual

Close a previously opened logical channel to the SIM.

Parameters
[in]channelIdThe channel ID to be closed.
[in]callbackOptional callback pointer to get the response of close logical channel request.
Returns
Status of closeLogicalChannel i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICard::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 
)
pure virtual

Transmit an APDU to the ICC card over a logical channel.

Parameters
[in]channelChannel Id of the channel to use for communication. Has to be greater than zero.
[in]claClass of the APDU command.
[in]instructionInstruction of the APDU command.
[in]p1Instruction Parameter 1 value of the APDU command.
[in]p2Instruction Parameter 2 value of the APDU command.
[in]p3Number 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]dataData to be sent with the APDU.
[in]callbackOptional callback pointer to get the response of transmit APDU request.
Returns
Status of transmitApduLogicalChannel i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICard::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 
)
pure virtual

Exchange APDUs with the SIM on a basic channel.

Parameters
[in]claClass of the APDU command.
[in]instructionInstruction of the APDU command.
[in]p1Instruction Param1 value of the APDU command.
[in]p2Instruction Param1 value of the APDU command.
[in]p3Number 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]dataData to be sent with the APDU.
[in]callbackOptional callback pointer to get the response of transmit APDU request.
Returns
Status of transmitApduBasicChannel i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ICard::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 
)
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

Parameters
[in]fileIdElementary File Identifier
[in]commandAPDU Command for SIM IO operation
[in]p1Instruction Param1 value of the APDU command
[in]p2Instruction Param2 value of the APDU command
[in]p3Number of bytes present in the data field of APDU command. If p3 is negative, a 4 byte APDU is sent to the SIM.
[in]filePathPath of the file
[in]dataData to be sent with the APDU, send empty or null string in case no data
[in]pin2Pin 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]aidApplication identifier, send empty or null string in case of no aid
[in]callbackOptional callback pointer to get the response of SIM IO request
Returns
- Status of exchangeSimIO i.e. success or suitable status code
virtual int telux::tel::ICard::getSlotId ( )
pure virtual

Get associated slot id for ICard

Returns
SlotId
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::ICard::requestEid ( EidResponseCallback  = nullptr)
pure virtual

Request eUICC identifier of eUICC card.

Parameters
[in]callbackCallback function to get the result of request eid.
Returns
Status of request eid i.e. success or suitable error code.
Dependencies card should be eUICC capable
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::ICardChannelCallback::onChannelResponse ( int  channel,
IccResult  result,
telux::common::ErrorCode  error 
)
pure virtual

This function is called with the response to the open logical channel operation.

Parameters
[in]channelChannel Id for the logical channel.
[in]resultIccResult of open logical channel.
[in]errorErrorCode of the request.
class telux::tel::ICardCommandCallback

Public Member Functions

virtual void onResponse (IccResult result, telux::common::ErrorCode error)=0
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::ICardCommandCallback::onResponse ( IccResult  result,
telux::common::ErrorCode  error 
)
pure virtual

This function is called when SIM Card transmit APDU over Logical, Basic Channel and Exchange Sim IO.

Parameters
[in]resultIccResult of transmit APDU command
[in]errorErrorCode of the request, Possible error codes are
  • SUCCESS
  • INTERNAL
  • NO_MEMORY
  • INVALID_ARG
  • MISSING_ARG
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 ()
 

Constructor & Destructor Documentation

virtual telux::tel::ICardListener::~ICardListener ( )
virtual

Member Function Documentation

virtual void telux::tel::ICardListener::onCardInfoChanged ( int  slotId)
virtual

This function is called when info of card gets updated.

Parameters
[in]slotIdSlot identifier.
struct telux::tel::CardReaderStatus

Structure contains identity of card reader status

Data Fields
int id

Card Reader ID

bool isRemovable

Card reader is removable

bool isPresent

Card reader is present

bool isID1size

Card reader present is ID-1 size

bool isCardPresent

Card is present in reader

bool isCardPoweredOn

Card in reader is powered

class telux::tel::ISapCardManager

ISapCardManager provide APIs for SAP related operations.

Public Member Functions

virtual telux::common::Status getState (SapState &sapState)=0
 
virtual telux::common::Status requestSapState (SapStateResponseCallback callback)=0
 
virtual telux::common::Status openConnection (SapCondition sapCondition=SapCondition::SAP_CONDITION_BLOCK_VOICE_OR_DATA, std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status closeConnection (std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status requestAtr (std::shared_ptr< IAtrResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status transmitApdu (uint8_t cla, uint8_t instruction, uint8_t p1, uint8_t p2, uint8_t lc, std::vector< uint8_t > data, uint8_t le=0, std::shared_ptr< ISapCardCommandCallback > callback=nullptr)=0
 
virtual telux::common::Status requestSimPowerOff (std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status requestSimPowerOn (std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status requestSimReset (std::shared_ptr< telux::common::ICommandResponseCallback > callback=nullptr)=0
 
virtual telux::common::Status requestCardReaderStatus (std::shared_ptr< ICardReaderCallback > callback=nullptr)=0
 
virtual int getSlotId ()=0
 
virtual ~ISapCardManager ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISapCardManager::~ISapCardManager ( )
virtual

Member Function Documentation

virtual telux::common::Status telux::tel::ISapCardManager::getState ( SapState sapState)
pure virtual

Get SIM access profile (SAP) client connection state.

Parameters
[out]sapStateSapState of the SIM Card
Returns
Status of getState i.e. success or suitable status code.
Deprecated:
Use requestSapState() API below to get SAP state
virtual telux::common::Status telux::tel::ISapCardManager::requestSapState ( SapStateResponseCallback  callback)
pure virtual

Get SIM access profile(SAP) client connection state.

Parameters
[out]callbackCallback function pointer to get the response of requestSapState.
Returns
Status of requestSapState i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::openConnection ( SapCondition  sapCondition = SapCondition::SAP_CONDITION_BLOCK_VOICE_OR_DATA,
std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr 
)
pure virtual

Establishes SIM access profile (SAP) client connection with SIM Card.

Parameters
[in]sapConditionCondition to enable sap connection.
[in]callbackOptional callback to get the response of open sap connection request or possible error codes i.e.
  • SUCCESS
  • INTERNAL
  • NO_MEMORY
  • INVALID_ARG
  • MISSING_ARG
Returns
Status of openConnection i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::closeConnection ( std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr)
pure virtual

Releases a SAP connection to SIM Card.

Parameters
[in]callbackOptional callback to get the response of close sap connection request or possible error codes i.e.
  • SUCCESS
  • INTERNAL
  • NO_MEMORY
  • INVALID_ARG
  • MISSING_ARG
Returns
Status of closeConnection i.e. success or suitable status code
virtual telux::common::Status telux::tel::ISapCardManager::requestAtr ( std::shared_ptr< IAtrResponseCallback callback = nullptr)
pure virtual

Request for SAP Answer To Reset command.

Parameters
[in]callbackOptional callback to get the response of requestAtr.
Returns
Status of requestAtr i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::transmitApdu ( uint8_t  cla,
uint8_t  instruction,
uint8_t  p1,
uint8_t  p2,
uint8_t  lc,
std::vector< uint8_t >  data,
uint8_t  le = 0,
std::shared_ptr< ISapCardCommandCallback callback = nullptr 
)
pure virtual

Send the Apdu on SAP mode.

Parameters
[in]claClass of the APDU command.
[in]instructionInstruction of the APDU command.
[in]p1Instruction Parameter 1 value of the APDU command.
[in]p2Instruction Parameter 1 value of the APDU command.
[in]lcNumber 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]dataList of data to be sent with the APDU.
[in]leMaximum number of bytes expected in the data field of the response to the command.
[in]callbackOptional callback to send APDU in SAP mode.
Returns
Status of transmitApdu i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::requestSimPowerOff ( std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr)
pure virtual

Send the SAP SIM power off request.

Parameters
[in]callbackOptional callback to get the response for SIM power off.
Returns
Status of requestSimPowerOff i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::requestSimPowerOn ( std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr)
pure virtual

Send the SAP SIM power on request.

Parameters
[in]callbackOptional callback to get the response for SIM power on.
Returns
Status of requestSimPowerOn i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::requestSimReset ( std::shared_ptr< telux::common::ICommandResponseCallback callback = nullptr)
pure virtual

Send the SAP SIM reset request.

Parameters
[in]callbackOptional callback to get the response for SIM reset
Returns
Status of requestSimReset i.e. success or suitable status code.
virtual telux::common::Status telux::tel::ISapCardManager::requestCardReaderStatus ( std::shared_ptr< ICardReaderCallback callback = nullptr)
pure virtual

Send the SAP Card Reader Status request command.

Parameters
[in]callbackOptional callback to get the response for card reader status
Returns
Status of requestCardReaderStatus i.e. success or suitable status code.
virtual int telux::tel::ISapCardManager::getSlotId ( )
pure virtual

Get associated slot id for the SapCardManager.

Returns
SlotId
class telux::tel::IAtrResponseCallback

Public Member Functions

virtual void atrResponse (std::vector< int > responseAtr, telux::common::ErrorCode error)=0
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::IAtrResponseCallback::atrResponse ( std::vector< int >  responseAtr,
telux::common::ErrorCode  error 
)
pure virtual

This function is called in response to requestAtr() request.

Parameters
[in]responseAtrresponse ATR values
[in]errorErrorCode of the request possible error codes are
  • SUCCESS
  • INTERNAL
  • NO_MEMORY
  • INVALID_ARG
  • MISSING_ARG
class telux::tel::ISapCardCommandCallback

Public Member Functions

virtual void onResponse (IccResult result, telux::common::ErrorCode error)=0
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::ISapCardCommandCallback::onResponse ( IccResult  result,
telux::common::ErrorCode  error 
)
pure virtual

This function is called when SIM Card transmit APDU on SAP mode.

Parameters
[in]resultIccResult of transmit APDU command
[in]errorErrorCode of the request, possible error codes are
  • SUCCESS
  • INTERNAL
  • NO_MEMORY
  • INVALID_ARG
  • MISSING_ARG
class telux::tel::ICardReaderCallback

Public Member Functions

virtual void cardReaderResponse (CardReaderStatus cardReaderStatus, telux::common::ErrorCode error)=0
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::ICardReaderCallback::cardReaderResponse ( CardReaderStatus  cardReaderStatus,
telux::common::ErrorCode  error 
)
pure virtual

This function is called in response to requestCardReaderStatus() method.

Parameters
[in]cardReaderStatusStructure contains the identity of the card reader
[in]errorErrorCode of the request

Enumeration Type Documentation

enum telux::tel::CardState
strong

Defines all state of Card like absent, present etc

Enumerator
CARDSTATE_UNKNOWN 

Unknown card state

CARDSTATE_ABSENT 

Card is absent

CARDSTATE_PRESENT 

Card is present

CARDSTATE_ERROR 

Card is having error, either card is removed and not readable

CARDSTATE_RESTRICTED 

Card is present but not usable due to carrier restrictions.

Defines all types of card locks which uses in PIN management APIs

Enumerator
PIN1 

Lock type is PIN1

PIN2 

Lock type is PIN2

PUK1 

Lock type is Pin Unblocking Key1

PUK2 

Lock type is Pin Unblocking Key2

FDN 

Lock type is Fixed Dialing Number

Defines all type of UICC application such as SIM, RUIM, USIM, CSIM and ISIM.

Enumerator
APPTYPE_UNKNOWN 

Unknown application type

APPTYPE_SIM 

UICC application type is SIM

APPTYPE_USIM 

UICC application type is USIM

APPTYPE_RUIM 

UICC application type is RSIM

APPTYPE_CSIM 

UICC application type is CSIM

APPTYPE_ISIM 

UICC application type is ISIM

Defines all application states.

Enumerator
APPSTATE_UNKNOWN 

Unknown application state

APPSTATE_DETECTED 

application state detected

APPSTATE_PIN 

If PIN1 or UPin is required

APPSTATE_PUK 

If PUK1 or Puk for UPin is required

APPSTATE_SUBSCRIPTION_PERSO 

PersoSubstate should be look at when application state is assigned to this value

APPSTATE_READY 

application State is ready

enum telux::tel::SapState
strong

Defines all SIM access profile (SAP) connection states.

Enumerator
SAP_STATE_NOT_ENABLED 

SAP connection not enabled

SAP_STATE_CONNECTING 

SAP State is connecting

SAP_STATE_CONNECTED_SUCCESSFULLY 

SAP connection is successful

SAP_STATE_CONNECTION_ERROR 

SAP connection error

SAP_STATE_DISCONNECTING 

SAP state is disconnecting

SAP_STATE_DISCONNECTED_SUCCESSFULLY 

SAP state disconnection is successful

Indicates type of connection required, default behavior is to block a SAP connection when a voice or data call is active.

Enumerator
SAP_CONDITION_BLOCK_VOICE_OR_DATA 

Block a SAP connection when a voice or data call is active (Default)

SAP_CONDITION_BLOCK_DATA 

Block a SAP connection when a data call is active

SAP_CONDITION_BLOCK_VOICE 

Block a SAP connection when a voice call is active

SAP_CONDITION_BLOCK_NONE 

Allow Sap connection in all cases