YDAccount.h
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// HuiDongLogin.h
// HuiDongLogin
//
// Created by xqwang on 2016/11/7.
// Copyright © 2016年 xqwang. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, WindowType)
{
Dialog = 0,
Activity
};
@interface YDUserAccount : NSObject
//账号ID,账号惟一标识
@property(nonatomic, assign)long long accountId;
//用户名
@property(nonatomic, copy)NSString* accountName;
//用户绑定手机号
@property(nonatomic, copy)NSString* phoneNumber;
@end
@protocol YDAccountDelegate <NSObject>
@optional
-(void)accountLogin:(YDUserAccount*)model;
-(void)accountRegist:(YDUserAccount*)model;
@end
@interface YDAccount : NSObject
+(void)initWithAppId:(NSString*)appId openKey:(NSString*)openKey;
//该接口不建议调用
+(void)login:(NSString*)appId openKey:(NSString*)openKey;
+(void)setWindowType:(WindowType)type;
+(void)autoRatate:(BOOL)enable;
+(void)setDelegate:(id<YDAccountDelegate>)delegate;
+(void)setChannelId:(NSString*)channelId;
+(void)showWindow;
//+(void)login:(YDUserAccount*)account;
+(void)bindGameUserId:(NSString*)userId;
+(void)logout;
+(YDUserAccount*)currentAccount;
@end