Revision 2943d6d4 pithos-macos/PithosSyncDaemon.m
b/pithos-macos/PithosSyncDaemon.m | ||
---|---|---|
576 | 576 |
nil]; |
577 | 577 |
[objectRequest setBytesReceivedBlock:^(unsigned long long size, unsigned long long total){ |
578 | 578 |
[activityFacility updateActivity:activity |
579 |
withMessage:[NSString stringWithFormat:@"Downloading '%@' (%.0f%%)", |
|
579 |
withMessage:[NSString stringWithFormat:@"Sync: Downloading '%@' (%.0f%%)",
|
|
580 | 580 |
[[objectRequest.userInfo valueForKey:@"pithosObject"] name], |
581 | 581 |
(100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))] |
582 | 582 |
totalBytes:activity.totalBytes |
... | ... | |
1130 | 1130 |
[(NSMutableDictionary *)(newObjectRequest.userInfo) setObject:[NSNumber numberWithUnsignedInteger:10] forKey:@"retries"]; |
1131 | 1131 |
[newObjectRequest setBytesReceivedBlock:^(unsigned long long size, unsigned long long total){ |
1132 | 1132 |
[activityFacility updateActivity:activity |
1133 |
withMessage:[NSString stringWithFormat:@"Downloading '%@' (%.0f%%)", |
|
1133 |
withMessage:[NSString stringWithFormat:@"Sync: Downloading '%@' (%.0f%%)",
|
|
1134 | 1134 |
object.name, |
1135 | 1135 |
(100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))] |
1136 | 1136 |
totalBytes:activity.totalBytes |
... | ... | |
1198 | 1198 |
[(NSMutableDictionary *)(newObjectRequest.userInfo) setObject:[NSNumber numberWithUnsignedInteger:10] forKey:@"retries"]; |
1199 | 1199 |
[newObjectRequest setBytesReceivedBlock:^(unsigned long long size, unsigned long long total){ |
1200 | 1200 |
[activityFacility updateActivity:activity |
1201 |
withMessage:[NSString stringWithFormat:@"Downloading '%@' (%.0f%%)", |
|
1201 |
withMessage:[NSString stringWithFormat:@"Sync: Downloading '%@' (%.0f%%)",
|
|
1202 | 1202 |
object.name, |
1203 | 1203 |
(100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))] |
1204 | 1204 |
totalBytes:activity.totalBytes |
... | ... | |
1293 | 1293 |
if (totalBytes >= [missingBlocks count]*blockSize) |
1294 | 1294 |
currentBytes = totalBytes - [missingBlocks count]*blockSize; |
1295 | 1295 |
[activityFacility updateActivity:activity |
1296 |
withMessage:[NSString stringWithFormat:@"Uploading '%@' (%.0f%%)", object.name, (100*(currentBytes + 0.0)/(totalBytes + 0.0))] |
|
1296 |
withMessage:[NSString stringWithFormat:@"Sync: Uploading '%@' (%.0f%%)", object.name, (100*(currentBytes + 0.0)/(totalBytes + 0.0))]
|
|
1297 | 1297 |
totalBytes:totalBytes |
1298 | 1298 |
currentBytes:currentBytes]; |
1299 | 1299 |
NSUInteger missingBlockIndex = [missingBlocks firstIndex]; |
... | ... | |
1312 | 1312 |
[(NSMutableDictionary *)(newContainerRequest.userInfo) setObject:[NSNumber numberWithUnsignedInteger:missingBlockIndex] forKey:@"missingBlockIndex"]; |
1313 | 1313 |
[newContainerRequest setBytesSentBlock:^(unsigned long long size, unsigned long long total){ |
1314 | 1314 |
[activityFacility updateActivity:activity |
1315 |
withMessage:[NSString stringWithFormat:@"Uploading '%@' (%.0f%%)", object.name, (100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))] |
|
1315 |
withMessage:[NSString stringWithFormat:@"Sync: Uploading '%@' (%.0f%%)", object.name, (100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))]
|
|
1316 | 1316 |
totalBytes:activity.totalBytes |
1317 | 1317 |
currentBytes:(activity.currentBytes + size)]; |
1318 | 1318 |
}]; |
... | ... | |
1333 | 1333 |
if (currentBytes > totalBytes) |
1334 | 1334 |
currentBytes = totalBytes; |
1335 | 1335 |
[activityFacility updateActivity:activity |
1336 |
withMessage:[NSString stringWithFormat:@"Uploading '%@' (%.0f%%)", object.name, (100*(currentBytes + 0.0)/(totalBytes + 0.0))] |
|
1336 |
withMessage:[NSString stringWithFormat:@"Sync: Uploading '%@' (%.0f%%)", object.name, (100*(currentBytes + 0.0)/(totalBytes + 0.0))]
|
|
1337 | 1337 |
totalBytes:totalBytes |
1338 | 1338 |
currentBytes:currentBytes]; |
1339 | 1339 |
NSIndexSet *missingBlocks = [containerRequest.userInfo objectForKey:@"missingBlocks"]; |
... | ... | |
1383 | 1383 |
[(NSMutableDictionary *)(newContainerRequest.userInfo) setObject:[NSNumber numberWithUnsignedInteger:missingBlockIndex] forKey:@"missingBlockIndex"]; |
1384 | 1384 |
[newContainerRequest setBytesSentBlock:^(unsigned long long size, unsigned long long total){ |
1385 | 1385 |
[activityFacility updateActivity:activity |
1386 |
withMessage:[NSString stringWithFormat:@"Uploading '%@' (%.0f%%)", object.name, (100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))] |
|
1386 |
withMessage:[NSString stringWithFormat:@"Sync: Uploading '%@' (%.0f%%)", object.name, (100*(activity.currentBytes + size + 0.0)/(activity.totalBytes + 0.0))]
|
|
1387 | 1387 |
totalBytes:activity.totalBytes |
1388 | 1388 |
currentBytes:(activity.currentBytes + size)]; |
1389 | 1389 |
}]; |
Also available in: Unified diff