#ifndef __COMMON_PACKAGE_MANAGER_H__ #define __COMMON_PACKAGE_MANAGER_H__ #include "IPackageManager.h" #include "PackageInfo.h" #include #include class CommonPackageManager: public IPackageManager { public: std::vector GetInstalledVersions(); bool CheckVersionInstalled(int version, int platform, int cpu_id); bool InstallVersion(int version, int platform, int cpu_id); std::string GetPackagePathByVersion(int version, int platform, int cpu_id); virtual ~CommonPackageManager(); protected: static const std::vector > ArchRatings[]; static std::vector > InitArmRating(); static std::vector > InitIntelRating(); static std::vector > InitMipsRating(); bool IsVersionCompatible(int target_version, int 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