Skip to content

Commit d5b022f

Browse files
committed
Merge pull request #9 from longbai/input_check
Input check
2 parents 806b28c + 7223f45 commit d5b022f

16 files changed

+278
-55
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#Changelog
22

3-
## 7.0.3
3+
## 7.0.4 (2014-10-17)
4+
5+
### 增加
6+
* 输入参数检查
7+
8+
### 废除
9+
* 不使用undefined key
10+
11+
## 7.0.3 (2014-10-15)
412

513
### 增加
614
* 实现crc32的检查

Qiniu.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Qiniu'
3-
s.version = '7.0.3'
3+
s.version = '7.0.4'
44
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
55
s.homepage = 'https://github.com/qiniu/objc-sdk'
66
s.social_media_url = 'http://weibo.com/qiniutek'

QiniuSDK.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
DF3C504819DD7BA6000F548F /* QNFormUploadTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3C504619DD7BA6000F548F /* QNFormUploadTest.m */; };
6161
DF3C504A19DD7D9F000F548F /* QNResumeUploadTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3C504919DD7D9F000F548F /* QNResumeUploadTest.m */; };
6262
DF3C504B19DD7D9F000F548F /* QNResumeUploadTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3C504919DD7D9F000F548F /* QNResumeUploadTest.m */; };
63+
DFA39AA419F1272800A1A158 /* QNAsyncRun.h in Headers */ = {isa = PBXBuildFile; fileRef = DFA39AA219F1272800A1A158 /* QNAsyncRun.h */; };
64+
DFA39AA519F1272800A1A158 /* QNAsyncRun.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA39AA319F1272800A1A158 /* QNAsyncRun.m */; };
65+
DFA39AA619F1272800A1A158 /* QNAsyncRun.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA39AA319F1272800A1A158 /* QNAsyncRun.m */; };
66+
DFA39AA719F1272800A1A158 /* QNAsyncRun.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA39AA319F1272800A1A158 /* QNAsyncRun.m */; };
67+
DFA39AA819F1272800A1A158 /* QNAsyncRun.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA39AA319F1272800A1A158 /* QNAsyncRun.m */; };
6368
DFA9B63B19DF904000A15FD1 /* QNEtag.h in Headers */ = {isa = PBXBuildFile; fileRef = DFA9B63919DF904000A15FD1 /* QNEtag.h */; };
6469
DFA9B63C19DF904000A15FD1 /* QNEtag.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9B63A19DF904000A15FD1 /* QNEtag.m */; };
6570
DFA9B63D19DF904000A15FD1 /* QNEtag.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9B63A19DF904000A15FD1 /* QNEtag.m */; };
@@ -143,6 +148,8 @@
143148
DF2CDE7019DAE90300CE01FB /* QNBase64Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNBase64Test.m; sourceTree = "<group>"; };
144149
DF3C504619DD7BA6000F548F /* QNFormUploadTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNFormUploadTest.m; sourceTree = "<group>"; };
145150
DF3C504919DD7D9F000F548F /* QNResumeUploadTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNResumeUploadTest.m; sourceTree = "<group>"; };
151+
DFA39AA219F1272800A1A158 /* QNAsyncRun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNAsyncRun.h; sourceTree = "<group>"; };
152+
DFA39AA319F1272800A1A158 /* QNAsyncRun.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNAsyncRun.m; sourceTree = "<group>"; };
146153
DFA9B63919DF904000A15FD1 /* QNEtag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNEtag.h; sourceTree = "<group>"; };
147154
DFA9B63A19DF904000A15FD1 /* QNEtag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNEtag.m; sourceTree = "<group>"; };
148155
DFA9B63E19DFD8C900A15FD1 /* QNEtagTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNEtagTest.m; sourceTree = "<group>"; };
@@ -278,6 +285,8 @@
278285
DF2CDE4E19DAC6A400CE01FB /* Common */ = {
279286
isa = PBXGroup;
280287
children = (
288+
DFA39AA219F1272800A1A158 /* QNAsyncRun.h */,
289+
DFA39AA319F1272800A1A158 /* QNAsyncRun.m */,
281290
DF2CDE4F19DAC6A400CE01FB /* QNUrlSafeBase64.h */,
282291
DF2CDE5019DAC6A400CE01FB /* QNUrlSafeBase64.m */,
283292
DF2CDE5119DAC6A400CE01FB /* QNConfig.h */,
@@ -353,6 +362,7 @@
353362
DF2CDE6919DAC6A400CE01FB /* QNUploadManager.h in Headers */,
354363
DF2CDE5F19DAC6A400CE01FB /* QNConfig.h in Headers */,
355364
DF293CA919DC0AF000799011 /* QNResumeUpload.h in Headers */,
365+
DFA39AA419F1272800A1A158 /* QNAsyncRun.h in Headers */,
356366
);
357367
runOnlyForDeploymentPostprocessing = 0;
358368
};
@@ -632,6 +642,7 @@
632642
DF2CDE6119DAC6A400CE01FB /* QNCrc32.m in Sources */,
633643
DF293CA619DC05B800799011 /* QNHttpManager.m in Sources */,
634644
DF293CAB19DC0E5300799011 /* QNResumeUpload.m in Sources */,
645+
DFA39AA519F1272800A1A158 /* QNAsyncRun.m in Sources */,
635646
DFA9B64A19E0018800A15FD1 /* QNUploadOption.m in Sources */,
636647
DF2CDE6A19DAC6A400CE01FB /* QNUploadManager.m in Sources */,
637648
);
@@ -650,6 +661,7 @@
650661
DF0D23D219DCF02C00D6B68F /* QNResponseInfo.m in Sources */,
651662
DFBC622519DE459800458C4B /* QNHttpTest.m in Sources */,
652663
DF0D23C919DCC5B800D6B68F /* QNUserAgent.m in Sources */,
664+
DFA39AA619F1272800A1A158 /* QNAsyncRun.m in Sources */,
653665
DF0D23C819DCC5B200D6B68F /* QNHttpManager.m in Sources */,
654666
DF0D23C719DCC58000D6B68F /* QNResumeUpload.m in Sources */,
655667
DF2CDE8019DAF67F00CE01FB /* QNUrlSafeBase64.m in Sources */,
@@ -676,6 +688,7 @@
676688
DF2CDE6219DAC6A400CE01FB /* QNCrc32.m in Sources */,
677689
DF293CA719DC05B800799011 /* QNHttpManager.m in Sources */,
678690
DF293CAC19DC0E5300799011 /* QNResumeUpload.m in Sources */,
691+
DFA39AA719F1272800A1A158 /* QNAsyncRun.m in Sources */,
679692
DFA9B64B19E0018800A15FD1 /* QNUploadOption.m in Sources */,
680693
DF2CDE6B19DAC6A400CE01FB /* QNUploadManager.m in Sources */,
681694
);
@@ -694,6 +707,7 @@
694707
DF0D23D119DCF02400D6B68F /* QNResponseInfo.m in Sources */,
695708
DFBC622619DE459800458C4B /* QNHttpTest.m in Sources */,
696709
DF0D23CB19DCC5D300D6B68F /* QNHttpManager.m in Sources */,
710+
DFA39AA819F1272800A1A158 /* QNAsyncRun.m in Sources */,
697711
DF0D23CA19DCC5CF00D6B68F /* QNUserAgent.m in Sources */,
698712
DF0D23C619DCC57500D6B68F /* QNResumeUpload.m in Sources */,
699713
DF2CDE7419DAF65800CE01FB /* QNUrlSafeBase64.m in Sources */,

