Introduction

Zoom C# wrapper for Windows SDK comes with most of the functions found in Zoom Windows SDK v5.4.54802.0124. Some functions are not available, for example, the new breakout room controller found in meeting_breakout_rooms_interface_v2.h. Let's use the new breakout room functions as an example how to extend the C# wrapper.

Required Header Files

To bring in the new functionalities ini meeting_breakout_rooms_interface_v2.h, add it to zoom_sdk_c_sharp_wrap/wrap/common_include.h:
#elif (defined CSHARP_WRAP) || (defined INTEL_UNITE)
...

#include "../h/meeting_service_components/meeting_breakout_rooms_interface.h"
#include "../h/meeting_service_components/meeting_breakout_rooms_interface_v2.h"

New C++ Classes To Reflect the SDK

Create the new files meeting_bo_wrap.h and meeting_bo_wrap.cpp as shown below. These are largely macro calls to make the C++ SDK functions for the breakout room available. They include the member function calls like GetBOCreatorHelper and the callback functions, for notification events.

zoom_sdk_c_sharp_wrap/wrap/meeting_service_components_wrap/meeting_bo_wrap.h:

#pragma once
#include "../common_include.h"
BEGIN_ZOOM_SDK_NAMESPACE
class IMeetingServiceWrap;
IMeetingBOController* InitIMeetingBOControllerFunc(IMeetingBOControllerEvent* pEvent, IMeetingServiceWrap* pOwner);
void UninitIMeetingBOControllerFunc(IMeetingBOController* obj);
BEGIN_CLASS_DEFINE_WITHCALLBACK(IMeetingBOController, IMeetingBOControllerEvent)
NORMAL_CLASS(IMeetingBOController)
INIT_UNINIT_WITHEVENT_AND_OWNSERVICE(IMeetingBOController, IMeetingServiceWrap)
virtual SDKError SetEvent(IMeetingBOControllerEvent* pEvent)
{
	external_cb = pEvent;
	return SDKERR_SUCCESS;
}
DEFINE_FUNC_0(GetBOCreatorHelper, IBOCreator*)
DEFINE_FUNC_0(GetBODataHelper, IBOData*)
DEFINE_FUNC_0(IsBOStarted, bool)

CallBack_FUNC_1(OnNewBroadcastMessageReceived, const wchar_t*, strMsg)
CallBack_FUNC_1(onHasCreatorRightsNotification, IBOCreator*, pCreatorObj)
CallBack_FUNC_1(onHasAdminRightsNotification, IBOAdmin*, pAdminObj)
CallBack_FUNC_1(onHasAssistantRightsNotification, IBOAssistant*, pAssistantObj)
CallBack_FUNC_1(onHasAttendeeRightsNotification, IBOAttendee*, pAttendeeObj)
CallBack_FUNC_1(onHasDataHelperRightsNotification, IBOData*, pDataHelperObj)
CallBack_FUNC_0(onLostCreatorRightsNotification)
CallBack_FUNC_0(onLostAdminRightsNotification)
CallBack_FUNC_0(onLostAssistantRightsNotification)
CallBack_FUNC_0(onLostAttendeeRightsNotification)
CallBack_FUNC_0(onLostDataHelperRightsNotification)
END_CLASS_DEFINE(IMeetingBOController)
END_ZOOM_SDK_NAMESPACE
zoom_sdk_c_sharp_wrap/wrap/meeting_service_components_wrap/meeting_bo_wrap.cpp:
#include "stdafx.h"
#include "meeting_bo_wrap.h"
#include "../meeting_service_wrap.h"
BEGIN_ZOOM_SDK_NAMESPACE
IMeetingBOController* InitIMeetingBOControllerFunc(IMeetingBOControllerEvent* pEvent, IMeetingServiceWrap* pOwner)
{
	if (pOwner && pOwner->GetSDKObj())
	{
		ZOOM_SDK_NAMESPACE::IMeetingBOController* pObj = pOwner->GetSDKObj()->GetMeetingBOController();
		if (pObj)
		{
			pObj->SetEvent(pEvent);
		}
		return pObj;
	}

	return NULL;
}

void UninitIMeetingBOControllerFunc(IMeetingBOController* obj)
{
	if (obj)
	{
		obj->SetEvent(NULL);
	}
}

IMPL_FUNC_0(IMeetingBOController, IsBOStarted, bool, false)
IMPL_FUNC_0(IMeetingBOController, GetBOCreatorHelper, IBOCreator*, NULL)
IMPL_FUNC_0(IMeetingBOController, GetBODataHelper, IBOData*, NULL)

END_ZOOM_SDK_NAMESPACE

Get the Controller in SDK

