xref: /haiku/src/apps/packageinstaller/PackageInstall.h (revision a085e81e62d7a860f809b4fb7c7bf5654c396985)
1 /*
2  * Copyright (c) 2010, 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 #include <Locker.h>
12 
13 class PackageView;
14 class PackageScript;
15 
16 enum {
17 	P_MSG_I_FINISHED = 'pifi',
18 	P_MSG_I_ABORT = 'piab',
19 	P_MSG_I_ERROR = 'pier'
20 };
21 
22 class PackageInstall {
23 	public:
24 		PackageInstall(PackageView *parent);
25 		~PackageInstall();
26 
27 		status_t Start();
28 		void Stop();
29 		void Install();
30 
31 	private:
32 		uint32 _Install();
33 
34 		PackageView *fParent;
35 		thread_id fThreadId;
36 		BLocker fIdLocker;
37 
38 		PackageScript *fCurrentScript;
39 		BLocker fCurrentScriptLocker; // XXX: will we need this?
40 		int32 fItemExistsPolicy;
41 };
42 
43 #endif
44