NEMeeting SDK
auth_service.h
浏览该文件的文档.
1 
9 #ifndef NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
10 #define NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
11 #include <string>
12 #include "service_define.h"
13 #include "metting.h"
14 
16 
22 class NEAuthListener : public NEObject
23 {
24 public:
29  virtual void onKickOut() = 0;
30 
35  virtual void onAuthInfoExpired() = 0;
36 };
37 
42 {
43 public:
47 public:
54  virtual void loginWithNEMeeting(const std::string& account, const std::string& password, const NEAuthLoginCallback& cb) = 0;
55 
61  virtual void loginWithSSOToken(const std::string& ssoToken, const NEAuthLoginCallback& cb) = 0;
62 
67  virtual void tryAutoLogin(const NEAuthLoginCallback& cb) = 0;
68 
75  virtual void login(const std::string& accountId, const std::string& token, const NEAuthLoginCallback& cb) = 0;
76 
85 #ifdef WIN32
86  __declspec(deprecated)
87 #else
88  __attribute__((deprecated("", "")))
89 #endif
90  virtual void login(const std::string& appKey, const std::string& accountId, const std::string& token, const NEAuthLoginCallback& cb) = 0;
91 
96  virtual void getAccountInfo(const NEGetAccountInfoCallback& cb) = 0;
97 
103  virtual void logout(bool cleanup = false, const NEAuthLoginCallback& cb = nullptr) = 0;
104 
109  virtual void addAuthListener(NEAuthListener* listener) = 0;
110 
115  virtual void removeAuthListener(NEAuthListener* listener) = 0;
116 
122 #ifdef WIN32
123  __declspec(deprecated)
124 #else
125  __attribute__((deprecated("", "")))
126 #endif
127  virtual void loginAnonymous(const NEAuthLoginCallback& cb) = 0;
128 };
129 
131 
132 #endif // ! NEM_SDK_INTERFACE_INTERFACE_AUTHSERVICE_H_
#define NNEM_SDK_INTERFACE_BEGIN_DECLS
Definition: build_config.h:12
#define NNEM_SDK_INTERFACE_END_DECLS
Definition: build_config.h:13
监听登录状态变更通知
Definition: auth_service.h:23
virtual void onKickOut()=0
被踢出,登录状态变更为未登录,原因为当前登录账号已在其他设备上重新登录
virtual void onAuthInfoExpired()=0
账号信息过期通知,原因为用户修改了密码,应用层随后应该重新登录
virtual void getAccountInfo(const NEGetAccountInfoCallback &cb)=0
NEEmptyCallback NEAuthLoginCallback
Definition: auth_service.h:44
NEEmptyCallback NEAuthLogoutCallback
Definition: auth_service.h:45
virtual void loginWithSSOToken(const std::string &ssoToken, const NEAuthLoginCallback &cb)=0
virtual void loginAnonymous(const NEAuthLoginCallback &cb)=0
NECallback< AccountInfo > NEGetAccountInfoCallback
Definition: auth_service.h:46
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
公共服务定义头文件