Add the include meeting_service_components_wrap/meeting_bo_wrap.h and the macro for T_GetMeetingBOController to make the GetMeetingBOController function available in C++, to zoom_sdk_c_sharp_wrap/wrap/meeting_service_wrap.h:
#include "meeting_service_components_wrap/meeting_interpretation_ctrl_wrap.h"
#include "meeting_service_components_wrap/meeting_emoji_reaction_wrap.h"
#include "meeting_service_components_wrap/meeting_bo_wrap.h"
...

DEFINE_FUNC_AND_MEMBER(T_GetMeetingRealNameAuthController, IZoomRealNameAuthMeetingHelperWrap)
//DEFINE_FUNC_AND_MEMBER(T_GetMeetingQAController, IMeetingQAControllerWrap)
DEFINE_FUNC_AND_MEMBER(T_GetMeetingBOController, IMeetingBOControllerWrap)
zoom_sdk_c_sharp_wrap/wrap/meeting_service_wrap.cpp:
IMPL_FUNC_AND_MEMBER(IMeetingService, T_GetMeetingEmojiReactionController, IEmojiReactionControllerWrap);
IMPL_FUNC_AND_MEMBER(IMeetingService, T_GetMeetingBOController, IMeetingBOControllerWrap);

Get the Controller in C#

Add a few lines to the IMeetingServiceDotNetWrap and CMeetingServiceDotNetWrap to enable C# programs to call GetMeetingBOController.

zoom_sdk_c_sharp_wrap/meeting_service_dotnet_wrap.h
#include "meeting_participants_ctrl_donet_wrap.h"
#include "meeting_live_stream_dotnet_wrap.h"
#include "meeting_bo_dotnet_wrap.h"
...

		IMeetingParticipantsControllerDotNetWrap^ GetMeetingParticipantsController();
		IMeetingLiveStreamControllerDotNetWrap^ GetMeetingLiveStreamController();
		IMeetingBOControllerDotNetWrap^ GetMeetingBOController();
...

		virtual IMeetingParticipantsControllerDotNetWrap^ GetMeetingParticipantsController();
		virtual IMeetingLiveStreamControllerDotNetWrap^ GetMeetingLiveStreamController();
		virtual IMeetingBOControllerDotNetWrap^ GetMeetingBOController();
zoom_sdk_c_sharp_wrap/meeting_service_dotnet_wrap.cpp:
	IMeetingLiveStreamControllerDotNetWrap^ CMeetingServiceDotNetWrap::GetMeetingLiveStreamController()
	{
		if (CMeetingLiveStreamControllerDotNetWrap::Instance)
			CMeetingLiveStreamControllerDotNetWrap::Instance->BindEvent();

		return CMeetingLiveStreamControllerDotNetWrap::Instance;
	}

	IMeetingBOControllerDotNetWrap^ CMeetingServiceDotNetWrap::GetMeetingBOController()
	{
		if (CMeetingBOControllerDotNetWrap::Instance)
			CMeetingBOControllerDotNetWrap::Instance->BindEvent();

		return CMeetingBOControllerDotNetWrap::Instance;
	}
}

Implement the Controller Wrapper in C#

The wrapper classes consists of pairs of interface and implementation classes, and most of the functions consist of code to marshal and unmarshal data across the C++/CLI divide.

zoom_sdk_c_sharp_wrap/meeting_bo_dotnet_wrap.h
#pragma once
using namespace System;
using namespace System::Windows;
#include "zoom_sdk_dotnet_wrap_def.h"
namespace ZOOM_SDK_DOTNET_WRAP {
	public interface class IBOCreatorDotNet
	{
	public:
		String^ CreateBO(String^ strBOName);
		bool UpdateBOName(String^ strBOID, String^ strNewBOName);
		bool RemoveBO(String^ strBOID);
		bool AssignUserToBO(String^ strUserID, String^ strBOID);
		bool RemoveUserFromBO(String^ strUserID, String^ strBOID);
	};

	public enum class BO_CTRL_USER_STATUS : int
	{
		BO_CTRL_USER_STATUS_UNASSIGNED = 1,
		BO_CTRL_USER_STATUS_ASSIGNED_NOT_JOIN = 2,
		BO_CTRL_USER_STATUS_IN_BO = 3,
		BO_CTRL_USER_STATUS_UNKNOWN = 4,
	};

	public interface class IBOMeetingDotNet
	{
		String^ GetBOID();
		String^ GetBOName();
		array<String^>^ GetBOUserList();
	};

	public interface class IBODataDotNet
	{
	public:
		array<String^ >^ GetUnassginedUserList();
		array<String^ >^ GetBOMeetingIDList();
		String^ GetBOUserName(String^ strUserID);
		BO_CTRL_USER_STATUS GetBOUserStatus(String^ strUserID);
		bool IsBOUserMyself(String^ strUserID);
		IBOMeetingDotNet^ GetBOMeetingByID(String^ strBOId);
	};

