xref: /haiku/src/apps/mediaplayer/MainApp.h (revision cfc3fa87da824bdf593eb8b817a83b6376e77935)
1 /*
2  * MainApp.h - Media Player for the Haiku Operating System
3  *
4  * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de>
5  * Copyright (C) 2008 Stephan Aßmus <superstippi@gmx.de>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  *
20  */
21 #ifndef __MAIN_APP_H
22 #define __MAIN_APP_H
23 
24 #include <Application.h>
25 #include "MainWin.h"
26 
27 enum  {
28 	M_PLAYER_QUIT				= 'plqt',
29 
30 	M_MEDIA_SERVER_STARTED		= 'msst',
31 	M_MEDIA_SERVER_QUIT			= 'msqt'
32 };
33 
34 class MainApp : public BApplication {
35 public:
36 								MainApp();
37 	virtual						~MainApp();
38 
39 			BWindow*			NewWindow();
40 
41 private:
42 	virtual	void				ReadyToRun();
43 	virtual	void				RefsReceived(BMessage* message);
44 	virtual	void				ArgvReceived(int32 argc, char** argv);
45 	virtual	void				MessageReceived(BMessage* message);
46 	virtual	void				AboutRequested();
47 
48 			void				_BroadcastMessage(const BMessage& message);
49 
50 private:
51 			int32				fPlayerCount;
52 			BWindow*			fFirstWindow;
53 
54 			bool				fMediaServerRunning;
55 			bool				fMediaAddOnServerRunning;
56 };
57 
58 extern MainApp* gMainApp;
59 extern const char* kAppSig;
60 
61 #endif
62