forked from arqbackup/arq_restore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PackIndexEntry.m
44 lines (40 loc) · 1.06 KB
/
PackIndexEntry.m
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// PackIndexEntry.m
// Arq
//
// Created by Stefan Reitshamer on 12/30/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "PackIndexEntry.h"
@implementation PackIndexEntry
- (id)initWithPackSHA1:(NSString *)thePackSHA1 offset:(unsigned long long)theOffset dataLength:(unsigned long long)theDataLength objectSHA1:(NSString *)theObjectSHA1 {
if (self = [super init]) {
packSHA1 = [thePackSHA1 copy];
offset = theOffset;
dataLength = theDataLength;
objectSHA1 = [theObjectSHA1 copy];
}
return self;
}
- (void)dealloc {
[packSHA1 release];
[objectSHA1 release];
[super dealloc];
}
- (NSString *)packSHA1 {
return packSHA1;
}
- (unsigned long long)offset {
return offset;
}
- (unsigned long long)dataLength {
return dataLength;
}
- (NSString *)objectSHA1 {
return objectSHA1;
}
#pragma mark NSObject
- (NSString *)description {
return [NSString stringWithFormat:@"<PackIndexEntry: packSHA1=%@ offset=%qu dataLength=%qu objectSHA1=%@>", packSHA1, offset, dataLength, objectSHA1];
}
@end