31#include "model/wx_instance_chk.h"
33#if defined(__linux__) && !defined(__ANDROID__)
34#include "model/dbus_client.h"
45std::unique_ptr<LocalClientApi> LocalClientApi::GetClient() {
50 return DummyIpcServer::GetInstance();
56 return DummyInstanceChk::GetInstance();
59#elif defined(__linux__)
60static bool UseDbus() {
61 return getenv(
"FLATPAK_ID") != 0 || getenv(
"OCPN_FORCE_DBUS");
64std::unique_ptr<LocalClientApi> LocalClientApi::GetClient() {
68 return std::unique_ptr<LocalClientApi>(
new IpcClient);
80 return DbusServer::GetInstance();
82 return GetWxInstanceChk();
86std::unique_ptr<LocalClientApi> LocalClientApi::GetClient() {
87 return std::unique_ptr<LocalClientApi>(
new IpcClient());
91 return IpcConnection::GetInstance();
Implement LocalClientApi on linux using Dbus mechanisms.
Common interface for all instance checkers.
static InstanceCheck & GetInstance()
Started by IpcServer on filesystem fifo/socket connects.
Base interface for local server command handling.
static void ReleaseInstance()
Release Instance.
static LocalServerApi & GetInstance()
Thin wrapper for wxSingleInstanceChecker implementing InstanceCheck.
DBus interface header file.
Server and client CLI api implementations.