mirror of
https://github.com/samsonjs/arq_restore.git
synced 2026-04-27 15:07:44 +00:00
print status messages as bytes are requested and downloaded
This commit is contained in:
parent
d6c32e1f1f
commit
3b7b66bf61
2 changed files with 7 additions and 0 deletions
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
@interface ArqRestoreCommand : NSObject <S3RestorerDelegate, S3GlacierRestorerDelegate, GlacierRestorerDelegate> {
|
@interface ArqRestoreCommand : NSObject <S3RestorerDelegate, S3GlacierRestorerDelegate, GlacierRestorerDelegate> {
|
||||||
Target *target;
|
Target *target;
|
||||||
|
unsigned long long maxRequested;
|
||||||
|
unsigned long long maxTransfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)errorDomain;
|
- (NSString *)errorDomain;
|
||||||
|
|
|
||||||
|
|
@ -473,18 +473,22 @@
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerBytesRequestedDidChange:(NSNumber *)theRequested {
|
- (BOOL)s3GlacierRestorerBytesRequestedDidChange:(NSNumber *)theRequested {
|
||||||
|
printf("requested %qu of %qu\n", [theRequested unsignedLongLongValue], maxRequested);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerTotalBytesToRequestDidChange:(NSNumber *)theMaxRequested {
|
- (BOOL)s3GlacierRestorerTotalBytesToRequestDidChange:(NSNumber *)theMaxRequested {
|
||||||
|
maxRequested = [theMaxRequested unsignedLongLongValue];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerDidFinishRequesting {
|
- (BOOL)s3GlacierRestorerDidFinishRequesting {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerBytesTransferredDidChange:(NSNumber *)theTransferred {
|
- (BOOL)s3GlacierRestorerBytesTransferredDidChange:(NSNumber *)theTransferred {
|
||||||
|
printf("restored %qu of %qu\n", [theTransferred unsignedLongLongValue], maxTransfer);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerTotalBytesToTransferDidChange:(NSNumber *)theTotal {
|
- (BOOL)s3GlacierRestorerTotalBytesToTransferDidChange:(NSNumber *)theTotal {
|
||||||
|
maxTransfer = [theTotal unsignedLongLongValue];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (BOOL)s3GlacierRestorerErrorMessage:(NSString *)theErrorMessage didOccurForPath:(NSString *)thePath {
|
- (BOOL)s3GlacierRestorerErrorMessage:(NSString *)theErrorMessage didOccurForPath:(NSString *)thePath {
|
||||||
|
|
@ -492,6 +496,7 @@
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
- (void)s3GlacierRestorerDidSucceed {
|
- (void)s3GlacierRestorerDidSucceed {
|
||||||
|
printf("restore finished.\n");
|
||||||
}
|
}
|
||||||
- (void)s3GlacierRestorerDidFail:(NSError *)error {
|
- (void)s3GlacierRestorerDidFail:(NSError *)error {
|
||||||
printf("failed: %s\n", [[error localizedDescription] UTF8String]);
|
printf("failed: %s\n", [[error localizedDescription] UTF8String]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue