source: trunk/macosx/Torrent.h @ 256

Last change on this file since 256 was 256, checked in by titer, 16 years ago

Merged Mitchell's changes, this includes:
Adds stop at ratio,
Adds sorting by name, date or state,
Seperates Info window into its own nib,
Adds option to enable or disabled autostarting downloads,
Seperates Network / Transfers in the Preferences

File size: 3.1 KB
Line 
1/******************************************************************************
2 * Copyright (c) 2005-2006 Transmission authors and contributors
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 *****************************************************************************/
22
23#import <Cocoa/Cocoa.h>
24#import <transmission.h>
25
26@interface Torrent : NSObject
27{
28    tr_handle_t  * fLib;
29    tr_torrent_t * fHandle;
30    tr_info_t    * fInfo;
31    tr_stat_t    * fStat;
32    BOOL         fResumeOnWake;
33    NSDate       * fDate;
34
35    NSUserDefaults  * fDefaults;
36
37    NSImage         * fIcon;
38    NSImage         * fIconNonFlipped;
39    NSMutableString * fStatusString;
40    NSMutableString * fInfoString;
41    NSMutableString * fDownloadString;
42    NSMutableString * fUploadString;
43   
44    int     fStopRatioSetting;
45    float   fRatioLimit;
46}
47
48- (id)          initWithPath: (NSString *) path lib: (tr_handle_t *) lib;
49- (id)          initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib;
50- (NSDictionary *) history;
51                   
52- (void)       setFolder: (NSString *) path;
53- (NSString *) getFolder;
54- (void)       getAvailability: (int8_t *) tab size: (int) size;
55
56- (void)       update;
57- (void)       start;
58- (void)       stop;
59- (void)       sleep;
60- (void)       wakeUp;
61
62- (float)      ratio;
63- (int)        stopRatioSetting;
64- (void)       setStopRatioSetting: (int) setting;
65- (float)      ratioLimit;
66- (void)       setRatioLimit: (float) limit;
67
68- (NSNumber *) stateSortKey;
69
70- (void)       reveal;
71- (void)       trashTorrent;
72- (void)       trashData;
73
74- (NSImage *)  icon;
75- (NSImage *)  iconNonFlipped;
76- (NSString *) path;
77- (NSString *) name;
78- (uint64_t)   size;
79- (NSString *) tracker;
80- (NSString *) announce;
81- (int)        pieceSize;
82- (int)        pieceCount;
83- (NSString *) hash;
84
85- (float)      progress;
86- (BOOL)       isActive;
87- (BOOL)       isSeeding;
88- (BOOL)       isPaused;
89- (BOOL)       justFinished;
90- (NSString *) statusString;
91- (NSString *) infoString;
92- (NSString *) downloadString;
93- (NSString *) uploadString;
94- (int)        seeders;
95- (int)        leechers;
96- (uint64_t)   downloaded;
97- (uint64_t)   uploaded;
98- (NSDate *)   date;
99
100@end
Note: See TracBrowser for help on using the repository browser.