source: trunk/macosx/Torrent.h @ 1285

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

remove unneeded function

  • Property svn:keywords set to Date Rev Author Id
File size: 4.7 KB
Line 
1/******************************************************************************
2 * $Id: Torrent.h 1285 2006-12-26 22:33:02Z 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, * fAnnounceDate;
41   
42    BOOL        fUseIncompleteFolder;
43    NSString    * fDownloadFolder, * fIncompleteFolder;
44   
45    BOOL        fPublicTorrent;
46    NSString    * fPublicTorrentLocation;
47
48    NSUserDefaults  * fDefaults;
49
50    NSImage         * fIcon, * fIconFlipped, * fIconSmall;
51    NSMutableString * fNameString, * fProgressString, * fStatusString, * fShortStatusString, * fRemainingTimeString;
52   
53    int     fStopRatioSetting;
54    float   fRatioLimit;
55    BOOL    fFinishedSeeding, fWaitToStart, fError;
56   
57    int fOrderValue;
58   
59    NSBitmapImageRep * fBitmap;
60    int8_t * fPieces;
61}
62
63- (id)  initWithPath: (NSString *) path forceDeleteTorrent: (BOOL) delete lib: (tr_handle_t *) lib;
64- (id)  initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib;
65
66- (NSDictionary *) history;
67                   
68- (void)       setDownloadFolder: (NSString *) path;
69- (NSString *) downloadFolder;
70
71- (void) getAvailability: (int8_t *) tab size: (int) size;
72- (void) getAmountFinished: (float *) tab size: (int) size;
73
74- (void)            update;
75- (NSDictionary *)  infoForCurrentView;
76
77- (void)        startTransfer;
78- (void)        stopTransfer;
79- (void)        stopTransferForQuit;
80- (void)        sleep;
81- (void)        wakeUp;
82
83- (void)        announce;
84- (NSDate *)    announceDate;
85
86- (float)       ratio;
87- (int)         stopRatioSetting;
88- (void)        setStopRatioSetting: (int) setting;
89- (float)       ratioLimit;
90- (void)        setRatioLimit: (float) limit;
91
92- (void) setWaitToStart: (BOOL) wait;
93- (BOOL) waitingToStart;
94
95- (void)    revealData;
96- (void)    revealPublicTorrent;
97- (void)    trashData;
98- (void)    trashTorrent;
99
100- (BOOL) alertForRemainingDiskSpace;
101- (BOOL) alertForVolumeAvailable;
102- (BOOL) alertForMoveVolumeAvailable;
103
104- (NSImage *)   icon;
105- (NSImage *)   iconFlipped;
106- (NSImage *)   iconSmall;
107
108- (NSString *) name;
109- (uint64_t)   size;
110- (NSString *) trackerAddress;
111- (NSString *) trackerAddressAnnounce;
112
113- (NSString *) comment;
114- (NSString *) creator;
115- (NSDate *)   dateCreated;
116
117- (int)        pieceSize;
118- (int)        pieceCount;
119- (NSString *) hashString;
120- (BOOL)       privateTorrent;
121
122- (NSString *) torrentLocation;
123- (NSString *) publicTorrentLocation;
124- (NSString *) dataLocation;
125
126- (BOOL) publicTorrent;
127
128- (NSString *) stateString;
129
130- (float)   progress;
131- (int)     eta;
132
133- (BOOL)        isActive;
134- (BOOL)        isSeeding;
135- (BOOL)        isPaused;
136- (BOOL)        isError;
137- (NSString *)  errorMessage;
138- (BOOL)        justFinished;
139
140- (NSArray *) peers;
141
142- (NSString *) progressString;
143- (NSString *) statusString;
144- (NSString *) shortStatusString;
145- (NSString *) remainingTimeString;
146
147- (int) seeders;
148- (int) leechers;
149- (int) completedFromTracker;
150- (int) totalPeers;
151- (int) totalPeersIncoming;
152- (int) totalPeersOutgoing;
153- (int) peersUploading;
154- (int) peersDownloading;
155
156- (float)       downloadRate;
157- (float)       uploadRate;
158- (float)       downloadedValid;
159- (uint64_t)    downloadedTotal;
160- (uint64_t)    uploadedTotal;
161- (float)       swarmSpeed;
162
163- (NSNumber *) orderValue;
164- (void) setOrderValue: (int) orderValue;
165
166- (NSArray *) fileList;
167
168- (NSDate *) date;
169- (NSNumber *) stateSortKey;
170- (NSNumber *) progressSortKey;
171
172@end
Note: See TracBrowser for help on using the repository browser.