	public interface class IBOAdminEventDotNet
	{
	public:
		void OnHelpRequestReceived(String^ strUserID);
	};

	public interface class IBOAdminDotNet
	{
	public:
		bool StartBO();
		bool StopBO();
		bool AssignNewUserToRunningBO(String^ strUserID, String^ strBOID);
		bool SwitchAssignedUserToRunningBO(String^ strUserID, String^ strBOID) = 0;
		bool CanStartBO();
		bool JoinBOByUserRequest(String^strUserID);
		bool IgnoreUserHelpRequest(String^ strUserID);
		bool BroadcastMessage(String^strMsg);
	};

	public interface class IBOAssistantDotNet
	{
	public:
	};

	public interface class IBOAttendeeDotNet
	{
	public:
	};

	public delegate void OnNewBroadcastMessageReceived(String^ stBID);
	public delegate void onHasCreatorRightsNotification(IBOCreatorDotNet^ boc);
	public delegate void onHasAdminRightsNotification(IBOAdminDotNet^ boa);
	public delegate void onHasAssistantRightsNotification(IBOAssistantDotNet^ boa);
	public delegate void onHasAttendeeRightsNotification(IBOAttendeeDotNet^ boa);
	public delegate void onHasDataHelperRightsNotification(IBODataDotNet^ boa);

	public delegate void onLostCreatorRightsNotification();
	public delegate void onLostAdminRightsNotification();
	public delegate void onLostAssistantRightsNotification();
	public delegate void onLostAttendeeRightsNotification();
	public delegate void onLostDataHelperRightsNotification();

	public interface class IMeetingBOControllerDotNetWrap
	{
	public:
		void Add_CB_OnNewBroadcastMessageReceived(OnNewBroadcastMessageReceived^ cb);
		void Remove_CB_OnNewBroadcastMessageReceived(OnNewBroadcastMessageReceived^ cb);
		void Add_CB_onHasCreatorRightsNotification(onHasCreatorRightsNotification^ cb);
		void Remove_CB_onHasCreatorRightsNotification(onHasCreatorRightsNotification^ cb);
		void Add_CB_onHasAdminRightsNotification(onHasAdminRightsNotification^ cb);
		void Remove_CB_onHasAdminRightsNotification(onHasAdminRightsNotification^ cb);
		void Add_CB_onHasAssistantRightsNotification(onHasAssistantRightsNotification^ cb);
		void Remove_CB_onHasAssistantRightsNotification(onHasAssistantRightsNotification^ cb);
		void Add_CB_onHasAttendeeRightsNotification(onHasAttendeeRightsNotification^ cb);
		void Remove_CB_onHasAttendeeRightsNotification(onHasAttendeeRightsNotification^ cb);
		void Add_CB_onHasDataHelperRightsNotification(onHasDataHelperRightsNotification^ cb);
		void Remove_CB_onHasDataHelperRightsNotification(onHasDataHelperRightsNotification^ cb);

		void Add_CB_onLostCreatorRightsNotification(onLostCreatorRightsNotification^ cb);
		void Remove_CB_onLostCreatorRightsNotification(onLostCreatorRightsNotification^ cb);
		void Add_CB_onLostAdminRightsNotification(onLostAdminRightsNotification^ cb);
		void Remove_CB_onLostAdminRightsNotification(onLostAdminRightsNotification^ cb);
		void Add_CB_onLostAssistantRightsNotification(onLostAssistantRightsNotification^ cb);
		void Remove_CB_onLostAssistantRightsNotification(onLostAssistantRightsNotification^ cb);
		void Add_CB_onLostAttendeeRightsNotification(onLostAttendeeRightsNotification^ cb);
		void Remove_CB_onLostAttendeeRightsNotification(onLostAttendeeRightsNotification^ cb);
		void Add_CB_onLostDataHelperRightsNotification(onLostDataHelperRightsNotification^ cb);
		void Remove_CB_onLostDataHelperRightsNotification(onLostDataHelperRightsNotification^ cb);

		bool IsBOStarted();
		IBOCreatorDotNet^ GetBOCreatorHelper();
		IBODataDotNet^ GetBODataHelper();
	};

