${CYNARA_SERVICE_PATH}/protocol/ProtocolAdmin.cpp
${CYNARA_SERVICE_PATH}/protocol/ProtocolClient.cpp
${CYNARA_SERVICE_PATH}/protocol/ProtocolSignal.cpp
+ ${CYNARA_SERVICE_PATH}/request/CheckRequest.cpp
${CYNARA_SERVICE_PATH}/request/Request.cpp
${CYNARA_SERVICE_PATH}/request/RequestContext.cpp
${CYNARA_SERVICE_PATH}/sockets/Descriptor.cpp
--- /dev/null
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * @file CheckRequest.cpp
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file implements check request class
+ */
+
+#include <common.h>
+#include <types/PolicyResult.h>
+
+#include <protocol/Protocol.h>
+#include <request/RequestContext.h>
+
+#include "CheckRequest.h"
+
+namespace Cynara {
+
+CheckRequest::CheckRequest(const PolicyKey &key) : m_key(key) {
+}
+
+void CheckRequest::execute(Logic *logic, int sourceDesc) {
+ PolicyResult result = logic->check(sourceDesc, m_key);
+ BinaryQueue &queue = RequestContext::resultQueue(sourceDesc);
+ RequestContext::protocol(sourceDesc)->appendResponseToBuffer(CheckResponse(queue, result));
+}
+
+} // namespace Cynara
--- /dev/null
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * @file CheckRequest.h
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file defines check request class
+ */
+
+#ifndef SRC_SERVICE_REQUEST_CHECKREQUEST_H_
+#define SRC_SERVICE_REQUEST_CHECKREQUEST_H_
+
+#include <types/PolicyKey.h>
+
+#include "Request.h"
+
+namespace Cynara {
+
+class CheckRequest : public Request {
+private:
+ PolicyKey m_key;
+
+public:
+ CheckRequest(const PolicyKey &key);
+ virtual ~CheckRequest() = default;
+
+ virtual void execute(Logic *logic, int sourceDesc);
+};
+
+} // namespace Cynara
+
+#endif /* SRC_SERVICE_REQUEST_CHECKREQUEST_H_ */