From a0162caad1127fa814d3a2604803116499b321a0 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Tue, 27 Apr 2021 09:29:51 -0700 Subject: [PATCH] base: Add base RequestHandler and rpc files --- CMakeLists.txt | 6 ++++++ src/WebSocketServer.h | 2 ++ src/requesthandler/RequestHandler.cpp | 1 + src/requesthandler/RequestHandler.h | 4 ++++ src/requesthandler/rpc/Request.cpp | 1 + src/requesthandler/rpc/Request.h | 1 + src/requesthandler/rpc/RequestResult.cpp | 1 + src/requesthandler/rpc/RequestResult.h | 1 + 8 files changed, 17 insertions(+) create mode 100644 src/requesthandler/RequestHandler.cpp create mode 100644 src/requesthandler/RequestHandler.h create mode 100644 src/requesthandler/rpc/Request.cpp create mode 100644 src/requesthandler/rpc/Request.h create mode 100644 src/requesthandler/rpc/RequestResult.cpp create mode 100644 src/requesthandler/rpc/RequestResult.h diff --git a/CMakeLists.txt b/CMakeLists.txt index a2262230..83768d46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,12 +67,18 @@ set(obs-websocket_SOURCES src/obs-websocket.cpp src/Config.cpp src/WebSocketServer.cpp + src/requesthandler/RequestHandler.cpp + src/requesthandler/rpc/Request.cpp + src/requesthandler/rpc/RequestResult.cpp src/forms/SettingsDialog.cpp) set(obs-websocket_HEADERS src/obs-websocket.h src/Config.h src/WebSocketServer.h + src/requesthandler/RequestHandler.h + src/requesthandler/rpc/Request.h + src/requesthandler/rpc/RequestResult.h src/forms/SettingsDialog.h) diff --git a/src/WebSocketServer.h b/src/WebSocketServer.h index 11f9cf91..3a4ce6d5 100644 --- a/src/WebSocketServer.h +++ b/src/WebSocketServer.h @@ -2,6 +2,8 @@ #include +#include "requesthandler/RequestHandler.h" + class WebSocketServer : public QObject { Q_OBJECT diff --git a/src/requesthandler/RequestHandler.cpp b/src/requesthandler/RequestHandler.cpp new file mode 100644 index 00000000..207c28c6 --- /dev/null +++ b/src/requesthandler/RequestHandler.cpp @@ -0,0 +1 @@ +#include "RequestHandler.h" \ No newline at end of file diff --git a/src/requesthandler/RequestHandler.h b/src/requesthandler/RequestHandler.h new file mode 100644 index 00000000..ae026626 --- /dev/null +++ b/src/requesthandler/RequestHandler.h @@ -0,0 +1,4 @@ +#pragma once + +#include "rpc/Request.h" +#include "rpc/RequestResult.h" \ No newline at end of file diff --git a/src/requesthandler/rpc/Request.cpp b/src/requesthandler/rpc/Request.cpp new file mode 100644 index 00000000..4fcf5444 --- /dev/null +++ b/src/requesthandler/rpc/Request.cpp @@ -0,0 +1 @@ +#include "Request.h" \ No newline at end of file diff --git a/src/requesthandler/rpc/Request.h b/src/requesthandler/rpc/Request.h new file mode 100644 index 00000000..7b9637ef --- /dev/null +++ b/src/requesthandler/rpc/Request.h @@ -0,0 +1 @@ +#pragma once \ No newline at end of file diff --git a/src/requesthandler/rpc/RequestResult.cpp b/src/requesthandler/rpc/RequestResult.cpp new file mode 100644 index 00000000..12636a9f --- /dev/null +++ b/src/requesthandler/rpc/RequestResult.cpp @@ -0,0 +1 @@ +#include "RequestResult.h" \ No newline at end of file diff --git a/src/requesthandler/rpc/RequestResult.h b/src/requesthandler/rpc/RequestResult.h new file mode 100644 index 00000000..7b9637ef --- /dev/null +++ b/src/requesthandler/rpc/RequestResult.h @@ -0,0 +1 @@ +#pragma once \ No newline at end of file