	private ref class CMeetingBOControllerDotNetWrap sealed : public IMeetingBOControllerDotNetWrap
	{
		// TODO: Add your methods for this class here.
	public:
		static property CMeetingBOControllerDotNetWrap^ Instance
		{
			CMeetingBOControllerDotNetWrap^ get() { return m_Instance; }
		}

		void BindEvent();

		virtual bool IsBOStarted();
		virtual IBOCreatorDotNet^ GetBOCreatorHelper();
		virtual IBODataDotNet^ GetBODataHelper();

		virtual void Add_CB_OnNewBroadcastMessageReceived(OnNewBroadcastMessageReceived^ cb)
		{
			event_OnNewBroadcastMessageReceived += cb;
		}

		virtual void Remove_CB_OnNewBroadcastMessageReceived(OnNewBroadcastMessageReceived^ cb)
		{
			event_OnNewBroadcastMessageReceived -= cb;
		}

		virtual void Add_CB_onHasCreatorRightsNotification(onHasCreatorRightsNotification^ cb)
		{
			event_onHasCreatorRightsNotification += cb;
		}

		virtual void Remove_CB_onHasCreatorRightsNotification(onHasCreatorRightsNotification^ cb)
		{
			event_onHasCreatorRightsNotification -= cb;
		}

		virtual void Add_CB_onHasAdminRightsNotification(onHasAdminRightsNotification^ cb)
		{
			event_onHasAdminRightsNotification += cb;
		}

		virtual void Remove_CB_onHasAdminRightsNotification(onHasAdminRightsNotification^ cb)
		{
			event_onHasAdminRightsNotification -= cb;
		}

		virtual void Add_CB_onHasAssistantRightsNotification(onHasAssistantRightsNotification^ cb)
		{
			event_onHasAssistantRightsNotification += cb;
		}

		virtual void Remove_CB_onHasAssistantRightsNotification(onHasAssistantRightsNotification^ cb)
		{
			event_onHasAssistantRightsNotification -= cb;
		}

		virtual void Add_CB_onHasAttendeeRightsNotification(onHasAttendeeRightsNotification^ cb)
		{
			event_onHasAttendeeRightsNotification += cb;
		}

		virtual void Remove_CB_onHasAttendeeRightsNotification(onHasAttendeeRightsNotification^ cb)
		{
			event_onHasAttendeeRightsNotification -= cb;
		}

		virtual void Add_CB_onHasDataHelperRightsNotification(onHasDataHelperRightsNotification^ cb)
		{
			event_onHasDataHelperRightsNotification += cb;
		}

		virtual void Remove_CB_onHasDataHelperRightsNotification(onHasDataHelperRightsNotification^ cb)
		{
			event_onHasDataHelperRightsNotification -= cb;
		}

		virtual void Add_CB_onLostCreatorRightsNotification(onLostCreatorRightsNotification^ cb)
		{
			event_onLostCreatorRightsNotification += cb;
		}
		virtual void Remove_CB_onLostCreatorRightsNotification(onLostCreatorRightsNotification^ cb)
		{
			event_onLostCreatorRightsNotification -= cb;
		}
		virtual void Add_CB_onLostAdminRightsNotification(onLostAdminRightsNotification^ cb)
		{
			event_onLostAdminRightsNotification += cb;
		}
		virtual void Remove_CB_onLostAdminRightsNotification(onLostAdminRightsNotification^ cb)
		{
			event_onLostAdminRightsNotification -= cb;
		}
		virtual void Add_CB_onLostAssistantRightsNotification(onLostAssistantRightsNotification^ cb)
		{
			event_onLostAssistantRightsNotification += cb;
		}
		virtual void Remove_CB_onLostAssistantRightsNotification(onLostAssistantRightsNotification^ cb)
		{
			event_onLostAssistantRightsNotification -= cb;
		}
		virtual void Add_CB_onLostAttendeeRightsNotification(onLostAttendeeRightsNotification^ cb)
		{
			event_onLostAttendeeRightsNotification += cb;
		}
		virtual void Remove_CB_onLostAttendeeRightsNotification(onLostAttendeeRightsNotification^ cb)
		{
			event_onLostAttendeeRightsNotification -= cb;
		}
		virtual void Add_CB_onLostDataHelperRightsNotification(onLostDataHelperRightsNotification^ cb)
		{
			event_onLostDataHelperRightsNotification += cb;
		}
		virtual void Remove_CB_onLostDataHelperRightsNotification(onLostDataHelperRightsNotification^ cb)
		{
			event_onLostDataHelperRightsNotification -= cb;
		}

		void ProcBONewBroadcastMessageReceived(String^ stBID);
		void ProcBOHasCreatorRightsNotification(IBOCreatorDotNet^boc);
		void ProcBOHasAdminRightsNotification(IBOAdminDotNet ^ boc);
		void ProcBOHasAssistantRightsNotification(IBOAssistantDotNet ^ boc);
		void ProcBOHasAttendeeRightsNotification(IBOAttendeeDotNet ^ boc);
		void ProcBOHasDataHelperRightsNotification(IBODataDotNet ^ boc);
		void ProcBOLostCreatorRightsNotification();
		void ProcBOLostAdminRightsNotification();
		void ProcBOLostAssistantRightsNotification();
		void ProcBOLostAttendeeRightsNotification();
		void ProcBOLostDataHelperRightsNotification();
	private:
		CMeetingBOControllerDotNetWrap() {};
		virtual ~CMeetingBOControllerDotNetWrap() {};
		event OnNewBroadcastMessageReceived^ event_OnNewBroadcastMessageReceived;
		event onHasCreatorRightsNotification ^ event_onHasCreatorRightsNotification;
		event onHasAdminRightsNotification ^ event_onHasAdminRightsNotification;
		event onHasAssistantRightsNotification ^ event_onHasAssistantRightsNotification;
		event onHasAttendeeRightsNotification ^ event_onHasAttendeeRightsNotification;
		event onHasDataHelperRightsNotification ^ event_onHasDataHelperRightsNotification;

		event onLostCreatorRightsNotification ^ event_onLostCreatorRightsNotification;
		event onLostAdminRightsNotification ^ event_onLostAdminRightsNotification;
		event onLostAssistantRightsNotification ^ event_onLostAssistantRightsNotification;
		event onLostAttendeeRightsNotification ^ event_onLostAttendeeRightsNotification;
		event onLostDataHelperRightsNotification ^ event_onLostDataHelperRightsNotification;
		static CMeetingBOControllerDotNetWrap^ m_Instance = gcnew CMeetingBOControllerDotNetWrap;
	};
}
zoom_sdk_c_sharp_wrap/meeting_bo_dotnet_wrap.cpp
#include "stdafx.h"
#include "meeting_bo_dotnet_wrap.h"
#include "zoom_sdk_dotnet_wrap_util.h"
#include "wrap/sdk_wrap.h"
namespace ZOOM_SDK_DOTNET_WRAP {

