- context.registerParametricMethod(this, "", (int)(ExternalEncryption::mount)(std::string));
- context.registerNonparametricMethod(this, "", (int)(ExternalEncryption::umount));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::encrypt)(std::string, unsigned int));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::decrypt)(std::string));
- context.registerNonparametricMethod(this, "", (int)(ExternalEncryption::isPasswordInitialized));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::initPassword)(std::string));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::cleanPassword)(std::string));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::changePassword)(std::string, std::string));
- context.registerParametricMethod(this, "", (int)(ExternalEncryption::verifyPassword)(std::string));
- context.registerNonparametricMethod(this, "", (int)(ExternalEncryption::getState));
- context.registerNonparametricMethod(this, "", (unsigned int)(ExternalEncryption::getSupportedOptions));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::mount)(std::string));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::umount)());
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::encrypt)(std::string, unsigned int));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::decrypt)(std::string));
+ context.expose(this, "", (int)(ExternalEncryption::isPasswordInitialized)());
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::initPassword)(std::string));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::cleanPassword)(std::string));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::changePassword)(std::string, std::string));
+ context.expose(this, PRIVILEGE_PLATFORM, (int)(ExternalEncryption::verifyPassword)(std::string));
+ context.expose(this, "", (int)(ExternalEncryption::getState)());
+ context.expose(this, "", (unsigned int)(ExternalEncryption::getSupportedOptions)());
+
+ engine.reset(new EXTERNAL_ENGINE(
+ EXTERNAL_PATH, EXTERNAL_PATH,
+ ProgressBar([](int v) {
+ ::vconf_set_str(VCONFKEY_SDE_ENCRYPT_PROGRESS,
+ std::to_string(v).c_str());
+ })
+ ));