Adapt protocol, request and response classes to common
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 26 Jun 2014 11:03:12 +0000 (13:03 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 3 Jul 2014 12:19:10 +0000 (14:19 +0200)
Update of includes, defines and CMakeLists.
This patch should be verified together with previous one.

Change-Id: I08e38dcba381a2514981068adbabb2e3b35088a5

16 files changed:
src/common/CMakeLists.txt
src/common/protocol/Protocol.h
src/common/protocol/ProtocolAdmin.h
src/common/protocol/ProtocolClient.h
src/common/protocol/ProtocolSignal.h
src/common/request/CheckRequest.h
src/common/request/Request.h
src/common/request/RequestContext.h
src/common/request/RequestTaker.cpp
src/common/request/RequestTaker.h
src/common/request/pointers.h
src/common/response/CheckResponse.h
src/common/response/ResponseTaker.cpp
src/common/response/ResponseTaker.h
src/common/response/pointers.h
src/service/CMakeLists.txt

index edefcd8..feac88e 100644 (file)
@@ -24,7 +24,13 @@ SET(COMMON_PATH ${CYNARA_PATH}/common)
 SET(COMMON_SOURCES
     ${COMMON_PATH}/containers/BinaryQueue.cpp
     ${COMMON_PATH}/log/log.cpp
+    ${COMMON_PATH}/protocol/ProtocolAdmin.cpp
+    ${COMMON_PATH}/protocol/ProtocolClient.cpp
     ${COMMON_PATH}/protocol/ProtocolSerialization.cpp
+    ${COMMON_PATH}/protocol/ProtocolSignal.cpp
+    ${COMMON_PATH}/request/CheckRequest.cpp
+    ${COMMON_PATH}/request/RequestTaker.cpp
+    ${COMMON_PATH}/response/ResponseTaker.cpp
     ${COMMON_PATH}/types/PolicyBucket.cpp
     ${COMMON_PATH}/types/PolicyKey.cpp
     )
index 984e528..a4e0839 100644 (file)
  * @brief       This file defines protocol base class
  */
 
-#ifndef SRC_SERVICE_PROTOCOL_PROTOCOL_H_
-#define SRC_SERVICE_PROTOCOL_PROTOCOL_H_
+#ifndef SRC_COMMON_PROTOCOL_PROTOCOL_H_
+#define SRC_COMMON_PROTOCOL_PROTOCOL_H_
 
 #include <memory>
 
-#include <common.h>
-
+#include <containers/BinaryQueue.h>
 #include <request/pointers.h>
 #include <request/RequestTaker.h>
 #include <response/ResponseTaker.h>
@@ -45,4 +44,4 @@ typedef std::shared_ptr<Protocol> ProtocolPtr;
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_PROTOCOL_PROTOCOL_H_ */
+#endif /* SRC_COMMON_PROTOCOL_PROTOCOL_H_ */
index 3fe459d..ce7388a 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines protocol class for administration
  */
 
-#ifndef SRC_SERVICE_PROTOCOL_PROTOCOLADMIN_H_
-#define SRC_SERVICE_PROTOCOL_PROTOCOLADMIN_H_
+#ifndef SRC_COMMON_PROTOCOL_PROTOCOLADMIN_H_
+#define SRC_COMMON_PROTOCOL_PROTOCOLADMIN_H_
 
 #include "Protocol.h"
 
@@ -37,4 +37,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_PROTOCOL_PROTOCOLADMIN_H_ */
+#endif /* SRC_COMMON_PROTOCOL_PROTOCOLADMIN_H_ */
index 19c5d14..8eb8052 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines protocol class for communication with client
  */
 
-#ifndef SRC_SERVICE_PROTOCOL_PROTOCOLCLIENT_H_
-#define SRC_SERVICE_PROTOCOL_PROTOCOLCLIENT_H_
+#ifndef SRC_COMMON_PROTOCOL_PROTOCOLCLIENT_H_
+#define SRC_COMMON_PROTOCOL_PROTOCOLCLIENT_H_
 
 #include "Protocol.h"
 
@@ -37,4 +37,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_PROTOCOL_PROTOCOLCLIENT_H_ */
+#endif /* SRC_COMMON_PROTOCOL_PROTOCOLCLIENT_H_ */
index c74cf7d..bb93af9 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines protocol class for signals
  */
 
-#ifndef SRC_SERVICE_PROTOCOL_PROTOCOLSIGNAL_H_
-#define SRC_SERVICE_PROTOCOL_PROTOCOLSIGNAL_H_
+#ifndef SRC_COMMON_PROTOCOL_PROTOCOLSIGNAL_H_
+#define SRC_COMMON_PROTOCOL_PROTOCOLSIGNAL_H_
 
 #include "Protocol.h"
 
@@ -37,4 +37,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_PROTOCOL_PROTOCOLSIGNAL_H_ */
+#endif /* SRC_COMMON_PROTOCOL_PROTOCOLSIGNAL_H_ */
index 83f0203..7e547fb 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines check request class
  */
 
-#ifndef SRC_SERVICE_REQUEST_CHECKREQUEST_H_
-#define SRC_SERVICE_REQUEST_CHECKREQUEST_H_
+#ifndef SRC_COMMON_REQUEST_CHECKREQUEST_H_
+#define SRC_COMMON_REQUEST_CHECKREQUEST_H_
 
 #include <types/PolicyKey.h>
 
@@ -50,4 +50,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_REQUEST_CHECKREQUEST_H_ */
+#endif /* SRC_COMMON_REQUEST_CHECKREQUEST_H_ */
index fa76ffa..aadbd4c 100644 (file)
  * @brief       This file defines request base class
  */
 
-#ifndef SRC_SERVICE_REQUEST_REQUEST_H_
-#define SRC_SERVICE_REQUEST_REQUEST_H_
+#ifndef SRC_COMMON_REQUEST_REQUEST_H_
+#define SRC_COMMON_REQUEST_REQUEST_H_
 
 #include <request/pointers.h>
-#include <request/pointers.h>
 #include <request/RequestTaker.h>
 
 namespace Cynara {
@@ -39,4 +38,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_REQUEST_REQUEST_H_ */
+#endif /* SRC_COMMON_REQUEST_REQUEST_H_ */
index d8e9578..880583e 100644 (file)
  * @brief       This file defines request context class
  */
 
-#ifndef SRC_SERVICE_REQUEST_REQUESTCONTEXT_H_
-#define SRC_SERVICE_REQUEST_REQUESTCONTEXT_H_
+#ifndef SRC_COMMON_REQUEST_REQUESTCONTEXT_H_
+#define SRC_COMMON_REQUEST_REQUESTCONTEXT_H_
 
 #include <memory>
 
-#include <common.h>
-
+#include <containers/BinaryQueue.h>
 #include <request/pointers.h>
 #include <response/pointers.h>
 #include <response/ResponseTaker.h>
@@ -58,4 +57,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_REQUEST_REQUESTCONTEXT_H_ */
+#endif /* SRC_COMMON_REQUEST_REQUESTCONTEXT_H_ */
index f634ea8..13d2ee9 100644 (file)
@@ -20,8 +20,7 @@
  * @brief       This file implements RequestTaker class
  */
 
-#include <common.h>
-
+#include <attributes/attributes.h>
 #include <exceptions/NotImplementedException.h>
 
 #include "RequestTaker.h"
index 9ebbe32..581d342 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines RequestTaker class
  */
 
-#ifndef SRC_SERVICE_REQUEST_REQUESTTAKER_H_
-#define SRC_SERVICE_REQUEST_REQUESTTAKER_H_
+#ifndef SRC_COMMON_REQUEST_REQUESTTAKER_H_
+#define SRC_COMMON_REQUEST_REQUESTTAKER_H_
 
 #include <request/pointers.h>
 
@@ -37,4 +37,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_REQUEST_REQUESTTAKER_H_ */
+#endif /* SRC_COMMON_REQUEST_REQUESTTAKER_H_ */
index 7bfc66e..cc306f3 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines request base class
  */
 
-#ifndef SRC_SERVICE_REQUEST_POINTERS_H_
-#define SRC_SERVICE_REQUEST_POINTERS_H_
+#ifndef SRC_COMMON_REQUEST_POINTERS_H_
+#define SRC_COMMON_REQUEST_POINTERS_H_
 
 #include <memory>
 
@@ -38,4 +38,4 @@ typedef std::shared_ptr<RequestContext> RequestContextPtr;
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_REQUEST_POINTERS_H_ */
+#endif /* SRC_COMMON_REQUEST_POINTERS_H_ */
index 69ae983..0c0fec2 100644 (file)
  * @brief       This file defines response class for check request
  */
 
-#ifndef SRC_SERVICE_RESPONSE_CHECKRESPONSE_H_
-#define SRC_SERVICE_RESPONSE_CHECKRESPONSE_H_
+#ifndef SRC_COMMON_RESPONSE_CHECKRESPONSE_H_
+#define SRC_COMMON_RESPONSE_CHECKRESPONSE_H_
 
-#include <common.h>
 #include <types/PolicyResult.h>
 
 namespace Cynara {
@@ -37,4 +36,4 @@ struct CheckResponse {
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_RESPONSE_CHECKRESPONSE_H_ */
+#endif /* SRC_COMMON_RESPONSE_CHECKRESPONSE_H_ */
index fff9774..6e52094 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 
-#include <common.h>
+#include <attributes/attributes.h>
 #include <exceptions/NotImplementedException.h>
 
 #include "ResponseTaker.h"
index 0c880b6..8093fab 100644 (file)
  * @brief       This file defines ResponseTaker class
  */
 
-#ifndef SRC_SERVICE_RESPONSE_RESPONSETAKER_H_
-#define SRC_SERVICE_RESPONSE_RESPONSETAKER_H_
-
-#include <common.h>
+#ifndef SRC_COMMON_RESPONSE_RESPONSETAKER_H_
+#define SRC_COMMON_RESPONSE_RESPONSETAKER_H_
 
 #include <request/pointers.h>
 #include <response/CheckResponse.h>
@@ -40,4 +38,4 @@ public:
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_RESPONSE_RESPONSETAKER_H_ */
+#endif /* SRC_COMMON_RESPONSE_RESPONSETAKER_H_ */
index 6d12a8b..3f238d6 100644 (file)
@@ -20,8 +20,8 @@
  * @brief       This file defines response classes pointers
  */
 
-#ifndef SRC_SERVICE_RESPONSE_POINTERS_H_
-#define SRC_SERVICE_RESPONSE_POINTERS_H_
+#ifndef SRC_COMMON_RESPONSE_POINTERS_H_
+#define SRC_COMMON_RESPONSE_POINTERS_H_
 
 #include <memory>
 
@@ -33,4 +33,4 @@ typedef std::weak_ptr<ResponseTaker> ResponseTakerWeakPtr;
 
 } // namespace Cynara
 
-#endif /* SRC_SERVICE_RESPONSE_POINTERS_H_ */
+#endif /* SRC_COMMON_RESPONSE_POINTERS_H_ */
index 69d35ee..915cc00 100644 (file)
@@ -22,12 +22,6 @@ SET(CYNARA_SOURCES
     ${CYNARA_SERVICE_PATH}/logic/Logic.cpp
     ${CYNARA_SERVICE_PATH}/main/Cynara.cpp
     ${CYNARA_SERVICE_PATH}/main/main.cpp
-    ${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/RequestTaker.cpp
-    ${CYNARA_SERVICE_PATH}/response/ResponseTaker.cpp
     ${CYNARA_SERVICE_PATH}/sockets/Descriptor.cpp
     ${CYNARA_SERVICE_PATH}/sockets/SocketManager.cpp
     ${CYNARA_SERVICE_PATH}/storage/InMemoryStorageBackend.cpp