	//translate bo info
	private ref class IBOCreatorDotNetImpl sealed : public IBOCreatorDotNet
	{
	public:
		IBOCreatorDotNetImpl(ZOOM_SDK_NAMESPACE::IBOCreator* pInfo)
		{
			m_pInfo = pInfo;
		}
		virtual bool AssignUserToBO(String ^ strUserId, String^ strBOId)
		{
			if (m_pInfo)
				return m_pInfo->AssignUserToBO(PlatformString2WChar(strUserId), PlatformString2WChar(strBOId));
			return false;
		}
		virtual String^ CreateBO(String ^ strBOName)
		{
			if (m_pInfo)
				return WChar2PlatformString(m_pInfo->CreateBO(PlatformString2WChar(strBOName)));
			return nullptr;
		}
		virtual bool RemoveBO(String^ strBOId)
		{
			if (m_pInfo)
				return m_pInfo->RemoveBO(PlatformString2WChar(strBOId));
			return false;
		}
		virtual bool RemoveUserFromBO(String ^ strUserId, String^ strBOId)
		{
			if (m_pInfo)
				return m_pInfo->RemoveUserFromBO(PlatformString2WChar(strUserId), PlatformString2WChar(strBOId));
			return false;
		}
		virtual bool UpdateBOName(String^ strBOId, String ^ strNewBOId)
		{
			if (m_pInfo)
				return m_pInfo->UpdateBOName(PlatformString2WChar(strBOId), PlatformString2WChar(strNewBOId));
			return false;
		}

	private:
		IBOCreatorDotNetImpl() {}
		ZOOM_SDK_NAMESPACE::IBOCreator* m_pInfo;
	};

	IBOMeetingDotNet^ TranslateBOMeeting(ZOOM_SDK_NAMESPACE::IBOMeeting*);

