Telematics SDK - API Reference  v1.54.0

Data Structures

struct  telux::tel::DeleteInfo
 Specify delete information used for deleting message on storage. More...
 
struct  telux::tel::SmsMetaInfo
 Provides certain attributes of an SMS message. More...
 
struct  telux::tel::MessageAttributes
 Contains structure of message attributes like encoding type, number of segments, characters left in last segment. More...
 
struct  telux::tel::MessagePartInfo
 Structure containing information about the part of multi-part SMS such as concatenated message reference number, number of segments and segment number. During concatenation this information along with originating address helps in associating each part of the multi-part message to the corresponding multi-part message. More...
 
class  telux::tel::SmsMessage
 Data structure represents an incoming SMS. This is applicable for single part message or part of the multipart message. More...
 
class  telux::tel::ISmsManager
 SmsManager class is the primary interface to manage SMS operations such as send and receive an SMS text and raw encoded PDU(s). This class handles single part and multi-part messages. More...
 
class  telux::tel::ISmsListener
 A listener class receives notification for the incoming message(s) and delivery report for sent message(s). More...
 
class  telux::tel::ISmscAddressCallback
 

Typedefs

using telux::tel::PduBuffer = std::vector< uint8_t >
 
using telux::tel::SmsResponseCb = std::function< void(std::vector< int > msgRefs, telux::common::ErrorCode errorCode)>
 
using telux::tel::RequestSmsInfoListCb = std::function< void(std::vector< SmsMetaInfo > infos, telux::common::ErrorCode errorCode)>
 
using telux::tel::ReadSmsMessageCb = std::function< void(SmsMessage message, telux::common::ErrorCode errorCode)>
 
using telux::tel::RequestPreferredStorageCb = std::function< void(StorageType type, telux::common::ErrorCode errorCode)>
 
using telux::tel::RequestStorageDetailsCb = std::function< void(uint32_t maxCount, uint32_t availableCount, telux::common::ErrorCode errorCode)>
 

Enumerations

enum  telux::tel::SmsEncoding { telux::tel::SmsEncoding::GSM7, telux::tel::SmsEncoding::GSM8, telux::tel::SmsEncoding::UCS2, telux::tel::SmsEncoding::UNKNOWN }
 Specifies the encoding of the SMS message. More...
 
enum  telux::tel::SmsTagType { telux::tel::SmsTagType::UNKNOWN = -1, telux::tel::SmsTagType::MT_READ, telux::tel::SmsTagType::MT_NOT_READ }
 Specifies the SMS tag type. All incoming messages will be received and stored with tag as MT_NOT_READ. It is the client's responsibility to update the tag to MT_READ using telux::tel::ISmsManager::setTag whenever the message is considered read. More...
 
enum  telux::tel::DeleteType { telux::tel::DeleteType::UNKNOWN = -1, telux::tel::DeleteType::DELETE_ALL, telux::tel::DeleteType::DELETE_MESSAGES_BY_TAG, telux::tel::DeleteType::DELETE_MSG_AT_INDEX }
 Specifies the type of delete operation to be performed. More...
 
enum  telux::tel::StorageType { telux::tel::StorageType::UNKNOWN = -1, telux::tel::StorageType::NONE, telux::tel::StorageType::SIM }
 Specifies the SMS storage type for incoming message. More...
 

Detailed Description

This section contains APIs related to Sending and Receiving SMS.


Data Structure Documentation

struct telux::tel::DeleteInfo

Specify delete information used for deleting message on storage.

Data Fields
DeleteType delType

Specifies the type of delete operation to be performed

SmsTagType tagType

1.If SMS tag type is set to telux::tel::SmsTagType::UNKNOWN and delType is set to telux::tel::DeleteType::DELETE_ALL then all messages on the storage would be deleted. 2.To delete all messages of a particular tag, set tagType to the particular tag like telux::tel::SmsTagType::MT_READ and delType to telux::tel::DeleteType::DELETE_MESSAGES_BY_TAG

