voicecallClient.h
Go to the documentation of this file.
1 
4 #pragma once
5 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
6 #include "voicecallProto.pb.h"
7 
8 #include "iCall.h"
9 #include "voicecallApi.h"
10 
16 {
17 
18 private:
19  std::map<voicecallProto::CallStatus,dpyVoicecall::CallStatus> mStatusProtoToCallStatusmap;
20 
21  std::map<voicecallProto::InfoElement_Direction,dpyVoicecall::CallDirection> mDirectionProtoToCallDirectionmap;
22  std::map<voicecallProto::InfoElement_Type,dpyVoicecall::CallType> mTypeProtoToCallTypemap;
23 
24 
25  void RegisterCallbacks();
26  boost::system::error_code buildCallInfo(voicecallProto::InfoElement* protoinfo,dpyVoicecall::CallInformation& info );
27 
28 public:
29  VoiceCallClient(std::string& ip, int dport, int sport);
30  ~VoiceCallClient();
31 
32  void asyncGetCallSources(dpyVoicecall::call_sources_list_handler_function handler);
33  void getCallEvents_S(dpyVoicecall::call_event_handler_function handler);
34  void getCallSourceStatus(std::string sourceid, dpyVoicecall::source_status_handler_function handler);
35 
36  void callSourceListEvent_S(dpyVoicecall::source_list_event_handler_function handler);
37  void monitorSourcesStatusEvents_S(dpyVoicecall::source_status_handler_function handler);
38 
39  void asyncSetCallConfiguration(std::string sourceid,const dpyVoicecall::CallParameter& param, const std::string& value, dpyVoicecall::request_handler_function handler);
40  void asyncGetCallConfiguration(std::string sourceid,std::list<dpyVoicecall::CallParameter> parameters, dpyVoicecall::get_call_config_handler_function handler);
41 
42  void asyncMakeCall(const std::string& sourceid,const std::string& destination, dpyVoicecall::make_call_handler_function handler);
43  void asyncAnswerCall(const std::string& callid,dpyVoicecall::request_handler_function handler);
44  void asyncFinishCall(const std::string& callid, dpyVoicecall::request_handler_function handler);
45  void asyncRedialLastNumber(const std::string& sourceid,dpyVoicecall::request_handler_function handler);
46 
47  void asyncGetCallInfo(const std::string& callid,dpyVoicecall::get_info_handler_function handler);
48  void asyncGetAllCallInfo(dpyVoicecall::get_all_call_info_handler_function handler);
49 
55 };
boost::function< void(boost::system::error_code, std::list< dpyVoicecall::VoiceCallSourceInfo > sourcesList)> call_sources_list_handler_function
Prototype of the handler function for getting available call sources.
Definition: voicecallApi.h:30
boost::function< void(boost::system::error_code error_code, std::string sourceid, std::map< dpyVoicecall::CallParameter, std::string > callConfiguration)> get_call_config_handler_function
Handler for get call configuration.
Definition: voicecallApi.h:98
boost::function< void(boost::system::error_code &error_code, const std::string &callid)> make_call_handler_function
Callback handler used when making calls.
Definition: voicecallApi.h:58
boost::function< void(boost::system::error_code error_code, const std::string &callid, dpyVoicecall::CallInformation callinfo)> get_info_handler_function
Handler for get info function callback.
Definition: voicecallApi.h:67
boost::function< void(boost::system::error_code, std::string callsourceid, SourceStatus event)> source_status_handler_function
Prototype of the handler function for subscribing to source status events.
Definition: voicecallApi.h:91
boost::function< void(boost::system::error_code error_code, std::map< std::string, dpyVoicecall::CallInformation > callList)> get_all_call_info_handler_function
Handler for get info function callback.
Definition: voicecallApi.h:75
boost::function< void(boost::system::error_code &error_code)> request_handler_function
Handler for answer function callback. This type of function is called to check the result...
Definition: voicecallApi.h:51
Interacts with the voicecall service in order to manage calls.
Definition: voicecallClient.h:15
CallParameter
Defines the Voice Call Configuration parameters that can be configured.
Definition: iVoiceCallSource.h:39
boost::function< void(boost::system::error_code &error_code, std::string &sourceid, std::string &callid, dpyVoicecall::CallStatus status)> call_event_handler_function
Handler for call event function callback.
Definition: voicecallApi.h:45
boost::function< void(boost::system::error_code, dpyVoicecall::VoiceCallSourceInfo sourceInfo, ListEvent event)> source_list_event_handler_function
Prototype of the handler function for subscribing to list events.
Definition: voicecallApi.h:83
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
Struct to keep information of a call.
Definition: iCall.h:43