commit | author | age
|
dcdc07
|
1 |
// |
W |
2 |
// WACoreProxy.h |
|
3 |
// WASdkIntfUI |
|
4 |
// |
|
5 |
// Created by wuyx on 16/3/1. |
|
6 |
// Copyright © 2016年 GHW-T-01. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import "WACore.h" |
|
11 |
@class WACoreProxy; |
|
12 |
|
|
13 |
#define WALog(fmt,...) {\ |
|
14 |
if([WACoreProxy displayLog]){\ |
|
15 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
16 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
17 |
}\ |
|
18 |
} |
|
19 |
|
|
20 |
#define WALogNb(fmt,...) {\ |
|
21 |
if([WACoreProxy displayLog]){\ |
|
22 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
23 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
24 |
}\ |
|
25 |
} |
|
26 |
|
|
27 |
#define WALogImpt(fmt,...) {\ |
|
28 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
29 |
if([WACoreProxy isDebugMode]){\ |
|
30 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
31 |
}\ |
|
32 |
} |
|
33 |
|
|
34 |
#define WAEventLog(fmt,...) {\ |
|
35 |
if([WACoreProxy displayLog]){\ |
|
36 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
37 |
[WACoreProxy addEventContentWithString:[NSString stringWithFormat:(@"" fmt),##__VA_ARGS__]];\ |
|
38 |
}\ |
|
39 |
} |
|
40 |
/*! |
|
41 |
@discussion WACoreProxy |
|
42 |
- - - |
|
43 |
*/ |
|
44 |
@interface WACoreProxy : NSObject |
|
45 |
/*! |
|
46 |
@abstract 初始化 |
|
47 |
*/ |
|
48 |
+(void)init; |
|
49 |
/*! |
|
50 |
@abstract 设置sdk类型 0 国外,1 国内 |
|
51 |
*/ |
|
52 |
+ (void)setSDKType:(NSInteger)sdkType; |
|
53 |
/*! |
|
54 |
@abstract 获取sdk类型 0 国外,1 国内 |
|
55 |
*/ |
|
56 |
+ (NSInteger)getSDKType; |
|
57 |
/*! |
|
58 |
@abstract 开启数据收集 |
|
59 |
*/ |
|
60 |
+(void)initAppEventTracker; |
|
61 |
/*! |
|
62 |
@abstract 是否调试模式 |
|
63 |
*/ |
|
64 |
+(BOOL)isDebugMode; |
|
65 |
/*! |
|
66 |
@abstract 设置调试模式 |
|
67 |
*/ |
|
68 |
+(void)setDebugMode:(BOOL)isDebugMode; |
|
69 |
|
|
70 |
/*! |
|
71 |
@abstract 是否显示Log按钮 |
|
72 |
*/ |
|
73 |
+(BOOL)displayLog; |
|
74 |
|
|
75 |
/*! |
|
76 |
@abstract 获取userId |
|
77 |
*/ |
|
78 |
+(NSString*)getUserId; |
|
79 |
/*! |
|
80 |
@abstract 设置serverId |
|
81 |
@param serverId |
|
82 |
*/ |
|
83 |
+(void)setServerId:(NSString *)serverId; |
|
84 |
/*! |
|
85 |
@abstract 获取serverId |
|
86 |
*/ |
|
87 |
|
|
88 |
+(NSString*)getServerId; |
|
89 |
/*! |
|
90 |
@abstract 设置level |
|
91 |
@param level |
|
92 |
*/ |
|
93 |
+(void)setLevel:(int)level; |
|
94 |
/*! |
|
95 |
@abstract 获取level |
|
96 |
*/ |
|
97 |
+(int)getLevel; |
|
98 |
/*! |
|
99 |
@abstract 设置gameUserId |
|
100 |
@param gameUserId |
|
101 |
*/ |
|
102 |
+(void)setGameUserId:(NSString*)gameUserId; |
|
103 |
/*! |
|
104 |
@abstract 获取gameUserId |
|
105 |
*/ |
|
106 |
+(NSString*)getGameUserId; |
|
107 |
/*! |
|
108 |
@abstract 获取WA Server url |
|
109 |
*/ |
|
110 |
+(NSString*)getWaSdkServerUrl; |
|
111 |
/*! |
|
112 |
@abstract 获取appKey |
|
113 |
*/ |
|
114 |
+(NSString*)getAppKey; |
|
115 |
/*! |
|
116 |
@abstract 获取Publish Channel |
|
117 |
*/ |
|
118 |
+(NSString*)getPublishChannel; |
|
119 |
/*! |
|
120 |
@abstract 获取Channel |
|
121 |
*/ |
|
122 |
+(NSString*)getChannel; |
|
123 |
/*! |
|
124 |
@abstract 获取appId |
|
125 |
*/ |
|
126 |
+(NSString*)getAppID; |
|
127 |
/*! |
|
128 |
@abstract 获取os |
|
129 |
*/ |
|
130 |
+(NSString*)getOS; |
|
131 |
/*! |
|
132 |
@abstract 获取SDK版本 |
|
133 |
*/ |
|
134 |
+(NSString*)getSdkVer; |
|
135 |
/*! |
|
136 |
@abstract 获取SDK ID |
|
137 |
*/ |
|
138 |
+(NSString *)getSdkId; |
|
139 |
/*! |
|
140 |
@abstract 获取配置文件版本 |
|
141 |
*/ |
|
142 |
+(NSString*)getXmlConfigVer; |
|
143 |
/*! |
|
144 |
@abstract 获取抽象层版本 |
|
145 |
*/ |
|
146 |
+(NSString*)getIntfVer; |
|
147 |
/*! |
|
148 |
@abstract 获取SessionId |
|
149 |
*/ |
|
150 |
+(NSString*)getSessionId; |
|
151 |
/*! |
|
152 |
@abstract 下面两个方法是关于Facebook deeplink, CP不用关注 |
|
153 |
*/ |
|
154 |
-(NSString*)getDeepLinkWithUrl:(NSURL*)url; |
|
155 |
|
|
156 |
+(void)fetchDeferredAppLink:(void(^)(NSURL *url, NSError *error))handler; |
|
157 |
/*! |
|
158 |
@abstract 下面四个方法是关于打印日志的,CP不用关注 |
|
159 |
*/ |
|
160 |
+(void)addLogWithString:(NSString*)string; |
|
161 |
|
|
162 |
+(void)addLogWithoutBtn:(NSString*)string; |
|
163 |
|
|
164 |
+(void)addEventContentWithString:(NSString*)string; |
|
165 |
|
|
166 |
+(void)eventLogWithPlatform:(NSString*)platform eventName:(NSString*)eventName parameters:(NSDictionary*)parameters color:(UIColor*)color; |
|
167 |
|
|
168 |
|
|
169 |
|
|
170 |
@end |