New tact, lets create a new endpoint entirely based on "devices"

This commit is contained in:
Rob Emery 2024-10-05 11:23:01 +01:00 committed by Carl Schwan
parent 811542cf84
commit 0856afe216
No known key found for this signature in database
GPG key ID: 02325448204E452A
2 changed files with 9 additions and 2 deletions

View file

@ -147,6 +147,14 @@ QSet<LinkProvider *> Daemon::getLinkProviders() const
return d->m_linkProviders; return d->m_linkProviders;
} }
QStringList Daemon::linkProviders() const
{
QStringList return;
for (LinkProvider *a : std::as_const(d->m_linkProviders)) {
return.append(a->name())
}
return ret;
}
QStringList Daemon::devices(bool onlyReachable, bool onlyTrusted) const QStringList Daemon::devices(bool onlyReachable, bool onlyTrusted) const
{ {
QStringList ret; QStringList ret;

View file

@ -61,11 +61,10 @@ public Q_SLOTS:
// Returns a list of ids. The respective devices can be manipulated using the dbus path: "/modules/kdeconnect/Devices/"+id // Returns a list of ids. The respective devices can be manipulated using the dbus path: "/modules/kdeconnect/Devices/"+id
Q_SCRIPTABLE QStringList devices(bool onlyReachable = false, bool onlyPaired = false) const; Q_SCRIPTABLE QStringList devices(bool onlyReachable = false, bool onlyPaired = false) const;
Q_SCRIPTABLE QMap<QString, QString> deviceNames(bool onlyReachable = false, bool onlyPaired = false) const; Q_SCRIPTABLE QMap<QString, QString> deviceNames(bool onlyReachable = false, bool onlyPaired = false) const;
Q_SCRIPTABLE QString deviceIdByName(const QString &name) const; Q_SCRIPTABLE QString deviceIdByName(const QString &name) const;
Q_SCRIPTABLE QStringList linkProviders() const;
Q_SCRIPTABLE virtual void sendSimpleNotification(const QString &eventId, const QString &title, const QString &text, const QString &iconName) = 0; Q_SCRIPTABLE virtual void sendSimpleNotification(const QString &eventId, const QString &title, const QString &text, const QString &iconName) = 0;
Q_SIGNALS: Q_SIGNALS: