opencv/android/service/engine/jni/NativeService/CommonPackageManager.h

34 lines
1.1 KiB
C
Raw Normal View History

2012-06-21 22:50:05 +08:00
#ifndef __COMMON_PACKAGE_MANAGER_H__
#define __COMMON_PACKAGE_MANAGER_H__
#include "IPackageManager.h"
#include "PackageInfo.h"
#include <vector>
#include <string>
class CommonPackageManager: public IPackageManager
{
public:
std::vector<int> 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);
2012-06-21 22:50:05 +08:00
virtual ~CommonPackageManager();
protected:
2013-01-22 19:53:07 +08:00
static const std::vector<std::pair<int, int> > ArchRatings[];
2012-06-21 22:50:05 +08:00
static std::vector<std::pair<int, int> > InitArmRating();
static std::vector<std::pair<int, int> > InitIntelRating();
2013-01-22 19:53:07 +08:00
static std::vector<std::pair<int, int> > InitMipsRating();
bool IsVersionCompatible(int target_version, int package_version);
2012-06-21 22:50:05 +08:00
int GetHardwareRating(int platform, int cpu_id, const std::vector<std::pair<int, int> >& group);
2012-06-21 22:50:05 +08:00
virtual bool InstallPackage(const PackageInfo& package) = 0;
virtual std::vector<PackageInfo> GetInstalledPackages() = 0;
2012-06-21 22:50:05 +08:00
};
#endif