- Add refresh scheduler and network refresh service boundaries for typed refresh results, ordered RPC collectors, applicators, and price parsing. - Add daemon lifecycle and wallet security workflow helpers while preserving App-owned command RPC, decrypt, cancellation, and UI handoff behavior. - Split balance, console, mining, amount formatting, and async task logic into focused modules with expanded Phase 4 test coverage. - Fix market price loading by triggering price refresh immediately, avoiding queue-pressure drops, tracking loading/error state, and adding translations. - Polish send, explorer, peers, settings, theme/schema, and related tab UI. - Replace checked-in generated language headers with build-generated resources. - Document the cleanup audit, UI static-state guidance, and architecture updates.
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "daemon_controller.h"
|
|
#include "../util/async_task_manager.h"
|
|
|
|
#include <atomic>
|
|
#include <filesystem>
|
|
|
|
namespace dragonx {
|
|
namespace daemon {
|
|
|
|
class AsyncLifecycleTaskContext final : public DaemonController::LifecycleTaskContext {
|
|
public:
|
|
AsyncLifecycleTaskContext(const util::AsyncTaskManager::Token& token,
|
|
const std::atomic<bool>& shuttingDown);
|
|
|
|
bool cancelled() const override;
|
|
bool shuttingDown() const override;
|
|
void sleepForMs(int milliseconds) override;
|
|
|
|
private:
|
|
const util::AsyncTaskManager::Token& token_;
|
|
const std::atomic<bool>& shuttingDown_;
|
|
};
|
|
|
|
class ImmediateLifecycleTaskContext final : public DaemonController::LifecycleTaskContext {
|
|
public:
|
|
bool cancelled() const override;
|
|
bool shuttingDown() const override;
|
|
void sleepForMs(int milliseconds) override;
|
|
};
|
|
|
|
class BlockchainDataCleaner final {
|
|
public:
|
|
static int removeBlockchainData(const std::filesystem::path& dataDir);
|
|
};
|
|
|
|
} // namespace daemon
|
|
} // namespace dragonx
|