1/*
2 * Copyright 2022, Andrew Lindesay <apl@lindesay.co.nz>
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5#ifndef ABSTRACT_PACKAGE_PROCESS_H
6#define ABSTRACT_PACKAGE_PROCESS_H
7
8
9#include <Referenceable.h>
10
11#include "AbstractProcess.h"
12#include "PackageInfo.h"
13
14
15class PackageManager;
16class Model;
17
18
19class AbstractPackageProcess : public BReferenceable, public AbstractProcess {
20public:
21								AbstractPackageProcess(PackageInfoRef package,
22									Model* model);
23	virtual						~AbstractPackageProcess();
24
25			int32				InstallLocation() const
26									{ return fInstallLocation; }
27
28protected:
29			PackageInfoRef		FindPackageByName(const BString& name);
30
31protected:
32			PackageManager*		fPackageManager;
33			PackageInfoRef		fPackage;
34
35private:
36			Model*				fModel;
37			int32				fInstallLocation;
38};
39
40
41typedef BReference<AbstractPackageProcess> PackageProcessRef;
42
43
44#endif // ABSTRACT_PACKAGE_PROCESS_H
45