Updating Custom Button Configurations
UpdateCustomButtonInfo
API Description
This API is used to update the configurations related to customized buttons. The bottom toolbar and shared toolbar are supported.
Precautions
- Used to update the customized button configuration during a meeting.
- Valid only for customized buttons that have been configured in Config.
Method Definition
1
|
HWM_SDK_AGENT_API hwmsdk::HwmErrCode UpdateCustomButtonInfo(const HwmCustomButtonInfo *btnInfo); |
Callback Function
1
|
virtual void OnUpdateCustomButtonInfoResult(hwmsdk::HwmErrCode ret, const char* reason) {}; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
btnInfo |
Yes |
HwmCustomButtonInfo |
Custom button information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
HwmCustomButtonPos |
Yes |
HwmCustomButtonPos |
Position of a customized button |
buttonKey |
Yes |
char[] |
Customized button ID, which must be the same as that configured in the config file. |
buttonTitle |
Yes |
char[] |
Customized button name |
buttonImg |
Yes |
char[] |
Icon path of a customized button. Use an absolute path. |
Parameter |
Description |
---|---|
CUSTOM_BUTTON_POS_TOOL_BAR |
Bottom toolbar |
CUSTOM_BUTTON_POS_SHARE_TOOL_BAR |
Sharing toolbar |
Return Values
Type |
Description |
---|---|
HwmErrCode |
If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes. |
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/** * Update customized button configurations. */ int hwmSDKConfigUI::hwmSDKConfigUI() { hwmsdkagent::HwmCustomButtonInfo btnInfo{}; btnInfo.buttonPos = hwmsdkagent::CUSTOM_BUTTON_POS_TOOL_BAR; string buttonKey = CTools::UNICODE2UTF(CString("customMenu")); strcpy_s(btnInfo.buttonKey, sizeof(btnInfo.buttonKey), buttonKey.c_str()); string buttonTitle = CTools::UNICODE2UTF(CString("update")); strcpy_s(btnInfo.buttonTitle, sizeof(btnInfo.buttonTitle), buttonTitle.c_str()); string buttonIconPath = CTools::UNICODE2UTF(CString("path/to/image")); strcpy_s(btnInfo.buttonImg, sizeof(btnInfo.buttonImg), buttonIconPath.c_str()); //Update the customized button configurations. int ret = hwmsdkagent::UpdateCustomButtonInfo(&btnInfo); LOG_INFO("Call hwmsdkagent::UpdateCustomButtonInfo ret is " << ret); } |
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