xref: /haiku/src/apps/haikudepot/util/PackageKitUtils.h (revision 8b5cc9cf52bc7de09b9fa2db0f16fced0f4ae2e9)
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 PACKAGE_KIT_UTILS_H
6 #define PACKAGE_KIT_UTILS_H
7 
8 
9 #include <FindDirectory.h>
10 #include <Path.h>
11 
12 #include "PackageInfo.h"
13 
14 #include <package/PackageDefs.h>
15 
16 
17 class PackageKitUtils
18 {
19 public:
20 	static	status_t		DeriveLocalFilePath(const PackageInfo* package,
21 								BPath& result);
22 
23 	static	BPackageKit::BPackageInstallationLocation
24 							DeriveInstallLocation(const PackageInfo* package);
25 
26 private:
27 	static	status_t		_DeriveDirectoryWhich(
28 								BPackageKit::BPackageInstallationLocation
29 									location,
30 								directory_which* which);
31 };
32 
33 
34 #endif // PACKAGE_KIT_UTILS_H
35