source: trunk/macosx/Controller.h @ 16

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

Update 2005-12-17

File size: 4.4 KB
Line 
1/******************************************************************************
2 * Copyright (c) 2005 Eric Petit
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#ifndef CONTROLLER_H
24#define CONTROLLER_H
25
26#include <Cocoa/Cocoa.h>
27#include <transmission.h>
28#include "PrefsController.h"
29
30@class TorrentTableView;
31
32@interface Controller : NSObject
33{
34    tr_handle_t                  * fHandle;
35    int                            fCount;
36    tr_stat_t                    * fStat;
37    int                            fResumeOnWake[TR_MAX_TORRENT_COUNT];
38
39    NSToolbar                    * fToolbar;
40
41    IBOutlet PrefsController     * fPrefsController;
42
43    IBOutlet NSMenuItem          * fAdvancedBarItem;
44    IBOutlet NSMenuItem          * fPauseResumeItem;
45    IBOutlet NSMenuItem          * fRemoveItem;
46    IBOutlet NSMenuItem          * fRemoveTorrentItem;
47    IBOutlet NSMenuItem          * fRemoveDataItem;
48    IBOutlet NSMenuItem          * fRemoveBothItem;
49    IBOutlet NSMenuItem          * fRevealItem;
50    IBOutlet NSMenuItem          * fShowHideToolbar;
51
52    IBOutlet NSWindow            * fWindow;
53    IBOutlet TorrentTableView    * fTableView;
54    IBOutlet NSTextField         * fTotalDLField;
55    IBOutlet NSTextField         * fTotalULField;
56    IBOutlet NSMenu              * fContextMenu;
57
58    IBOutlet NSPanel             * fInfoPanel;
59    IBOutlet NSTextField         * fInfoTitle;
60    IBOutlet NSTextField         * fInfoTracker;
61    IBOutlet NSTextField         * fInfoAnnounce;
62    IBOutlet NSTextField         * fInfoSize;
63    IBOutlet NSTextField         * fInfoPieces;
64    IBOutlet NSTextField         * fInfoPieceSize;
65    IBOutlet NSTextField         * fInfoSeeders;
66    IBOutlet NSTextField         * fInfoLeechers;
67    IBOutlet NSTextField         * fInfoFolder;
68    IBOutlet NSTextField         * fInfoDownloaded;
69    IBOutlet NSTextField         * fInfoUploaded;
70
71    io_connect_t                   fRootPort;
72    NSArray * fFilenames;
73    NSTimer * fTimer;
74}
75
76- (void) advancedChanged: (id) sender;
77- (void) openShowSheet:   (id) sender;
78- (void) openSheetClosed: (NSOpenPanel *) s returnCode: (int) code
79                            contextInfo: (void *) info;
80- (void) stopTorrent:     (id) sender;
81- (void) stopAllTorrents: (id) sender;
82- (void) stopTorrentWithIndex: (int) index;
83- (void) resumeTorrent:   (id) sender;
84- (void) resumeAllTorrents: (id) sender;
85- (void) resumeTorrentWithIndex: (int) index;
86- (void) removeTorrent:   (id) sender;
87- (void) removeTorrentDeleteFile: (id) sender;
88- (void) removeTorrentDeleteData: (id) sender;
89- (void) removeTorrentDeleteBoth: (id) sender;
90- (void) removeTorrentWithIndex: (int) idx
91                  deleteTorrent: (BOOL) deleteTorrent
92                     deleteData: (BOOL) deleteData;
93- (void) showInfo:        (id) sender;
94
95- (void) updateUI:        (NSTimer *) timer;
96- (void) sleepCallBack:   (natural_t) messageType argument:
97                            (void *) messageArgument;
98
99- (NSMenu *) menuForIndex: (int) idx;
100
101- (void) runCustomizationPalette: (id) sender;
102- (void) showHideToolbar: (id) sender;
103
104- (void) showMainWindow:  (id) sender;
105- (void) linkHomepage:    (id) sender;
106- (void) linkForums:      (id) sender;
107- (void) notifyGrowl:     (NSString *) file;
108- (void) finderReveal:    (NSString *) path;
109- (void) finderTrash:     (NSString *) path;
110- (void) growlRegister:   (id) sender;
111
112@end
113
114#endif
Note: See TracBrowser for help on using the repository browser.