6#ifndef SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_H
7#define SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_H
9#include <QDBusArgument>
29#define SWIFT_CORE_CONTEXTAPPLICATION_INTERFACENAME "org.swift_project.swift_core.contextapplication"
33#define SWIFT_CORE_CONTEXTAPPLICATION_OBJECTPATH "/application"
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
Application context interface.
~IContextApplication()=default
Destructor.
virtual void unregisterApplication(const misc::CIdentifier &application)=0
Unregister application.
void remoteHotkeyAction(const QString &action, bool argument, const swift::misc::CIdentifier &origin)
Call a hotkey action on a remote process.
virtual CSettingsDictionary getUnsavedSettingsKeysDescribed() const =0
Get keys and descriptions of all unsaved settings currently in core settings cache.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Forward to facade.
QString getPathAndContextId() const
Id and path name for round trip protection.
static const QString & ObjectPath()
Service path.
virtual void synchronizeLocalSettings()=0
Update local settings with settings from core.
void registrationChanged()
A component changes.
virtual misc::CStatusMessage loadSettings()=0
Load core settings from disk.
virtual misc::CValueCachePacket getAllSettings() const =0
Get all settings currently in core settings cache.
virtual void callHotkeyActionRemotely(const QString &action, bool argument, const misc::CIdentifier &origin)
Call a hotkey action on a remote process.
void hotkeyActionsRegistered(const QStringList &actions, const swift::misc::CIdentifier &origin)
New action was registered.
virtual misc::CStatusMessage saveSettingsByKey(const QStringList &keys)=0
Save core settings to disk.
static constexpr int PingIdentifiersMs
how often identifiers are pinged
virtual void changeSettings(const misc::CValueCachePacket &settings, const misc::CIdentifier &origin)
Ratify some settings changed by another process.
virtual misc::CIdentifier registerApplication(const misc::CIdentifier &application)=0
Register application, can also be used for ping.
IContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime)
Constructor.
void settingsChanged(const swift::misc::CValueCachePacket &settings, const swift::misc::CIdentifier &origin)
One or more settings were changed.
virtual misc::CStatusMessage saveSettings(const QString &keyPrefix={})=0
Save core settings to disk.
virtual void registerHotkeyActions(const QStringList &actions, const misc::CIdentifier &origin)
Register hotkey action implemented by another process.
virtual misc::CIdentifier getApplicationIdentifier() const =0
Identifier of application, remote side if distributed.
static const QString & InterfaceName()
Service name.
virtual QStringList getUnsavedSettingsKeys() const =0
Get keys of all unsaved settings currently in core settings cache.
virtual misc::CIdentifierList getRegisteredApplications() const =0
All registered applications.
IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent)
Constructor.
QString buildPathAndContextId(const QString &path) const
Path and context id.
Associative container with value semantics, chooses a sensible default implementation container type.
Value object encapsulating information identifying a component of a modular distributed swift process...
Value object encapsulating a list of object identifiers.
Streamable status message, e.g.
Value class used for signalling changed values in the cache.
swift::misc::CDictionary< QString, QString, QMap > CSettingsDictionary
Value type for settings keys with descriptions.
#define SWIFT_CORE_CONTEXTAPPLICATION_OBJECTPATH
DBus object path for context.
#define SWIFT_CORE_CONTEXTAPPLICATION_INTERFACENAME
DBus interface for context.
Backend services of the swift project, like dealing with the network or the simulators.
Free functions in swift::misc.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.