Old privileges restored
[platform/core/security/key-manager.git] / src / manager / service / ckm-service.h
index b8b6c55..5a96f23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -21,7 +21,8 @@
  */
 #pragma once
 
-#include <thread-service.h>
+#include <mutex>
+#include <message-service.h>
 #include <message-buffer.h>
 #include <dpl/exception.h>
 
@@ -29,7 +30,7 @@ namespace CKM {
 
 class CKMLogic;
 
-class CKMService : public CKM::ThreadService
+class CKMService : public ThreadMessageService<MsgKeyRequest>
 {
 public:
     CKMService();
@@ -46,6 +47,8 @@ public:
     ServiceDescriptionVector GetServiceDescription();
 
 private:
+    virtual void SetCommManager(CommMgr *manager);
+
     class Exception {
     public:
         DECLARE_EXCEPTION_TYPE(CKM::Exception, Base)
@@ -54,14 +57,18 @@ private:
 
     bool ProcessOne(
         const ConnectionID &conn,
-        ConnectionInfo &info);
+        ConnectionInfo &info,
+        bool allowed);
 
     RawBuffer ProcessControl(
         MessageBuffer &buffer);
 
     RawBuffer ProcessStorage(
         Credentials &cred,
-        MessageBuffer &buffer);
+        MessageBuffer &buffer,
+        bool allowed);
+
+    virtual void ProcessMessage(MsgKeyRequest msg);
 
     CKMLogic *m_logic;
 };