xref: /haiku/src/apps/haikudepot/util/PackageKitUtils.h (revision 344ded80d400028c8f561b4b876257b94c12db4a)
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 PackageInfoRef package, BPath& result);
21 
22 	static	BPackageKit::BPackageInstallationLocation
23 							DeriveInstallLocation(const PackageInfoRef package);
24 
25 private:
26 	static	status_t		_DeriveDirectoryWhich(
27 								BPackageKit::BPackageInstallationLocation location,
28 								directory_which* which);
29 };
30 
31 
32 #endif // PACKAGE_KIT_UTILS_H
33