* @brief This file implements main class of logic layer in cynara service
*/
-#include <signal.h>
+#include <csignal>
+#include <memory>
-#include <log/log.h>
#include <common.h>
+#include <log/log.h>
#include <exceptions/BucketNotExistsException.h>
#include <exceptions/DatabaseException.h>
#include <exceptions/DefaultBucketDeletionException.h>
#include <exceptions/PluginErrorException.h>
#include <exceptions/PluginNotFoundException.h>
#include <exceptions/UnexpectedErrorException.h>
-
-#include <cynara-plugin.h>
-
-#include <main/Cynara.h>
#include <request/AdminCheckRequest.h>
+#include <request/AgentRegisterRequest.h>
#include <request/CancelRequest.h>
#include <request/CheckRequest.h>
#include <request/InsertOrUpdateBucketRequest.h>
#include <request/RequestContext.h>
#include <request/SetPoliciesRequest.h>
#include <request/SignalRequest.h>
+#include <response/AgentRegisterResponse.h>
#include <response/CancelResponse.h>
#include <response/CheckResponse.h>
#include <response/CodeResponse.h>
+
+#include <main/Cynara.h>
#include <sockets/SocketManager.h>
#include <storage/Storage.h>
+#include <cynara-plugin.h>
+
#include "Logic.h"
namespace Cynara {
request->sequenceNumber()));
}
+void Logic::execute(RequestContextPtr context, AgentRegisterRequestPtr request) {
+ // MOCKUP
+ context->returnResponse(context, std::make_shared<AgentRegisterResponse>(
+ AgentRegisterResponse::DONE, request->sequenceNumber()));
+}
+
void Logic::execute(RequestContextPtr context, CancelRequestPtr request) {
// MOCKUP
context->returnResponse(context, std::make_shared<CancelResponse>(request->sequenceNumber()));
}
virtual void execute(RequestContextPtr context, AdminCheckRequestPtr request);
+ 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, InsertOrUpdateBucketRequestPtr request);