Change registerParametricMethod/regiterNonPrametricMethod to expose 89/113189/1
authorSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 6 Feb 2017 08:16:51 +0000 (17:16 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 6 Feb 2017 12:22:19 +0000 (21:22 +0900)
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: I2880e9482084553dff66e7fc26b657ee4cc816d6

server/external-encryption.cpp
server/internal-encryption.cpp
server/secure-erase.cpp

index 7ca0c8de40696f2bb5aba372058d7ffdbe27a44f..bcca38c404ecc753eea11c46e18cf07ad4202ba5 100644 (file)
@@ -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();
 }
index 45533e4bca0249d4e3269a626e5b850f4db34d8b..e0439d161d467f021c4fa78cddb23c72406ddbcb 100644 (file)
@@ -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()
index fe72e107c640585bb8401ba65a9607083ce2737e..368c62ed02f04dbe8b1c3a94efa28671450524e7 100644 (file)
@@ -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()