feat: adjust dbus service structure

Log:
This commit is contained in:
heyuming
2023-07-17 14:49:35 +08:00
committed by Comix
parent 6f598ab52b
commit 3a278bec79
12 changed files with 338 additions and 117 deletions

View File

@ -12,15 +12,23 @@ class InstanceService : public QObject
{
Q_OBJECT
public:
explicit InstanceService(QObject *parent = nullptr);
virtual ~InstanceService();
~InstanceService() override;
InstanceService(const InstanceService &) = delete;
InstanceService(InstanceService &&) = delete;
InstanceService &operator=(const InstanceService &) = delete;
InstanceService &operator=(InstanceService&&) = delete;
public:
Q_PROPERTY(QDBusObjectPath Application READ application)
Q_PROPERTY(QDBusObjectPath Application READ application CONSTANT)
QDBusObjectPath application() const;
Q_PROPERTY(QDBusObjectPath SystemdUnitPath READ systemdUnitPath)
Q_PROPERTY(QDBusObjectPath SystemdUnitPath READ systemdUnitPath CONSTANT)
QDBusObjectPath systemdUnitPath() const;
private:
friend class ApplicationService;
InstanceService(QString application, QString systemdUnitPath);
const QDBusObjectPath m_Application;
const QDBusObjectPath m_SystemdUnitPath;
};
#endif