${COMMON_PATH}/request/CancelRequest.cpp
${COMMON_PATH}/request/CheckRequest.cpp
${COMMON_PATH}/request/InsertOrUpdateBucketRequest.cpp
+ ${COMMON_PATH}/request/ListRequest.cpp
${COMMON_PATH}/request/RemoveBucketRequest.cpp
${COMMON_PATH}/request/RequestTaker.cpp
${COMMON_PATH}/request/SetPoliciesRequest.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/list/ListRequest.cpp
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file implements policies list request class
+ */
+
+#include <memory>
+
+#include <request/RequestTaker.h>
+
+#include "ListRequest.h"
+
+namespace Cynara {
+
+void ListRequest::execute(RequestPtr self, RequestTakerPtr taker, RequestContextPtr context) const {
+ taker->execute(context, std::dynamic_pointer_cast<ListRequest>(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/list/ListRequest.h
+ * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * @version 1.0
+ * @brief This file defines policies list request class
+ */
+
+#ifndef SRC_COMMON_REQUEST_LISTREQUEST_H_
+#define SRC_COMMON_REQUEST_LISTREQUEST_H_
+
+#include <types/PolicyBucketId.h>
+#include <types/PolicyKey.h>
+
+#include <request/pointers.h>
+#include <request/Request.h>
+
+namespace Cynara {
+
+class ListRequest : public Request {
+private:
+ PolicyBucketId m_bucket;
+ PolicyKey m_filter;
+
+public:
+ ListRequest(const PolicyBucketId &bucket, const PolicyKey &filter,
+ ProtocolFrameSequenceNumber sequenceNumber) :
+ Request(sequenceNumber), m_bucket(bucket), m_filter(filter) {
+ }
+
+ virtual ~ListRequest() {};
+
+ const PolicyBucketId &bucket(void) const {
+ return m_bucket;
+ }
+
+ const PolicyKey &filter(void) const {
+ return m_filter;
+ }
+
+ virtual void execute(RequestPtr self, RequestTakerPtr taker, RequestContextPtr context) const;
+};
+
+} // namespace Cynara
+
+#endif /* SRC_COMMON_REQUEST_LISTREQUEST_H_ */
throw NotImplementedException();
}
+void RequestTaker::execute(RequestContextPtr context UNUSED, ListRequestPtr request UNUSED) {
+ throw NotImplementedException();
+}
+
void RequestTaker::execute(RequestContextPtr context UNUSED,
RemoveBucketRequestPtr 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, InsertOrUpdateBucketRequestPtr request);
virtual void execute(RequestContextPtr context, RemoveBucketRequestPtr request);
virtual void execute(RequestContextPtr context, SetPoliciesRequestPtr request);
class InsertOrUpdateBucketRequest;
typedef std::shared_ptr<InsertOrUpdateBucketRequest> InsertOrUpdateBucketRequestPtr;
+class ListRequest;
+typedef std::shared_ptr<ListRequest> ListRequestPtr;
+
class RemoveBucketRequest;
typedef std::shared_ptr<RemoveBucketRequest> RemoveBucketRequestPtr;