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
15class PackageView;
16class PackageScript;
17
18enum {
19	P_MSG_I_FINISHED = 'pifi',
20	P_MSG_I_ABORT = 'piab',
21	P_MSG_I_ERROR = 'pier'
22};
23
24
25class PackageInstall {
26public:
27								PackageInstall(PackageView* parent);
28								~PackageInstall();
29
30			status_t			Start();
31			void				Stop();
32			void				Install();
33
34private:
35			uint32				_Install();
36
37private:
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