commit | author | age
|
ea8e18
|
1 |
// |
L |
2 |
// ECServiceCocos2dx.h |
|
3 |
// ElvaChatService Cocos2dx SDK |
|
4 |
// |
|
5 |
|
|
6 |
#import <Foundation/Foundation.h> |
d8c7af
|
7 |
|
ea8e18
|
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); |
d8c7af
|
16 |
typedef BOOL (*ElvaPingCallBack)(const NSString * log); |
L |
17 |
typedef void (*ElvaAllowUploadLogMessageCallback)(void); |
|
18 |
|
ea8e18
|
19 |
@class UIViewController; |
d8c7af
|
20 |
typedef NS_ENUM(int,ElvaTokenPlatform) { |
L |
21 |
ElvaTokenPlatformAPNS = 1,//APNS |
|
22 |
ElvaTokenPlatformFirebase = 2,//firebase-FCM |
|
23 |
ElvaTokenPlatformJpush = 3,//极光推送 |
|
24 |
ElvaTokenPlatformGeTui = 4,//个推 |
|
25 |
}; |
ea8e18
|
26 |
@interface ECServiceSdk:NSObject |
L |
27 |
#pragma mark - ------init------ |
|
28 |
+ (void) init:(NSString*) appSecret Domain:(NSString*) domain AppId:(NSString*) appId; |
|
29 |
#pragma mark - ------showElva------ |
|
30 |
+ (void) showElva:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag; |
|
31 |
+ (void) showElva:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary*) config; |
|
32 |
#pragma mark - ------showConversation------ |
|
33 |
+ (void) showConversation:(NSString*) playerUid ServerId:(NSString*) serverId;//请优先实现setUserName接口 |
|
34 |
+ (void) showConversation:(NSString*) playerUid ServerId:(NSString*) serverId Config:(NSMutableDictionary*) config; |
|
35 |
#pragma mark - ------showElvaOP------ |
|
36 |
+ (void) showElvaOP:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary *)config; |
|
37 |
|
|
38 |
+ (void) showElvaOP:(NSString*) playerName PlayerUid:(NSString*) playerUid ServerId:(NSString*) serverId PlayerParseId:(NSString*) playerParseId PlayershowConversationFlag:(NSString*) playershowConversationFlag Config:(NSMutableDictionary *)config defaultTabIndex:(int)defaultTabIndex; |
|
39 |
#pragma mark - ------showFAQ------ |
|
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; |
|
44 |
|
|
45 |
+ (void) showFAQSection:(NSString*) sectionPublishId; |
|
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; |
|
53 |
+ (void) showQACommunity:(NSString *)playerUid PlayName:(NSString *)playerName; |
|
54 |
|
|
55 |
+ (void) showURL:(NSString *) url; |
|
56 |
+ (void) showStoreReview; |
|
57 |
|
|
58 |
+ (void) setRootViewController:(UIViewController*)rootViewController; |
|
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;//设置默认评价星星个数 |
|
69 |
|
|
70 |
+ (void) setChangeDirection; |
|
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; |
d8c7af
|
78 |
+ (void) registerUnityOnSendMessageSuccessCallback:(NSString *) gameObject; |
ea8e18
|
79 |
+ (void) registerDeviceToken:(NSString*) deviceToken isVIP:(Boolean) isVip; |
L |
80 |
+ (void) handlePushNotification:(NSDictionary *) table DataFromInApp:(BOOL) dataFromInApp; |
|
81 |
+ (int) getNotificationMessageCount; |
|
82 |
|
|
83 |
+ (void) setUnreadMessageFetchUid:(NSString*) playerUid; |
|
84 |
|
|
85 |
|
|
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; |
d8c7af
|
92 |
+ (void) setPushToken:(NSString*)pushToken pushPlatform:(ElvaTokenPlatform)pushPlatform;//platform参考1:APNS 2:firebase 3:极光推送 4:个推 |
L |
93 |
+ (void)setNetCheckInfoWithIp:(NSString*)ip callback:(ElvaPingCallBack)callback; |
|
94 |
+ (void)setAllowUploadLogMessageCallback:(ElvaAllowUploadLogMessageCallback)callback; |
|
95 |
+ (void)setUploadLogFileAtPath:(NSString*)path; |
ea8e18
|
96 |
@end |