mirror of
https://github.com/aydencharles/onionHEN.git
synced 2026-10-22 03:42:46 -05:00
Implement the daemon-side Host Service handlers that the SDK client already sends, and the two descriptor flags the SDK defines beyond auto-start. - session: add LOG/NOTIFY/CONFIG_GET/CONFIG_SET commands and a HostServices interface injected by the daemon; NOTIFY is gated by the Notify capability - daemon: route log to LOG_*, notify to the toast, and config to a persistent per-plugin ConfigStore under the plugin install root - manager: honor LONG_RUNNING (crash supervision on reconcile) and STOP_SUPPORTED (graceful SIGTERM vs immediate SIGKILL) - tests: cover host-service gating/config round-trip and the new flags
19 lines
543 B
C++
19 lines
543 B
C++
#pragma once
|
|
|
|
#include <onion/plugin_session.hpp>
|
|
|
|
namespace onion::daemon::plugin_ipc {
|
|
|
|
bool start();
|
|
void stop();
|
|
void restart();
|
|
bool is_listening();
|
|
|
|
/* Serve one accepted stream until EOF or a fatal protocol error. */
|
|
void serve_connection(int socket, plugin_session::SessionDirectory &directory,
|
|
plugin_ui::ProtocolBroker &ui_broker,
|
|
plugin_session::EventSource *events = nullptr,
|
|
plugin_session::HostServices *host = nullptr);
|
|
|
|
} // namespace onion::daemon::plugin_ipc
|