Changeset View
Changeset View
Standalone View
Standalone View
plugins/share/shareplugin.h
Show All 33 Lines | 33 | { | |||
---|---|---|---|---|---|
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.share") | 35 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.share") | ||
36 | 36 | | |||
37 | public: | 37 | public: | ||
38 | explicit SharePlugin(QObject *parent, const QVariantList &args); | 38 | explicit SharePlugin(QObject *parent, const QVariantList &args); | ||
39 | 39 | | |||
40 | ///Helper method, QDBus won't recognize QUrl | 40 | ///Helper method, QDBus won't recognize QUrl | ||
41 | Q_SCRIPTABLE void shareUrl(const QString& url) { shareUrl(QUrl(url)); } | 41 | Q_SCRIPTABLE void shareUrl(const QString& url) { shareUrl(QUrl(url)); } | ||
42 | public Q_SLOTS: | 42 | | ||
43 | bool receivePackage(const NetworkPackage& np) override; | 43 | bool receivePackage(const NetworkPackage& np) override; | ||
44 | void connected() override; | 44 | void connected() override {} | ||
45 | QString dbusPath() const override; | ||||
45 | 46 | | |||
46 | private Q_SLOTS: | 47 | private Q_SLOTS: | ||
47 | void finished(KJob*); | 48 | void finished(KJob*); | ||
48 | void openDestinationFolder(); | 49 | void openDestinationFolder(); | ||
49 | 50 | | |||
50 | Q_SIGNALS: | 51 | Q_SIGNALS: | ||
51 | void shareReceived(const QUrl& url); | 52 | void shareReceived(const QUrl& url); | ||
52 | 53 | | |||
53 | private: | 54 | private: | ||
54 | void shareUrl(const QUrl& url); | 55 | void shareUrl(const QUrl& url); | ||
55 | 56 | | |||
56 | QString dbusPath() const; | | |||
57 | QUrl destinationDir() const; | 57 | QUrl destinationDir() const; | ||
58 | 58 | | |||
59 | }; | 59 | }; | ||
60 | #endif | 60 | #endif |