swift
contextapplicationimpl.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_IMPL_H
7 #define SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_IMPL_H
8 
9 #include <QObject>
10 #include <QString>
11 #include <QStringList>
12 
14 #include "core/corefacadeconfig.h"
15 #include "core/swiftcoreexport.h"
16 #include "misc/identifiable.h"
17 #include "misc/identifierlist.h"
18 #include "misc/statusmessage.h"
19 #include "misc/valuecache.h"
20 
21 // clazy:excludeall=const-signal-or-slot
22 
23 namespace swift::misc
24 {
25  class CDBusServer;
26 }
27 
28 namespace swift::core
29 {
30  class CCoreFacade;
31  namespace context
32  {
35  {
36  Q_CLASSINFO("D-Bus Interface", SWIFT_CORE_CONTEXTAPPLICATION_INTERFACENAME)
37  Q_OBJECT
38  friend class swift::core::CCoreFacade;
39  friend class IContextApplication;
40 
41  public slots:
43  virtual void changeSettings(const swift::misc::CValueCachePacket &settings,
44  const swift::misc::CIdentifier &origin) override;
45 
47  virtual swift::misc::CValueCachePacket getAllSettings() const override;
48 
50  virtual QStringList getUnsavedSettingsKeys() const override;
51 
53  virtual swift::core::context::CSettingsDictionary getUnsavedSettingsKeysDescribed() const override;
54 
56  virtual void synchronizeLocalSettings() override;
57 
59  virtual swift::misc::CStatusMessage saveSettings(const QString &keyPrefix = {}) override;
60 
62  virtual swift::misc::CStatusMessage saveSettingsByKey(const QStringList &keys) override;
63 
65  virtual swift::misc::CStatusMessage loadSettings() override;
66 
68  virtual void registerHotkeyActions(const QStringList &actions,
69  const swift::misc::CIdentifier &origin) override;
70 
72  virtual void callHotkeyActionRemotely(const QString &action, bool argument,
73  const swift::misc::CIdentifier &origin) override;
74 
76  virtual swift::misc::CIdentifier registerApplication(const swift::misc::CIdentifier &application) override;
77 
79  virtual void unregisterApplication(const swift::misc::CIdentifier &application) override;
80 
82  virtual swift::misc::CIdentifierList getRegisteredApplications() const override;
83 
85  virtual swift::misc::CIdentifier getApplicationIdentifier() const override;
86 
87  protected:
90 
91  private:
92  swift::misc::CIdentifierList m_registeredApplications;
93 
95  void cleanupRegisteredApplications();
96  };
97  } // namespace context
98 } // namespace swift::core
99 #endif // SWIFT_CORE_CONTEXT_CONTEXTAPPLICATION_IMPL_H
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
Definition: corefacade.h:57
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Definition: identifiable.h:24
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition: identifier.h:29
Value object encapsulating a list of object identifiers.
Streamable status message, e.g.
Value class used for signalling changed values in the cache.
Definition: valuecache.h:67
#define SWIFT_CORE_CONTEXTAPPLICATION_INTERFACENAME
DBus interface for context.
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7
Free functions in swift::misc.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.