/** * @file meeting_audio_interface.h * @brief Meeting Service Audio Interface. */ #ifndef _MEETING_AUDIO_INTERFACE_H_ #define _MEETING_AUDIO_INTERFACE_H_ #include "zoom_sdk_def.h" BEGIN_ZOOM_SDK_NAMESPACE /** * @brief Define the audio status of the user. * Here are more detailed structural descriptions. */ enum AudioStatus { /** Initialization. */ Audio_None, /** Muted status. */ Audio_Muted, /** Unmuted status. */ Audio_UnMuted, /** Muted by the host. */ Audio_Muted_ByHost, /** Unmuted by the host. */ Audio_UnMuted_ByHost, /** The host mutes all. */ Audio_MutedAll_ByHost, /** The host unmutes all. */ Audio_UnMutedAll_ByHost, }; /** * @brief Define the audio type of the user. * Here are more detailed structural descriptions. */ enum AudioType { /** Normal audio type. */ AUDIOTYPE_NONE, /** In VoIP mode. */ AUDIOTYPE_VOIP, /** In telephone mode. */ AUDIOTYPE_PHONE, /** Unknown mode. */ AUDIOTYPE_UNKNOWN, }; /** * @class IRequestStartAudioHandler * @brief Process after the user receives the requirement from the host to turn on the audio. */ class IRequestStartAudioHandler { public: virtual ~IRequestStartAudioHandler(){}; /** * @brief Get the user ID who asks to turn on the audio. * @return If the function succeeds, the return value is the user ID. FALSE 0. * @deprecated This interface is marked as deprecated. */ virtual unsigned int GetReqFromUserId() = 0; /** * @brief Instance to ignore the requirement, return nothing and finally self-destroy. */ virtual SDKError Ignore() = 0; /** * @brief Instance to accept the requirement, turn on the audio and finally self-destroy. */ virtual SDKError Accept() = 0; /** * @brief Ignore the request to enable the video in the meeting and finally the instance self-destroys. */ virtual SDKError Cancel() = 0; }; /** * @class IUserAudioStatus * @brief User audio status interface. */ class IUserAudioStatus { public: /** * @brief Get the user ID. * @return The user ID. */ virtual unsigned int GetUserId() = 0; /** * @brief Get the audio status of the user. * @return Value defined in AudioStatus enum. */ virtual AudioStatus GetStatus() = 0; /** * @brief Get the audio type of the user. * @return Value defined in AudioType enum. */ virtual AudioType GetAudioType() = 0; virtual ~IUserAudioStatus(){}; }; /** * @class IMeetingAudioCtrlEvent * @brief Meeting audio callback event */ class IMeetingAudioCtrlEvent { public: /** * @brief User's audio status changed callback. * @param lstAudioStatusChange List of the user information with audio status changed. The list will be emptied once the function calls end. * @param strAudioStatusList List of the user information whose audio status changes, saved in json format. This parameter is currently invalid, hereby only for reservations. */ virtual void onUserAudioStatusChange(IList* lstAudioStatusChange, const zchar_t* strAudioStatusList = nullptr) = 0; /** * @brief The callback event that users whose audio is active changed. * @param plstActiveAudio List to store the ID of user whose audio is active. */ virtual void onUserActiveAudioChange(IList* plstActiveAudio) = 0; /** * @brief Callback event of the requirement to turn on the audio from the host. * @param handler_ A pointer to the IRequestStartAudioHandler. */ virtual void onHostRequestStartAudio(IRequestStartAudioHandler* handler_) = 0; /** * @brief Callback event that requests to join third party telephony audio. * @param audioInfo Instruction on how to join the meeting with third party audio. */ virtual void onJoin3rdPartyTelephonyAudio(const zchar_t* audioInfo) = 0; /** * @brief Callback event for the mute on entry status change. * @param bEnabled Specify whether mute on entry is enabled or not. */ virtual void onMuteOnEntryStatusChange(bool bEnabled) = 0; virtual ~IMeetingAudioCtrlEvent() {} }; /** * @class IMeetingAudioController * @brief Meeting audio controller interface. */ class IMeetingAudioController { public: /** * @brief Configure the meeting audio controller callback event handler. * @param pEvent An object pointer to the IMeetingAudioCtrlEvent that receives the meeting audio callback event. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note The SDK use pEvent to transmit the callback event to the user's application. If the function is not called or failed, the user's application is unabled to retrieve the callback event. */ virtual SDKError SetEvent(IMeetingAudioCtrlEvent* pEvent) = 0; /** * @brief Join VoIP meeting. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError JoinVoip() = 0; /** * @brief Leave VoIP meeting. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError LeaveVoip() = 0; /** * @brief Mute the assigned user. * @param userid Specify the user ID to mute. ZERO(0) indicates to mute all the participants. * @param allowUnmuteBySelf The user may unmute himself when everyone is muted. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError MuteAudio(unsigned int userid, bool allowUnmuteBySelf = true) = 0; /** * @brief Unmute the assigned user. * @param userid Specify the user ID to unmute. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError UnMuteAudio(unsigned int userid) = 0; /** * @brief Check if the user can unmute himself. * @return TRUE indicates that the user can unmute himself. Otherwise not. * @note Valid for both ZOOM style and user custom interface mode. */ virtual bool CanUnMuteBySelf() = 0; /** * @brief Check if the host or cohost can enable mute on entry. * @return TRUE indicates that the host or cohost can enable mute on entry. Otherwise not. * @note Valid for both ZOOM style and user custom interface mode. */ virtual bool CanEnableMuteOnEntry() = 0; /** * @brief Mute or umute the user after joining the meeting. * @param bEnable TRUE indicates to mute the user after joining the meeting. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise fails. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError EnableMuteOnEntry(bool bEnable,bool allowUnmuteBySelf) = 0; /** * @brief Determine if mute on entry is enabled. * @return TRUE indicates that mute on entry is enabled. */ virtual bool IsMuteOnEntryEnabled() = 0; /** * @brief User joins or leaves the meeting in silence or no. * @param bEnable TRUE indicates to play chime when the user joins or leaves the meeting. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise failed. * @note Valid for both ZOOM style and user custom interface mode. */ virtual SDKError EnablePlayChimeWhenEnterOrExit(bool bEnable) = 0; /** * @brief Stop the incoming audio. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise the function fails and returns an error. */ virtual SDKError StopIncomingAudio(bool bStop) = 0; /** * @brief Determine if the incoming audio is stopped. * @return TRUE indicates that the incoming audio is stopped. */ virtual bool IsIncomingAudioStopped() = 0; /** * @brief Determine if the meeting has third party telephony audio enabled. * @return TRUE means enabled, otherwise it is not enabled. */ virtual bool Is3rdPartyTelephonyAudioOn() = 0; /** * @brief Enable or disable SDK to play meeting audio. * @param bEnable True means that SDK will play meeting audio. False means that SDK will not play meeting audio. * @return If the function succeeds, the return value is SDKErr_Success. Otherwise fails. * @note SDK will not support sharing computer sound when disabling playing meeting audio. */ virtual SDKError EnablePlayMeetingAudio(bool bEnable) = 0; /** * @brief Determine if play meeting audio is enabled or not. * @return TRUE means enabled, otherwise it is not enabled. */ virtual bool IsPlayMeetingAudioEnabled() = 0; }; END_ZOOM_SDK_NAMESPACE #endif