Add privileges to APIs
[platform/core/security/ode.git] / server / internal-encryption.cpp
index e0439d1..70ade69 100644 (file)
@@ -36,6 +36,8 @@
 #define INTERNAL_STATE_VCONF_KEY VCONFKEY_ODE_CRYPTO_STATE
 #define INTERNAL_OPTION_ONLY_USED_REGION_VCONF_KEY VCONFKEY_ODE_FAST_ENCRYPTION
 
+#define PRIVILEGE_PLATFORM "http://tizen.org/privilege/internal/default/platform"
+
 namespace ode {
 
 namespace {
@@ -116,15 +118,15 @@ void setOptions(unsigned int options)
 InternalEncryption::InternalEncryption(ODEControlContext& ctx) :
        context(ctx)
 {
-       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, PRIVILEGE_PLATFORM, (int)(InternalEncryption::mount)(std::string));
+       context.expose(this, PRIVILEGE_PLATFORM, (int)(InternalEncryption::umount)());
+       context.expose(this, PRIVILEGE_PLATFORM, (int)(InternalEncryption::encrypt)(std::string, unsigned int));
+       context.expose(this, PRIVILEGE_PLATFORM, (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, PRIVILEGE_PLATFORM, (int)(InternalEncryption::initPassword)(std::string));
+       context.expose(this, PRIVILEGE_PLATFORM, (int)(InternalEncryption::cleanPassword)(std::string));
+       context.expose(this, PRIVILEGE_PLATFORM, (int)(InternalEncryption::changePassword)(std::string, std::string));
+       context.expose(this, PRIVILEGE_PLATFORM, (int)(InternalEncryption::verifyPassword)(std::string));
        context.expose(this, "", (int)(InternalEncryption::getState)());
        context.expose(this, "", (unsigned int)(InternalEncryption::getSupportedOptions)());
 }