#ifndef __COMMON_PACKAGE_MANAGER_H__ #define __COMMON_PACKAGE_MANAGER_H__ #include "IPackageManager.h" #include "PackageInfo.h" #include #include #include class CommonPackageManager: public IPackageManager { public: std::set GetInstalledVersions(); bool CheckVersionInstalled(const std::string& version, int platform, int cpu_id); bool InstallVersion(const std::string& version, int platform, int cpu_id); std::string GetPackagePathByVersion(const std::string& version, int platform, int cpu_id); virtual ~CommonPackageManager(); protected: static std::vector > ArmRating; static std::vector > IntelRating; static std::vector > InitArmRating(); static std::vector > InitIntelRating(); bool IsVersionCompatible(const std::string& target_version, const std::string& package_version); int GetHardwareRating(int platform, int cpu_id, const std::vector >& group); virtual bool InstallPackage(const PackageInfo& package) = 0; virtual std::vector GetInstalledPackages() = 0; }; #endif