From 5df63c0bc7e3d6f1850d04f5bafbae2dd6fa619e Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Fri, 14 Nov 2025 21:05:12 +0100 Subject: organize things a bit, populate ICamera --- src/httpservice.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/httpservice.h (limited to 'src/httpservice.h') diff --git a/src/httpservice.h b/src/httpservice.h deleted file mode 100644 index 0fbd54d..0000000 --- a/src/httpservice.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -// qt -#include -#include -// #include - -class ICamera; -class QHttpServer; - -class HttpServer // : public QObject -{ - // Q_OBJECT - -private: - struct Stats - { - uint64_t GET_pixels_us{0}; - } m_stats{0}; - -public: - static constexpr auto DefaultAddress = QHostAddress::Any; - static constexpr uint16_t DefaultPort{8080}; - -public: - explicit HttpServer(ICamera *camera, - // QObject *parent = nullptr, - const QHostAddress &address = DefaultAddress, - const uint16_t port = DefaultPort); - - // TODO: methods starting with GET_/POST_ will be routed automatically -public: - QHttpServerResponse GET_pixels(); - -private: - // std::weak_ptr m_camera; - ICamera *m_camera{nullptr}; - QHostAddress m_address{DefaultAddress}; - uint16_t m_port{DefaultPort}; - - std::shared_ptr m_server; -}; -- cgit v1.2.3-70-g09d2