source: trunk/macosx/Torrent.h @ 244

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

Saves in history the date at which the torrent was loaded

File size: 2.9 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    NSImage         * fIcon;
36    NSImage         * fIconNonFlipped;
37    NSMutableString * fStatusString;
38    NSMutableString * fInfoString;
39    NSMutableString * fDownloadString;
40    NSMutableString * fUploadString;
41}
42
43- (id)         initWithPath: (NSString *) path lib: (tr_handle_t *) lib;
44- (id)         initWithPath: (NSString *) path lib: (tr_handle_t *) lib
45                        date: (NSDate *) date;
46- (void)       setFolder: (NSString *) path;
47- (NSString *) getFolder;
48- (void)       getAvailability: (int8_t *) tab size: (int) size;
49
50- (void)       update;
51- (void)       start;
52- (void)       stop;
53- (void)       sleep;
54- (void)       wakeUp;
55- (void)       reveal;
56- (void)       trashTorrent;
57- (void)       trashData;
58
59- (NSImage *)  icon;
60- (NSImage *)  iconNonFlipped;
61- (NSString *) path;
62- (NSString *) name;
63- (uint64_t)   size;
64- (NSString *) tracker;
65- (NSString *) announce;
66- (int)        pieceSize;
67- (int)        pieceCount;
68- (NSString *) hash1;
69- (NSString *) hash2;
70
71- (float)      progress;
72- (BOOL)       isActive;
73- (BOOL)       isSeeding;
74- (BOOL)       isPaused;
75- (BOOL)       justFinished;
76- (NSString *) statusString;
77- (NSString *) infoString;
78- (NSString *) downloadString;
79- (NSString *) uploadString;
80- (int)        seeders;
81- (int)        leechers;
82- (uint64_t)   downloaded;
83- (uint64_t)   uploaded;
84- (NSDate *)   date;
85
86@end
Note: See TracBrowser for help on using the repository browser.