1c65ff9f1SAndrew Lindesay /* 2c65ff9f1SAndrew Lindesay * Copyright 2022, Andrew Lindesay <apl@lindesay.co.nz>. 3c65ff9f1SAndrew Lindesay * All rights reserved. Distributed under the terms of the MIT License. 4c65ff9f1SAndrew Lindesay */ 5c65ff9f1SAndrew Lindesay #ifndef PACKAGE_KIT_UTILS_H 6c65ff9f1SAndrew Lindesay #define PACKAGE_KIT_UTILS_H 7c65ff9f1SAndrew Lindesay 8c65ff9f1SAndrew Lindesay 9c65ff9f1SAndrew Lindesay #include <FindDirectory.h> 10c65ff9f1SAndrew Lindesay #include <Path.h> 11c65ff9f1SAndrew Lindesay 12c65ff9f1SAndrew Lindesay #include "PackageInfo.h" 13c65ff9f1SAndrew Lindesay 14c65ff9f1SAndrew Lindesay #include <package/PackageDefs.h> 15c65ff9f1SAndrew Lindesay 16c65ff9f1SAndrew Lindesay 17c65ff9f1SAndrew Lindesay class PackageKitUtils 18c65ff9f1SAndrew Lindesay { 19c65ff9f1SAndrew Lindesay public: 20*c0789628SAndrew Lindesay static status_t DeriveLocalFilePath(const PackageInfoRef package, BPath& result); 21c65ff9f1SAndrew Lindesay 22c65ff9f1SAndrew Lindesay static BPackageKit::BPackageInstallationLocation 23*c0789628SAndrew Lindesay DeriveInstallLocation(const PackageInfoRef package); 24c65ff9f1SAndrew Lindesay 25c65ff9f1SAndrew Lindesay private: 26c65ff9f1SAndrew Lindesay static status_t _DeriveDirectoryWhich( 27*c0789628SAndrew Lindesay BPackageKit::BPackageInstallationLocation location, 28c65ff9f1SAndrew Lindesay directory_which* which); 29c65ff9f1SAndrew Lindesay }; 30c65ff9f1SAndrew Lindesay 31c65ff9f1SAndrew Lindesay 32c65ff9f1SAndrew Lindesay #endif // PACKAGE_KIT_UTILS_H 33