6 #include <boost/shared_ptr.hpp> 7 #include <boost/make_shared.hpp> 8 #include "../../../../../SERVICES/MODEM/api/src/modemApiPrivate.h" 9 #include "../../../../../LIBRARIES/UTILS/src/dpyError.h" 12 #include "gtest/gtest.h" 30 void modem_availability_handler(
bool available);
47 void createSms(
const std::string& remoteId,
const std::string& content,
const dpySms::SmsDirection& dir,
const struct tm creationDate, boost::shared_ptr<Sms>& sms);
54 void smsListHandler(boost::system::error_code ec,
const std::map<std::string, dpyModem::s_SMSInfo>& smsInfoList);
64 void smsEventsHandler(boost::system::error_code ec, std::string simid, std::string smsidmodem,
dpyModem::SmsEvent event);
66 bool isValidPhoneNumber(
const std::string& number);
67 bool isValidSmsContent(
const std::string& content);
98 boost::system::error_code
sendSms(
const std::string& destination,
const std::string& content, std::string& smsid);
105 boost::system::error_code
deleteSms(
const std::string& smsid);
109 FRIEND_TEST(Create_sms_Tests,New_sms_created_locally);
110 FRIEND_TEST(Create_sms_Tests,New_sms_received_externally);
111 FRIEND_TEST(Create_sms_Tests,Sms_notified_to_observer);
113 FRIEND_TEST(Modem_commands_handlers_Tests,Received_modem_sms_no_DPY_OK);
114 FRIEND_TEST(Modem_commands_handlers_Tests,Received_modem_sms_emtpy_list);
115 FRIEND_TEST(Modem_commands_handlers_Tests,Received_modem_sms);
116 FRIEND_TEST(Modem_commands_handlers_Tests,Received_modem_two_sms);
118 FRIEND_TEST(Send_sms_modem_Tests,sendSmsModemNotAvailable);
119 FRIEND_TEST(Send_sms_modem_Tests,sendSmsInvalidContent_not_min_size);
120 FRIEND_TEST(Send_sms_modem_Tests,sendSmsInvalidContent_oversized_size);
121 FRIEND_TEST(Send_sms_modem_Tests,sendSmsInvalidPhoneNumber);
123 FRIEND_TEST(Send_sms_modem_Tests,sendSmsValidContent_max_size);
124 FRIEND_TEST(Send_sms_modem_Tests,sendSmsValidContent_min_size);
125 FRIEND_TEST(Send_sms_modem_Tests,sendSmsCorrectly_format_1);
126 FRIEND_TEST(Send_sms_modem_Tests,sendSmsCorrectly_format_2);
void stop()
Stop Source operations.
Sms Source interface including service logic.
Definition: smsSource.h:14
SmsEvent
Defines the possible sms notifications that a sim can report.
Definition: iSim.h:79
boost::system::error_code deleteSms(const std::string &smsid)
Delete a specific sms from the sms list.
Sim Source interface which interacts with the modem.
Definition: simSource.h:19
virtual ~SimSource()
Destructor.
void start()
Start Source operations.
boost::system::error_code sendSms(const std::string &destination, const std::string &content, std::string &smsid)
Sends a sms to a specified phone number.
Allows to interact with a modem from inside the Deepsy.
Definition: modemApiPrivate.h:88
CallSourceStatus
Defines the possible status that a voice call source can report regarding calls.
Definition: iSim.h:110
SimSource(const std::string &id, ModemManagerPrivate &modem, const std::string &modemid)
Constructor.