source: trunk/macosx/Torrent.h @ 465

Last change on this file since 465 was 465, checked in by livings124, 16 years ago

I don't think these will be needed anymore.

  • Property svn:keywords set to Date Rev Author Id
File size: 3.8 KB
Line 
1/******************************************************************************
2 * $Id: Torrent.h 465 2006-06-25 18:49:29Z livings124 $
3 *
4 * Copyright (c) 2006 Transmission authors and contributors
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *****************************************************************************/
24
25#import <Cocoa/Cocoa.h>
26#import <transmission.h>
27
28#define RATIO_CHECK 1
29#define RATIO_GLOBAL -1
30#define RATIO_NO_CHECK 0
31
32@interface Torrent : NSObject
33{
34    tr_handle_t  * fLib;
35    tr_torrent_t * fHandle;
36    tr_info_t    * fInfo;
37    tr_stat_t    * fStat;
38   
39    BOOL         fResumeOnWake;
40    NSDate       * fDate;
41   
42    BOOL        fPrivateTorrent, fPublicTorrent;
43    NSString    * fPublicTorrentLocation;
44
45    NSUserDefaults  * fDefaults;
46
47    NSImage         * fIcon, * fIconFlipped;
48    NSMutableString * fNameString, * fProgressString, * fStatusString;
49   
50    int     fStopRatioSetting;
51    float   fRatioLimit;
52    BOOL    fFinishedSeeding, fWaitToStart;
53   
54    int fOrderValue;
55}
56
57- (id)  initWithPath: (NSString *) path lib: (tr_handle_t *) lib;
58- (id)  initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib;
59
60- (NSDictionary *) history;
61                   
62- (void)       setDownloadFolder: (NSString *) path;
63- (NSString *) downloadFolder;
64- (void)       getAvailability: (int8_t *) tab size: (int) size;
65
66- (void)        update;
67- (void)        startTransfer;
68- (void)        stopTransfer;
69- (void)        removeForever;
70- (void)        sleep;
71- (void)        wakeUp;
72
73- (float)       ratio;
74- (int)         stopRatioSetting;
75- (void)        setStopRatioSetting: (int) setting;
76- (float)       ratioLimit;
77- (void)        setRatioLimit: (float) limit;
78
79- (void) setWaitToStart: (BOOL) wait;
80- (BOOL) waitingToStart;
81
82- (void)    revealData;
83- (void)    trashData;
84- (void)    trashTorrent;
85
86- (NSImage *)  icon;
87- (NSImage *)  iconFlipped;
88
89- (NSString *) name;
90- (uint64_t)   size;
91- (NSString *) tracker;
92- (NSString *) announce;
93- (int)        pieceSize;
94- (int)        pieceCount;
95- (NSString *) hashString;
96
97- (NSString *) torrentLocation;
98- (NSString *) publicTorrentLocation;
99- (NSString *) torrentLocationString;
100- (NSString *) dataLocation;
101
102- (BOOL) publicTorrent;
103- (BOOL) privateTorrent;
104
105//- (NSString *) state;
106
107- (float)   progress;
108- (int)     eta;
109
110- (BOOL)    isActive;
111- (BOOL)    isSeeding;
112- (BOOL)    isPaused;
113- (BOOL)    justFinished;
114
115- (NSString *)  progressString;
116- (NSString *)  statusString;
117
118- (int) seeders;
119- (int) leechers;
120- (int) totalPeers;
121- (int) peersUploading;
122- (int) peersDownloading;
123
124- (float)       downloadRate;
125- (float)       uploadRate;
126- (float)       downloadedValid;
127- (uint64_t)    downloadedTotal;
128- (uint64_t)    uploadedTotal;
129
130- (NSNumber *) orderValue;
131- (void) setOrderValue: (int) orderValue;
132
133- (NSArray *) fileList;
134
135- (NSDate *) date;
136- (NSNumber *) stateSortKey;
137- (NSNumber *) progressSortKey;
138
139@end
Note: See TracBrowser for help on using the repository browser.