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 
18 {
19  CALL,
22  MUTE,
23 };
24 
27 {
34 };
35 
38 {
45 };
46 
49 {
51 };
52 
53 typedef boost::function<void(boost::system::error_code error_code, std::string simid, dpyModem::CallInfo callinfo)> get_sim_call_info_handler_function;
54 
55 typedef boost::function<void(boost::system::error_code, std::string simid, dpyModem::CallSourceStatus callSourceStatus)> call_source_status_handler_function;
56 typedef boost::function<void(boost::system::error_code, std::string simid, dpyModem::CallStatus event)> voice_call_event_handler_function;
57 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;
58 
59 }
60 
61 #endif /* MODEM_PRIVATE_TYPES_H_ */
62 
63 
69 {
70 public:
71  explicit ModemManagerPrivate(std::string ip = "127.0.0.1");
72  virtual ~ModemManagerPrivate();
73 
74 #ifndef TESTING
75 
77  void asyncGetCallSourceStatus(const std::string& simid, dpyModemPrivate::call_source_status_handler_function handler);
80  void getCallSourceUpdates_S(dpyModemPrivate::call_source_status_handler_function handler);
81  void getCallSourceUpdates_U();
82  void getVoiceCallEvents_S(dpyModemPrivate::voice_call_event_handler_function handler);
83  void getVoiceCallEvents_U();
84  void asyncRequestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter, dpyModem::result_handler_function handler);
85  void asyncGetLastVoiceCallInfo(const std::string& simid, dpyModemPrivate::get_sim_call_info_handler_function handler);
86  void asyncSetVoiceCallConfig(const std::string& modemid, const dpyModemPrivate::VoiceCallConfigParam& param, const std::string& value, dpyModem::result_handler_function handler);
87  void asyncGetVoiceCallConfig(const std::string& modemid, dpyModemPrivate::voice_call_config_handler_function handler);
88 
90  boost::system::error_code requestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter);
91 
93 
94 #else
95  virtual void asyncGetCallSourceStatus(const std::string& simid,dpyModemPrivate::call_source_status_handler_function handler);
97  virtual void getCallSourceUpdates_S(dpyModemPrivate::call_source_status_handler_function handler);
98  virtual void getCallSourceUpdates_U();
99  virtual void getVoiceCallEvents_S(dpyModemPrivate::voice_call_event_handler_function handler);
100  virtual void getVoiceCallEvents_U();
101  virtual void asyncRequestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter, dpyModem::result_handler_function handler);
102  virtual void asyncGetLastVoiceCallInfo(const std::string& simid, dpyModemPrivate::get_sim_call_info_handler_function handler);
103  virtual void asyncSetVoiceCallConfig(const std::string& modemid, const dpyModemPrivate::VoiceCallConfigParam& param, const std::string& value, dpyModem::result_handler_function handler);
104  virtual void asyncGetVoiceCallConfig(const std::string& modemid, dpyModemPrivate::voice_call_config_handler_function handler);
105 
107  virtual boost::system::error_code requestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter);
108 
109 #endif //TESTING
110 
111 };
VOICECALL_INFO
Defines the possible Voice call related information that can be queried.
Definition: modemApiPrivate.h:48
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:53
Type of ring tone.
Definition: modemApiPrivate.h:29
Modem call state is IDLE.
Definition: modemApiPrivate.h:40
Current or last call duration.
Definition: modemApiPrivate.h:50
Modem call state is DISABLED.
Definition: modemApiPrivate.h:39
Audio mode.
Definition: modemApiPrivate.h:28
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:56
Answers incoming call operation.
Definition: modemApiPrivate.h:20
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:55
Definition: modemApiPrivate.h:14
VoiceCallOperation
Defines the possible voice call operations.
Definition: modemApiPrivate.h:17
Modem call state is RINGING.
Definition: modemApiPrivate.h:41
VoiceCallConfigParam
Defines the possible voice call configuration parameters.
Definition: modemApiPrivate.h:26
Modem call state is DIALING.
Definition: modemApiPrivate.h:42
Volume of ring tone,varies from low to high.
Definition: modemApiPrivate.h:30
Amplification of the microphone. ADC Gain.
Definition: modemApiPrivate.h:32
Percentage of volume.
Definition: modemApiPrivate.h:31
Modem call state is DISCONNECTED.
Definition: modemApiPrivate.h:44
Amplification of the microphone. Multiplication factor.
Definition: modemApiPrivate.h:33
Allows to interact with a modem from inside the Deepsy.
Definition: modemApiPrivate.h:68
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:57
Make call operation.
Definition: modemApiPrivate.h:19
Mutes current call operation.
Definition: modemApiPrivate.h:22
Allows to interact with Modem Service.
Definition: modemApi.h:174
VOICE_CALL_NOTIFICATIONS
Defines the possible voice call notifications that the modem can report during its operation...
Definition: modemApiPrivate.h:37
Modem call state is CONVERSATION.
Definition: modemApiPrivate.h:43
Finish current call operation.
Definition: modemApiPrivate.h:21
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