Skip to content

Commit

Permalink
include timesync service
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 21, 2024
1 parent d999356 commit c20f43a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/app/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "atomicdex/services/price/komodo_prices/komodo.prices.provider.hpp"
#include "atomicdex/services/price/coingecko/coingecko.wallet.charts.hpp"
#include "atomicdex/services/price/orderbook.scanner.service.hpp"
#include "atomicdex/services/sync/timesync.checker.service.hpp"

namespace
{
Expand Down Expand Up @@ -498,6 +499,7 @@ namespace atomic_dex
system_manager_.create_system<orderbook_scanner_service>(system_manager_);
system_manager_.create_system<komodo_prices_provider>();
system_manager_.create_system<update_checker_service>();
system_manager_.create_system<timesync_checker_service>();
system_manager_.create_system<coingecko_wallet_charts_service>(system_manager_);
system_manager_.create_system<exporter_service>(system_manager_);
system_manager_.create_system<trading_page>(
Expand Down Expand Up @@ -910,7 +912,18 @@ namespace atomic_dex
}
} // namespace atomic_dex

//! update checker
//! time sync checker
namespace atomic_dex
{
timesync_checker_service* application::get_timesync_checker_service() const
{
auto ptr = const_cast<timesync_checker_service*>(std::addressof(system_manager_.get_system<timesync_checker_service>()));
assert(ptr != nullptr);
return ptr;
}
} // namespace atomic_dex

//! zcash_params checker
namespace atomic_dex
{
zcash_params_service* application::get_zcash_params_service() const
Expand Down
4 changes: 4 additions & 0 deletions src/app/app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "atomicdex/services/price/global.provider.hpp"
#include "atomicdex/services/update/update.checker.service.hpp"
#include "atomicdex/services/update/zcash.params.service.hpp"
#include "atomicdex/services/sync/timesync.checker.service.hpp"
#include "atomicdex/utilities/qt.utilities.hpp"

namespace ag = antara::gaming;
Expand All @@ -75,6 +76,7 @@ namespace atomic_dex
Q_PROPERTY(settings_page* settings_pg READ get_settings_page NOTIFY settingsPageChanged)
Q_PROPERTY(qt_wallet_manager* wallet_mgr READ get_wallet_mgr NOTIFY walletMgrChanged)
Q_PROPERTY(update_checker_service* updateCheckerService READ get_update_checker_service NOTIFY updateCheckerServiceChanged)
Q_PROPERTY(timesync_checker_service* timesyncCheckerService READ get_timesync_checker_service NOTIFY timesyncCheckerServiceChanged)
Q_PROPERTY(zcash_params_service* zcash_params READ get_zcash_params_service NOTIFY zcashParamsServiceChanged)

//! Private function
Expand Down Expand Up @@ -135,6 +137,7 @@ namespace atomic_dex
qt_wallet_manager* get_wallet_mgr() const;
internet_service_checker* get_internet_checker() const;
update_checker_service* get_update_checker_service() const;
timesync_checker_service* get_timesync_checker_service() const;
[[nodiscard]] zcash_params_service* get_zcash_params_service() const;
exporter_service* get_exporter_service() const;

Expand Down Expand Up @@ -180,6 +183,7 @@ namespace atomic_dex
void walletPageChanged();
void ordersChanged();
void updateCheckerServiceChanged();
void timesyncCheckerServiceChanged();
void zcashParamsServiceChanged();
void tradingPageChanged();
void settingsPageChanged();
Expand Down

0 comments on commit c20f43a

Please sign in to comment.