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 
83  void getVoiceCallEvents_U();
84  void asyncRequestVoiceCallOperation(const std::string& simid, const dpyModemPrivate::VoiceCallOperation& operation, const std::string& firstParameter, dpyModem::result_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);
98  virtual void getCallSourceUpdates_U();
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 };
@ RINGTONE
Type of ring tone.
Definition: modemApiPrivate.h:29
@ CALL
Make call operation.
Definition: modemApiPrivate.h:19
@ CALL_DISABLED
Modem call state is DISABLED.
Definition: modemApiPrivate.h:39
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
VOICECALL_INFO
Defines the possible Voice call related information that can be queried.
Definition: modemApiPrivate.h:48
@ CALL_WAITING
Modem call state is IDLE.
Definition: modemApiPrivate.h:40
void getVoiceCallEvents_S(dpyModemPrivate::voice_call_event_handler_function handler)
@ CALL_DIALING
Modem call state is DIALING.
Definition: modemApiPrivate.h:42
@ MICRO_ADC_GAIN
Amplification of the microphone. ADC Gain.
Definition: modemApiPrivate.h:32
Allows to interact with a modem from inside the Deepsy.
Definition: modemApiPrivate.h:68
void asyncGetLastVoiceCallInfo(const std::string &simid, dpyModemPrivate::get_sim_call_info_handler_function handler)
void getCallSourceUpdates_S(dpyModemPrivate::call_source_status_handler_function handler)
@ VOLUME_RINGTONE
Volume of ring tone,varies from low to high.
Definition: modemApiPrivate.h:30
Struct to keep info from a call.
Definition: iSim.h:153
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
CallSourceStatus
Defines the possible status that a voice call source can report regarding calls.
Definition: iSim.h:92
void asyncGetVoiceCallConfig(const std::string &modemid, dpyModemPrivate::voice_call_config_handler_function handler)
void getCallSourceUpdates_U()
void asyncSetVoiceCallConfig(const std::string &modemid, const dpyModemPrivate::VoiceCallConfigParam &param, const std::string &value, dpyModem::result_handler_function handler)
Allows to interact with Modem Service.
Definition: modemApi.h:174
@ ANSWER
Answers incoming call operation.
Definition: modemApiPrivate.h:20
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
VoiceCallOperation
Defines the possible voice call operations.
Definition: modemApiPrivate.h:17
@ CALL_DISCONNECTED
Modem call state is DISCONNECTED.
Definition: modemApiPrivate.h:44
@ CALL_CONVERSATION
Modem call state is CONVERSATION.
Definition: modemApiPrivate.h:43
boost::system::error_code requestVoiceCallOperation(const std::string &simid, const dpyModemPrivate::VoiceCallOperation &operation, const std::string &firstParameter)
Synchronous Voice call related methods.
VOICE_CALL_NOTIFICATIONS
Defines the possible voice call notifications that the modem can report during its operation.
Definition: modemApiPrivate.h:37
@ MUTE
Mutes current call operation.
Definition: modemApiPrivate.h:22
@ CALL_DURATION
Current or last call duration.
Definition: modemApiPrivate.h:50
void asyncGetCallSourceStatus(const std::string &simid, dpyModemPrivate::call_source_status_handler_function handler)
@ CALL_RINGING
Modem call state is RINGING.
Definition: modemApiPrivate.h:41
VoiceCallConfigParam
Defines the possible voice call configuration parameters.
Definition: modemApiPrivate.h:26
CallStatus
Defines the possible call status.
Definition: iSim.h:100
@ VOLUME_PERCENT
Percentage of volume.
Definition: modemApiPrivate.h:31
void asyncRequestVoiceCallOperation(const std::string &simid, const dpyModemPrivate::VoiceCallOperation &operation, const std::string &firstParameter, dpyModem::result_handler_function handler)
@ MICRO_MULT_FACTOR
Amplification of the microphone. Multiplication factor.
Definition: modemApiPrivate.h:33
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
@ FINISH
Finish current call operation.
Definition: modemApiPrivate.h:21
@ AUDIO_MODE
Audio mode.
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:55