-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
725496b
commit 11db240
Showing
23 changed files
with
322 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
zoom_sdk_c_sharp_wrap/customized_resource_helper_dotnet_wrap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "stdafx.h" | ||
#include "customized_resource_helper_dotnet_wrap.h" | ||
#include "zoom_sdk_dotnet_wrap_util.h" | ||
#include "wrap/sdk_wrap.h" | ||
namespace ZOOM_SDK_DOTNET_WRAP { | ||
|
||
SDKError CCustomizedResourceHelperDotNetWrap::AddCustomizedPictureResource(String^ key_, String^ absolute_resource_path) | ||
{ | ||
return (SDKError)ZOOM_SDK_NAMESPACE::CSDKExtWrap::GetInst().GetCustomizedResourceHelperWrap() | ||
.AddCustomizedPictureResource(PlatformString2WChar(key_), PlatformString2WChar(absolute_resource_path)); | ||
} | ||
|
||
SDKError CCustomizedResourceHelperDotNetWrap::AddCustomizedStringResource(SDKCustomizedStringType customizedType, String^ customizedString) | ||
{ | ||
return (SDKError)ZOOM_SDK_NAMESPACE::CSDKExtWrap::GetInst().GetCustomizedResourceHelperWrap() | ||
.AddCustomizedStringResource((ZOOM_SDK_NAMESPACE::SDKCustomizedStringType)customizedType, PlatformString2WChar(customizedString)); | ||
} | ||
|
||
SDKError CCustomizedResourceHelperDotNetWrap::AddCustomizedURLResource(SDKCustomizedURLType customizedType, String^ customizedUrl) | ||
{ | ||
return (SDKError)ZOOM_SDK_NAMESPACE::CSDKExtWrap::GetInst().GetCustomizedResourceHelperWrap() | ||
.AddCustomizedURLResource((ZOOM_SDK_NAMESPACE::SDKCustomizedURLType)customizedType, PlatformString2WChar(customizedUrl)); | ||
} | ||
|
||
CCustomizedResourceHelperDotNetWrap::CCustomizedResourceHelperDotNetWrap() | ||
{ | ||
} | ||
|
||
CCustomizedResourceHelperDotNetWrap::~CCustomizedResourceHelperDotNetWrap() | ||
{ | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
zoom_sdk_c_sharp_wrap/customized_resource_helper_dotnet_wrap.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma once | ||
using namespace System; | ||
#include "zoom_sdk_dotnet_wrap_def.h" | ||
namespace ZOOM_SDK_DOTNET_WRAP { | ||
|
||
public enum class SDKCustomizedStringType : int | ||
{ | ||
SDK_Customized_LiveStream_MenuString_LiveOn_String = 0,///<The new string must end up with "%s" so that the menu item can show correctly. This type is used to define a string to replace the menu item ON %S on live streaming. | ||
SDK_Customized_LiveStream_MenuString_LiveView_String,///<The new string must end up with "%s" so that the menu item can show correctly. This type is used to define a string to replace the menu item VIEW STREAM ON %S on live streaming. | ||
SDK_Customized_LiveStream_MenuString_LiveStop_String,///<The new string must be a pure string so that it can show correctly. This type is used to define a string to replace the menu item STOP LIVE STREAM on live streaming. | ||
SDK_Customized_LiveStream_MenuString_CopyURL_String,///<The new string must be a pure string so that it can show correctly. This type is used to define a string to replace the menu item COPY STREAMING LINK on live streaming. | ||
SDK_Customized_Title_App, ///<The new string must be a pure string so that it can show correctly. This type is used to define a string to replace the title of the meeting video UI. | ||
SDK_Customized_Title_ZoomVideo, ///<The new string must be the same format as "Zoom Participant ID: %s Meeting ID: %s" so that it can show correctly. This type is used to define a string to replace the title of the meeting video UI. | ||
SDK_Customized_Title_FreeZoomVideo, ///<The new string must be the same format as "Zoom Participant ID: %s %d-Minutes Meeting ID:%s" so that it can show correctly. This type is used to define a string to replace the title of the meeting video UI when the user is free user and in view-only status. | ||
SDK_Customized_Title_ViewOnly_ZoomVideo, ///<The new string must end up with "%s" so that it can show correctly. This type is used to define a string to replace the title of the meeting video UI. | ||
SDK_Customized_Title_ViewOnly_FreeZoomVideo, ///<The new string must be the same format as "Zoom %d-Minutes Meeting ID: %s" so that it can show correctly. This type is used to define a string to replace the title of the meeting video UI when the user is free user and in view-only status. | ||
}; | ||
|
||
public enum class SDKCustomizedURLType : int | ||
{ | ||
SDKCustomizedURL_VITRULBG_HELP, ///<Set the custom help URL in the virtual background tab page. | ||
SDKCustomizedURL_VITRULBG_LEARN_MORE,///<Set the custom Learn More URL in the virtual background tab page. | ||
SDKCustomizedURL_SUPPORTURL, ///<Set the Support URL in the meeting. | ||
}; | ||
|
||
public interface class ICustomizedResourceHelperDotNetWrap | ||
{ | ||
public: | ||
SDKError AddCustomizedPictureResource(String^ key_, String^ absolute_resource_path); | ||
SDKError AddCustomizedStringResource(SDKCustomizedStringType customizedType, String^ customizedString); | ||
SDKError AddCustomizedURLResource(SDKCustomizedURLType customizedType, String^ customizedUrl); | ||
}; | ||
|
||
private ref class CCustomizedResourceHelperDotNetWrap sealed: public ICustomizedResourceHelperDotNetWrap | ||
{ | ||
// TODO: Add your methods for this class here. | ||
public: | ||
static property CCustomizedResourceHelperDotNetWrap^ Instance | ||
{ | ||
CCustomizedResourceHelperDotNetWrap^ get() { return m_Instance; } | ||
} | ||
|
||
virtual SDKError AddCustomizedPictureResource(String^ key_, String^ absolute_resource_path); | ||
virtual SDKError AddCustomizedStringResource(SDKCustomizedStringType customizedType, String^ customizedString); | ||
virtual SDKError AddCustomizedURLResource(SDKCustomizedURLType customizedType, String^ customizedUrl); | ||
|
||
private: | ||
CCustomizedResourceHelperDotNetWrap(); | ||
virtual ~CCustomizedResourceHelperDotNetWrap(); | ||
static CCustomizedResourceHelperDotNetWrap^ m_Instance = gcnew CCustomizedResourceHelperDotNetWrap; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
zoom_sdk_c_sharp_wrap/wrap/customized_resource_helper_wrap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#pragma once | ||
#include "customized_resource_helper_wrap.h" | ||
BEGIN_ZOOM_SDK_NAMESPACE | ||
SDKError ICustomizedResourceHelperWrap::AddCustomizedPictureResource(const wchar_t* key_, const wchar_t* absolute_resource_path) | ||
{ | ||
if (key_ && absolute_resource_path) | ||
{ | ||
cache_customized_pic_map.insert(std::make_pair(key_, absolute_resource_path)); | ||
} | ||
return SDKERR_SUCCESS; | ||
} | ||
SDKError ICustomizedResourceHelperWrap::AddCustomizedStringResource(SDKCustomizedStringType customizedType, const wchar_t* customizedString) | ||
{ | ||
if (customizedString) | ||
{ | ||
cache_customized_str_map.insert(std::make_pair(customizedType, customizedString)); | ||
} | ||
return SDKERR_SUCCESS; | ||
} | ||
|
||
SDKError ICustomizedResourceHelperWrap::AddCustomizedURLResource(SDKCustomizedURLType customizedType, const wchar_t* customizedUrl) | ||
{ | ||
if (customizedType) | ||
{ | ||
cache_customized_url_map.insert(std::make_pair(customizedType, customizedUrl)); | ||
} | ||
return SDKERR_SUCCESS; | ||
} | ||
|
||
void ICustomizedResourceHelperWrap::ApplyAll() | ||
{ | ||
ZOOM_SDK_NAMESPACE::ICustomizedResourceHelper* pObj(NULL); | ||
CSDKImpl::GetInst().RetrieveCustomizedResourceHelper(&pObj); | ||
if (pObj) | ||
{ | ||
{ | ||
std::map<std::wstring, std::wstring>::iterator iter_pic = cache_customized_pic_map.begin(); | ||
while (cache_customized_pic_map.end() != iter_pic) | ||
{ | ||
pObj->AddCustomizedPictureResource(iter_pic->first.c_str(), iter_pic->second.c_str()); | ||
++iter_pic; | ||
} | ||
} | ||
|
||
|
||
{ | ||
std::map<SDKCustomizedStringType, std::wstring>::iterator iter_str = cache_customized_str_map.begin(); | ||
while (cache_customized_str_map.end() != iter_str) | ||
{ | ||
pObj->AddCustomizedStringResource(iter_str->first, iter_str->second.c_str()); | ||
++iter_str; | ||
} | ||
} | ||
|
||
{ | ||
std::map<SDKCustomizedURLType, std::wstring>::iterator iter_url = cache_customized_url_map.begin(); | ||
while (cache_customized_url_map.end() != iter_url) | ||
{ | ||
pObj->AddCustomizedURLResource(iter_url->first, iter_url->second.c_str()); | ||
++iter_url; | ||
} | ||
} | ||
|
||
cache_customized_pic_map.clear(); | ||
cache_customized_str_map.clear(); | ||
cache_customized_url_map.clear(); | ||
} | ||
} | ||
END_ZOOM_SDK_NAMESPACE |
20 changes: 20 additions & 0 deletions
20
zoom_sdk_c_sharp_wrap/wrap/customized_resource_helper_wrap.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
#include "common_include.h" | ||
#include <map> | ||
#include <string> | ||
BEGIN_ZOOM_SDK_NAMESPACE | ||
class ICustomizedResourceHelperWrap : public ICustomizedResourceHelper | ||
{ | ||
public: | ||
static ICustomizedResourceHelperWrap& GetInst() { static ICustomizedResourceHelperWrap inst; return inst; }; | ||
virtual SDKError AddCustomizedPictureResource(const wchar_t* key_, const wchar_t* absolute_resource_path); | ||
virtual SDKError AddCustomizedStringResource(SDKCustomizedStringType customizedType, const wchar_t* customizedString); | ||
virtual SDKError AddCustomizedURLResource(SDKCustomizedURLType customizedType, const wchar_t* customizedUrl); | ||
|
||
void ApplyAll(); | ||
private: | ||
std::map<std::wstring, std::wstring> cache_customized_pic_map; | ||
std::map<SDKCustomizedStringType, std::wstring> cache_customized_str_map; | ||
std::map<SDKCustomizedURLType, std::wstring> cache_customized_url_map; | ||
}; | ||
END_ZOOM_SDK_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.