xref: /haiku/src/apps/cortex/addons/common/ControlAppLauncher.h (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
1 // ControlAppLauncher.h
2 // * PURPOSE
3 //   A ControlAppLauncher manages a control-panel application
4 //   for a given Media Kit node.  It takes responsibility for
5 //   launching the application, maintaining a BMessenger to
6 //   it for control purposes, and telling it to quit upon
7 //   destruction.
8 //
9 // * HISTORY
10 //   e.moon		17jun99		Begun.
11 
12 #ifndef __ControlAppLauncher_H__
13 #define __ControlAppLauncher_H__
14 
15 #include <kernel/image.h>
16 #include <MediaDefs.h>
17 #include <Messenger.h>
18 
19 class ControlAppLauncher {
20 public:						// ctor/dtor
21 	virtual ~ControlAppLauncher(); //nyi
22 
23 	ControlAppLauncher(
24 		media_node_id mediaNode,
25 		bool launchNow=true); //nyi
26 
27 public:						// accessors
28 	bool launched() const { return m_launched; }
29 	status_t error() const { return m_error; }
30 	const BMessenger& messenger() const { return m_messenger; }
31 
32 public:						// operations
33 	status_t launch(); //nyi
34 
35 private:						// guts
36 	void quit();
37 
38 	bool							m_launched;
39 	status_t				m_error;
40 	BMessenger			m_messenger;
41 };
42 
43 #endif /*__ControlAppLauncher_H__*/
44