‪JMSDK iOS  ‪v2.8.0
‪API文档
JCClient.h
浏览该文件的文档.
1 //
2 // JCClient.h
3 // JCSDK-OC
4 //
5 // Created by maikireton on 2017/8/10.
6 // Copyright © 2017年 juphoon. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "JCClientCallback.h"
11 
15 @interface JCClient : NSObject
16 
21 @property (nonatomic, readonly, copy) NSString* userId;
22 
26 @property (nonatomic, copy, getter=getDisplayName) NSString* displayName;
27 
32 @property (nonatomic, readonly) JCClientState state;
33 
41 +(JCClient*)create:(NSString*)appKey callback:(id<JCClientCallback>)callback extraParams:(NSDictionary*)extraParams;
42 
60 -(bool)login:(NSString*)userId password:(NSString*)password;
61 
62 
80 -(bool)login:(bool)autologin accountType:(NSString*)accountType account:(NSString*)account password:(NSString*)password;
81 
87 -(bool)relogin:(NSString*)userId password:(NSString*)password;
88 
93 -(bool)logout;
94 
102 -(bool)setConfig:(NSString*)key value:(NSString*)value;
103 
109 -(NSString*)getConfig:(NSString*)key;
110 
115 -(void)setForeground:(bool)foreground;
116 
121 -(void)addCallback:(id<JCClientCallback>)callback;
122 
127 -(void)removeCallback:(id<JCClientCallback>)callback;
128 
129 
133 -(void)destroy;
134 
135 @end
JCClientState
Definition: JCClientConstants.h:44
JCClient 为全局基础类,主要负责登陆登出管理及账户属性存储
Definition: JCClient.h:16
NSString * userId
用户标识
Definition: JCClient.h:21
bool logout()
NSString * displayName
昵称,用于通话,消息等,可以更直观的表明身份
Definition: JCClient.h:26
void destroy()
销毁接口
JCClientState state
当前状态
Definition: JCClient.h:32
JCClient 回调代理
Definition: JCClientCallback.h:15