${COMMON_PATH}/request/AgentRegisterRequest.cpp
${COMMON_PATH}/request/CancelRequest.cpp
${COMMON_PATH}/request/CheckRequest.cpp
+ ${COMMON_PATH}/request/DescriptionListRequest.cpp
${COMMON_PATH}/request/EraseRequest.cpp
${COMMON_PATH}/request/InsertOrUpdateBucketRequest.cpp
${COMMON_PATH}/request/ListRequest.cpp
${COMMON_PATH}/response/CancelResponse.cpp
${COMMON_PATH}/response/CheckResponse.cpp
${COMMON_PATH}/response/CodeResponse.cpp
+ ${COMMON_PATH}/response/DescriptionListResponse.cpp
${COMMON_PATH}/response/ListResponse.cpp
${COMMON_PATH}/response/ResponseTaker.cpp
${COMMON_PATH}/sockets/Socket.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/DescriptionListRequest.cpp
+ * @author Zofia Abramowska <z.abramowska@samsung.com>
+ * @version 1.0
+ * @brief This file implements plugin description list request class
+ */
+
+#include <memory>
+
+#include <request/RequestTaker.h>
+
+#include "DescriptionListRequest.h"
+
+namespace Cynara {
+
+void DescriptionListRequest::execute(RequestPtr self, RequestTakerPtr taker,
+ RequestContextPtr context) const {
+ taker->execute(context, std::dynamic_pointer_cast<DescriptionListRequest>(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/DescriptionListRequest.h
+ * @author Zofia Abramowska <z.abramowska@samsung.com>
+ * @version 1.0
+ * @brief This file defines plugin description list request class
+ */
+
+#ifndef SRC_COMMON_REQUEST_DESCRIPTIONLISTREQUEST_H_
+#define SRC_COMMON_REQUEST_DESCRIPTIONLISTREQUEST_H_
+
+#include <request/pointers.h>
+#include <request/Request.h>
+
+namespace Cynara {
+
+class DescriptionListRequest : public Request {
+public:
+ DescriptionListRequest(ProtocolFrameSequenceNumber sequenceNumber) :
+ Request(sequenceNumber) {
+ }
+
+ virtual ~DescriptionListRequest() {};
+
+ virtual void execute(RequestPtr self, RequestTakerPtr taker, RequestContextPtr context) const;
+};
+
+} // namespace Cynara
+
+#endif /* SRC_COMMON_REQUEST_DESCRIPTIONLISTREQUEST_H_ */
}
void RequestTaker::execute(RequestContextPtr context UNUSED,
+ DescriptionListRequestPtr 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, DescriptionListRequestPtr request);
virtual void execute(RequestContextPtr context, EraseRequestPtr request);
virtual void execute(RequestContextPtr context, InsertOrUpdateBucketRequestPtr request);
virtual void execute(RequestContextPtr context, ListRequestPtr request);
class CheckRequest;
typedef std::shared_ptr<CheckRequest> CheckRequestPtr;
+class DescriptionListRequest;
+typedef std::shared_ptr<DescriptionListRequest> DescriptionListRequestPtr;
+
class EraseRequest;
typedef std::shared_ptr<EraseRequest> EraseRequestPtr;
--- /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/response/DescriptionListResponse.cpp
+ * @author Zofia Abramowska <z.abramowska@samsung.com>
+ * @version 1.0
+ * @brief This file implements plugins description list response class
+ */
+
+#include <memory>
+
+#include <response/ResponseTaker.h>
+
+#include "DescriptionListResponse.h"
+
+namespace Cynara {
+
+void DescriptionListResponse::execute(ResponsePtr self, ResponseTakerPtr taker,
+ RequestContextPtr context) const {
+ taker->execute(context, std::dynamic_pointer_cast<DescriptionListResponse>(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/response/DescriptionListResponse.h
+ * @author Zofia Abramowska <z.abramowska@samsung.com>
+ * @version 1.0
+ * @brief This file defines response class for plugins description list response
+ */
+
+#ifndef SRC_COMMON_RESPONSE_DESCRIPTIONLISTRESPONSE_H_
+#define SRC_COMMON_RESPONSE_DESCRIPTIONLISTRESPONSE_H_
+
+#include <vector>
+
+#include <types/PolicyDescription.h>
+#include <request/pointers.h>
+#include <response/pointers.h>
+#include <response/Response.h>
+
+namespace Cynara {
+
+class DescriptionListResponse : public Response {
+public:
+ DescriptionListResponse(const std::vector<PolicyDescription> &descriptions,
+ ProtocolFrameSequenceNumber sequenceNumber) :
+ Response(sequenceNumber), m_descriptions(descriptions) {
+ }
+
+ virtual ~DescriptionListResponse() {};
+
+ virtual void execute(ResponsePtr self, ResponseTakerPtr taker, RequestContextPtr context) const;
+
+ const std::vector<PolicyDescription> &descriptions(void) const {
+ return m_descriptions;
+ }
+
+private:
+ std::vector<PolicyDescription> m_descriptions;
+};
+
+} // namespace Cynara
+
+#endif /* SRC_COMMON_RESPONSE_DESCRIPTIONLISTRESPONSE_H_ */
throw NotImplementedException();
}
+void ResponseTaker::execute(RequestContextPtr context UNUSED,
+ DescriptionListResponsePtr response UNUSED) {
+ throw NotImplementedException();
+}
+
void ResponseTaker::execute(RequestContextPtr context UNUSED, ListResponsePtr response UNUSED) {
throw NotImplementedException();
}
virtual void execute(RequestContextPtr context, CancelResponsePtr response);
virtual void execute(RequestContextPtr context, CheckResponsePtr response);
virtual void execute(RequestContextPtr context, CodeResponsePtr response);
+ virtual void execute(RequestContextPtr context, DescriptionListResponsePtr response);
virtual void execute(RequestContextPtr context, ListResponsePtr response);
};
class CodeResponse;
typedef std::shared_ptr<CodeResponse> CodeResponsePtr;
+class DescriptionListResponse;
+typedef std::shared_ptr<DescriptionListResponse> DescriptionListResponsePtr;
+
class ListResponse;
typedef std::shared_ptr<ListResponse> ListResponsePtr;