source: trunk/macosx/PrefsController.h @ 13162

Last change on this file since 13162 was 13162, checked in by livings124, 9 years ago

bump Mac copyright to 2012

  • Property svn:keywords set to Date Rev Author Id
File size: 5.8 KB
Line 
1/******************************************************************************
2 * $Id: PrefsController.h 13162 2012-01-14 17:12:04Z livings124 $
3 *
4 * Copyright (c) 2005-2012 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@class PortChecker;
29
30@interface PrefsController : NSWindowController <NSToolbarDelegate>
31{
32    NSUserDefaults * fDefaults;
33    BOOL fHasLoaded;
34   
35    IBOutlet NSView * fGeneralView, * fTransfersView, * fBandwidthView, * fPeersView, * fNetworkView, * fRemoteView, * fGroupsView;
36   
37    NSString * fInitialString;
38   
39    IBOutlet NSButton * fBuiltInGrowlButton;
40    IBOutlet NSTextField * fGrowlInstalledField;
41    IBOutlet NSTextField * fCheckForUpdatesLabel;
42    IBOutlet NSButton * fCheckForUpdatesButton, * fCheckForUpdatesBetaButton;
43   
44    IBOutlet NSPopUpButton * fFolderPopUp, * fIncompleteFolderPopUp, * fImportFolderPopUp, * fDoneScriptPopUp;
45    IBOutlet NSTextField * fRatioStopField, * fIdleStopField, * fQueueDownloadField, * fQueueSeedField, * fStalledField;
46
47    IBOutlet NSTextField * fUploadField, * fDownloadField,
48                        * fSpeedLimitUploadField, * fSpeedLimitDownloadField;
49    IBOutlet NSPopUpButton * fAutoSpeedDayTypePopUp;
50   
51    IBOutlet NSTextField * fPeersGlobalField, * fPeersTorrentField,
52                        * fBlocklistURLField, * fBlocklistMessageField, * fBlocklistDateField;
53    IBOutlet NSButton * fBlocklistButton;
54   
55    PortChecker * fPortChecker;
56    IBOutlet NSTextField * fPortField, * fPortStatusField;
57    IBOutlet NSButton * fNatCheck;
58    IBOutlet NSImageView * fPortStatusImage;
59    IBOutlet NSProgressIndicator * fPortStatusProgress;
60    NSTimer * fPortStatusTimer;
61    int fPeerPort, fNatStatus;
62   
63    IBOutlet NSTextField * fRPCPortField, * fRPCPasswordField;
64    IBOutlet NSTableView * fRPCWhitelistTable;
65    NSMutableArray * fRPCWhitelistArray;
66    IBOutlet NSSegmentedControl * fRPCAddRemoveControl;
67    NSString * fRPCPassword;
68}
69
70+ (void) setHandle: (tr_session *) handle;
71+ (tr_session *) handle;
72
73- (void) setAutoUpdateToBeta: (id) sender;
74
75- (void) setPort: (id) sender;
76- (void) randomPort: (id) sender;
77- (void) setRandomPortOnStart: (id) sender;
78- (void) setNat: (id) sender;
79- (void) updatePortStatus;
80- (void) portCheckerDidFinishProbing: (PortChecker *) portChecker;
81
82- (NSArray *) sounds;
83- (void) setSound: (id) sender;
84
85- (void) setUTP: (id) sender;
86
87- (void) setPeersGlobal: (id) sender;
88- (void) setPeersTorrent: (id) sender;
89
90- (void) setPEX: (id) sender;
91- (void) setDHT: (id) sender;
92- (void) setLPD: (id) sender;
93
94- (void) setEncryptionMode: (id) sender;
95
96- (void) setBlocklistEnabled: (id) sender;
97- (void) updateBlocklist: (id) sender;
98- (void) setBlocklistAutoUpdate: (id) sender;
99- (void) updateBlocklistFields;
100- (void) updateBlocklistURLField;
101- (void) updateBlocklistButton;
102
103- (void) setAutoStartDownloads: (id) sender;
104
105- (void) setBadge: (id) sender;
106
107- (IBAction) setBuiltInGrowlEnabled: (id) sender;
108
109- (void) resetWarnings: (id) sender;
110
111- (void) setDefaultForMagnets: (id) sender;
112
113- (void) setQueue: (id) sender;
114- (void) setQueueNumber: (id) sender;
115
116- (void) setStalled: (id) sender;
117- (void) setStalledMinutes: (id) sender;
118
119- (void) setDownloadLocation: (id) sender;
120- (void) folderSheetShow: (id) sender;
121- (void) incompleteFolderSheetShow: (id) sender;
122- (void) setUseIncompleteFolder: (id) sender;
123
124- (void) setRenamePartialFiles: (id) sender;
125
126- (void) setDoneScriptEnabled: (id) sender;
127- (void) doneScriptSheetShow: (id) sender;
128
129- (void) applyRatioSetting: (id) sender;
130- (void) setRatioStop: (id) sender;
131- (void) updateRatioStopField;
132- (void) updateRatioStopFieldOld;
133
134- (void) applyIdleStopSetting: (id) sender;
135- (void) setIdleStop: (id) sender;
136- (void) updateLimitStopField;
137
138- (void) applySpeedSettings: (id) sender;
139- (void) applyAltSpeedSettings;
140
141- (void) updateLimitFields;
142- (void) setGlobalLimit: (id) sender;
143
144- (void) setSpeedLimit: (id) sender;
145- (void) setAutoSpeedLimit: (id) sender;
146- (void) setAutoSpeedLimitTime: (id) sender;
147- (void) setAutoSpeedLimitDay: (id) sender;
148+ (NSInteger) dateToTimeSum: (NSDate *) date;
149+ (NSDate *) timeSumToDate: (NSInteger) sum;
150
151- (void) setAutoImport: (id) sender;
152- (void) importFolderSheetShow: (id) sender;
153
154- (void) setAutoSize: (id) sender;
155
156- (void) setRPCEnabled: (id) sender;
157- (void) linkWebUI: (id) sender;
158- (void) setRPCAuthorize: (id) sender;
159- (void) setRPCUsername: (id) sender;
160- (void) setRPCPassword: (id) sender;
161- (void) updateRPCPassword;
162- (void) setRPCPort: (id) sender;
163- (void) setRPCUseWhitelist: (id) sender;
164- (void) setRPCWebUIDiscovery: (id) sender;
165- (void) updateRPCWhitelist;
166- (void) addRemoveRPCIP: (id) sender;
167
168- (void) helpForScript: (id) sender;
169- (void) helpForPeers: (id) sender;
170- (void) helpForNetwork: (id) sender;
171- (void) helpForRemote: (id) sender;
172
173- (void) rpcUpdatePrefs;
174
175@end
Note: See TracBrowser for help on using the repository browser.