Customizing the Icon for a Specific Scenario
SetCustomUIImage
API Description
This API is used to customize the icon for a specific scenario.
Precautions
- This API is an asynchronous API. The return value only indicates whether the API is successfully called. The actual service processing result is returned in the corresponding callback function.
Method Definition
1
|
HWM_SDK_AGENT_API hwmsdk::HwmErrCode SetCustomUIImage(const HwmCustomSceneImageInfoList* customSceneImageInfoList); |
Callback Function
1
|
virtual void OnSetCustomUIImageResult(hwmsdk::HwmErrCode ret, const char* reason) {}; |
Parameter Description
Parameter |
Type |
Description |
---|---|---|
customSceneImageInfoListSize |
unsigned int |
Number of scenarios requiring icon customization. |
customSceneImageInfoList |
HwmCustomSceneImageInfo* |
Custom icon details. |
Parameter |
Type |
Description |
---|---|---|
scene |
HwmUICustomImageScene |
Scenario requiring icon customization. |
imagePath |
char[] |
Absolute path of the custom icon. For example, to/path/image.svg. SVG and PNG formats are supported. UTF-8 encoding is required. |
width |
unsigned int |
Custom icon width. |
height |
unsigned int |
Custom icon height. |
Enumerated Value |
Description |
---|---|
CLOUD_RECORD_ICON_IMAGE_SCENE |
Main icon of cloud recording in a meeting (in the recording pop-up menu, participant list, and sharing toolbar). |
MAIN_WINDOW_CLOUD_RECORD_ICON_SCENE |
Small cloud recording icon in the main window. |
MAIN_WINDOW_CLOUD_RECORD_LOGO_SCENE |
Large cloud recording logo in the main window. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
/** * Customize the icon for a specific scenario. */ void demoCustomSceneContentDlg::OnBnClickedOk() { // Obtain the icon information. hwmsdkagent::HwmCustomSceneImageInfo imageInfo; int ccomboxIndex = m_comboBoxScene.GetCurSel(); imageInfo.scene = static_cast<hwmsdkagent::HwmUICustomImageScene>(ccomboxIndex); CString tempCString; m_imagePath.GetWindowText(tempCString); strncpy_s(imageInfo.imagePath, CTools::UNICODE2UTF(tempCString.GetString()).c_str(), HWM_MAX_FILE_PATH_LEN); m_width.GetWindowText(tempCString); imageInfo.width = static_cast<unsigned int>(_ttoi(tempCString)); m_height.GetWindowText(tempCString); imageInfo.height = static_cast<unsigned int>(_ttoi(tempCString)); hwmsdkagent::HwmCustomSceneImageInfoList data{}; data.customSceneImageInfoListSize = 1; data.customSceneImageInfoList = new (std::nothrow)hwmsdkagent::HwmCustomSceneImageInfo[data.customSceneImageInfoListSize]; data.customSceneImageInfoList[0] = std::move(imageInfo); hwmsdk::HwmErrCode ret = hwmsdkagent::SetCustomUIImage(&data); if (ret != hwmsdk::HWM_COMMON_SUCCESS) { CTools::OutputRetStr("Custom scene content error"); } // Release the struct memory. if (data.customSceneImageInfoList != nullptr) { delete data.customSceneImageInfoList; data.customSceneImageInfoList = nullptr; } } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot