modemApiPrivate.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "modemApi.h"
10 
11 #ifndef MODEM_PRIVATE_TYPES_H_
12 #define MODEM_PRIVATE_TYPES_H_
13 
14 namespace dpyModemPrivate {
15 
16 
19 {
20  SEND,
22 };
23 
26 {
27  CALL,
30  MUTE,
31 };
32 
35 {
42 };
43 
46 {
51 };
52 
55 {
62 };
63 
66 {
68 };
69 
70 typedef boost::function<void(boost::system::error_code& ec, SMS_NOTIFICATION sms_notif, std::vector<int> sms_identifiers)> sms_notification_handler_function;
71 typedef boost::function<void(boost::system::error_code error_code, const std::map<std::string, dpyModem::s_SMSInfo>& smsInfoList)> get_sms_info_handler_function;
72 typedef boost::function<void(boost::system::error_code error_code, std::string simid, dpyModem::CallInfo callinfo)> get_sim_call_info_handler_function;
73 
74 typedef boost::function<void(boost::system::error_code, std::string simid, std::string smsid, dpyModem::SmsEvent event)> sms_event_handler_function;
75 typedef boost::function<void(boost::system::error_code, std::string simid, dpyModem::CallSourceStatus callSourceStatus)> call_source_status_handler_function;
76 typedef boost::function<void(boost::system::error_code, std::string simid, dpyModem::CallStatus event)> voice_call_event_handler_function;
77 typedef boost::function<void(boost::system::error_code, std::string modemid, std::map<dpyModemPrivate::VoiceCallConfigParam,std::string> call_param_to_value_map)> voice_call_config_handler_function;
78 
79 }
80 
81 #endif /* MODEM_PRIVATE_TYPES_H_ */
82 
83 
89 {
90 public:
91  explicit ModemManagerPrivate(std::string ip = "127.0.0.1");
92  virtual ~ModemManagerPrivate();
93 
94 #ifndef TESTING
95 
97  void asyncGetAllSmsInfo(const std::string& simid, dpyModemPrivate::get_sms_info_handler_function handler);
100  void getSmsEvents_S(dpyModemPrivate::sms_event_handler_function handler);
101  void asyncRequestSmsOperation(const std::string& simid, const dpyModemPrivate::SmsOperation& operation, const std::string& firstParameter, const std::string& secondParameter, dpyModem::result_handler_function handler);
102 
104  boost::system::error_code requestSmsOperation(const std::string& simid, const dpyModemPrivate::SmsOperation& operation, const std::string& firstParameter, const std::string& secondParameter);
106 
109  void asyncGetCallSourceStatus(const std::string& simid, dpyModemPrivate::call_source_status_handler_function handler);
112  void getCallSourceUpdates_S(dpyModemPrivate::call_source_status_handler_function handler);
113  void getCallSourceUpdates_U();
114  void getVoiceCallEvents_S(dpyModemPrivate::voice_call_event_handler_function handler);
115  void getVoiceCallEvents_U();
116  void asyncRequestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter, dpyModem::result_handler_function handler);
117  void asyncGetLastVoiceCallInfo(const std::string& simid, dpyModemPrivate::get_sim_call_info_handler_function handler);
118  void asyncSetVoiceCallConfig(const std::string& modemid, const dpyModemPrivate::VoiceCallConfigParam& param, const std::string& value, dpyModem::result_handler_function handler);
119  void asyncGetVoiceCallConfig(const std::string& modemid, dpyModemPrivate::voice_call_config_handler_function handler);
120 
122  boost::system::error_code requestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter);
123 
125 
126 #else
127  virtual void asyncGetAllSmsInfo(const std::string& simid, dpyModemPrivate::get_sms_info_handler_function handler);
129  virtual void getSmsEvents_S(dpyModemPrivate::sms_event_handler_function handler);
130  virtual void asyncRequestSmsOperation(const std::string& simid, const dpyModemPrivate::SmsOperation& operation, const std::string& firstParameter, const std::string& secondParameter, dpyModem::result_handler_function handler);
132  virtual boost::system::error_code requestSmsOperation(const std::string& simid, const dpyModemPrivate::SmsOperation& operation, const std::string& firstParameter, const std::string& secondParameter);
133 
135  virtual void asyncGetCallSourceStatus(const std::string& simid,dpyModemPrivate::call_source_status_handler_function handler);
136  virtual void getCallSourceUpdates_S(dpyModemPrivate::call_source_status_handler_function handler);
137  virtual void getCallSourceUpdates_U();
138  virtual void getVoiceCallEvents_S(dpyModemPrivate::voice_call_event_handler_function handler);
139  virtual void getVoiceCallEvents_U();
140  virtual void asyncRequestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter, dpyModem::result_handler_function handler);
141  virtual void asyncGetLastVoiceCallInfo(const std::string& simid, dpyModemPrivate::get_sim_call_info_handler_function handler);
142  virtual void asyncSetVoiceCallConfig(const std::string& modemid, const dpyModemPrivate::VoiceCallConfigParam& param, const std::string& value, dpyModem::result_handler_function handler);
143  virtual void asyncGetVoiceCallConfig(const std::string& modemid, dpyModemPrivate::voice_call_config_handler_function handler);
144 
146  virtual boost::system::error_code requestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter);
147 
148 #endif //TESTING
149 
150 };
VOICECALL_INFO
Defines the possible Voice call related information that can be queried.
Definition: modemApiPrivate.h:65
boost::function< void(boost::system::error_code error_code, std::string simid, dpyModem::CallInfo callinfo)> get_sim_call_info_handler_function
Prototype of the handler function used to retrieve call info.
Definition: modemApiPrivate.h:72
Modem module has just received a SMS.
Definition: modemApiPrivate.h:47
Type of ring tone.
Definition: modemApiPrivate.h:37
Modem module SMS has been sent.
Definition: modemApiPrivate.h:49
Send sms operation.
Definition: modemApiPrivate.h:20
Modem call state is IDLE.
Definition: modemApiPrivate.h:57
Current or last call duration.
Definition: modemApiPrivate.h:67
boost::function< void(boost::system::error_code &ec, SMS_NOTIFICATION sms_notif, std::vector< int > sms_identifiers)> sms_notification_handler_function
Prototype of the handler function for getSmsNotifications_S method.
Definition: modemApiPrivate.h:70
SMS_NOTIFICATION
Defines the possible sms notifications that the modem can report during its operation.
Definition: modemApiPrivate.h:45
Modem call state is DISABLED.
Definition: modemApiPrivate.h:56
Modem SMS has been deleted from memory.
Definition: modemApiPrivate.h:48
Audio mode.
Definition: modemApiPrivate.h:36
boost::function< void(boost::system::error_code, std::string simid, dpyModem::CallStatus event)> voice_call_event_handler_function
Prototype of the handler function used to retrieve call events.
Definition: modemApiPrivate.h:76
Answers incoming call operation.
Definition: modemApiPrivate.h:28
boost::function< void(boost::system::error_code, std::string simid, dpyModem::CallSourceStatus callSourceStatus)> call_source_status_handler_function
Prototype of the handler function used to retrieve sim status in terms of calls.
Definition: modemApiPrivate.h:75
Delete sms operation.
Definition: modemApiPrivate.h:21
Definition: modemApiPrivate.h:14
VoiceCallOperation
Defines the possible sms operations.
Definition: modemApiPrivate.h:25
Modem call state is RINGING.
Definition: modemApiPrivate.h:58
boost::function< void(boost::system::error_code error_code, const std::map< std::string, dpyModem::s_SMSInfo > &smsInfoList)> get_sms_info_handler_function
Prototype of the handler function used to retrieve sms info.
Definition: modemApiPrivate.h:71
VoiceCallConfigParam
Defines the possible voice call configuration parameters.
Definition: modemApiPrivate.h:34
Modem call state is DIALING.
Definition: modemApiPrivate.h:59
Volume of ring tone,varies from low to high.
Definition: modemApiPrivate.h:38
Amplification of the microphone. ADC Gain.
Definition: modemApiPrivate.h:40
Percentage of volume.
Definition: modemApiPrivate.h:39
Modem call state is DISCONNECTED.
Definition: modemApiPrivate.h:61
Amplification of the microphone. Multiplication factor.
Definition: modemApiPrivate.h:41
SmsOperation
Defines the possible sms operations.
Definition: modemApiPrivate.h:18
boost::function< void(boost::system::error_code, std::string simid, std::string smsid, dpyModem::SmsEvent event)> sms_event_handler_function
Prototype of the handler function used to retrieve sms events.
Definition: modemApiPrivate.h:74
Allows to interact with a modem from inside the Deepsy.
Definition: modemApiPrivate.h:88
boost::function< void(boost::system::error_code, std::string modemid, std::map< dpyModemPrivate::VoiceCallConfigParam, std::string > call_param_to_value_map)> voice_call_config_handler_function
Prototype of the handler function used to retrieve the call configuration.
Definition: modemApiPrivate.h:77
Make call operation.
Definition: modemApiPrivate.h:27
Mutes current call operation.
Definition: modemApiPrivate.h:30
Allows to interact with Modem Service.
Definition: modemApi.h:174
Modem module SMS storage is full, some SMS should be deleted.
Definition: modemApiPrivate.h:50
VOICE_CALL_NOTIFICATIONS
Defines the possible voice call notifications that the modem can report during its operation...
Definition: modemApiPrivate.h:54
Modem call state is CONVERSATION.
Definition: modemApiPrivate.h:60
Finish current call operation.
Definition: modemApiPrivate.h:29
boost::function< void(boost::system::error_code error_code)> result_handler_function
Prototype of the handler function for obtaining result of the different operations.
Definition: modemApi.h:144