uint32_t msgIndex

To delete message at specific index, specify msgIndex and delType as telux::tel::DeleteType::DELETE_MSG_AT_INDEX

struct telux::tel::SmsMetaInfo

Provides certain attributes of an SMS message.

Data Fields
uint32_t msgIndex

Message index on storage

SmsTagType tagType

SMS tag type

struct telux::tel::MessageAttributes

Contains structure of message attributes like encoding type, number of segments, characters left in last segment.

Data Fields
SmsEncoding encoding

Data encoding type

int numberOfSegments

Number of segments

int segmentSize

Max size of each segment

int numberOfCharsLeftInLastSegment

characters left in last segment

struct telux::tel::MessagePartInfo

Structure containing information about the part of multi-part SMS such as concatenated message reference number, number of segments and segment number. During concatenation this information along with originating address helps in associating each part of the multi-part message to the corresponding multi-part message.

Data Fields
uint16_t refNumber

Concatenated message reference number as per spec 3GPP TS 23.040 9.2.3.24.1. For each part of multipart message this message reference will be the same

uint8_t numberOfSegments

Number of segments

uint8_t segmentNumber

Segment Number

class telux::tel::SmsMessage

Data structure represents an incoming SMS. This is applicable for single part message or part of the multipart message.

Public Member Functions

 SmsMessage (std::string text, std::string sender, std::string receiver, SmsEncoding encoding, std::string pdu, PduBuffer pduBuffer, std::shared_ptr< MessagePartInfo > info)
 
 SmsMessage (std::string text, std::string sender, std::string receiver, SmsEncoding encoding, std::string pdu, PduBuffer pduBuffer, std::shared_ptr< MessagePartInfo > info, bool isMetaInfoValid, SmsMetaInfo metaInfo)
 
const std::string & getText () const
 
const std::string & getSender () const
 
const std::string & getReceiver () const
 
SmsEncoding getEncoding () const
 
const std::string & getPdu () const
 
PduBuffer getRawPdu () const
 
std::shared_ptr< MessagePartInfogetMessagePartInfo ()
 
const std::string toString () const
 
telux::common::Status getMetaInfo (SmsMetaInfo &metaInfo)
 

Constructor & Destructor Documentation

telux::tel::SmsMessage::SmsMessage ( std::string  text,
std::string  sender,
std::string  receiver,
SmsEncoding  encoding,
std::string  pdu,
PduBuffer  pduBuffer,
std::shared_ptr< MessagePartInfo info 
)
telux::tel::SmsMessage::SmsMessage ( std::string  text,
std::string  sender,
std::string  receiver,
SmsEncoding  encoding,
std::string  pdu,
PduBuffer  pduBuffer,
std::shared_ptr< MessagePartInfo info,
bool  isMetaInfoValid,
SmsMetaInfo  metaInfo 
)

Member Function Documentation

const std::string& telux::tel::SmsMessage::getText ( ) const

Get the message text for the single part message or part of the multipart message.

Returns
String containing SMS message.
const std::string& telux::tel::SmsMessage::getSender ( ) const

Get the originating address (sender address).

Returns
String containing sender address.
const std::string& telux::tel::SmsMessage::getReceiver ( ) const

Get the destination address (receiver address).

Returns
String containing receiver address
SmsEncoding telux::tel::SmsMessage::getEncoding ( ) const

Get encoding format used for the single part message or part of the multipart message.

Returns
SMS message encoding used.
const std::string& telux::tel::SmsMessage::getPdu ( ) const

Get the raw PDU for the single part message or part of the multipart message.

Returns
String containing raw PDU content.
Deprecated
Use API SmsMessage::getRawPdu
PduBuffer telux::tel::SmsMessage::getRawPdu ( ) const

Get the raw PDU buffer for the single part message or part of the multipart message.

Returns
Buffer containing raw PDU content.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backward compatibility
std::shared_ptr<MessagePartInfo> telux::tel::SmsMessage::getMessagePartInfo ( )