	private ref class IBODataDotNetImpl sealed : public IBODataDotNet
	{
	public:
		IBODataDotNetImpl(ZOOM_SDK_NAMESPACE::IBOData* pInfo)
		{
			m_pInfo = pInfo;
		}
		virtual array<String^ >^  GetUnassginedUserList()
		{
			if (m_pInfo)
			{
				ZOOM_SDK_NAMESPACE::IList<const wchar_t*>* p = m_pInfo->GetUnassginedUserList();
				if (p)
				{
					int count = p->GetCount();
					array<String^ >^ p2 = gcnew array<String^ >(count);
					if (p2)
					{
						for (int i = 0; i < count; i++)
						{
							String^ userid = WChar2PlatformString(p->GetItem(i));
							p2[i] = userid;
						}
						return p2;
					}
				}
			}
			return nullptr;
		}
		virtual array<String^ >^ GetBOMeetingIDList()
		{
			if (m_pInfo)
			{
				ZOOM_SDK_NAMESPACE::IList<const wchar_t*>* p = m_pInfo->GetBOMeetingIDList();
				if (p)
				{
					int count = p->GetCount();
					array<String^ >^ p2 = gcnew array<String^ >(count);
					if (p2)
					{
						for (int i = 0; i < count; i++)
						{
							String^ userid = WChar2PlatformString(p->GetItem(i));
							p2[i] = userid;
						}
						return p2;
					}
				}
			}
			return nullptr;
		}
		virtual String^ GetBOUserName(String^ strUserID)
		{
			if (m_pInfo)
				return WChar2PlatformString(m_pInfo->GetBOUserName(PlatformString2WChar(strUserID)));
			return nullptr;
		}
		virtual BO_CTRL_USER_STATUS GetBOUserStatus(String ^ strUserID)
		{
			if (m_pInfo)
				return (BO_CTRL_USER_STATUS)m_pInfo->GetBOUserStatus(PlatformString2WChar(strUserID));
			return  BO_CTRL_USER_STATUS::BO_CTRL_USER_STATUS_UNKNOWN;
		}
		virtual bool IsBOUserMyself(String^ strUserID)
		{
			if (m_pInfo)
				return m_pInfo->IsBOUserMyself(PlatformString2WChar(strUserID));
			return false;
		}
		virtual IBOMeetingDotNet^ GetBOMeetingByID(String^ strBOId)
		{
			if (m_pInfo)
			{
				ZOOM_SDK_NAMESPACE::IBOMeeting*p = m_pInfo->GetBOMeetingByID(PlatformString2WChar(strBOId));
				return TranslateBOMeeting(p);
			}
			return nullptr;
		}

	private:
		IBODataDotNetImpl() {}
		ZOOM_SDK_NAMESPACE::IBOData* m_pInfo;
	};

	private ref class IBOMeetingDotNetImpl sealed : public IBOMeetingDotNet
	{
	public:
		IBOMeetingDotNetImpl(ZOOM_SDK_NAMESPACE::IBOMeeting* pInfo)
		{
			m_pInfo = pInfo;
		}
		virtual String^ GetBOID()
		{
			if (m_pInfo)
			{
				const wchar_t* p = m_pInfo->GetBOID();
				return WChar2PlatformString(p);
			}
			return nullptr;
		}
		virtual String^ GetBOName()
		{
			if (m_pInfo)
			{
				const wchar_t* p = m_pInfo->GetBOName();
				return WChar2PlatformString(p);
			}
			return nullptr;
		}
		virtual array<String^ >^ GetBOUserList()
		{
			if (m_pInfo)
			{
				ZOOM_SDK_NAMESPACE::IList<const wchar_t*>* p = m_pInfo->GetBOUserList();
				return Convert(p);
			}
			return nullptr;
		}

	private:
		IBOMeetingDotNetImpl() {}
		ZOOM_SDK_NAMESPACE::IBOMeeting* m_pInfo;
	};

	private ref class IBOAssistantDotNetImpl sealed : public IBOAssistantDotNet
	{
	public:
		IBOAssistantDotNetImpl(ZOOM_SDK_NAMESPACE::IBOAssistant* pInfo)
		{
			m_pInfo = pInfo;
		}
		ZOOM_SDK_NAMESPACE::IBOAssistant* m_pInfo;
	};

	private ref class IBOAttendeeDotNetImpl sealed : public IBOAttendeeDotNet
	{
	public:
		IBOAttendeeDotNetImpl(ZOOM_SDK_NAMESPACE::IBOAttendee* pInfo)
		{
			m_pInfo = pInfo;
		}
		ZOOM_SDK_NAMESPACE::IBOAttendee* m_pInfo;
	};

	private ref class IBOAdminDotNetImpl sealed : public IBOAdminDotNet
	{
	public:
		IBOAdminDotNetImpl(ZOOM_SDK_NAMESPACE::IBOAdmin* pInfo)
		{
			m_pInfo = pInfo;
		}

		virtual bool StartBO()
		{
			if (m_pInfo)
				return m_pInfo->StartBO();
			return false;
		}

		virtual bool StopBO()
		{
			if (m_pInfo)
				return m_pInfo->StopBO();
			return false;
		}

		virtual bool AssignNewUserToRunningBO(String^ strUserID, String^ strBOID)
		{
			if (m_pInfo)
				return m_pInfo->AssignNewUserToRunningBO(PlatformString2WChar(strUserID), PlatformString2WChar(strBOID));
			return false;
		}

		virtual bool SwitchAssignedUserToRunningBO(String^ strUserID, String^ strBOID)
		{
			if (m_pInfo)
				return m_pInfo->SwitchAssignedUserToRunningBO(PlatformString2WChar(strUserID), PlatformString2WChar(strBOID));
			return false;
		}

		virtual bool CanStartBO()
		{
			if (m_pInfo)
				return m_pInfo->CanStartBO();
			return false;
		}

		virtual bool JoinBOByUserRequest(String^ strUserID)
		{
			if (m_pInfo)
				return m_pInfo->JoinBOByUserRequest(PlatformString2WChar(strUserID));
			return false;
		}

		virtual bool IgnoreUserHelpRequest(String^ strUserID)
		{
			if (m_pInfo)
				return m_pInfo->IgnoreUserHelpRequest(PlatformString2WChar(strUserID));
			return false;
		}

		virtual bool BroadcastMessage(String^ strUserID)
		{
			if (m_pInfo)
				return m_pInfo->BroadcastMessage(PlatformString2WChar(strUserID));
			return false;
		}

	private:
		IBOAdminDotNetImpl() {}
		ZOOM_SDK_NAMESPACE::IBOAdmin* m_pInfo;
	};

