-
-
Notifications
You must be signed in to change notification settings - Fork 126
Feature/wasm remote3 #2104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thibaudk
wants to merge
31
commits into
master
Choose a base branch
from
feature/wasm-remote3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/wasm remote3 #2104
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 9e9e16a
try to add a thread for the web socket connection
Toine-ddt d56f42e
Update .gitignore
Toine-ddt 142b45f
Do not block score with the http server for the remotecontrol
jcelerier 3918fa9
rm some useless include
Toine-ddt 96d54b2
modify some variable and path
Toine-ddt 4e230f4
clean code
Toine-ddt 64ca2ec
get ip address and set in remote.html
Toine-ddt 60e41cf
add comments and clean code
Toine-ddt ea4347a
detect ip address which start with 172.
Toine-ddt 39640cd
detect ip address with socket / set keep_alive = false
Toine-ddt 68c57a4
clean code
Toine-ddt 082d7be
changes from the review
Toine-ddt 0861410
load remote.html, read and write ip address
Toine-ddt 1bbdf60
Update CMakeLists.txt
Toine-ddt f53c43d
Update ApplicationPlugin.cpp
Toine-ddt 53f134a
Update ApplicationPlugin.hpp
Toine-ddt daa4d2b
clean code
Toine-ddt 371393d
[remote] update path for new qml-remote
thibaudk 31beb64
[http_server] setup server for autoconnect .was remote
thibaudk a98fb07
[RemoteControl] begin re-structuring Http_server
thibaudk 76c5886
[remote control] all settings
thibaudk 5a2e645
[remote control] more settings for the HTTP_server
thibaudk 5cff16d
[Http_server] re-format
thibaudk fb49b7c
[Http_server] set port, address, and path
thibaudk be14211
[HttpServer] rename file and add proper lambda
thibaudk 76f2c9e
[remotecontrol] riun clang-format
thibaudk 610df2a
[repo] more formatting
thibaudk 73aac9a
[HttpServer] thread safety
thibaudk 35bdd55
[HttpServer] ossia_score_version_agent
thibaudk 13afe3f
[HttpServer] qDebug instaed of cerr and rebase on master
thibaudk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,6 @@ | |
| .clangd | ||
| ./*.cache | ||
| *.zip | ||
| build-* | ||
| AppRun* | ||
| *.AppImage | ||
| *.txz | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/DocumentPlugin.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() { } | ||
|
|
||
| } |
18 changes: 18 additions & 0 deletions
18
src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/DocumentPlugin.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }; | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.