24 using namespace swift::core::context;
27 namespace swift::core::context
38 context->registerWithDBus(ObjectPath(), server);
52 QPointer<IContextApplication> myself(
this);
56 if (!myself) {
return; }
68 [=](
const QStringList &actions) {
69 if (!myself) { return; }
70 this->registerHotkeyActions(actions, {});
72 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect hotkey action failed");
76 [=](
const QStringList &actions,
const CIdentifier &origin) {
77 if (origin.hasApplicationProcessId()) { return; }
80 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect hotkey actions failed");
85 [=](
const QString &action,
bool argument) {
86 if (!myself) { return; }
87 this->callHotkeyActionRemotely(action, argument, {});
89 Qt::QueuedConnection);
91 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect remote action failed");
102 qFatal(
"Not implemented");
109 qFatal(
"Not implemented");
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
CInputManager * getInputManager() const
The input manager, if available.
ContextMode
How to handle a given context.
@ NotUsed
during shutdown or not used at all
@ Local
context runs in same process
@ Remote
context runs in a different process.
@ LocalInDBusServer
context runs in same process.
The class providing facades (the contexts) for all DBus relevant operations.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Parse command line in all contexts.
Application context proxy.
Application context interface.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Forward to facade.
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 void changeSettings(const misc::CValueCachePacket &settings, const misc::CIdentifier &origin)
Ratify some settings changed by another process.
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.
static IContextApplication * create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, swift::misc::CDBusServer *server, QDBusConnection &connection)
Factory method.
virtual void registerHotkeyActions(const QStringList &actions, const misc::CIdentifier &origin)
Register hotkey action implemented by another process.
Base for all context classes.
CCoreFacade * getRuntime()
Runtime.
static const QString & coreServiceName()
Default service name.
Value object encapsulating information identifying a component of a modular distributed swift process...
static CSettingsCache * instance()
Return the singleton instance.
void changeValuesFromRemote(const swift::misc::CValueCachePacket &values, const swift::misc::CIdentifier &originator)
Notify this cache that values have been changed by one of the duplicate caches in the multi-process e...
void valuesChangedByLocal(const swift::misc::CValueCachePacket &values)
Emitted when values in the cache are changed by an object in this very process. The interprocess comm...
Value class used for signalling changed values in the cache.
Backend services of the swift project, like dealing with the network or the simulators.
Free functions in swift::misc.