Skip to content

Commit d168b0c

Browse files
committed
upstats
1 parent 9a1b7a0 commit d168b0c

18 files changed

+1497
-387
lines changed

QiniuSDK.xcodeproj/project.pbxproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
22019FE04FB937FAB13FDFFD /* libPods-QiniuSDK iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 389DF9365782A14F70933C3E /* libPods-QiniuSDK iOS.a */; };
1111
5F0FFE6A946BAEFF741BC23E /* libPods-QiniuSDK Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8924D07F6E137C6379C173D4 /* libPods-QiniuSDK Mac.a */; };
1212
7277FD17389341BDCAD29727 /* libPods-QiniuSDK iOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D41D651AEAB89853C760E3A /* libPods-QiniuSDK iOSTests.a */; };
13+
BA0FAD4C1BE25EE500DD5C51 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = BA0FAD4B1BE25EE500DD5C51 /* Reachability.m */; settings = {ASSET_TAGS = (); }; };
14+
BA1659301BDBD6FB00C7304A /* QNStats.h in Headers */ = {isa = PBXBuildFile; fileRef = BA16592E1BDBD6FB00C7304A /* QNStats.h */; settings = {ASSET_TAGS = (); }; };
15+
BA1659311BDBD6FB00C7304A /* QNStats.m in Sources */ = {isa = PBXBuildFile; fileRef = BA16592F1BDBD6FB00C7304A /* QNStats.m */; settings = {ASSET_TAGS = (); }; };
16+
BA1659321BDBD6FB00C7304A /* QNStats.m in Sources */ = {isa = PBXBuildFile; fileRef = BA16592F1BDBD6FB00C7304A /* QNStats.m */; settings = {ASSET_TAGS = (); }; };
17+
BA8408531BE250C80093B013 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA8408521BE250C80093B013 /* SystemConfiguration.framework */; };
18+
BA8408541BE251010093B013 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA8408521BE250C80093B013 /* SystemConfiguration.framework */; };
1319
DF0A03231B3BABEC00E3778C /* libQiniuSDK Mac.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DF2CDDFF19DAC05500CE01FB /* libQiniuSDK Mac.dylib */; };
1420
DF0A03241B3BAC3900E3778C /* QNFormUploadTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3C504619DD7BA6000F548F /* QNFormUploadTest.m */; };
1521
DF0A03251B3BAC5700E3778C /* libQiniuSDK iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF2CDE1A19DAC08400CE01FB /* libQiniuSDK iOS.a */; };
@@ -128,6 +134,11 @@
128134
8924D07F6E137C6379C173D4 /* libPods-QiniuSDK Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QiniuSDK Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; };
129135
948F5D59B2BD6CACC644FA14 /* Pods-QiniuSDK MacTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuSDK MacTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuSDK MacTests/Pods-QiniuSDK MacTests.debug.xcconfig"; sourceTree = "<group>"; };
130136
9A0CE9E3B1F13E790C38CB75 /* Pods-QiniuSDK iOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuSDK iOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuSDK iOSTests/Pods-QiniuSDK iOSTests.release.xcconfig"; sourceTree = "<group>"; };
137+
BA0FAD4A1BE25EE500DD5C51 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
138+
BA0FAD4B1BE25EE500DD5C51 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
139+
BA16592E1BDBD6FB00C7304A /* QNStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNStats.h; sourceTree = "<group>"; };
140+
BA16592F1BDBD6FB00C7304A /* QNStats.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNStats.m; sourceTree = "<group>"; };
141+
BA8408521BE250C80093B013 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
131142
C24CE1990894CD3CA9A17042 /* Pods-QiniuSDK iOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuSDK iOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuSDK iOSTests/Pods-QiniuSDK iOSTests.debug.xcconfig"; sourceTree = "<group>"; };
132143
DB8C25D8ADEC1AAEAFE9BB8A /* Pods-QiniuSDK iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuSDK iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuSDK iOS/Pods-QiniuSDK iOS.debug.xcconfig"; sourceTree = "<group>"; };
133144
DEC82F60B1102AD44ABC9284 /* Pods-QiniuSDK Mac.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QiniuSDK Mac.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QiniuSDK Mac/Pods-QiniuSDK Mac.debug.xcconfig"; sourceTree = "<group>"; };
@@ -222,6 +233,7 @@
222233
isa = PBXFrameworksBuildPhase;
223234
buildActionMask = 2147483647;
224235
files = (
236+
BA8408531BE250C80093B013 /* SystemConfiguration.framework in Frameworks */,
225237
22019FE04FB937FAB13FDFFD /* libPods-QiniuSDK iOS.a in Frameworks */,
226238
);
227239
runOnlyForDeploymentPostprocessing = 0;
@@ -231,6 +243,7 @@
231243
buildActionMask = 2147483647;
232244
files = (
233245
DF5AC8E81B5F509200728D30 /* libresolv.dylib in Frameworks */,
246+
BA8408541BE251010093B013 /* SystemConfiguration.framework in Frameworks */,
234247
DF0A03251B3BAC5700E3778C /* libQiniuSDK iOS.a in Frameworks */,
235248
DF293C9A19DBC09400799011 /* libz.dylib in Frameworks */,
236249
7277FD17389341BDCAD29727 /* libPods-QiniuSDK iOSTests.a in Frameworks */,
@@ -258,6 +271,7 @@
258271
A955AABD20BF51BFE5032419 /* Frameworks */ = {
259272
isa = PBXGroup;
260273
children = (
274+
BA8408521BE250C80093B013 /* SystemConfiguration.framework */,
261275
DF5AC8E71B5F509200728D30 /* libresolv.dylib */,
262276
DF293C9319DB860200799011 /* libz.dylib */,
263277
DF293C9019DB85CB00799011 /* libz.dylib */,
@@ -269,6 +283,15 @@
269283
name = Frameworks;
270284
sourceTree = "<group>";
271285
};
286+
BA0FAD491BE25EB300DD5C51 /* Reachiability */ = {
287+
isa = PBXGroup;
288+
children = (
289+
BA0FAD4A1BE25EE500DD5C51 /* Reachability.h */,
290+
BA0FAD4B1BE25EE500DD5C51 /* Reachability.m */,
291+
);
292+
name = Reachiability;
293+
sourceTree = "<group>";
294+
};
272295
DF293C9B19DBC2AE00799011 /* Http */ = {
273296
isa = PBXGroup;
274297
children = (
@@ -283,6 +306,8 @@
283306
DFF5252F1A6235D100D02BA1 /* QNSessionManager.h */,
284307
DFF525301A6235D100D02BA1 /* QNSessionManager.m */,
285308
DFF525361A626A3700D02BA1 /* QNHttpDelegate.h */,
309+
BA16592E1BDBD6FB00C7304A /* QNStats.h */,
310+
BA16592F1BDBD6FB00C7304A /* QNStats.m */,
286311
);
287312
path = Http;
288313
sourceTree = "<group>";
@@ -312,6 +337,7 @@
312337
DF2CDE4D19DAC6A400CE01FB /* QiniuSDK */ = {
313338
isa = PBXGroup;
314339
children = (
340+
BA0FAD491BE25EB300DD5C51 /* Reachiability */,
315341
DFA9B65519E0B53700A15FD1 /* Recorder */,
316342
DF293C9B19DBC2AE00799011 /* Http */,
317343
DF2CDE4E19DAC6A400CE01FB /* Common */,
@@ -405,6 +431,7 @@
405431
DF0D23CD19DCE6C400D6B68F /* QNResponseInfo.h in Headers */,
406432
DFBF63711BCCE2A600A771D8 /* QNSystem.h in Headers */,
407433
DFF126F61B63ABED0005C39C /* QNALAssetFile.h in Headers */,
434+
BA1659301BDBD6FB00C7304A /* QNStats.h in Headers */,
408435
DF6099FA1A5676AA00AC7297 /* QNDns.h in Headers */,
409436
DF437CD21B2426270099587B /* GTM_Base64.h in Headers */,
410437
DF293C9E19DBC2AE00799011 /* QNUserAgent.h in Headers */,
@@ -705,6 +732,7 @@
705732
DF482FD91B0DA8A2000DAD98 /* QNConfiguration.m in Sources */,
706733
DF609A061A58E39D00AC7297 /* QNFormUpload.m in Sources */,
707734
DF293C9F19DBC2AE00799011 /* QNUserAgent.m in Sources */,
735+
BA1659311BDBD6FB00C7304A /* QNStats.m in Sources */,
708736
DFA9B65919E0B53700A15FD1 /* QNFileRecorder.m in Sources */,
709737
DF2CDE6119DAC6A400CE01FB /* QNCrc32.m in Sources */,
710738
DF293CA619DC05B800799011 /* QNHttpManager.m in Sources */,
@@ -750,11 +778,13 @@
750778
DFA9B63D19DF904000A15FD1 /* QNEtag.m in Sources */,
751779
DF437CD51B2426270099587B /* GTM_Base64.m in Sources */,
752780
DF482FDA1B0DA8A2000DAD98 /* QNConfiguration.m in Sources */,
781+
BA1659321BDBD6FB00C7304A /* QNStats.m in Sources */,
753782
DF609A081A58E39D00AC7297 /* QNFormUpload.m in Sources */,
754783
DF293CA019DBC2AE00799011 /* QNUserAgent.m in Sources */,
755784
DFA9B65A19E0B53700A15FD1 /* QNFileRecorder.m in Sources */,
756785
DF2CDE6219DAC6A400CE01FB /* QNCrc32.m in Sources */,
757786
DF293CA719DC05B800799011 /* QNHttpManager.m in Sources */,
787+
BA0FAD4C1BE25EE500DD5C51 /* Reachability.m in Sources */,
758788
DF293CAC19DC0E5300799011 /* QNResumeUpload.m in Sources */,
759789
DF437CDC1B2429E10099587B /* QNUpToken.m in Sources */,
760790
DFF525341A6235D100D02BA1 /* QNSessionManager.m in Sources */,

QiniuSDK/Http/QNHttpDelegate.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ typedef BOOL (^QNCancelBlock)(void);
1616
withParams:(NSDictionary *)params
1717
withFileName:(NSString *)key
1818
withMimeType:(NSString *)mime
19+
withStats:(NSMutableDictionary *)stats
1920
withCompleteBlock:(QNCompleteBlock)completeBlock
2021
withProgressBlock:(QNInternalProgressBlock)progressBlock
2122
withCancelBlock:(QNCancelBlock)cancelBlock;
2223

24+
2325
- (void) post:(NSString *)url
2426
withData:(NSData *)data
2527
withParams:(NSDictionary *)params
2628
withHeaders:(NSDictionary *)headers
29+
withStats:(NSMutableDictionary *)stats
2730
withCompleteBlock:(QNCompleteBlock)completeBlock
2831
withProgressBlock:(QNInternalProgressBlock)progressBlock
2932
withCancelBlock:(QNCancelBlock)cancelBlock;

QiniuSDK/Http/QNHttpManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
withParams:(NSDictionary *)params
2323
withFileName:(NSString *)key
2424
withMimeType:(NSString *)mime
25+
withStats:(NSMutableDictionary *)stats
2526
withCompleteBlock:(QNCompleteBlock)completeBlock
2627
withProgressBlock:(QNInternalProgressBlock)progressBlock
2728
withCancelBlock:(QNCancelBlock)cancelBlock;
@@ -30,6 +31,7 @@
3031
withData:(NSData *)data
3132
withParams:(NSDictionary *)params
3233
withHeaders:(NSDictionary *)headers
34+
withStats:(NSMutableDictionary *)stats
3335
withCompleteBlock:(QNCompleteBlock)completeBlock
3436
withProgressBlock:(QNInternalProgressBlock)progressBlock
3537
withCancelBlock:(QNCancelBlock)cancelBlock;

0 commit comments

Comments
 (0)