From 5ecca98e958deace134a6d289954859e3de8bd1d Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Tue, 16 Dec 2014 13:36:38 +0100 Subject: [PATCH] Handle EraseRequest in admin library Logic layer Create EraseRequest and wait for CodeResponse. Interprete it and return proper code to admin API layer. Change-Id: I35ba3573fdf8a455c5a42020e918a6a7b17c0a46 --- src/admin/logic/Logic.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/admin/logic/Logic.cpp b/src/admin/logic/Logic.cpp index 3a5654c..b0ea895 100644 --- a/src/admin/logic/Logic.cpp +++ b/src/admin/logic/Logic.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,7 @@ int Logic::askCynaraAndInterpreteCodeResponse(Args... args) { LOGD("codeResponse: code [%" PRIu16 "]", codeResponse->m_code); switch (codeResponse->m_code) { case CodeResponse::Code::OK: - LOGI("Policies set successfully."); + LOGI("Cynara command finished successfully."); return CYNARA_API_SUCCESS; case CodeResponse::Code::NOT_ALLOWED: LOGE("Cynara service answered: Operation not allowed."); @@ -198,10 +199,9 @@ int Logic::listPolicies(const PolicyBucketId &bucket, const PolicyKey &filter, return CYNARA_API_SUCCESS; } -int Logic::erasePolicies(const PolicyBucketId &startBucket UNUSED, bool recursive UNUSED, - const PolicyKey &filter UNUSED) { - //todo implement erase - return CYNARA_API_SUCCESS; +int Logic::erasePolicies(const PolicyBucketId &startBucket, bool recursive, + const PolicyKey &filter) { + return askCynaraAndInterpreteCodeResponse(startBucket, recursive, filter); } } // namespace Cynara -- 2.7.4