Dmitry Novotochinov 248e60e1d3
[#5038] desktop deep links
Add support for status-im://chat/public/status type of links

Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
2018-10-18 16:02:14 +03:00

39 lines
834 B
C++

#ifndef DESKTOPLINKING_H
#define DESKTOPLINKING_H
#include "moduleinterface.h"
#include <QVariantMap>
class DesktopLinkingPrivate;
class DesktopLinking : public QObject, public ModuleInterface {
Q_OBJECT
Q_INTERFACES(ModuleInterface)
Q_DECLARE_PRIVATE(DesktopLinking)
public:
Q_INVOKABLE DesktopLinking(QObject* parent = 0);
~DesktopLinking();
void setBridge(Bridge* bridge) override;
QString moduleName() override;
QList<ModuleMethod*> methodsToExport() override;
QVariantMap constantsToExport() override;
signals:
void urlOpened(QString path);
void fileOpened(QString path);
public slots:
void handleURL(const QString url);
private:
QScopedPointer<DesktopLinkingPrivate> d_ptr;
bool eventFilter(QObject* obj, QEvent* event) override;
};
#endif // DESKTOPLINKING_H