From 52392aee29a3ee329fe494dafff94de1900fdc0e Mon Sep 17 00:00:00 2001 From: Sungbae Yoo Date: Mon, 6 Feb 2017 17:16:51 +0900 Subject: [PATCH] Change registerParametricMethod/regiterNonPrametricMethod to expose Signed-off-by: Sungbae Yoo Change-Id: I2880e9482084553dff66e7fc26b657ee4cc816d6 --- server/external-encryption.cpp | 22 +++++++++++----------- server/internal-encryption.cpp | 22 +++++++++++----------- server/secure-erase.cpp | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/server/external-encryption.cpp b/server/external-encryption.cpp index 7ca0c8d..bcca38c 100644 --- a/server/external-encryption.cpp +++ b/server/external-encryption.cpp @@ -160,17 +160,17 @@ void setOptions(unsigned int options) ExternalEncryption::ExternalEncryption(ODEControlContext &ctx) : context(ctx) { - 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, "", (int)(ExternalEncryption::mount)(std::string)); + context.expose(this, "", (int)(ExternalEncryption::umount)()); + context.expose(this, "", (int)(ExternalEncryption::encrypt)(std::string, unsigned int)); + context.expose(this, "", (int)(ExternalEncryption::decrypt)(std::string)); + context.expose(this, "", (int)(ExternalEncryption::isPasswordInitialized)()); + context.expose(this, "", (int)(ExternalEncryption::initPassword)(std::string)); + context.expose(this, "", (int)(ExternalEncryption::cleanPassword)(std::string)); + context.expose(this, "", (int)(ExternalEncryption::changePassword)(std::string, std::string)); + context.expose(this, "", (int)(ExternalEncryption::verifyPassword)(std::string)); + context.expose(this, "", (int)(ExternalEncryption::getState)()); + context.expose(this, "", (unsigned int)(ExternalEncryption::getSupportedOptions)()); externalAddEventReceiver(); } diff --git a/server/internal-encryption.cpp b/server/internal-encryption.cpp index 45533e4..e0439d1 100644 --- a/server/internal-encryption.cpp +++ b/server/internal-encryption.cpp @@ -116,17 +116,17 @@ void setOptions(unsigned int options) InternalEncryption::InternalEncryption(ODEControlContext& ctx) : context(ctx) { - context.registerParametricMethod(this, "", (int)(InternalEncryption::mount)(std::string)); - context.registerNonparametricMethod(this, "", (int)(InternalEncryption::umount)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::encrypt)(std::string, unsigned int)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::decrypt)(std::string)); - context.registerNonparametricMethod(this, "", (int)(InternalEncryption::isPasswordInitialized)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::initPassword)(std::string)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::cleanPassword)(std::string)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::changePassword)(std::string, std::string)); - context.registerParametricMethod(this, "", (int)(InternalEncryption::verifyPassword)(std::string)); - context.registerNonparametricMethod(this, "", (int)(InternalEncryption::getState)); - context.registerNonparametricMethod(this, "", (unsigned int)(InternalEncryption::getSupportedOptions)); + context.expose(this, "", (int)(InternalEncryption::mount)(std::string)); + context.expose(this, "", (int)(InternalEncryption::umount)()); + context.expose(this, "", (int)(InternalEncryption::encrypt)(std::string, unsigned int)); + context.expose(this, "", (int)(InternalEncryption::decrypt)(std::string)); + context.expose(this, "", (int)(InternalEncryption::isPasswordInitialized)()); + context.expose(this, "", (int)(InternalEncryption::initPassword)(std::string)); + context.expose(this, "", (int)(InternalEncryption::cleanPassword)(std::string)); + context.expose(this, "", (int)(InternalEncryption::changePassword)(std::string, std::string)); + context.expose(this, "", (int)(InternalEncryption::verifyPassword)(std::string)); + context.expose(this, "", (int)(InternalEncryption::getState)()); + context.expose(this, "", (unsigned int)(InternalEncryption::getSupportedOptions)()); } InternalEncryption::~InternalEncryption() diff --git a/server/secure-erase.cpp b/server/secure-erase.cpp index fe72e10..368c62e 100644 --- a/server/secure-erase.cpp +++ b/server/secure-erase.cpp @@ -70,8 +70,8 @@ static int getTotalFileCount(const std::string &name) SecureErase::SecureErase(ODEControlContext &ctx) : context(ctx), devicePath("") { - context.registerParametricMethod(this, "", (int)(SecureErase::erase)(std::string)); - context.registerParametricMethod(this, "", (int)(SecureErase::clean)(std::string)); + context.expose(this, "", (int)(SecureErase::erase)(std::string)); + context.expose(this, "", (int)(SecureErase::clean)(std::string)); } SecureErase::~SecureErase() -- 2.34.1