-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippet16.txt
30 lines (22 loc) · 1.01 KB
/
snippet16.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- (GO*) getAllMusicProgressCancellation:(ProgressCancellation)progressCancellation
{
GO* go = [GO groupOperation:^(GO * _Nonnull groupOp) {
void (^universalProgress)(DTO*, DTODownProgress) = ^(DTO* op, DTODownProgress p){
if (groupOp.state == RXNO_Cancelled) [op cancel];
if (progressCancellation) progressCancellation(groupOp);
};
DTO* op1 = [[DTO GET:url1 downloadProgress:universalProgress] syncStart];
NSLog(@"op1: %@",[op1 stateDescription]);
if (groupOp.state == RXNO_Cancelled) return;
DTO* op2 = [[DTO GET:url2 downloadProgress:universalProgress] syncStart];
NSLog(@"op2: %@",[op2 stateDescription]);
groupOp.result = @[op1.receivedData, op2.receivedData];
group.resultClass = NSStringFromClass(NSArray.class);
}];
go.owner = [BO addressInMemory:self];
return go;
}
- (GO*) getAllVideoProgressCancellation:(ProgressCancellation)progressCancellation
{
...
}