opencv/android/service/engine/jni/JNIWrapper/JavaBasedPackageManager.h
Alexander Smorkalov 9f9c333a26 Bug #2759 android.os.DeadObjectException on OpenCV Manager connection fixed.
DeleteLocalRef calls for jclass objects added.
2013-02-11 16:03:19 +04:00

23 lines
589 B
C++

#include "IPackageManager.h"
#include "CommonPackageManager.h"
#include <jni.h>
#include <vector>
class JavaBasedPackageManager: public CommonPackageManager
{
public:
JavaBasedPackageManager(JavaVM* JavaMashine, jobject MarketConector);
virtual ~JavaBasedPackageManager();
protected:
virtual bool InstallPackage(const PackageInfo& package);
virtual std::vector<PackageInfo> GetInstalledPackages();
private:
JavaVM* JavaContext;
jobject JavaPackageManager;
JavaBasedPackageManager();
PackageInfo ConvertPackageFromJava(jobject package, JNIEnv* jenv);
};