Applicable for multi-part SMS only. Get the information such as segment number, number of segments and concatenated reference number corresponding to the part of multi-part SMS.

Returns
If a message is single part SMS the method returns null otherwise returns message part information.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
const std::string telux::tel::SmsMessage::toString ( ) const

Get the text related informative representation of this object.

Returns
String containing informative string.
telux::common::Status telux::tel::SmsMessage::getMetaInfo ( SmsMetaInfo metaInfo)

Get meta information of SMS stored in storage. There is no meta information when storage type is none.

Parameters
[out]metaInfoMeta information about SMS message stored in storage.
Returns
Status of getMetaInfo i.e. success or suitable error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::tel::ISmsManager

SmsManager class is the primary interface to manage SMS operations such as send and receive an SMS text and raw encoded PDU(s). This class handles single part and multi-part messages.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual telux::common::Status sendSms (const std::string &message, const std::string &receiverAddress, std::shared_ptr< telux::common::ICommandResponseCallback > sentCallback=nullptr, std::shared_ptr< telux::common::ICommandResponseCallback > deliveryCallback=nullptr)=0
 
virtual telux::common::Status sendSms (std::string message, std::string receiverAddress, bool deliveryReportNeeded=true, SmsResponseCb sentCallback=nullptr, std::string smscAddr="")=0
 
virtual telux::common::Status sendRawSms (const std::vector< PduBuffer > rawPdus, SmsResponseCb sentCallback=nullptr)=0
 
virtual telux::common::Status requestSmscAddress (std::shared_ptr< ISmscAddressCallback > callback=nullptr)=0
 
