zdk.net
Conference.h
1 //
2 // Conference.h
3 // ZDK
4 //
5 
6 #ifndef ZDK_NET_Conference_h
7 #define ZDK_NET_Conference_h
8 
9 #include "native_shared_ptr.h"
10 #include "PublicInterfaces.h"
11 #include "Call.h"
12 #include "BrandingInfo.h"
13 #include "CallStatus.h"
14 #include "AudioVideoCodecs.h"
15 #include "VideoCallInfo.h"
16 #include "Account.h"
17 #include "ConferenceEventsHandler.h"
18 #include "CallEventsHandler.h"
19 #include "VideoRendererEventsHandler.h"
20 #include "VideoFrameFormat.h"
21 #include "OriginType.h"
22 #include "DTMFCodes.h"
23 #include "AudioFileFormat.h"
24 #include "Result.h"
25 #include "CameraSensorLocation.h"
26 #include "ZHandle.h"
27 
28 using namespace System::Collections::Generic;
29 
30 namespace ZDK_NET
31 {
32  ref class BrandingInfo;
33  ref class CallStatus;
34  ref class VideoCallInfo;
35  ref class Account;
36  ref class Call;
37  ref class ConferenceEventsHandler;
38  ref class CallEventsHandler;
39  ref class VideoRendererEventsHandler;
40  ref class Result;
41 
42  public ref class Conference : ZHandle
43  {
44  private:
45  //LISTENERS:
46  static GeneralStatusEventListener *ConferenceEventsHandler_Listener = nullptr;
47  static GeneralStatusEventListener *CallEventsHandler_Listener = nullptr;
48  static GeneralStatusEventListener *VideoRendererEventsHandler_Listener = nullptr;
49 
50  static bool RegisterEventListeners()
51  {
52  std::shared_ptr<GeneralStatusEventListener> ConferenceEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
53  ConferenceEventsHandler_Listener = ConferenceEventsHandler_Listener_tmp.get();
54  listenersMap->try_emplace(reinterpret_cast<intptr_t>(ConferenceEventsHandler_Listener), std::move(ConferenceEventsHandler_Listener_tmp));
55  std::shared_ptr<GeneralStatusEventListener> CallEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
56  CallEventsHandler_Listener = CallEventsHandler_Listener_tmp.get();
57  listenersMap->try_emplace(reinterpret_cast<intptr_t>(CallEventsHandler_Listener), std::move(CallEventsHandler_Listener_tmp));
58  std::shared_ptr<GeneralStatusEventListener> VideoRendererEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
59  VideoRendererEventsHandler_Listener = VideoRendererEventsHandler_Listener_tmp.get();
60  listenersMap->try_emplace(reinterpret_cast<intptr_t>(VideoRendererEventsHandler_Listener), std::move(VideoRendererEventsHandler_Listener_tmp));
61  return true;
62  }
63 
64  static bool RegisteredEventListeners = RegisterEventListeners();
65  public:
66  ZDK::IConference* cppRef = nullptr;
67 
68  Conference(ZDK::Shared::Conference src);
69  ~Conference();
71 
78  property long long ConferenceHandle
79  {
80  long long get();
81  }
82 
87  property int CallsCount
88  {
89  int get();
90  }
91 
96  property List<Call^>^ Calls
97  {
98  List<Call^>^ get();
99  }
100 
105  property long long CallHandle
106  {
107  long long get();
108  }
109 
110  property ZDK_NET::BrandingInfo^ Branding
111  {
112  ZDK_NET::BrandingInfo^ get();
113  void set(ZDK_NET::BrandingInfo^ value);
114  }
115 
122  property ZDK_NET::CallStatus^ Status
123  {
124  ZDK_NET::CallStatus^ get();
125  }
126 
131  property System::String^ CalleeNumber
132  {
133  System::String^ get();
134  }
135 
140  property System::String^ CalleeName
141  {
142  System::String^ get();
143  }
144 
151  property ZDK_NET::AudioVideoCodecs CodecInUse
152  {
153  ZDK_NET::AudioVideoCodecs get();
154  }
155 
165  property bool OnSpeaker
166  {
167  bool get();
168  void set(bool value);
169  }
170 
177  property bool Held
178  {
179  bool get();
180  void set(bool value);
181  }
182 
191  property bool Muted
192  {
193  bool get();
194  void set(bool value);
195  }
196 
205  property ZDK_NET::VideoCallInfo^ VideoCallInfo
206  {
207  ZDK_NET::VideoCallInfo^ get();
208  }
209 
210  property bool IsFirstClass
211  {
212  bool get();
213  }
214 
221  property ZDK_NET::Account^ Owner
222  {
223  ZDK_NET::Account^ get();
224  }
225 
230  property System::String^ RecordFileName
231  {
232  void set(System::String^ value);
233  }
234 
246 
256  ZDK_NET::Result^ RemoveCall(ZDK_NET::Call^ hCall, bool hangUp);
257 
267 
277 
284  bool IsCallFromConference(long long hCall);
285 
293 
301 
309 
317 
325 
329 
330  void SetVideoRendererNotificationsListener(ZDK_NET::VideoRendererEventsHandler^ value);
331 
342 
352 
360 
376 
386 
404 
423  ZDK_NET::Result^ BlindTransfer(System::String^ transferee);
424 
434 
444 
459  void SendVideoFrame(unsigned char* bytes, int byteCount, ZDK_NET::VideoFrameFormat type);
460 
468 
478  ZDK_NET::CameraSensorLocation VideoGetCameraLocation();
479 
487 
498  bool HasVideo(ZDK_NET::OriginType origin);
499 
503 
507 
515 
532  ZDK_NET::Result^ SendDTMF(ZDK_NET::DTMFCodes dtmf);
533 
541 
549 
560  ZDK_NET::Result^ EnableZrtp(bool enabled);
561 
572  ZDK_NET::Result^ ConfirmZrtpSas(bool confirmed);
573 
582  ZDK_NET::Result^ ConfigureCallRecordFormat(ZDK_NET::AudioFileFormat format);
583 
584  virtual long long Handle() override;
585 
586  virtual void Initialize() override;
587 
588  virtual void ReleaseReference() override;
589 
590  };
591 }
592 
593 #endif
ZDK_NET::Conference::AcceptCall
ZDK_NET::Result ^ AcceptCall()
Accepts an incoming call.
ZDK_NET::Conference::AttendedTransfer
ZDK_NET::Result ^ AttendedTransfer(ZDK_NET::Call^ transferee)
Initiates an attended call transfer.
ZDK_NET::Result
API invocation status result.
Definition: Result.h:24
ZDK_NET::CallEventsHandler
Definition: CallEventsHandler.h:386
ZDK_NET::BrandingInfo
Definition: BrandingInfo.h:19
ZDK_NET::Conference::IsCallFromConference
bool IsCallFromConference(long long hCall)
Checks if a call is part of conference.
ZDK_NET::Conference::AddCall
ZDK_NET::Result ^ AddCall(ZDK_NET::Call^ hCall)
Adds a call to the conference.
ZDK_NET::Conference::StopHandlingVoipPhoneCallEvents
void StopHandlingVoipPhoneCallEvents()
Stops handling Call events.
ZDK_NET::Conference::UnmuteCall
ZDK_NET::Result ^ UnmuteCall(ZDK_NET::Call^ hCall)
Unmute a call in the conference.
ZDK_NET::Conference::StartHandlingVoipPhoneCallEvents
void StartHandlingVoipPhoneCallEvents()
Start handling Call events.
ZDK_NET::Conference::Ringing
ZDK_NET::Result ^ Ringing()
Notifies the remote party that we are ringing (incoming calls)
ZDK_NET::VideoRendererEventsHandler
Definition: VideoRendererEventsHandler.h:30
ZDK_NET::Conference::HangUp
ZDK_NET::Result ^ HangUp()
Hang up the call.
ZDK_NET::Conference
Definition: Conference.h:43
ZDK_NET::Conference::StartRecording
ZDK_NET::Result ^ StartRecording()
Start recording call.
ZDK_NET::Conference::AcquireVideoSinkMngrFromCall
ZDK_NET::Result ^ AcquireVideoSinkMngrFromCall(ZDK_NET::Call^ call)
Acquire video sink from call.
ZDK_NET::Conference::MuteCall
ZDK_NET::Result ^ MuteCall(ZDK_NET::Call^ hCall)
Mute a call in the conference.
ZDK_NET::Conference::HasVideo
bool HasVideo(ZDK_NET::OriginType origin)
Gets if video is present.
ZDK_NET::Conference::RemoveCall
ZDK_NET::Result ^ RemoveCall(ZDK_NET::Call^ hCall, bool hangUp)
Removes a call from the conference.
GeneralStatusEventListener
Definition: GeneralStatusEventListener.h:90
ZDK_NET::Conference::RestartVideoCapture
ZDK_NET::Result ^ RestartVideoCapture()
Restart Video capture.
ZDK_NET::Conference::StopRecording
ZDK_NET::Result ^ StopRecording()
Stop recording.
ZDK_NET::Account
The main account class.
Definition: Account.h:38
ZDK_NET::Conference::DropAllEventListeners
void DropAllEventListeners()
Drops all event listeners.
ZDK_NET::Conference::AcceptCallTransfer
ZDK_NET::Call ^ AcceptCallTransfer()
Accept a call transfer request.
ZDK_NET::CallStatus
Call's status information.
Definition: CallStatus.h:27
ZDK_NET::Conference::VideoGetCameraLocation
ZDK_NET::CameraSensorLocation VideoGetCameraLocation()
Provides Camera location.
ZDK_NET::Conference::OfferVideo
ZDK_NET::Result ^ OfferVideo()
Offers Video.
ZDK_NET::Conference::SendDTMF
ZDK_NET::Result ^ SendDTMF(ZDK_NET::DTMFCodes dtmf)
Sends a DTMF signal over a call.
ZDK_NET::Conference::ConfirmZrtpSas
ZDK_NET::Result ^ ConfirmZrtpSas(bool confirmed)
Enables ZRTP.
ZDK_NET::Conference::SetConferenceEventsListener
void SetConferenceEventsListener(ZDK_NET::ConferenceEventsHandler^ confEventHandler)
Set Conference Events Listener.
ZDK_NET::Conference::RejectCallTransfer
ZDK_NET::Result ^ RejectCallTransfer()
Rejects a call transfer request.
ZDK_NET::Call
Definition: Call.h:40
ZDK_NET::Conference::ConfigureCallRecordFormat
ZDK_NET::Result ^ ConfigureCallRecordFormat(ZDK_NET::AudioFileFormat format)
Configures a call recording's encoding format and its specific settings.
ZDK_NET::VideoCallInfo
Definition: VideoCallInfo.h:21
ZDK_NET::ConferenceEventsHandler
Definition: ConferenceEventsHandler.h:60
ZDK_NET::Conference::SetCallStatusListener
void SetCallStatusListener(ZDK_NET::CallEventsHandler^ value)
Sets Call status listener.
ZDK_NET::Conference::DropConferenceEventsListener
void DropConferenceEventsListener(ZDK_NET::ConferenceEventsHandler^ confEventHandler)
Drops Conference Events Listener.
ZDK_NET::Conference::SendVideoFrame
void SendVideoFrame(unsigned char *bytes, int byteCount, ZDK_NET::VideoFrameFormat type)
Send a video frame over the network.
ZDK_NET::Conference::BlindTransfer
ZDK_NET::Result ^ BlindTransfer(System::String^ transferee)
Initiates an unattended call transfer.
ZDK_NET::Conference::VideoToggleCamera
ZDK_NET::Result ^ VideoToggleCamera()
Toggles the camera.
ZDK_NET::Conference::EnableZrtp
ZDK_NET::Result ^ EnableZrtp(bool enabled)
Enables ZRTP.
ZDK_NET::Conference::NotifyAccountOfOwnershipChange
ZDK_NET::Result ^ NotifyAccountOfOwnershipChange()
Notify upon Account ownership changes.
ZDK_NET::Conference::AcceptVideo
ZDK_NET::Result ^ AcceptVideo(bool accept)
Accepts an incoming offer for video.
ZDK_NET::Conference::DropCallStatusListener
void DropCallStatusListener(ZDK_NET::CallEventsHandler^ value)
Drops Call status listener.
ZDK_NET::ZHandle
Definition: ZHandle.h:18