QiniuSDK/Common/QNAsyncRun.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// QNAsyncRun.h
3+
// QiniuSDK
4+
//
5+
// Created by bailong on 14/10/17.
6+
// Copyright (c) 2014年 Qiniu. All rights reserved.
7+
//
8+
9+
typedef void (^QNRun)(void);
10+
11+
void QNAsyncRun(QNRun run);

QiniuSDK/Common/QNAsyncRun.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// QNAsyncRun.m
3+
// QiniuSDK
4+
//
5+
// Created by bailong on 14/10/17.
6+
// Copyright (c) 2014年 Qiniu. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "QNAsyncRun.h"
11+
12+
void QNAsyncRun(QNRun run) {
13+
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {
14+
run();
15+
});
16+
}

QiniuSDK/Common/QNConfig.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
#import <Foundation/Foundation.h>
1010

11-
extern NSString *const kQNUndefinedKey;
1211
extern NSString *const kQNUpHost;
12+
1313
extern NSString *const kQNUpHostBackup;
14+
1415
extern const UInt32 kQNChunkSize;
16+
1517
extern const UInt32 kQNBlockSize;
16-
extern const UInt32 kQNRetryMax;
17-
extern const UInt32 kQNPutThreshold;
1818

19-
@interface QNConfig : NSObject
19+
extern const UInt32 kQNRetryMax;
2020

21-
@end
21+
extern const UInt32 kQNPutThreshold;

QiniuSDK/Common/QNConfig.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@
88

99
#import "QNConfig.h"
1010

11-
NSString *const kQNUndefinedKey = @"?";
1211
NSString *const kQNUpHost = @"upload.qiniu.com";
1312
NSString *const kQNUpHostBackup = @"up.qiniu.com";
1413
const UInt32 kQNChunkSize = 256 * 1024;
1514
const UInt32 kQNBlockSize = 4 * 1024 * 1024;
1615
const UInt32 kQNPutThreshold = 512 * 1024;
1716

1817
const UInt32 kQNRetryMax = 3;
19-
20-
@implementation QNConfig
21-
22-
@end

QiniuSDK/Common/QNUrlSafeBase64.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
@interface QNUrlSafeBase64 : NSObject
1111

1212
+ (NSString *)encodeString:(NSString *)source;
13+
1314
+ (NSString *)encodeData:(NSData *)source;
15+
1416
@end

QiniuSDK/Common/QNVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
#import <Foundation/Foundation.h>
1010

11-
static const NSString *kQiniuVersion = @"7.0.3";
11+
static const NSString *kQiniuVersion = @"7.0.4";

QiniuSDK/Http/QNHttpManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ + (QNResponseInfo *)buildResponseInfo:(AFHTTPRequestOperation *)operation
3939
info = [[QNResponseInfo alloc] init:status withReqId:reqId withXLog:xlog withBody:responseObject];
4040
}
4141
else {
42-
info = [[QNResponseInfo alloc] initWithError:error];
42+
info = [QNResponseInfo responseInfoWithNetError:error];
4343
}
4444
return info;
4545
}

0 commit comments

Comments
 (0)