Revision 78355da3 asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m
b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m | ||
---|---|---|
35 | 35 |
// or implied, of GRNET S.A. |
36 | 36 |
|
37 | 37 |
#import "ASIPithosAccountRequest.h" |
38 |
#import "ASIPithosAccount.h" |
|
38 | 39 |
#import "ASIPithosContainer.h" |
39 | 40 |
|
40 | 41 |
@implementation ASIPithosAccountRequest |
... | ... | |
137 | 138 |
return nil; |
138 | 139 |
} |
139 | 140 |
|
141 |
- (ASIPithosAccount *)account { |
|
142 |
ASIPithosAccount *account = [ASIPithosAccount account]; |
|
143 |
account.containerCount = [self containerCount]; |
|
144 |
account.bytesUsed = [self bytesUsed]; |
|
145 |
account.untilTimestamp = [self untilTimestamp]; |
|
146 |
account.groups = (NSMutableDictionary *)[self groups]; |
|
147 |
account.metadata = (NSMutableDictionary *)[self metadata]; |
|
148 |
account.lastModified = [self lastModified]; |
|
149 |
return account; |
|
150 |
} |
|
151 |
|
|
152 |
|
|
140 | 153 |
#pragma mark - |
141 | 154 |
#pragma mark GET |
142 | 155 |
|
... | ... | |
256 | 269 |
options:NSBackwardsSearch |
257 | 270 |
range:NSMakeRange(([currentContent length] - 3), 1)]]; |
258 | 271 |
} else if ([elementName isEqualToString:@"x_container_until_timestamp"]) { |
259 |
currentContainer.untilTimestamp = [NSDate dateWithTimeIntervalSince1970:[currentContent intValue]];
|
|
272 |
currentContainer.untilTimestamp = [NSDate dateWithTimeIntervalSince1970:[currentContent doubleValue]];
|
|
260 | 273 |
} else if ([elementName rangeOfString:@"x_container_policy_"].location == 0) { |
261 | 274 |
if (currentContainer.policy == nil) |
262 | 275 |
currentContainer.policy = [NSMutableDictionary dictionary]; |
Also available in: Unified diff