NEMeetingKit V4.9.0
载入中...
搜索中...
未找到
NEAccountService.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
5#import <Foundation/Foundation.h>
6#import "NEAccountInfo.h"
7#import "NEContact.h"
10
11NS_ASSUME_NONNULL_BEGIN
12
16@protocol NEAccountServiceListener <NSObject>
17
21- (void)onKickOut;
22
26- (void)onAuthInfoExpired;
27
31- (void)onReconnected;
32
36- (void)onAccountInfoUpdated:(NEAccountInfo *)accountInfo;
37
38@end
39
43@protocol NEMeetingAuthListener <NEAccountServiceListener>
44@end
45
50@interface NEAccountService : NSObject
51
56- (void)tryAutoLogin:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
57
65- (void)loginByToken:(NSString *)userUuid
66 token:(NSString *)token
67 callback:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
68
76- (void)loginByPassword:(NSString *)userUuid
77 password:(NSString *)password
78 callback:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
79
86- (void)requestSmsCodeForLogin:(NSString *)phoneNumber callback:(NECallback)callback;
87
95- (void)loginBySmsCode:(NSString *)phoneNumber
96 smsCode:(NSString *)smsCode
97 callback:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
98
104- (void)generateSSOLoginWebURL:(void (^)(NSInteger code, NSString *mesage, NSString *url))callback;
105
112- (void)loginBySSOUri:(nonnull NSString *)ssoUri
113 callback:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
114
122- (void)loginByEmail:(NSString *)email
123 password:(NSString *)password
124 callback:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
125
133- (void)loginByPhoneNumber:(NSString *)phoneNumber
134 password:(NSString *)password
135 callback:
136 (void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
137
143- (void)getAccountInfo:(void (^)(NSInteger code, NSString *message, NEAccountInfo *data))callback;
144
149- (void)addListener:(id<NEAccountServiceListener>)listener;
150
155- (void)removeListener:(id<NEAccountServiceListener>)listener;
156
164- (void)resetPassword:(NSString *)userUuid
165 newPassword:(NSString *)newPassword
166 oldPassword:(NSString *)oldPassword
167 callback:(NECallback)callback;
168
174- (void)updateAvatar:(NSString *)imagePath callback:(NECallback)callback;
175
181- (void)updateNickname:(NSString *)nickname callback:(NECallback)callback;
182
187- (void)logout:(NECallback)callback;
188
189@end
190
191NS_ASSUME_NONNULL_END
void(^ NECallback)(NSInteger resultCode, NSString *resultMessage, id resultData)
定义 NEMeetingKitDefine.h:17
定义 NEAccountInfo.h:61
定义 NEAccountService.h:51