virtual telux::common::Status setSmscAddress (const std::string &smscAddress, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status requestSmsMessageList (SmsTagType type, RequestSmsInfoListCb callback)=0
 
virtual telux::common::Status readMessage (uint32_t messageIndex, ReadSmsMessageCb callback)=0
 
virtual telux::common::Status deleteMessage (DeleteInfo info, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status requestPreferredStorage (RequestPreferredStorageCb callback)=0
 
virtual telux::common::Status setPreferredStorage (StorageType storageType, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status setTag (uint32_t msgIndex, SmsTagType tagType, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status requestStorageDetails (RequestStorageDetailsCb callback)=0
 
virtual MessageAttributes calculateMessageAttributes (const std::string &message)=0
 
virtual int getPhoneId ()=0
 
virtual telux::common::Status registerListener (std::weak_ptr< ISmsListener > listener)=0
 
virtual telux::common::Status removeListener (std::weak_ptr< ISmsListener > listener)=0
 
virtual ~ISmsManager ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISmsManager::~ISmsManager ( )
virtual

Member Function Documentation

virtual telux::common::ServiceStatus telux::tel::ISmsManager::getServiceStatus ( )
pure virtual

This status indicates whether the ISmsManager object is in a usable state.

Returns
telux::common::ServiceStatus
virtual telux::common::Status telux::tel::ISmsManager::sendSms ( const std::string &  message,
const std::string &  receiverAddress,
std::shared_ptr< telux::common::ICommandResponseCallback sentCallback = nullptr,
std::shared_ptr< telux::common::ICommandResponseCallback deliveryCallback = nullptr 
)
pure virtual

Send SMS to the destination address. When registered on IMS the SMS will be attempted over IMS. If sending SMS over IMS fails, an automatic retry would be attempted to send the message over CS. Only support UCS2 format, GSM 7 bit default alphabet and does not support National language shift tables.

On platforms with access control enabled, caller needs to have TELUX_TEL_SMS_OPS permission to invoke this API successfully.

Parameters
[in]messageMessage text to be sent
[in]receiverAddressReceiver or destination address
[in]sentCallbackOptional callback pointer to get the response of send SMS request.
[in]deliveryCallbackOptional callback pointer to get message delivery status
Deprecated
Use API ISmsManager::sendSms(const std::string &message, const std::string &receiverAddress, bool deliveryReportNeeded = true, SmsResponseCb callback = nullptr, std::string smscAddr = "")
Returns
Status of sendSms i.e. success or suitable error code.
virtual telux::common::Status telux::tel::ISmsManager::sendSms ( std::string  message,
std::string  receiverAddress,
bool  deliveryReportNeeded = true,
SmsResponseCb  sentCallback = nullptr,
std::string  smscAddr = "" 
)
pure virtual

Send single or multipart SMS to the destination address. When registered on IMS the SMS will be attempted over IMS. If sending SMS over IMS fails, an automatic retry would be attempted to send the message over CS. Only support UCS2 format, GSM 7 bit default alphabet and does not support National language shift tables. The SMS is sent directly not stored on storage.

On platforms with access control enabled, caller needs to have TELUX_TEL_SMS_OPS permission to invoke this API successfully.

Parameters
[in]messageMessage text to be send.
[in]receiverAddressReceiver or destination address
[in]deliveryReportNeededDelivery status received in the listener API telux::tel::ISmsListener if deliveryReportNeeded is true. Provided recipient responds to SMSC before the validity period expires. If deliveryReportNeeded is false delivery report will not be received.
[in]sentCallbackOptional callback pointer to get the sent response for single part or multi-part SMS.
[in]smscAddrSMS is sent to SMSC address. If SMSC address is empty then pre-configured SMSC address is used.
Returns
Status of sendSms i.e. success or suitable error 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::ISmsManager::sendRawSms ( const std::vector< PduBuffer rawPdus,
SmsResponseCb  sentCallback = nullptr 
)
pure virtual

Send an SMS that is provided as a raw encoded PDU(s). When registered on IMS the SMS will be attempted over IMS. If sending SMS over IMS fails, an automatic retry would be attempted to send the message over CS. If the SMS is a multi-part message, the API expects multiple PDU to be passed to it. The SMS is sent directly not stored on storage.

On platforms with access control enabled, caller needs to have TELUX_TEL_SMS_OPS permission to invoke this API successfully.

Parameters
[in]rawPdusEach element in the vector represents a part of a multipart message. For single part message the vector will have single element.
[in]sentCallbackOptional callback to get the sent response for single part or multi-part SMS.
Returns
Status of sendRawSms i.e. success or suitable error 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::ISmsManager::requestSmscAddress ( std::shared_ptr< ISmscAddressCallback callback = nullptr)
pure virtual

Request for Short Messaging Service Center (SMSC) Address.Purpose of SMSC is to store, forward, convert and deliver Short Message Service (SMS) messages.

On platforms with access control enabled, caller needs to have TELUX_TEL_SMS_CONFIG permission to invoke this API successfully.

Parameters
[in]callbackOptional callback pointer to get the response of Smsc address request
Returns
Status of getSmscAddress i.e. success or suitable error code.
virtual telux::common::Status telux::tel::ISmsManager::setSmscAddress ( const std::string &  smscAddress,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Sets the Short Message Service Center(SMSC) address on the device.

On platforms with access control enabled, caller needs to have TELUX_TEL_SMS_CONFIG permission to invoke this API successfully.

This will change the SMSC address for all the SMS messages sent from any app.

Parameters
[in]smscAddressSMSC address
[in]callbackOptional callback pointer to get the response of set SMSC address
Returns
Status of setSmscAddress i.e. success or suitable error code.
virtual telux::common::Status telux::tel::ISmsManager::requestSmsMessageList ( SmsTagType  type,
RequestSmsInfoListCb  callback 
)
pure virtual

Requests a list of message information for the messages saved in SIM storage.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_STORAGE permission to invoke this API successfully.

Parameters
[in]typeSpecifies the tag type of the SMS message that should be matched when retrieving the list. Specifying telux::tel::SmsTagType::UNKNOWN will retrieve all the messages from storage.
[in]callbackCallback to get the response of request SMS messages info.
Returns
Status of requestSmsMessageList i.e. success or suitable error 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::ISmsManager::readMessage ( uint32_t  messageIndex,
ReadSmsMessageCb  callback 
)
pure virtual

Retrieve a particular message from SIM storage matching the index.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_STORAGE permission to invoke this API successfully.

Parameters
[in]messageIndexSMS index on storage.
[in]callbackCallback to get the response of read SMS message from storage .
Returns
Status of readMessage i.e. success or suitable error 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::ISmsManager::deleteMessage ( DeleteInfo  info,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Delete specific SMS based on message index or delete messages on SIM storage based on telux::tel::SmsTagType or delete all messages from SIM storage.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_STORAGE permission to invoke this API successfully.

Parameters
[in]infoSpecify delete information based on which messages are deleted
[in]callbackOptional callback to get the response of delete SMS message from storage .
Returns
Status of deleteMessage i.e. success or suitable error 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::ISmsManager::requestPreferredStorage ( RequestPreferredStorageCb  callback)
pure virtual

Request preferred storage for incoming SMS.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_CONFIG permission to invoke this API successfully.

Parameters
[in]callbackCallback to get the response of get preferred storage type .
Returns
Status of requestPreferredStorage i.e. success or suitable error 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::ISmsManager::setPreferredStorage ( StorageType  storageType,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Set the preferred storage for incoming SMS. All future messages that arrive will be stored on the storage set in this API, if any. Messages in the current storage will not be moved to the new storage. If client does not require messages to be stored by the platform, then the storage could be set to telux::tel::StorageType::NONE.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_CONFIG permission to invoke this API successfully.

Parameters
[in]storageTypetelux::tel::StorageType
[in]callbackOptional callback to get the response of set preferred storage.
Returns
Status of setPreferredStorage i.e. success or suitable error 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::ISmsManager::setTag ( uint32_t  msgIndex,
SmsTagType  tagType,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Update the tag of the incoming message stored in SIM storage as read/unread

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_OPS permission to invoke this API successfully.

Parameters
[in]msgIndexMessage index corresponding to message in storage for which tag needs to be updated.
[in]tagTypetelux::tel::SmsTagType. The applicable tag types are MT_READ and MT_NOT_READ.
[in]callbackOptional callback to get the response of updating the tag.
Returns
Status of setTag i.e. success or suitable error 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::ISmsManager::requestStorageDetails ( RequestStorageDetailsCb  callback)
pure virtual

Request details about SIM storage like total size and available size in terms of number of messages.

On platforms with access control enabled, the caller needs to have TELUX_TEL_SMS_CONFIG permission to invoke this API successfully.

Parameters
[in]callbackCallback to get the response of storage detail request.
Returns
Status of requestStorageDetails i.e. success or suitable error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual MessageAttributes telux::tel::ISmsManager::calculateMessageAttributes ( const std::string &  message)
pure virtual

Calculate message attributes for the given message.

Parameters
[in]messageMessage to send
Returns
MessageAttributes structure containing encoding type, number of segments, max size of segment and characters left in last segment.
virtual int telux::tel::ISmsManager::getPhoneId ( )
pure virtual

Get associated phone id for this SMSManager.

Returns
PhoneId.
virtual telux::common::Status telux::tel::ISmsManager::registerListener ( std::weak_ptr< ISmsListener listener)
pure virtual

Register a listener for Sms events

Parameters
[in]listenerPointer to ISmsListener object which receives event corresponding to SMS
Returns
Status of registerListener i.e. success or suitable error code.
virtual telux::common::Status telux::tel::ISmsManager::removeListener ( std::weak_ptr< ISmsListener listener)
pure virtual

Remove a previously added listener.

Parameters
[in]listenerPointer to ISmsListener object
Returns
Status of removeListener i.e. success or suitable error code.
class telux::tel::ISmsListener

A listener class receives notification for the incoming message(s) and delivery report for sent message(s).

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onIncomingSms (int phoneId, std::shared_ptr< SmsMessage > message)
 
virtual void onIncomingSms (int phoneId, std::shared_ptr< std::vector< SmsMessage >> messages)
 
virtual void onDeliveryReport (int phoneId, int msgRef, std::string receiverAddress, telux::common::ErrorCode error)
 
virtual void onMemoryFull (int phoneId, StorageType type)
 
virtual ~ISmsListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::tel::ISmsListener::~ISmsListener ( )
virtual

Member Function Documentation

virtual void telux::tel::ISmsListener::onIncomingSms ( int  phoneId,
std::shared_ptr< SmsMessage message 
)
virtual

This function will be invoked when a single part message is received or when a part of a multi-part message is received. If the SMS preferred storage is to store the SMS in storage i.e SIM then the SMS will be first stored in storage and then this API will be invoked.

On platforms with access control enabled, the client needs to have TELUX_TEL_SMS_LISTEN permission to invoke this API successfully.

Parameters
[in]phoneIdUnique identifier per SIM slot. Phone on which the message is received.
[in]messagePointer to SmsMessage object
virtual void telux::tel::ISmsListener::onIncomingSms ( int  phoneId,
std::shared_ptr< std::vector< SmsMessage >>  messages 
)
virtual

This function will be invoked when either a single part message is received, or when all the parts of a multipart message have been received. This API is invoked only once all parts of a message are received. In case of a single part message, it will be invoked as soon as it is received. In case of multi-part, the implementation waits for all parts of the message to arrive and then invokes this API. If the SMS preferred storage is to store the SMS in storage i.e SIM then the messages will be first stored in storage and then this API will be invoked.

On platforms with access control enabled, the client needs to have TELUX_TEL_SMS_LISTEN permission to invoke this API successfully.

Parameters
[in]phoneIdUnique identifier per SIM slot. Phone on which the message is received.
[in]messagesPointer to list of SmsMessage received corresponding to single part or all parts of multipart message.
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::ISmsListener::onDeliveryReport ( int  phoneId,
int  msgRef,
std::string  receiverAddress,
telux::common::ErrorCode  error 
)
virtual

This function will be invoked when either a delivery report for a single part message is received or when the delivery report for part of a multi-part message is received. In order to determine delivery of all parts of the multi-part message, the client application shall compare message reference received in the delivery indications with message references received in telux::tel::SmsResponseCb.

On platforms with access control enabled, the client needs to have TELUX_TEL_SMS_OPS permission to invoke this API successfully.

Parameters
[in]phoneIdUnique identifier per SIM slot. Phone on which the message is received.
[in]msgRefMessage reference number (as per spec 3GPP TS 23.040 9.2.2.3) for a single part message or part of multipart message.
[in]receiverAddressReceiver or destination address
[in]errortelux::common::ErrorCode
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::ISmsListener::onMemoryFull ( int  phoneId,
StorageType  type 
)
virtual

This function will be invoked when SMS storage is full.

On platforms with access control enabled, the client needs to have TELUX_TEL_SMS_STORAGE permission to invoke this API successfully.

Parameters
[in]phoneIdUnique identifier per SIM slot. Phone on which the message is received.
[in]typetelux::tel::StorageType. Applicable storage type StorageType::SIM
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::tel::ISmscAddressCallback

Interface for SMS callback object. Client needs to implement this interface to get single shot responses for send SMS.

The methods in callback can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void smscAddressResponse (const std::string &address, telux::common::ErrorCode error)=0
 
- Public Member Functions inherited from telux::common::ICommandCallback
virtual ~ICommandCallback ()
 

Member Function Documentation

virtual void telux::tel::ISmscAddressCallback::smscAddressResponse ( const std::string &  address,
telux::common::ErrorCode  error 
)
pure virtual

This function is called with the response to the Smsc address request.

Parameters
[in]addressSmsc address
[in]errortelux::common::ErrorCode

Typedef Documentation

using telux::tel::PduBuffer = typedef std::vector<uint8_t>
using telux::tel::SmsResponseCb = typedef std::function<void(std::vector<int> msgRefs, telux::common::ErrorCode errorCode)>

This function is called in response to sending a single part or multi-part SMS. This response callback is invoked when a single part message is sent or when all the parts of a multi-part message is sent. This function is called in response to telux::tel::ISmsManager::sendSms and telux::tel::ISmsManager::sendRawSms APIs.

The callback can be invoked from multiple different threads. The implementation should be thread safe.

Parameters
[in]msgRefsThis parameter represent the unique message reference number(s) corresponding to single/multi-part message that we successfully sent. When part of a message is delivered, the notification API i.e telux::tel::ISmsListener::onDeliveryReport will be invoked with the message reference number corresponding to that part.
[in]errorCodeIf sending any part of a multi-part message fails or a single part message fails this API will return an telux:common::ErrorCode corresponding to the failure.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
using telux::tel::RequestSmsInfoListCb = typedef std::function<void(std::vector<SmsMetaInfo> infos, telux::common::ErrorCode errorCode)>

This function can be invoked in response to getting a list of message information for the messages saved in SIM storage. To get message detail at a specific index on storage, telux::tel::ISmsManager::readMessage API should be invoked. The callback can be invoked from multiple different threads. The implementation should be thread-safe.

Parameters
[in]infosList of SMS message meta information i.e telux::tel::SmsMetaInfo.
[in]errorCodeReturn code which indicates whether the operation succeeded or not. telux::common::ErrorCode.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
using telux::tel::ReadSmsMessageCb = typedef std::function<void(SmsMessage message, telux::common::ErrorCode errorCode)>

This function can be invoked in response to reading SMS message on SIM storage. The callback can be from multiple different threads. The implementation should be thread-safe.

Parameters
[in]messagetelux::tel::SmsMessage
[in]errorCodeReturn code which indicates whether the operation succeeded or not. telux::common::ErrorCode.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
using telux::tel::RequestPreferredStorageCb = typedef std::function<void(StorageType type, telux::common::ErrorCode errorCode)>

This function can be invoked in response to request for preferred SMS storage. The callback can be from multiple different threads. The implementation should be thread-safe.

Parameters
[in]typePreferred telux::tel::StorageType
[in]errorCodeReturn code which indicates whether the operation succeeded or not. telux::common::ErrorCode.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
using telux::tel::RequestStorageDetailsCb = typedef std::function<void(uint32_t maxCount, uint32_t availableCount, telux::common::ErrorCode errorCode)>

This function can be invoked in response to request for storage details. The callback can be from multiple different threads. The implementation should be thread-safe.

Parameters
[in]maxCountMaximum number of messages allowed for SIM storage.
[in]availableCountAvailable count in terms of SIM messages.
[in]errorCodeReturn code which indicates whether the operation succeeded or not. telux::common::ErrorCode.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Enumeration Type Documentation

Specifies the encoding of the SMS message.

Enumerator
GSM7 

GSM 7-bit default alphabet encoding

GSM8 

GSM 8-bit data encoding

UCS2 

UCS-2 encoding

UNKNOWN 

Unknown encoding

Specifies the SMS tag type. All incoming messages will be received and stored with tag as MT_NOT_READ. It is the client's responsibility to update the tag to MT_READ using telux::tel::ISmsManager::setTag whenever the message is considered read.

Enumerator
UNKNOWN 

Unknown tag type

MT_READ 

MT message marked as read

MT_NOT_READ 

MT message marked as not read

Specifies the type of delete operation to be performed.

Enumerator
UNKNOWN 

Unknown delete type

DELETE_ALL 

Delete all message from memory storage

DELETE_MESSAGES_BY_TAG 

Deletes all messages from the memory storage that match the specific message tag

DELETE_MSG_AT_INDEX 

Deletes only the message at the specific index from the memory storage

Specifies the SMS storage type for incoming message.

Enumerator
UNKNOWN 

Unknown storage type

NONE 

This indicates SMS not stored on any of storage and is directly notified to client. This is the default storage type

SIM 

This indicates SMS is stored on SIM