xref: /haiku/src/apps/packageinstaller/PackageInstall.h (revision 3f5014ec86d210bd1d63f14c7640d1c68b7d8684)
1 /*
2  * Copyright (c) 2010-2014, Haiku, Inc.
3  * Distributed under the terms of the MIT license.
4  *
5  * Author:
6  *		Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
7  */
8 #ifndef PACKAGE_INSTALL_H
9 #define PACKAGE_INSTALL_H
10 
11 
12 #include <Locker.h>
13 
14 
15 class PackageView;
16 class PackageScript;
17 
18 enum {
19 	P_MSG_I_FINISHED = 'pifi',
20 	P_MSG_I_ABORT = 'piab',
21 	P_MSG_I_ERROR = 'pier'
22 };
23 
24 
25 class PackageInstall {
26 public:
27 								PackageInstall(PackageView* parent);
28 								~PackageInstall();
29 
30 			status_t			Start();
31 			void				Stop();
32 			void				Install();
33 
34 private:
35 			uint32				_Install();
36 
37 private:
38 			PackageView*		fParent;
39 			thread_id			fThreadId;
40 			BLocker				fIdLocker;
41 
42 			PackageScript*		fCurrentScript;
43 			BLocker				fCurrentScriptLocker;
44 			int32				fItemExistsPolicy;
45 };
46 
47 
48 #endif // PACKAGE_INSTALL_H
49