6 #ifndef SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_H
7 #define SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_H
9 #include <QDBusArgument>
13 #include <QStringList>
29 #define SWIFT_CORE_CONTEXTAPPLICATION_INTERFACENAME "org.swift_project.swift_core.contextapplication"
33 #define SWIFT_CORE_CONTEXTAPPLICATION_OBJECTPATH "/application"
35 class QDBusConnection;
128 virtual void registerHotkeyActions(
const QStringList &actions,
const misc::CIdentifier &origin);
133 virtual void callHotkeyActionRemotely(
const QString &action,
bool argument,
152 static constexpr
int PingIdentifiersMs = 20000;
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.
static const QString & ObjectPath()
Service path.
virtual CSettingsDictionary getUnsavedSettingsKeysDescribed() const =0
Get keys and descriptions of all unsaved settings currently in core settings cache.
static const QString & InterfaceName()
Service name.
QString getPathAndContextId() const
Id and path name for round trip protection.
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.
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.
virtual misc::CIdentifier registerApplication(const misc::CIdentifier &application)=0
Register application, can also be used for ping.
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 misc::CIdentifier getApplicationIdentifier() const =0
Identifier of application, remote side if distributed.
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.
Base for all context classes.
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.
#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.