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; |
962836
|
74 |
/*! |
W |
75 |
@abstract 设置clientId |
|
76 |
*/ |
|
77 |
+(void)setClientId:(NSString*)clientId; |
dcdc07
|
78 |
/*! |
W |
79 |
@abstract 获取userId |
|
80 |
*/ |
|
81 |
+(NSString*)getUserId; |
|
82 |
/*! |
|
83 |
@abstract 设置serverId |
962836
|
84 |
@param serverId 服务器id |
dcdc07
|
85 |
*/ |
W |
86 |
+(void)setServerId:(NSString *)serverId; |
|
87 |
/*! |
|
88 |
@abstract 获取serverId |
|
89 |
*/ |
|
90 |
|
|
91 |
+(NSString*)getServerId; |
|
92 |
/*! |
|
93 |
@abstract 设置level |
962836
|
94 |
@param level 等级 |
dcdc07
|
95 |
*/ |
W |
96 |
+(void)setLevel:(int)level; |
|
97 |
/*! |
|
98 |
@abstract 获取level |
|
99 |
*/ |
|
100 |
+(int)getLevel; |
|
101 |
/*! |
|
102 |
@abstract 设置gameUserId |
962836
|
103 |
@param gameUserId 游戏userId |
dcdc07
|
104 |
*/ |
W |
105 |
+(void)setGameUserId:(NSString*)gameUserId; |
|
106 |
/*! |
|
107 |
@abstract 获取gameUserId |
|
108 |
*/ |
|
109 |
+(NSString*)getGameUserId; |
|
110 |
/*! |
|
111 |
@abstract 获取WA Server url |
|
112 |
*/ |
|
113 |
+(NSString*)getWaSdkServerUrl; |
|
114 |
/*! |
|
115 |
@abstract 获取appKey |
|
116 |
*/ |
|
117 |
+(NSString*)getAppKey; |
|
118 |
/*! |
|
119 |
@abstract 获取Publish Channel |
|
120 |
*/ |
|
121 |
+(NSString*)getPublishChannel; |
|
122 |
/*! |
|
123 |
@abstract 获取Channel |
|
124 |
*/ |
|
125 |
+(NSString*)getChannel; |
|
126 |
/*! |
|
127 |
@abstract 获取appId |
|
128 |
*/ |
|
129 |
+(NSString*)getAppID; |
|
130 |
/*! |
|
131 |
@abstract 获取os |
|
132 |
*/ |
|
133 |
+(NSString*)getOS; |
|
134 |
/*! |
|
135 |
@abstract 获取SDK版本 |
|
136 |
*/ |
|
137 |
+(NSString*)getSdkVer; |
|
138 |
/*! |
|
139 |
@abstract 获取SDK ID |
|
140 |
*/ |
|
141 |
+(NSString *)getSdkId; |
|
142 |
/*! |
|
143 |
@abstract 获取配置文件版本 |
|
144 |
*/ |
|
145 |
+(NSString*)getXmlConfigVer; |
|
146 |
/*! |
|
147 |
@abstract 获取抽象层版本 |
|
148 |
*/ |
|
149 |
+(NSString*)getIntfVer; |
|
150 |
/*! |
|
151 |
@abstract 获取SessionId |
|
152 |
*/ |
|
153 |
+(NSString*)getSessionId; |
|
154 |
/*! |
|
155 |
@abstract 下面两个方法是关于Facebook deeplink, CP不用关注 |
|
156 |
*/ |
|
157 |
-(NSString*)getDeepLinkWithUrl:(NSURL*)url; |
|
158 |
|
|
159 |
+(void)fetchDeferredAppLink:(void(^)(NSURL *url, NSError *error))handler; |
|
160 |
/*! |
cf3302
|
161 |
@abstract 获取后台配置参数 |
H |
162 |
*/ |
|
163 |
+(WAParamConfigObj*)getParamConfig; |
|
164 |
/*! |
dcdc07
|
165 |
@abstract 下面四个方法是关于打印日志的,CP不用关注 |
W |
166 |
*/ |
|
167 |
+(void)addLogWithString:(NSString*)string; |
|
168 |
|
|
169 |
+(void)addLogWithoutBtn:(NSString*)string; |
|
170 |
|
|
171 |
+(void)addEventContentWithString:(NSString*)string; |
|
172 |
|
|
173 |
+(void)eventLogWithPlatform:(NSString*)platform eventName:(NSString*)eventName parameters:(NSDictionary*)parameters color:(UIColor*)color; |
|
174 |
|
|
175 |
|
|
176 |
|
|
177 |
@end |