Telematics SDK - Interface Specification  v1.26.8
Subscription Management

Data Structures

class  telux::tel::ISubscription
 Subscription returns information about network operator subscription details pertaining to a SIM card. More...
 
class  telux::tel::ISubscriptionListener
 A listener class for receiving device subscription information. The methods in listener can be invoked from multiple different threads. The implementation should be thread safe. More...
 
class  telux::tel::ISubscriptionManager
 

Detailed Description

This section contains APIs related to Subscription Management.


Data Structure Documentation

class telux::tel::ISubscription

Subscription returns information about network operator subscription details pertaining to a SIM card.

Public Member Functions

virtual std::string getCarrierName ()=0
 
virtual std::string getIccId ()=0
 
virtual int getMcc ()=0
 
virtual int getMnc ()=0
 
virtual std::string getPhoneNumber ()=0
 
virtual int getSlotId ()=0
 
virtual std::string getImsi ()=0
 
virtual ~ISubscription ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISubscription::~ISubscription ( )
virtual

Member Function Documentation

virtual std::string telux::tel::ISubscription::getCarrierName ( )
pure virtual

Retrieves the name of the carrier on which this subscription is made.

Returns
Name of the carrier.
virtual std::string telux::tel::ISubscription::getIccId ( )
pure virtual

Retrieves the SIM's ICCID (Integrated Chip ID) - i.e SIM Serial Number.

Returns
Integrated Chip Id.
virtual int telux::tel::ISubscription::getMcc ( )
pure virtual

Retrieves the mobile country code of the carrier to which the phone is connected.

Returns
Mobile Country Code.
virtual int telux::tel::ISubscription::getMnc ( )
pure virtual

Retrieves the mobile network code of the carrier to which phone is connected.

Returns
Mobile Network Code.
virtual std::string telux::tel::ISubscription::getPhoneNumber ( )
pure virtual

Retrieves the phone number for the SIM subscription.

Returns
PhoneNumber.
virtual int telux::tel::ISubscription::getSlotId ( )
pure virtual

Retrieves SIM Slot index for the SIM pertaining to this subscription object.

Returns
SIM slotId.
virtual std::string telux::tel::ISubscription::getImsi ( )
pure virtual

Retrieves IMSI (International Mobile Subscriber Identity) for the SIM. This will have home network MCC and MNC values.

Returns
imsi.
class telux::tel::ISubscriptionListener

A listener class for receiving device subscription information. The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onSubscriptionInfoChanged (std::shared_ptr< ISubscription > subscription)
 
virtual void onNumberOfSubscriptionsChanged (int count)
 
virtual ~ISubscriptionListener ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISubscriptionListener::~ISubscriptionListener ( )
virtual

Member Function Documentation

virtual void telux::tel::ISubscriptionListener::onSubscriptionInfoChanged ( std::shared_ptr< ISubscription subscription)
virtual

This function is called whenever there is a change in Subscription details.

Parameters
[in]subscriptionPointer to ISubscription Object.
virtual void telux::tel::ISubscriptionListener::onNumberOfSubscriptionsChanged ( int  count)
virtual

This function called whenever there is a change in the subscription count. for example when a new subscription is discovered or an existing subscription goes away when SIM is inserted or removed respectively.

Parameters
[in]countcount of subscription
class telux::tel::ISubscriptionManager

Public Member Functions

virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual std::shared_ptr< ISubscriptiongetSubscription (int slotId=DEFAULT_SLOT_ID, telux::common::Status *status=nullptr)=0
 
virtual std::vector< std::shared_ptr< ISubscription > > getAllSubscriptions (telux::common::Status *status=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< ISubscriptionListener > listener)=0
 
virtual telux::common::Status removeListener (std::weak_ptr< ISubscriptionListener > listener)=0
 
virtual ~ISubscriptionManager ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISubscriptionManager::~ISubscriptionManager ( )
virtual

Member Function Documentation

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

Checks the status of SubscriptionManager and returns the result.

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

Wait for Subscription subsystem to be ready.

Returns
A future that caller can wait on to be notified when SubscriptionManager is ready.
virtual std::shared_ptr<ISubscription> telux::tel::ISubscriptionManager::getSubscription ( int  slotId = DEFAULT_SLOT_ID,
telux::common::Status status = nullptr 
)
pure virtual

Get Subscription details of the SIM in the given SIM slot.

Parameters
[in]slotIdSlot id corresponding to the subscription.
[out]statusStatus of getSubscription i.e. success or suitable status code.
Returns
Pointer to ISubscription object.
virtual std::vector<std::shared_ptr<ISubscription> > telux::tel::ISubscriptionManager::getAllSubscriptions ( telux::common::Status status = nullptr)
pure virtual

Get all the subscription details of the device.

Parameters
[out]statusStatus of getAllSubscriptions i.e. success or suitable status code.
Returns
list of ISubscription objects.
virtual telux::common::Status telux::tel::ISubscriptionManager::registerListener ( std::weak_ptr< ISubscriptionListener listener)
pure virtual

Register a listener for Subscription events.

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

Remove a previously added listener.

Parameters
[in]listenerPointer to ISubscriptionListener object that needs to be removed.
Returns
Status of removeListener i.e. success or suitable status code.