A interface for Sims.

#include <iSim.h>

Public Member Functions

virtual ~ISim ()
 Destructor.
 
std::string getId () const
 Retrieve the sim ID. More...
 
virtual std::string getIccid () const =0
 Retrieve sim iccid. More...
 
virtual std::string getImsi () const =0
 Retrieve the sim imsi. More...
 
virtual std::string getOperatorName () const =0
 Retrieve the sim operator name. More...
 
virtual boost::system::error_code getApn (dpyModem::AccessPointNetwork &apn, bool &forced)=0
 Retrieve the sim APN. More...
 
virtual boost::system::error_code getSimInfo (dpyModem::SimInfo &sim_info)=0
 Retrieve sim related information. More...
 
virtual dpyModem::SimStatus getStatus () const =0
 Retrieve the sim status. More...
 
boost::system::error_code subscribe (SimObserver *observer)
 Subscribe to the different sim events. More...
 
boost::system::error_code unsubscribe (SimObserver *observer)
 Unsubscribe from the different sim events. More...
 
SMS related methods
virtual boost::system::error_code getSmsInfo (const std::string &smsId, dpyModem::s_SMSInfo &smsInfo)=0
 Retrieve sms related information. More...
 
virtual boost::system::error_code getAllSmsInfo (std::map< std::string, dpyModem::s_SMSInfo > &smsList)=0
 Retrieve sms related information. More...
 
virtual boost::system::error_code deleteSms (const std::string &smsId)=0
 Delete a specific sms. More...
 
Voice Call related methods
virtual dpyModem::CallSourceStatus getCallSourceStatus () const =0
 Used to retrieve last call information. More...
 
virtual dpyModem::CallInfo getLastCallInfo () const =0
 Used to retrieve last call information. More...
 

Protected Member Functions

void setId (const std::string &id)
 
void notifySimStatusUpdate (const std::string &simId, const dpyModem::SimStatus &status)
 
void notifySmsEvent (const std::string &simId, const std::string &smsId, const dpyModem::SmsEvent &smsEvent)
 
void notifyCallSourceStatusUpdate (const std::string &simId, const dpyModem::CallSourceStatus &sourceStatus)
 
void notifyVoiceCallEvent (const std::string &simId, const dpyModem::CallStatus &callStatusEvent)
 

Member Function Documentation

virtual boost::system::error_code deleteSms ( const std::string &  smsId)
pure virtual
Parameters
smsIdsms identifier whose information wants to be retrieved
Returns
error code
virtual boost::system::error_code getAllSmsInfo ( std::map< std::string, dpyModem::s_SMSInfo > &  smsList)
pure virtual
Parameters
smsListmap containing sms list
Returns
error code
virtual boost::system::error_code getApn ( dpyModem::AccessPointNetwork apn,
bool &  forced 
)
pure virtual
Parameters
apnapn being used
forced
Returns
error code
virtual dpyModem::CallSourceStatus getCallSourceStatus ( ) const
pure virtual
Returns
last call information
virtual std::string getIccid ( ) const
pure virtual
Returns
sim iccid
std::string getId ( ) const
Returns
sim ID
virtual std::string getImsi ( ) const
pure virtual
Returns
sim imsi
virtual dpyModem::CallInfo getLastCallInfo ( ) const
pure virtual
Returns
last call information
virtual std::string getOperatorName ( ) const
pure virtual
Returns
operator name
virtual boost::system::error_code getSimInfo ( dpyModem::SimInfo sim_info)
pure virtual
Parameters
sim_infostructure to be filled with the sim information
Returns
error code
virtual boost::system::error_code getSmsInfo ( const std::string &  smsId,
dpyModem::s_SMSInfo smsInfo 
)
pure virtual
Parameters
smsIdsms identifier whose information wants to be retrieved
simInfosms related information
Returns
error code
virtual dpyModem::SimStatus getStatus ( ) const
pure virtual
Returns
sim status
boost::system::error_code subscribe ( SimObserver observer)
Parameters
observerobject to subscribe
Returns
error code
boost::system::error_code unsubscribe ( SimObserver observer)
Parameters
observerobject to unsubscribe
Returns
error code