Obtaining the Status of Your Sharing
GetSelfShareState
API Description
This API is used to obtain the status of sharing initiated by you.
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 GetSelfShareState(); |
Callback Function
1
|
virtual void OnGetSelfShareStateResult(hwmsdk::HwmErrCode ret, const char* reason, HwmSelfShareStateInfo* selfShareStateInfo) {}; |
Parameter Description
Parameter |
Type |
Description |
---|---|---|
state |
HwmState |
Sharing status. |
Parameter |
Description |
---|---|
HWM_STATE_OFF |
Ended. |
HWM_STATE_ON |
Ongoing. |
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
/** * API calling */ void demoConfCtrlDlg::OnBnClickedButtonGetSelfShareState() { int ret = hwmsdkagent::GetSelfShareState(); if (ret != hwmsdk::HWM_COMMON_SUCCESS) { AfxMessageBox(_T("GetSelfShareState failed")); } }
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