	IBOCreatorDotNetImpl^ TranslateBOCreator(ZOOM_SDK_NAMESPACE::IBOCreator* p)
	{
		if (p)
		{
			return gcnew IBOCreatorDotNetImpl(p);
		}
		return nullptr;
	}

	IBODataDotNetImpl^ TranslateBOData(ZOOM_SDK_NAMESPACE::IBOData* p)
	{
		if (p)
		{
			return gcnew IBODataDotNetImpl(p);
		}
		return nullptr;
	}

	IBOMeetingDotNet^ TranslateBOMeeting(ZOOM_SDK_NAMESPACE::IBOMeeting* p)
	{
		if (p)
		{
			return gcnew IBOMeetingDotNetImpl(p);
		}
		return nullptr;
	}

	IBOAdminDotNet^ TranslateBOAdmin(ZOOM_SDK_NAMESPACE::IBOAdmin* p)
	{
		if (p)
		{
			return gcnew IBOAdminDotNetImpl(p);
		}
		return nullptr;
	}

	IBOAssistantDotNet^ TranslateBOAssistant(ZOOM_SDK_NAMESPACE::IBOAssistant* p)
	{
		if (p)
		{
			return gcnew IBOAssistantDotNetImpl(p);
		}
		return nullptr;
	}

	IBOAttendeeDotNet^ TranslateBOAttendee(ZOOM_SDK_NAMESPACE::IBOAttendee* p)
	{
		if (p)
		{
			return gcnew IBOAttendeeDotNetImpl(p);
		}
		return nullptr;
	}

	//
	//translate event
	class MeetingBOControllerEventHandler
	{
	public:
		static MeetingBOControllerEventHandler& GetInst()
		{
			static MeetingBOControllerEventHandler inst;
			return inst;
		}

		void OnNewBroadcastMessageReceived(const wchar_t* stBID)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBONewBroadcastMessageReceived(WChar2PlatformString(stBID));
		}

