Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1356196
add httpserver to the remote cotrol
thibaudk Aug 9, 2021
9e9e16a
try to add a thread for the web socket connection
Toine-ddt Aug 9, 2021
d56f42e
Update .gitignore
Toine-ddt Aug 9, 2021
142b45f
Do not block score with the http server for the remotecontrol
jcelerier Aug 11, 2021
3918fa9
rm some useless include
Toine-ddt Aug 12, 2021
96d54b2
modify some variable and path
Toine-ddt Aug 12, 2021
4e230f4
clean code
Toine-ddt Aug 12, 2021
64ca2ec
get ip address and set in remote.html
Toine-ddt Aug 16, 2021
60e41cf
add comments and clean code
Toine-ddt Aug 16, 2021
ea4347a
detect ip address which start with 172.
Toine-ddt Aug 16, 2021
39640cd
detect ip address with socket / set keep_alive = false
Toine-ddt Aug 18, 2021
68c57a4
clean code
Toine-ddt Aug 18, 2021
082d7be
changes from the review
Toine-ddt Aug 19, 2021
0861410
load remote.html, read and write ip address
Toine-ddt Aug 20, 2021
1bbdf60
Update CMakeLists.txt
Toine-ddt Aug 20, 2021
f53c43d
Update ApplicationPlugin.cpp
Toine-ddt Aug 20, 2021
53f134a
Update ApplicationPlugin.hpp
Toine-ddt Aug 20, 2021
daa4d2b
clean code
Toine-ddt Aug 20, 2021
371393d
[remote] update path for new qml-remote
thibaudk Jul 3, 2026
31beb64
[http_server] setup server for autoconnect .was remote
thibaudk Jul 6, 2026
a98fb07
[RemoteControl] begin re-structuring Http_server
thibaudk Jul 7, 2026
76c5886
[remote control] all settings
thibaudk Jul 9, 2026
5a2e645
[remote control] more settings for the HTTP_server
thibaudk Jul 10, 2026
5cff16d
[Http_server] re-format
thibaudk Jul 10, 2026
fb49b7c
[Http_server] set port, address, and path
thibaudk Jul 10, 2026
be14211
[HttpServer] rename file and add proper lambda
thibaudk Jul 12, 2026
76f2c9e
[remotecontrol] riun clang-format
thibaudk Jul 12, 2026
610df2a
[repo] more formatting
thibaudk Jul 12, 2026
73aac9a
[HttpServer] thread safety
thibaudk Jul 13, 2026
35bdd55
[HttpServer] ossia_score_version_agent
thibaudk Jul 14, 2026
13afe3f
[HttpServer] qDebug instaed of cerr and rebase on master
thibaudk Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.clangd
./*.cache
*.zip
build-*
Comment thread
thibaudk marked this conversation as resolved.
AppRun*
*.AppImage
*.txz
Expand Down
8 changes: 7 additions & 1 deletion src/plugins/score-plugin-remotecontrol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ set(HDRS

"${CMAKE_CURRENT_SOURCE_DIR}/i-score-remote/RemoteApplication.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score_plugin_remotecontrol.hpp"

"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/HttpServer/DocumentPlugin.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/HttpServer/HttpServer.hpp"
)
set(SRCS

set(SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/Controller/RemoteControlProvider.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/Controller/DocumentPlugin.cpp"

Expand All @@ -57,6 +60,9 @@ set(SRCS

"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/ApplicationPlugin.cpp"

"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/HttpServer/DocumentPlugin.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/HttpServer/HttpServer.cpp"

"${CMAKE_CURRENT_SOURCE_DIR}/score_plugin_remotecontrol.cpp"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
#include <core/document/DocumentModel.hpp>

#include <RemoteControl/ApplicationPlugin.hpp>

#include <RemoteControl/Controller/DocumentPlugin.hpp>
#include <RemoteControl/Websockets/DocumentPlugin.hpp>
#include <RemoteControl/HttpServer/DocumentPlugin.hpp>


namespace RemoteControl
{
Expand All @@ -22,6 +25,8 @@ void ApplicationPlugin::on_createdDocument(score::Document& doc)
doc.model().addPluginModel(new WS::DocumentPlugin{doc.context(), &doc.model()});
doc.model().addPluginModel(
new Controller::DocumentPlugin{doc.context(), &doc.model()});
doc.model().addPluginModel(
new HttpServer::DocumentPlugin{doc.context(), &doc.model()});
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#include "DocumentPlugin.hpp"

#include <score/tools/Bind.hpp>

#include <RemoteControl/Settings/Model.hpp>

namespace RemoteControl::HttpServer
{
DocumentPlugin::DocumentPlugin(const score::DocumentContext& doc, QObject* parent)
: score::DocumentPlugin{doc, "RemoteControl::HttpServer::DocumentPlugin", parent}
{
auto& model{m_context.app.settings<Settings::Model>()};

m_server.set_path(model.getWebUiPath().toStdString());
m_server.set_address(model.getServerAddress().toStdString());
m_server.set_port(model.getServerPort());

if(model.getEnabled() && model.getServerEnabled())
m_server.start_thread();

con(model, &Settings::Model::EnabledChanged, this, [this, &model](bool e) {
e&& model.getServerEnabled() ? m_server.start_thread() : m_server.stop_thread();
}, Qt::QueuedConnection);

con(model, &Settings::Model::WebUiPathChanged, this, [this](const QString& s) {
m_server.set_path(s.toStdString());
}, Qt::QueuedConnection);

con(model, &Settings::Model::ServerAddressChanged, this, [this](const QString& s) {
m_server.set_address(s.toStdString().c_str());
}, Qt::QueuedConnection);

con(model, &Settings::Model::ServerPortChanged, this,
[this](unsigned short s) { m_server.set_port(s); }, Qt::QueuedConnection);

con(model, &Settings::Model::ServerEnabledChanged, this, [this, &model](bool e) {
e&& model.getEnabled() ? m_server.start_thread() : m_server.stop_thread();
}, Qt::QueuedConnection);
}

DocumentPlugin::~DocumentPlugin() { }

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once
#include "HttpServer.hpp"

#include <score/plugins/documentdelegate/plugin/DocumentPlugin.hpp>

namespace RemoteControl::HttpServer
{
struct DocumentPlugin : score::DocumentPlugin
{
public:
DocumentPlugin(const score::DocumentContext& doc, QObject* parent);
~DocumentPlugin();

private:
HttpServer m_server;
};

}
Loading
Loading