${COMMON_PATH}/request/AgentRegisterRequest.cpp
${COMMON_PATH}/request/CancelRequest.cpp
${COMMON_PATH}/request/CheckRequest.cpp
+ ${COMMON_PATH}/request/EraseRequest.cpp
${COMMON_PATH}/request/InsertOrUpdateBucketRequest.cpp
${COMMON_PATH}/request/ListRequest.cpp
${COMMON_PATH}/request/RemoveBucketRequest.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 src/common/request/EraseRequest.cpp
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file implements policies erase request class
+ */
+
+#include <memory>
+
+#include <request/RequestTaker.h>
+
+#include "EraseRequest.h"
+
+namespace Cynara {
+
+void EraseRequest::execute(RequestPtr self, RequestTakerPtr taker,
+ RequestContextPtr context) const {
+ taker->execute(context, std::dynamic_pointer_cast<EraseRequest>(self));
+}
+
+} // 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 src/common/request/EraseRequest.h
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file defines policies erase request class
+ */
+
+#ifndef SRC_COMMON_REQUEST_ERASEREQUEST_H_
+#define SRC_COMMON_REQUEST_ERASEREQUEST_H_
+
+#include <types/PolicyBucketId.h>
+#include <types/PolicyKey.h>
+
+#include <request/pointers.h>
+#include <request/Request.h>
+
+namespace Cynara {
+
+class EraseRequest : public Request {
+public:
+ EraseRequest(const PolicyBucketId &startBucket, bool recursive, const PolicyKey &filter,
+ ProtocolFrameSequenceNumber sequenceNumber) :
+ Request(sequenceNumber), m_startBucket(startBucket), m_recursive(recursive),
+ m_filter(filter) {
+ }
+
+ virtual ~EraseRequest() {};
+
+ const PolicyBucketId &startBucket(void) const {
+ return m_startBucket;
+ }
+
+ bool recursive(void) const {
+ return m_recursive;
+ }
+
+ const PolicyKey &filter(void) const {
+ return m_filter;
+ }
+
+ virtual void execute(RequestPtr self, RequestTakerPtr taker, RequestContextPtr context) const;
+
+private:
+ PolicyBucketId m_startBucket;
+ bool m_recursive;
+ PolicyKey m_filter;
+};
+
+} // namespace Cynara
+
+#endif /* SRC_COMMON_REQUEST_ERASEREQUEST_H_ */
throw NotImplementedException();
}
+void RequestTaker::execute(RequestContextPtr context UNUSED, EraseRequestPtr request UNUSED) {
+ throw NotImplementedException();
+}
+
void RequestTaker::execute(RequestContextPtr context UNUSED,
InsertOrUpdateBucketRequestPtr request UNUSED) {
throw NotImplementedException();
virtual void execute(RequestContextPtr context, AgentRegisterRequestPtr request);
virtual void execute(RequestContextPtr context, CancelRequestPtr request);
virtual void execute(RequestContextPtr context, CheckRequestPtr request);
- virtual void execute(RequestContextPtr context, ListRequestPtr request);
+ virtual void execute(RequestContextPtr context, EraseRequestPtr request);
virtual void execute(RequestContextPtr context, InsertOrUpdateBucketRequestPtr request);
+ virtual void execute(RequestContextPtr context, ListRequestPtr request);
virtual void execute(RequestContextPtr context, RemoveBucketRequestPtr request);
virtual void execute(RequestContextPtr context, SetPoliciesRequestPtr request);
virtual void execute(RequestContextPtr context, SignalRequestPtr request);
class CheckRequest;
typedef std::shared_ptr<CheckRequest> CheckRequestPtr;
+class EraseRequest;
+typedef std::shared_ptr<EraseRequest> EraseRequestPtr;
+
class InsertOrUpdateBucketRequest;
typedef std::shared_ptr<InsertOrUpdateBucketRequest> InsertOrUpdateBucketRequestPtr;
${CYNARA_SRC}/common/protocol/ProtocolFrameHeader.cpp
${CYNARA_SRC}/common/protocol/ProtocolFrameSerializer.cpp
${CYNARA_SRC}/common/request/AdminCheckRequest.cpp
+ ${CYNARA_SRC}/common/request/EraseRequest.cpp
${CYNARA_SRC}/common/request/InsertOrUpdateBucketRequest.cpp
${CYNARA_SRC}/common/request/ListRequest.cpp
${CYNARA_SRC}/common/request/RemoveBucketRequest.cpp