24using namespace swift::core::context;
27namespace swift::core::context
38 context->registerWithDBus(
ObjectPath(), server);
72 Q_ASSERT_X(sApp && sApp->getInputManager(), Q_FUNC_INFO,
"Missing input manager");
79 this->registerHotkeyActions(actions, {});
81 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect hotkey action failed");
86 if (origin.hasApplicationProcessId())
90 sApp->getInputManager()->registerRemoteActions(actions);
92 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect hotkey actions failed");
97 [=,
this](
const QString &action,
bool argument) {
102 this->callHotkeyActionRemotely(action, argument, {});
106 Q_ASSERT_X(s, Q_FUNC_INFO,
"Connect remote action failed");
110 sApp->getInputManager()->setForwarding(
true);
117 qFatal(
"Not implemented");
124 qFatal(
"Not implemented");
140 return this->
getRuntime()->parseCommandLine(commandLine, originator);
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.
Application context proxy.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Forward to facade.
static const QString & ObjectPath()
Service path.
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.
IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent)
Constructor.
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.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const