commit | author | age
|
2370e0
|
1 |
// |
H |
2 |
// ECServiceCocos2dx.h |
|
3 |
// ElvaChatService Cocos2dx SDK |
|
4 |
// |
|
5 |
|
|
6 |
#import <Foundation/Foundation.h> |
|
7 |
|
ca75cc
|
8 |
/* |
L |
9 |
* notify the application when some state changes in Elva. |
|
10 |
* eventCode: |
|
11 |
* 2: Elva UI Visible Changed |
|
12 |
* state (0) : will show elva ui |
|
13 |
* state (1) : all elva ui are closed |
|
14 |
*/ |
|
15 |
typedef void (*ElvaEventCallBack)(const int eventCode, const int state); |
|
16 |
typedef BOOL (*ElvaPingCallBack)(const NSString * log); |
|
17 |
typedef void (*ElvaAllowUploadLogMessageCallback)(void); |
|
18 |
|
|
19 |
@class UIViewController; |
|
20 |
typedef NS_ENUM(int,ElvaTokenPlatform) { |
|
21 |
ElvaTokenPlatformAPNS = 1,//APNS |
|
22 |
ElvaTokenPlatformFirebase = 2,//firebase-FCM |
|
23 |
ElvaTokenPlatformJpush = 3,//极光推送 |
|
24 |
ElvaTokenPlatformGeTui = 4,//个推 |
|
25 |
}; |
|
26 |
@interface ECServiceSdk:NSObject |
|
27 |
#pragma mark - ------init------ |
2370e0
|
28 |
+ (void) init:(NSString*) appSecret Domain:(NSString*) domain AppId:(NSString*) appId; |
ca75cc
|
29 |
#pragma mark - ------showElva------ |
2370e0
|
30 |
+ (void) showElva:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag; |
H |
31 |
+ (void) showElva:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary*) config; |
ca75cc
|
32 |
#pragma mark - ------showConversation------ |
2370e0
|
33 |
+ (void) showConversation:(NSString*) playerUid ServerId:(NSString*) serverId;//请优先实现setUserName接口 |
H |
34 |
+ (void) showConversation:(NSString*) playerUid ServerId:(NSString*) serverId Config:(NSMutableDictionary*) config; |
ca75cc
|
35 |
#pragma mark - ------showElvaOP------ |
2370e0
|
36 |
+ (void) showElvaOP:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary *)config; |
H |
37 |
|
|
38 |
+ (void) showElvaOP:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary *)config defaultTabIndex:(int)defaultTabIndex; |
ca75cc
|
39 |
#pragma mark - ------showFAQ------ |
L |
40 |
+ (void) showFAQs; |
|
41 |
+ (void) showFAQs:(NSDictionary*)config; |
|
42 |
+ (void) showFAQs:(NSString*)playerName playerUid:(NSString*)playerUid; |
|
43 |
+ (void) showFAQs:(NSString*)playerName playerUid:(NSString*)playerUid config:(NSDictionary*)config; |
2370e0
|
44 |
|
ca75cc
|
45 |
+ (void) showFAQSection:(NSString*) sectionPublishId; |
L |
46 |
+ (void) showFAQSection:(NSString*) sectionPublishId Config:(NSMutableDictionary*) config; |
|
47 |
|
|
48 |
+ (void) showSingleFAQ:(NSString*) faqId; |
|
49 |
+ (void) showSingleFAQ:(NSString*) faqId Config:(NSMutableDictionary*) config; |
|
50 |
|
|
51 |
#pragma mark - ------other------ |
|
52 |
+ (void) showVIPChat:(NSString*) appidWeb VIPTags:(NSString *) vipTags; |
2370e0
|
53 |
+ (void) showQACommunity:(NSString *)playerUid PlayName:(NSString *)playerName; |
H |
54 |
|
ca75cc
|
55 |
+ (void) showURL:(NSString *) url; |
2370e0
|
56 |
+ (void) showStoreReview; |
H |
57 |
|
ca75cc
|
58 |
+ (void) setRootViewController:(UIViewController*)rootViewController; |
L |
59 |
+ (void) setUserId:(NSString*) playerUid;//自助服务,在showFAQ之前调用 |
|
60 |
+ (void) setUserName:(NSString*) playerName;//在需要的接口之前调用,建议游戏刚进入就默认调用 |
|
61 |
+ (void) setName:(NSString*) game_name; |
|
62 |
+ (void) setOpenLog:(BOOL)isOpen; |
|
63 |
+ (void) setServerId:(NSString*) serverId;//自助服务,在showFAQ之前调用 |
|
64 |
+ (void) setAccelerateDomain:(NSString *)domain; |
|
65 |
+ (void) setSDKLanguage:(NSString*) sdkLanguage; |
|
66 |
+ (void) setUseDevice; |
|
67 |
+ (void) setSendCloseNotification:(BOOL) isSend;//关闭某一项是否发送通知 |
|
68 |
+ (void) setEvaluateStar:(int) star;//设置默认评价星星个数 |
2370e0
|
69 |
|
ca75cc
|
70 |
+ (void) setChangeDirection; |
L |
71 |
+ (void) setSDKInterfaceOrientationMask:(NSUInteger)interfaceOrientationMask;//参数参考UIInterfaceOrientationMask |
|
72 |
+ (void) setNoMenu; |
|
73 |
|
|
74 |
+ (void) setVIP:(NSString *)userName userId:(NSString *)userId config:(NSDictionary*)config; |
|
75 |
|
|
76 |
+ (void) registerUnityOnInitializedCallback:(NSString *) gameObject; |
|
77 |
+ (void) registerUnityOnMessageArrivedCallback:(NSString *) gameObject; |
|
78 |
+ (void) registerUnityOnSendMessageSuccessCallback:(NSString *) gameObject; |
|
79 |
+ (void) registerDeviceToken:(NSString*) deviceToken isVIP:(Boolean) isVip; |
|
80 |
+ (void) handlePushNotification:(NSDictionary *) table DataFromInApp:(BOOL) dataFromInApp; |
2370e0
|
81 |
+ (int) getNotificationMessageCount; |
ca75cc
|
82 |
|
9bb554
|
83 |
+ (void) setUnreadMessageFetchUid:(NSString*) playerUid; |
2370e0
|
84 |
|
ca75cc
|
85 |
|
L |
86 |
+ (NSString*)sdkVersionInfo; |
|
87 |
+ (BOOL) isInSDKPageView; |
|
88 |
+ (void) setSDKEdgeInsetsWithTop:(float)top bottom:(float)bottom enable:(BOOL)enable; |
|
89 |
+ (void) setSDKEdgeColorWithRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha;//0~1 |
|
90 |
|
|
91 |
+ (void) setEventListener:(ElvaEventCallBack)callback; |
|
92 |
+ (void) setPushToken:(NSString*)pushToken pushPlatform:(ElvaTokenPlatform)pushPlatform;//platform参考1:APNS 2:firebase 3:极光推送 4:个推 |
|
93 |
+ (void)setNetCheckInfoWithIp:(NSString*)ip callback:(ElvaPingCallBack)callback; |
|
94 |
+ (void)setAllowUploadLogMessageCallback:(ElvaAllowUploadLogMessageCallback)callback; |
|
95 |
+ (void)setUploadLogFileAtPath:(NSString*)path; |
2370e0
|
96 |
@end |