mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-10-06 09:17:07 +02:00
Remove httpfileserver until we actually use it
This commit is contained in:
parent
2626226618
commit
5d3d3a905e
@ -48,7 +48,6 @@ set(SOURCES
|
|||||||
src/archive.cpp
|
src/archive.cpp
|
||||||
src/contenttypes.cpp
|
src/contenttypes.cpp
|
||||||
src/exitcodes.cpp
|
src/exitcodes.cpp
|
||||||
src/httpfileserver.cpp
|
|
||||||
src/logginghandler.cpp
|
src/logginghandler.cpp
|
||||||
src/projectfile.cpp
|
src/projectfile.cpp
|
||||||
src/steamenumsgenerated.cpp
|
src/steamenumsgenerated.cpp
|
||||||
@ -61,7 +60,6 @@ set(HEADER
|
|||||||
inc/public/ScreenPlayUtil/contenttypes.h
|
inc/public/ScreenPlayUtil/contenttypes.h
|
||||||
inc/public/ScreenPlayUtil/exitcodes.h
|
inc/public/ScreenPlayUtil/exitcodes.h
|
||||||
inc/public/ScreenPlayUtil/HelpersCommon.h
|
inc/public/ScreenPlayUtil/HelpersCommon.h
|
||||||
inc/public/ScreenPlayUtil/httpfileserver.h
|
|
||||||
inc/public/ScreenPlayUtil/ListPropertyHelper.h
|
inc/public/ScreenPlayUtil/ListPropertyHelper.h
|
||||||
inc/public/ScreenPlayUtil/logginghandler.h
|
inc/public/ScreenPlayUtil/logginghandler.h
|
||||||
inc/public/ScreenPlayUtil/projectfile.h
|
inc/public/ScreenPlayUtil/projectfile.h
|
||||||
@ -98,9 +96,6 @@ qt_add_qml_module(
|
|||||||
RESOURCES
|
RESOURCES
|
||||||
${RESOURCES})
|
${RESOURCES})
|
||||||
|
|
||||||
find_path(CPP_HTTPLIB_INCLUDE_DIRS "httplib.h")
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CPP_HTTPLIB_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
PUBLIC inc/public/
|
PUBLIC inc/public/
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QObject>
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <thread>
|
|
||||||
|
|
||||||
namespace httplib {
|
|
||||||
class Server;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace ScreenPlay {
|
|
||||||
|
|
||||||
class HttpFileServer : public QObject {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit HttpFileServer(QObject* parent = nullptr);
|
|
||||||
|
|
||||||
void startServer();
|
|
||||||
void stopServer();
|
|
||||||
|
|
||||||
private:
|
|
||||||
using Deleter = std::function<void(httplib::Server*)>;
|
|
||||||
std::unique_ptr<httplib::Server, Deleter> m_server;
|
|
||||||
|
|
||||||
std::thread m_thread;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
|
||||||
#include "httpfileserver.h"
|
|
||||||
#include "httplib.h"
|
|
||||||
|
|
||||||
namespace ScreenPlay {
|
|
||||||
HttpFileServer::HttpFileServer(QObject* parent)
|
|
||||||
: QObject { parent }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void HttpFileServer::startServer()
|
|
||||||
{
|
|
||||||
const auto deleter = [](auto* ptr) { delete ptr; };
|
|
||||||
m_server = std::unique_ptr<httplib::Server, Deleter>(new httplib::Server(), deleter);
|
|
||||||
m_thread = std::thread([&]() {
|
|
||||||
qInfo() << " set_mount_point" << m_server->set_mount_point("/", "C:/Users/Eli/Desktop/web");
|
|
||||||
|
|
||||||
qInfo() << "listen";
|
|
||||||
m_server->listen("0.0.0.0", 8081);
|
|
||||||
qInfo() << "end";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void HttpFileServer::stopServer()
|
|
||||||
{
|
|
||||||
if (m_thread.joinable())
|
|
||||||
m_thread.join();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_httpfileserver.cpp"
|
|
@ -30,7 +30,6 @@ VCPKG_VERSION = "2a6371b01420d8820d158b4707e79931feba27aa"
|
|||||||
VCPKG_BASE_PACKAGES = [
|
VCPKG_BASE_PACKAGES = [
|
||||||
"curl",
|
"curl",
|
||||||
"openssl",
|
"openssl",
|
||||||
"cpp-httplib",
|
|
||||||
"libarchive",
|
"libarchive",
|
||||||
"fmt",
|
"fmt",
|
||||||
"catch2"
|
"catch2"
|
||||||
|
Loading…
Reference in New Issue
Block a user