source: trunk/beos/TRApplication.h @ 4182

Last change on this file since 4182 was 4182, checked in by charles, 15 years ago

add explicit BSD licensing and copyright ownership by Bryan Varner, so the Debian packagers will be satisfied about is free software status. (#528)

  • Property svn:keywords set to Date Rev Author Id
File size: 2.2 KB
Line 
1/**
2 * Copyright (C) 2007 Bryan Varner
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * $Id:$
24 */
25
26// $Id: TRApplication.h 4182 2007-12-17 06:30:42Z charles $
27
28#ifndef TR_APP
29#define TR_APP
30
31#include <Application.h>
32#include <Directory.h>
33#include <FilePanel.h>
34#include <Message.h>
35
36#include "TRWindow.h"
37
38#define APP_SIG "application/x-vnd.titer-Transmission"
39#define TRANSMISSION_SETTINGS "Transmission/settings"
40
41
42#define TR_ADD 'tAdd'
43#define TR_OPEN 'tOpn'
44#define TR_RELOAD_SETTINGS 'tRSt'
45
46class TRApplication : public BApplication {
47        public:
48                TRApplication();
49                ~TRApplication();
50               
51                virtual void AboutRequested();
52                virtual void Pulse();
53                virtual void ReadyToRun();
54                virtual void RefsReceived(BMessage *message);
55                virtual void ArgvReceived(int32 _argc, char** _argv);
56                virtual bool QuitRequested();
57
58                virtual void MessageReceived(BMessage *message);
59               
60                static int32 Copy(void *data);
61               
62                status_t InitCheck();
63                inline BDirectory* TorrentDir() { return torrentDir; };
64        private:
65                TRWindow *window;
66                TRPrefsWindow *settings;
67                BFilePanel *openPanel;
68                BDirectory *torrentDir;
69};
70
71/** Torrent File-Type Filter */
72class TRFilter : public BRefFilter {
73public:
74        virtual bool Filter(const entry_ref *ref, BNode *node, 
75                            struct stat *st, const char *mimetype);
76};
77
78#endif /* TR_APP */
Note: See TracBrowser for help on using the repository browser.