Telematics SDK - Interface Specification
Subscription API

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.


Data Structure Documentation

class telux::tel::ISubscription

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

Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.

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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual std::string telux::tel::ISubscription::getPhoneNumber ( )
pure virtual

Retrieves the phone number for the SIM subscription.

Returns
PhoneNumber.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
virtual int telux::tel::ISubscription::getSlotId ( )
pure virtual

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

Returns
SIM slotId.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.

Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.

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 Subscription Object.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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]count- count of subscription
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
class telux::tel::ISubscriptionManager

Public Member Functions

virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual std::shared_ptr
< ISubscription
getSubscription (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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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 Subscription object.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
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 subscriptions
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::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.
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::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.
Note
Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.