JCSDK Objective-C API Reference for iOS/macOS  2.5.1
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 
21 @interface JCClientCreateParam : NSObject
22 
28 @property (nonatomic, copy) NSString* __nonnull sdkInfoDir;
29 
35 @property (nonatomic, copy) NSString* __nonnull sdkLogDir;
36 
45 @property (nonatomic) JCLogLevel sdkLogLevel;
46 
47 @end
48 
49 
55 @interface JCClientLoginParam : NSObject
56 
62 @property (nonatomic, copy) NSString* __nonnull deviceId;
63 
69 @property (nonatomic, copy) NSString* __nullable httpsProxy;
70 
76 @property (nonatomic) bool autoCreateAccount;
77 
84 @property (nonatomic, strong) NSString* __nonnull terminalType;
85 
86 @end
87 
88 
94  @interface JCClient : NSObject
95 
102 @property (nonatomic, readonly, copy) NSString* __nonnull userId;
103 
111 @property (nonatomic, copy) NSString* __nonnull displayName;
112 
122 @property (nonatomic, readonly) JCClientState state;
123 
130 @property (nonatomic, readonly) JCClientCreateParam* __nullable createParam;
131 
139 @property (nonatomic, readonly) JCClientLoginParam* __nullable loginParam;
140 
146 @property (nonatomic, readonly) NSString* __nonnull appkey;
147 
149 
152 @property (nonatomic, readonly) NSString* __nonnull serverUid;
154 
161 @property (nonatomic, copy) NSString * __nonnull serverAddress;
162 
178 +(JCClient* __nullable)create:(NSString* __nonnull)appKey callback:(id<JCClientCallback> __nonnull)callback createParam:(JCClientCreateParam* __nullable)createParam;
179 
187 +(void)destroy;
188 
205 -(bool)login:(NSString* __nonnull)userId password:(NSString* __nonnull)password loginParam:(JCClientLoginParam* __nullable)loginParam;
206 
208 
225 -(bool)relogin:(NSString* __nonnull)userId password:(NSString* __nonnull)password loginParam:(JCClientLoginParam* __nullable)loginParam;
227 
237 -(bool)logout;
238 
254 -(int)sendOnlineMessage:(NSString* __nonnull)userId content:(NSString* __nonnull)content;
255 
256 @end
257 
JCLogLevel
JCLogLevel
Definition: JCClientConstants.h:106
JCClientCreateParam::sdkInfoDir
NSString *__nonnull sdkInfoDir
Definition: JCClient.h:28
JCClientState
JCClientState
Definition: JCClientConstants.h:90
JCClientCallback-p
Definition: JCClientCallback.h:20
JCClientCreateParam::sdkLogLevel
JCLogLevel sdkLogLevel
Definition: JCClient.h:45
JCClientLoginParam
Definition: JCClient.h:56
JCClientCreateParam
Definition: JCClient.h:22
JCClientCreateParam::sdkLogDir
NSString *__nonnull sdkLogDir
Definition: JCClient.h:35
JCClient
Definition: JCClient.h:95