~ubuntu-branches/ubuntu/natty/transmission/natty

« back to all changes in this revision

Viewing changes to macosx/Torrent.h

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2009-12-08 10:49:11 UTC
  • mfrom: (1.1.29 upstream) (2.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20091208104911-06gio45n2nla3vpg
Tags: 1.80~b1-0ubuntu1
* New upstream release (LP: #460620), rebased on debian unstable
  remaining changes:
  - debian/control:
    + Added replaces & provides clutch (now included as part of transmission).
      Can be removed in lucid+1
    + Added quilt, liblaunchpad-integration-dev and lsb-release to Build-Depends
  - debian/rules:
    + create a po template during package build.
  - debian/patches/01_lpi.patch:
    + integrate transmission with launchpad
  - debian/patches/20_add_x-ubuntu-gettext-domain.diff:
    + add x-ubuntu-gettext-domain to .desktop file.
  - debian/transmission-daemon.default:
    - remove --auth from OPTIONS
* Fixes bugs:
  - tray menu shows wrong status for "main window" when started minimized
    (LP: #451415)
* Refreshed patches:
  - dont_build_libevent.patch
  - 99_autoreconf.patch
* Removed patches:
  - 21_onPortTested.diff, 23_tr_torrentNext.diff and
    24_tr_torrentDeleteLocalData_do_move.diff
* debian/patches/21_fix_inhibition.patch:
  - The right value for suspend inhibition is 4
* debian/control:
  - Build-Depend on libgconf2-dev to enable magnet link registration and on
    libcanberra-gtk-dev for notification sound.
* debian/watch:
  - make it detect beta versions, to be removed after 1.80 is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: Torrent.h 8870 2009-08-05 01:55:37Z livings124 $
 
2
 * $Id: Torrent.h 9667 2009-12-04 13:35:15Z livings124 $
3
3
 *
4
4
 * Copyright (c) 2006-2009 Transmission authors and contributors
5
5
 *
24
24
 
25
25
#import <Cocoa/Cocoa.h>
26
26
#import <transmission.h>
 
27
#import <Quartz/Quartz.h>
27
28
 
28
29
@class FileListNode;
29
30
 
30
 
#define STAT_TIME_NONE -1
31
 
#define STAT_TIME_NOW -2
32
 
 
33
 
@interface Torrent : NSObject
 
31
#warning uncomment
 
32
@interface Torrent : NSObject //<QLPreviewItem>
34
33
{
35
34
    tr_torrent * fHandle;
36
35
    const tr_info * fInfo;
37
36
    const tr_stat * fStat;
38
 
    
39
 
    BOOL fResumeOnWake;
40
 
    
41
 
    BOOL fUseIncompleteFolder;
42
 
    NSString * fDownloadFolder, * fIncompleteFolder;
43
37
        
44
38
    NSUserDefaults * fDefaults;
45
39
 
46
40
    NSImage * fIcon;
47
41
    
48
 
    NSString * fNameString, * fHashString;
 
42
    NSString * fHashString;
49
43
    
50
44
    tr_file_stat * fFileStat;
51
45
    NSArray * fFileList, * fFlatFileList;
57
51
    
58
52
    NSInteger fGroupValue;
59
53
    
60
 
    BOOL fAddedTrackers;
 
54
    BOOL fResumeOnWake;
61
55
    
62
 
    NSDictionary * fQuickPauseDict;
 
56
    NSString * fTimeMachineExclude;
63
57
}
64
58
 
65
59
- (id) initWithPath: (NSString *) path location: (NSString *) location deleteTorrentFile: (BOOL) torrentDelete
66
60
        lib: (tr_session *) lib;
67
61
- (id) initWithTorrentStruct: (tr_torrent *) torrentStruct location: (NSString *) location lib: (tr_session *) lib;
 
62
- (id) initWithMagnetAddress: (NSString *) address location: (NSString *) location lib: (tr_session *) lib;
68
63
- (id) initWithHistory: (NSDictionary *) history lib: (tr_session *) lib forcePause: (BOOL) pause;
69
64
 
70
65
- (NSDictionary *) history;
71
66
 
72
67
- (void) closeRemoveTorrent;
73
68
 
74
 
- (void) changeIncompleteDownloadFolder: (NSString *) folder;
75
 
- (void) changeDownloadFolder: (NSString *) folder;
76
 
- (NSString *) downloadFolder;
 
69
- (void) changeDownloadFolderBeforeUsing: (NSString *) folder;
 
70
 
 
71
- (NSString *) currentDirectory;
77
72
 
78
73
- (void) getAvailability: (int8_t *) tab size: (NSInteger) size;
79
74
- (void) getAmountFinished: (float *) tab size: (NSInteger) size;
92
87
 
93
88
- (void) resetCache;
94
89
 
 
90
- (BOOL) isMagnet;
 
91
- (NSString *) magnetLink;
 
92
 
95
93
- (CGFloat) ratio;
96
94
- (tr_ratiolimit) ratioSetting;
97
95
- (void) setRatioSetting: (tr_ratiolimit) setting;
116
114
- (tr_priority_t) priority;
117
115
- (void) setPriority: (tr_priority_t) priority;
118
116
 
119
 
- (void) revealData;
120
117
+ (void) trashFile: (NSString *) path;
121
118
- (void) trashData;
122
119
- (void) moveTorrentDataFileTo: (NSString *) folder;
123
120
- (void) copyTorrentFileTo: (NSString *) path;
124
121
 
125
122
- (BOOL) alertForRemainingDiskSpace;
126
 
- (BOOL) alertForFolderAvailable;
127
 
- (BOOL) alertForMoveFolderAvailable;
128
123
 
129
124
- (NSImage *) icon;
130
125
 
133
128
- (uint64_t) size;
134
129
- (uint64_t) sizeLeft;
135
130
 
136
 
- (NSString *) trackerAddressAnnounce;
137
 
- (NSDate *) lastAnnounceTime;
138
 
- (NSInteger) nextAnnounceTime;
139
 
- (NSString *) announceResponse;
140
 
 
141
 
- (NSString *) trackerAddressScrape;
142
 
- (NSDate *) lastScrapeTime;
143
 
- (NSInteger) nextScrapeTime;
144
 
- (NSString *) scrapeResponse;
145
 
 
146
 
- (NSMutableArray *) allTrackers: (BOOL) separators;
147
 
- (NSArray *) allTrackersFlat;
148
 
- (BOOL) updateAllTrackersForAdd: (NSMutableArray *) trackers;
149
 
- (void) updateAllTrackersForRemove: (NSMutableArray *) trackers;
150
 
- (BOOL) hasAddedTrackers;
 
131
- (NSMutableArray *) allTrackerStats;
 
132
- (NSArray *) allTrackersFlat; //used by GroupRules
 
133
- (BOOL) addTrackerToNewTier: (NSString *) tracker;
 
134
- (void) removeTrackersWithAnnounceAddresses: (NSSet *) trackers;
151
135
 
152
136
- (NSString *) comment;
153
137
- (NSString *) creator;
160
144
 
161
145
- (NSString *) torrentLocation;
162
146
- (NSString *) dataLocation;
 
147
- (NSString *) fileLocation: (FileListNode *) node;
163
148
 
164
149
- (CGFloat) progress;
165
150
- (CGFloat) progressDone;
168
153
 
169
154
- (NSInteger) eta;
170
155
 
171
 
- (CGFloat) notAvailableDesired;
 
156
- (CGFloat) availableDesired;
172
157
 
173
158
- (BOOL) isActive;
174
159
- (BOOL) isSeeding;
177
162
- (BOOL) allDownloaded;
178
163
- (BOOL) isComplete;
179
164
- (BOOL) isError;
180
 
- (BOOL) isErrorOrWarning;
 
165
- (BOOL) isAnyErrorOrWarning;
181
166
- (NSString *) errorMessage;
182
167
 
183
168
- (NSArray *) peers;
191
176
- (NSString *) remainingTimeString;
192
177
 
193
178
- (NSString *) stateString;
194
 
 
195
 
- (NSInteger) seeders;
196
 
- (NSInteger) leechers;
197
 
- (NSInteger) completedFromTracker;
198
 
 
199
179
- (NSInteger) totalPeersConnected;
200
180
- (NSInteger) totalPeersTracker;
201
181
- (NSInteger) totalPeersIncoming;
202
182
- (NSInteger) totalPeersCache;
203
183
- (NSInteger) totalPeersPex;
204
184
- (NSInteger) totalPeersDHT;
 
185
- (NSInteger) totalPeersLTEP;
205
186
- (NSInteger) totalPeersKnown;
206
187
 
207
188
- (NSInteger) peersSendingToUs;
216
197
- (uint64_t) downloadedTotal;
217
198
- (uint64_t) uploadedTotal;
218
199
- (uint64_t) failedHash;
219
 
- (CGFloat) swarmSpeed;
220
200
 
221
201
- (NSInteger) groupValue;
222
202
- (void) setGroupValue: (NSInteger) groupValue;
246
226
- (NSInteger) stalledMinutes;
247
227
- (BOOL) isStalled;
248
228
 
 
229
- (void) updateTimeMachineExclude;
 
230
 
249
231
- (NSInteger) stateSortKey;
 
232
- (NSString *) trackerSortKey;
250
233
 
251
234
- (tr_torrent *) torrentStruct;
252
235