Add implementation to test CAPIs in CLI tool
[platform/core/security/ode.git] / server / server.cpp
index 86c673a..4a9cefe 100644 (file)
 #include <cynara-client.h>
 #include <cynara-session.h>
 
+#include "rmi/secure-erase.h"
+#include "rmi/internal-encryption.h"
+#include "rmi/external-encryption.h"
+
 #include "server.h"
 
 using namespace std::placeholders;
@@ -24,6 +28,10 @@ namespace {
 
 const std::string ODE_MANAGER_ADDRESS = "/tmp/.ode.sock";
 
+std::unique_ptr<ode::SecureErase> secureErase;
+std::unique_ptr<ode::InternalEncryption> internalEncryption;
+std::unique_ptr<ode::ExternalEncryption> externalEncryption;
+
 } // namespace
 
 Server::Server()
@@ -31,6 +39,10 @@ Server::Server()
        service.reset(new rmi::Service(ODE_MANAGER_ADDRESS));
 
        service->setPrivilegeChecker(std::bind(&Server::checkPeerPrivilege, this, _1, _2));
+
+       secureErase.reset(new ode::SecureErase(*this));
+       internalEncryption.reset(new ode::InternalEncryption(*this));
+       externalEncryption.reset(new ode::ExternalEncryption(*this));
 }
 
 Server::~Server()