aboutsummaryrefslogtreecommitdiff
path: root/source/app
diff options
context:
space:
mode:
Diffstat (limited to 'source/app')
-rw-r--r--source/app/CMakeLists.txt6
-rw-r--r--source/app/src/wandac.cpp12
-rw-r--r--source/app/src/wandad.cpp7
3 files changed, 14 insertions, 11 deletions
diff --git a/source/app/CMakeLists.txt b/source/app/CMakeLists.txt
index a567dd1..f2c69e8 100644
--- a/source/app/CMakeLists.txt
+++ b/source/app/CMakeLists.txt
@@ -2,7 +2,7 @@ include("CheckIPOSupported")
check_ipo_supported(RESULT "WANDA_IPO_SUPPORTED")
-find_package("asio")
+find_package("Boost")
find_package("lyra")
find_package("spdlog")
@@ -17,7 +17,7 @@ target_link_libraries("${PROJECT_NAME}c" PRIVATE
"wanda::proto"
"wanda::system"
- "asio::asio"
+ "Boost::boost"
"bfg::lyra"
"spdlog::spdlog_header_only"
)
@@ -42,7 +42,7 @@ target_link_libraries("wandad" PRIVATE
"wanda::std_ext"
"wanda::system"
- "asio::asio"
+ "Boost::boost"
"bfg::lyra"
"spdlog::spdlog_header_only"
)
diff --git a/source/app/src/wandac.cpp b/source/app/src/wandac.cpp
index ae24d0f..ff27e65 100644
--- a/source/app/src/wandac.cpp
+++ b/source/app/src/wandac.cpp
@@ -4,7 +4,8 @@
#include <wanda/system/logging.hpp>
#include <wanda/system/xdg.hpp>
-#include <asio.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/post.hpp>
#include <lyra/lyra.hpp>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
@@ -39,7 +40,7 @@ struct cli
struct listener : wanda::control::commander::listener
{
- listener(::cli & cli, asio::io_service & service)
+ listener(::cli & cli, boost::asio::io_context & service)
: m_cli{cli}
, m_service{service}
{
@@ -50,13 +51,14 @@ struct listener : wanda::control::commander::listener
if (m_cli.command == "change")
{
commander.send(wanda::proto::make_change_command());
- m_service.post([&] { commander.stop(); });
+
+ post(m_service, [&] { commander.stop(); });
}
}
private:
::cli & m_cli;
- asio::io_service & m_service;
+ boost::asio::io_context & m_service;
};
int main(int argc, char const * const * argv)
@@ -77,7 +79,7 @@ int main(int argc, char const * const * argv)
auto interface =
wanda::system::xdg_path_for(wanda::system::xdg_directory::runtime_dir, wanda::system::environment{}) /
".wanda_interface";
- auto service = asio::io_service{};
+ auto service = boost::asio::io_context{};
auto listener = ::listener{cli, service};
auto commander = wanda::control::commander{service, interface, listener};
diff --git a/source/app/src/wandad.cpp b/source/app/src/wandad.cpp
index a610b8a..e7ee772 100644
--- a/source/app/src/wandad.cpp
+++ b/source/app/src/wandad.cpp
@@ -8,7 +8,8 @@
#include <wanda/system/wallpaper.hpp>
#include <wanda/system/xdg.hpp>
-#include <asio.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/signal_set.hpp>
#include <lyra/lyra.hpp>
#include <spdlog/sinks/stdout_color_sinks.h>
@@ -106,7 +107,7 @@ int main(int argc, char const * const * argv)
with(wanda::system::scan({cli.wallpaper_directory}, image_filter),
[&](auto const & list) {
- auto service = asio::io_service{};
+ auto service = boost::asio::io_context{};
auto socket_path =
wanda::system::xdg_path_for(wanda::system::xdg_directory::runtime_dir, wanda::system::environment{}) /
".wanda_interface";
@@ -126,7 +127,7 @@ int main(int argc, char const * const * argv)
return;
}
- auto signals = asio::signal_set{service, SIGINT, SIGTERM};
+ auto signals = boost::asio::signal_set{service, SIGINT, SIGTERM};
signals.async_wait([&](auto const & error, auto const signal) {
if (!error)
{