-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEXUpdateRequestReply.m
More file actions
46 lines (37 loc) · 931 Bytes
/
EXUpdateRequestReply.m
File metadata and controls
46 lines (37 loc) · 931 Bytes
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
45
46
//
// EXUpdateRequestReply.m
// Entropy
// (C) 2007-2009 Codesign
// Licensed under LGPL (v3)
//
#import "EXUpdateRequestReply.h"
@implementation EXUpdateRequestReply
- (id)initWithLastSyncedUpdate:(NSTimeInterval)timeInterval updates:(NSArray*)_updates {
if (self = [super init]) {
lastSyncedUpdate = timeInterval;
updates = [_updates retain];
}
return self;
}
- (NSTimeInterval)lastSyncedUpdate {
return lastSyncedUpdate;
}
- (void)encodeWithCoder:(NSCoder*)coder {
[coder encodeDouble: lastSyncedUpdate forKey: @"lastSyncedUpdate"];
[coder encodeObject: updates forKey: @"updates"];
}
- (id)initWithCoder:(NSCoder*)coder {
if (self = [super init]) {
lastSyncedUpdate = [coder decodeDoubleForKey: @"lastSyncedUpdate"];
updates = [[coder decodeObjectForKey: @"updates"] retain];
}
return self;
}
- (NSArray*)updates {
return updates;
}
- (void)dealloc {
[updates release];
[super dealloc];
}
@end