Skip to content

Commit 20c509b

Browse files
committed
Merge pull request #242 from devincheevers/master
Added Bolts generics to internal implementation
2 parents e2fbecc + 388a3a8 commit 20c509b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Parse/Internal/ACL/DefaultACLController/PFDefaultACLController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ - (instancetype)init {
5757
#pragma mark - ACL
5858
///--------------------------------------
5959

60-
- (BFTask *)getDefaultACLAsync {
60+
- (BFTask PF_GENERIC(PFACL *)*)getDefaultACLAsync {
6161
return [_taskQueue enqueue:^id(BFTask *task) {
6262
if (!_defaultACL || !_useCurrentUser) {
6363
return _defaultACL;
@@ -82,7 +82,7 @@ - (BFTask *)getDefaultACLAsync {
8282
}];
8383
}
8484

85-
- (BFTask *)setDefaultACLAsync:(PFACL *)acl withCurrentUserAccess:(BOOL)accessForCurrentUser {
85+
- (BFTask PF_GENERIC(PFACL *)*)setDefaultACLAsync:(PFACL *)acl withCurrentUserAccess:(BOOL)accessForCurrentUser {
8686
return [_taskQueue enqueue:^id(BFTask *task) {
8787
_defaultACLWithCurrentUser = nil;
8888
_lastCurrentUser = nil;

Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ - (void)dealloc {
112112
#pragma mark - Data Commands
113113
///--------------------------------------
114114

115-
- (BFTask *)runCommandAsync:(PFRESTCommand *)command withOptions:(PFCommandRunningOptions)options {
115+
- (BFTask PF_GENERIC(PFCommandResult *)*)runCommandAsync:(PFRESTCommand *)command withOptions:(PFCommandRunningOptions)options {
116116
return [self runCommandAsync:command withOptions:options cancellationToken:nil];
117117
}
118118

119-
- (BFTask *)runCommandAsync:(PFRESTCommand *)command
120-
withOptions:(PFCommandRunningOptions)options
121-
cancellationToken:(BFCancellationToken *)cancellationToken {
119+
- (BFTask PF_GENERIC(PFCommandResult *)*)runCommandAsync:(PFRESTCommand *)command
120+
withOptions:(PFCommandRunningOptions)options
121+
cancellationToken:(BFCancellationToken *)cancellationToken {
122122
return [self _performCommandRunningBlock:^id {
123123
[command resolveLocalIds];
124124
NSURLRequest *request = [self.requestConstructor dataURLRequestForCommand:command];
@@ -130,12 +130,12 @@ - (BFTask *)runCommandAsync:(PFRESTCommand *)command
130130
#pragma mark - File Commands
131131
///--------------------------------------
132132

133-
- (BFTask *)runFileUploadCommandAsync:(PFRESTCommand *)command
134-
withContentType:(NSString *)contentType
135-
contentSourceFilePath:(NSString *)sourceFilePath
136-
options:(PFCommandRunningOptions)options
137-
cancellationToken:(nullable BFCancellationToken *)cancellationToken
138-
progressBlock:(nullable PFProgressBlock)progressBlock {
133+
- (BFTask PF_GENERIC(PFCommandResult *)*)runFileUploadCommandAsync:(PFRESTCommand *)command
134+
withContentType:(NSString *)contentType
135+
contentSourceFilePath:(NSString *)sourceFilePath
136+
options:(PFCommandRunningOptions)options
137+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
138+
progressBlock:(nullable PFProgressBlock)progressBlock {
139139
@weakify(self);
140140
return [self _performCommandRunningBlock:^id {
141141
@strongify(self);
@@ -153,10 +153,10 @@ - (BFTask *)runFileUploadCommandAsync:(PFRESTCommand *)command
153153
} withOptions:options cancellationToken:cancellationToken];
154154
}
155155

156-
- (BFTask *)runFileDownloadCommandAsyncWithFileURL:(NSURL *)url
157-
targetFilePath:(NSString *)filePath
158-
cancellationToken:(nullable BFCancellationToken *)cancellationToken
159-
progressBlock:(nullable PFProgressBlock)progressBlock {
156+
- (BFTask PF_GENERIC(PFCommandResult *)*)runFileDownloadCommandAsyncWithFileURL:(NSURL *)url
157+
targetFilePath:(NSString *)filePath
158+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
159+
progressBlock:(nullable PFProgressBlock)progressBlock {
160160
return [self _performCommandRunningBlock:^id {
161161
NSURLRequest *request = [NSURLRequest requestWithURL:url];
162162
return [_session performFileDownloadURLRequestAsync:request

0 commit comments

Comments
 (0)