Line | |
---|
1 | #ifndef TR_APP |
---|
2 | #define TR_APP |
---|
3 | |
---|
4 | #include <Application.h> |
---|
5 | #include <Directory.h> |
---|
6 | #include <FilePanel.h> |
---|
7 | #include <Message.h> |
---|
8 | |
---|
9 | #include "TRWindow.h" |
---|
10 | |
---|
11 | #define APP_SIG "application/x-vnd.titer-Transmission" |
---|
12 | #define TRANSMISSION_SETTINGS "Transmission/settings" |
---|
13 | |
---|
14 | |
---|
15 | #define TR_ADD 'tAdd' |
---|
16 | #define TR_OPEN 'tOpn' |
---|
17 | #define TR_RELOAD_SETTINGS 'tRSt' |
---|
18 | |
---|
19 | class TRApplication : public BApplication { |
---|
20 | public: |
---|
21 | TRApplication(); |
---|
22 | ~TRApplication(); |
---|
23 | |
---|
24 | virtual void AboutRequested(); |
---|
25 | virtual void Pulse(); |
---|
26 | virtual void ReadyToRun(); |
---|
27 | virtual void RefsReceived(BMessage *message); |
---|
28 | virtual bool QuitRequested(); |
---|
29 | |
---|
30 | virtual void MessageReceived(BMessage *message); |
---|
31 | |
---|
32 | static int32 Copy(void *data); |
---|
33 | |
---|
34 | status_t InitCheck(); |
---|
35 | inline BDirectory* TorrentDir() { return torrentDir; }; |
---|
36 | private: |
---|
37 | TRWindow *window; |
---|
38 | TRPrefsWindow *settings; |
---|
39 | BFilePanel *openPanel; |
---|
40 | BDirectory *torrentDir; |
---|
41 | }; |
---|
42 | |
---|
43 | /** Torrent File-Type Filter */ |
---|
44 | class TRFilter : public BRefFilter { |
---|
45 | public: |
---|
46 | virtual bool Filter(const entry_ref *ref, BNode *node, |
---|
47 | struct stat *st, const char *mimetype); |
---|
48 | }; |
---|
49 | |
---|
50 | #endif /* TR_APP */ |
---|
Note: See
TracBrowser
for help on using the repository browser.