Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
// Copyright 2019 Google
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
 
15
#import "Crashlytics/Shared/FIRCLSOperation/FIRCLSFABAsyncOperation.h"
16
 
17
/**
18
 * If the compound operation is sent a @c -[cancel] message while executing, it will attempt to
19
 * cancel all operations on its internal queue, and will return an error in its @c asyncCompletion
20
 * block with this value as its code.
21
 */
22
FOUNDATION_EXPORT const NSUInteger FIRCLSCompoundOperationErrorCodeCancelled;
23
 
24
/**
25
 * If one or more of the operations on the @c compoundQueue fail, this operation returns an error
26
 * in its @c asyncCompletion block with this code, and an array of @c NSErrors keyed on @c
27
 * FIRCLSCompoundOperationErrorUserInfoKeyUnderlyingErrors in the @c userInfo dictionary.
28
 */
29
FOUNDATION_EXPORT const NSUInteger FIRCLSCompoundOperationErrorCodeSuboperationFailed;
30
 
31
/**
32
 * When all the operations complete, this @c FIRCLSCompoundOperation instance's @c asyncCompletion
33
 * block is called. If any errors were passed by the suboperations' @c asyncCompletion blocks, they
34
 * are put in an array which can be accessed in the @c userInfo dictionary in the error parameter
35
 * for this instance's @c asyncCompletion block.
36
 */
37
FOUNDATION_EXPORT NSString *const FIRCLSCompoundOperationErrorUserInfoKeyUnderlyingErrors;
38
 
39
/**
40
 * An operation that executes a collection of suboperations on an internal private queue. Any
41
 * instance of @c FIRCLSFABAsyncOperation passed into this instance's @c operations property has the
42
 * potential to return an @c NSError in its @c asyncCompletion block. This instance's @c
43
 * asyncCompletion block will put all such errors in an @c NSArray and return an @c NSError whose @c
44
 * userInfo contains that array keyed by @c FIRCLSCompoundOperationErrorUserInfoKeyUnderlyingErrors.
45
 */
46
@interface FIRCLSCompoundOperation : FIRCLSFABAsyncOperation
47
 
48
/**
49
 * An array of @c NSOperations to execute, which can include instances of @c FIRCLSFABAsyncOperation
50
 * or
51
 * @c FIRCLSCompoundOperation. This operation will not be marked as finished until all suboperations
52
 * are marked as finished.
53
 */
54
@property(copy, nonatomic) NSArray<NSOperation *> *operations;
55
 
56
@property(strong, nonatomic, readonly) NSOperationQueue *compoundQueue;
57
 
58
@end