-
Notifications
You must be signed in to change notification settings - Fork 0
/
TorrentModel.h
57 lines (41 loc) · 1.25 KB
/
TorrentModel.h
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
47
48
49
50
51
52
53
54
55
56
57
//
// Torrent.h
// jigsaw
//
// Created by Will Goring on 09/12/2009.
//
#import <Foundation/Foundation.h>
@interface TorrentModel : NSObject <NSCopying> {
NSString *name;
NSString *hash;
unsigned long long size;
unsigned long long upRate;
unsigned long long uploaded;
unsigned long long downRate;
unsigned long long downloaded;
double ratio;
BOOL active;
unsigned long long priority;
NSString* url;
}
@property(readwrite, copy) NSString* name;
@property(readwrite, copy) NSString* hash;
@property(readwrite, assign) unsigned long long size;
@property(readwrite, assign) unsigned long long upRate;
@property(readwrite, assign) unsigned long long uploaded;
@property(readwrite, assign) unsigned long long downRate;
@property(readwrite, assign) unsigned long long downloaded;
@property(readwrite, assign) double ratio;
@property(readwrite, assign) BOOL active;
@property(readwrite, assign) NSString* url;
@property(readwrite, assign) unsigned long long priority;
+ (TorrentModel *)withHash:(NSString *)hash;
- (BOOL)isEqual:(TorrentModel*)other;
- (double) proportionComplete;
- (unsigned long long) secondsRemaining;
- (double) normalisedRatio;
- (void) start;
- (void) stop;
- (void) remove;
- (void) changePriority:(int)new_priority;
@end