Obtaining the Login Status
Function
This API is used to obtain the login status.
Function Prototype
getLoginState(onGetLoginStateResult?: (ret: SDKERR, reason: string, loginStateInfo: LoginStateInfo) => void): voidgetLoginState(onGetLoginStateResult?: (ret: SDKERR, reason: string, loginStateInfo: LoginStateInfo) => void): void
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| onGetLoginStateResult | Yes | (ret: SDKERR, reason: string, loginStateInfo: LoginStateInfo) => void | Callback of the API for obtaining the login status. |
Return Values
void
Callback Method Parameters
(ret: SDKERR, reason: string, loginStateInfo: LoginStateInfo) => void
| Parameter | Type | Description |
|---|---|---|
| ret | For details about SDKERR, see Error Code Reference. | Error code. |
| reason | string | Error description. |
| loginStateInfo | LoginStateInfo | Login status information. |
| Parameter | Type | Description |
|---|---|---|
| loginState | LoginState | Login mode. |
| Enumeration Name | Enumerated Value | Description |
|---|---|---|
| LOGIN_STATUS_UN_LOGIN | 0 | Logged out. |
| LOGIN_STATUS_LOGINING | 1 | Logging in. |
| LOGIN_STATUS_LOGINED | 2 | Logged in. |
| LOGIN_STATUS_LOGOUTING | 3 | Logging out. |
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