NEMeetingKit
载入中...
搜索中...
未找到
auth_service.h
浏览该文件的文档.
1// Copyright (c) 2022 NetEase, Inc. All rights reserved.
2// Use of this source code is governed by a MIT license that can be
3// found in the LICENSE file.
4
13#ifndef NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
14#define NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
15#include <string>
16#include "meeting.h"
17#include "service_define.h"
18
20
26class NEAuthListener : public NEObject {
27public:
32 virtual void onKickOut() = 0;
33
38 virtual void onAuthInfoExpired() = 0;
39};
40
45public:
49
50public:
57 virtual void loginWithNEMeeting(const std::string& account, const std::string& password, const NEAuthLoginCallback& cb) = 0;
58
65#ifdef WIN32
66 __declspec(deprecated)
67#else
68 __attribute__((deprecated("", "")))
69#endif
70 virtual void loginWithSSOToken(const std::string& ssoToken, const NEAuthLoginCallback& cb) = 0;
71
76 virtual void tryAutoLogin(const NEAuthLoginCallback& cb) = 0;
77
84 virtual void login(const std::string& accountId, const std::string& token, const NEAuthLoginCallback& cb) = 0;
85
94#ifdef WIN32
95 __declspec(deprecated)
96#else
97 __attribute__((deprecated("", "")))
98#endif
99 virtual void login(const std::string& appKey, const std::string& accountId, const std::string& token, const NEAuthLoginCallback& cb) = 0;
100
105 virtual void getAccountInfo(const NEGetAccountInfoCallback& cb) = 0;
106
112 virtual void logout(bool cleanup = false, const NEAuthLoginCallback& cb = nullptr) = 0;
113
118 virtual void addAuthListener(NEAuthListener* listener) = 0;
119
124 virtual void removeAuthListener(NEAuthListener* listener) = 0;
125
131#ifdef WIN32
132 __declspec(deprecated)
133#else
134 __attribute__((deprecated("", "")))
135#endif
136 virtual void loginAnonymous(const NEAuthLoginCallback& cb) = 0;
137};
138
140
141#endif // ! NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
#define NNEM_SDK_INTERFACE_BEGIN_DECLS
#define NNEM_SDK_INTERFACE_END_DECLS
监听登录状态变更通知
virtual void onKickOut()=0
被踢出,登录状态变更为未登录,原因为当前登录账号已在其他设备上重新登录
virtual void onAuthInfoExpired()=0
账号信息过期通知,原因为用户修改了密码,应用层随后应该重新登录
virtual void getAccountInfo(const NEGetAccountInfoCallback &cb)=0
virtual void loginWithSSOToken(const std::string &ssoToken, const NEAuthLoginCallback &cb)=0
virtual void loginAnonymous(const NEAuthLoginCallback &cb)=0
NECallback< AccountInfo > NEGetAccountInfoCallback
virtual void removeAuthListener(NEAuthListener *listener)=0
virtual void logout(bool cleanup=false, const NEAuthLoginCallback &cb=nullptr)=0
virtual void login(const std::string &accountId, const std::string &token, const NEAuthLoginCallback &cb)=0
virtual void login(const std::string &appKey, const std::string &accountId, const std::string &token, const NEAuthLoginCallback &cb)=0
virtual void addAuthListener(NEAuthListener *listener)=0
virtual void tryAutoLogin(const NEAuthLoginCallback &cb)=0
virtual void loginWithNEMeeting(const std::string &account, const std::string &password, const NEAuthLoginCallback &cb)=0
会议头文件
NECallback<> NEEmptyCallback
std::function< void(NEErrorCode, const std::string &, const TResultParam &...)> NECallback
#define NEM_SDK_INTERFACE_EXPORT
公共服务定义头文件