		void onHasCreatorRightsNotification(ZOOM_SDK_NAMESPACE::IBOCreator * boc)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOHasCreatorRightsNotification(TranslateBOCreator(boc));
		}

		void OnHasAdminRightsNotification(ZOOM_SDK_NAMESPACE::IBOAdmin* boc)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOHasAdminRightsNotification(TranslateBOAdmin(boc));
		}

		void OnHasAssistantRightsNotification(ZOOM_SDK_NAMESPACE::IBOAssistant* boc)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOHasAssistantRightsNotification(TranslateBOAssistant(boc));
		}

		void OnHasAttendeeRightsNotification(ZOOM_SDK_NAMESPACE::IBOAttendee* boc)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOHasAttendeeRightsNotification(TranslateBOAttendee(boc));
		}

		void OnHasDataHelperRightsNotification(ZOOM_SDK_NAMESPACE::IBOData* boc)
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOHasDataHelperRightsNotification(TranslateBOData(boc));
		}

		void OnLostCreatorRightsNotification()
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOLostCreatorRightsNotification();
		}

		void OnLostAdminRightsNotification()
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOLostAdminRightsNotification();
		}

		void OnLostAssistantRightsNotification()
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOLostAssistantRightsNotification();
		}

		void OnLostAttendeeRightsNotification()
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOLostAttendeeRightsNotification();
		}

		void OnLostDataHelperRightsNotification()
		{
			if (CMeetingBOControllerDotNetWrap::Instance)
				CMeetingBOControllerDotNetWrap::Instance->ProcBOLostDataHelperRightsNotification();
		}
	private:
		MeetingBOControllerEventHandler() {};
	};
	//

	void CMeetingBOControllerDotNetWrap::BindEvent()
	{
		ZOOM_SDK_NAMESPACE::IMeetingBOControllerWrap& meetingBO = ZOOM_SDK_NAMESPACE::CSDKWrap::GetInst().GetMeetingServiceWrap().GetMeetingBOController();
		meetingBO.m_cbOnNewBroadcastMessageReceived =
			std::bind(&MeetingBOControllerEventHandler::OnNewBroadcastMessageReceived,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);
		meetingBO.m_cbonHasCreatorRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::onHasCreatorRightsNotification,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);
		meetingBO.m_cbonHasAdminRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnHasAdminRightsNotification,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);
		meetingBO.m_cbonHasAssistantRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnHasAssistantRightsNotification,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);
		meetingBO.m_cbonHasAttendeeRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnHasAttendeeRightsNotification,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);
		meetingBO.m_cbonHasDataHelperRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnHasDataHelperRightsNotification,
				&MeetingBOControllerEventHandler::GetInst(), std::placeholders::_1);

		meetingBO.m_cbonLostCreatorRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnLostCreatorRightsNotification,
				&MeetingBOControllerEventHandler::GetInst());
		meetingBO.m_cbonLostAdminRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnLostAdminRightsNotification,
				&MeetingBOControllerEventHandler::GetInst());
		meetingBO.m_cbonLostAssistantRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnLostAssistantRightsNotification,
				&MeetingBOControllerEventHandler::GetInst());
		meetingBO.m_cbonLostAttendeeRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnLostAttendeeRightsNotification,
				&MeetingBOControllerEventHandler::GetInst());
		meetingBO.m_cbonLostDataHelperRightsNotification =
			std::bind(&MeetingBOControllerEventHandler::OnLostDataHelperRightsNotification,
				&MeetingBOControllerEventHandler::GetInst());
	}

	void CMeetingBOControllerDotNetWrap::ProcBONewBroadcastMessageReceived(String^ stBID)
	{
		event_OnNewBroadcastMessageReceived(stBID);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOHasCreatorRightsNotification(IBOCreatorDotNet^ boc)
	{
		event_onHasCreatorRightsNotification(boc);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOHasAdminRightsNotification(IBOAdminDotNet^ boc)
	{
		event_onHasAdminRightsNotification(boc);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOHasAssistantRightsNotification(IBOAssistantDotNet^ boc)
	{
		event_onHasAssistantRightsNotification(boc);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOHasAttendeeRightsNotification(IBOAttendeeDotNet^ boc)
	{
		event_onHasAttendeeRightsNotification(boc);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOHasDataHelperRightsNotification(IBODataDotNet^ boc)
	{
		event_onHasDataHelperRightsNotification(boc);
	}

	void CMeetingBOControllerDotNetWrap::ProcBOLostCreatorRightsNotification()
	{
		event_onLostCreatorRightsNotification();
	}

	void CMeetingBOControllerDotNetWrap::ProcBOLostAdminRightsNotification()
	{
		event_onLostAdminRightsNotification();
	}

	void CMeetingBOControllerDotNetWrap::ProcBOLostAssistantRightsNotification()
	{
		event_onLostAssistantRightsNotification();
	}

	void CMeetingBOControllerDotNetWrap::ProcBOLostAttendeeRightsNotification()
	{
		event_onLostAttendeeRightsNotification();
	}

	void CMeetingBOControllerDotNetWrap::ProcBOLostDataHelperRightsNotification()
	{
		event_onLostDataHelperRightsNotification();
	}

	bool CMeetingBOControllerDotNetWrap::IsBOStarted()
	{
		return ZOOM_SDK_NAMESPACE::CSDKWrap::GetInst().GetMeetingServiceWrap().
			GetMeetingBOController().IsBOStarted();
	}

	IBOCreatorDotNet^ CMeetingBOControllerDotNetWrap::GetBOCreatorHelper()
	{
		return TranslateBOCreator(ZOOM_SDK_NAMESPACE::CSDKWrap::GetInst().GetMeetingServiceWrap().
			GetMeetingBOController().GetBOCreatorHelper());
	}

	IBODataDotNet^ CMeetingBOControllerDotNetWrap::GetBODataHelper()
	{
		return TranslateBOData(ZOOM_SDK_NAMESPACE::CSDKWrap::GetInst().GetMeetingServiceWrap().
			GetMeetingBOController().GetBODataHelper());
	}
}

Test the Wrapper

Try out the new break out room controller wrapper by starting break out rooms and then calling the IsBOStarted function. It should return true.
	bool b = CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingBOController().IsBOStarted();
Last updated on 20 Apr 2021
133, New Bridge Road #24-01
Chinatown Point S(049513) •
Tel: 6-552-6826 •
Email: sales@bumblebee.com.sg
Copyright Bumble Bee Laboratories Pte. Ltd. July 2020