This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/plugin/DoricNotificationPlugin.h

26 lines
599 B
C
Raw Normal View History

2021-06-07 17:12:55 +08:00
#ifndef DORICNOTIFICATIONPLUGIN_H
#define DORICNOTIFICATIONPLUGIN_H
#include "DoricExport.h"
#include "DoricNativePlugin.h"
class DORIC_EXPORT DoricNotificationPlugin : public DoricNativePlugin {
Q_OBJECT
private:
2021-06-08 10:08:38 +08:00
QList<QString> subscriptions;
2021-06-07 17:12:55 +08:00
public:
using DoricNativePlugin::DoricNativePlugin;
2021-06-08 10:08:38 +08:00
~DoricNotificationPlugin();
2021-06-07 17:12:55 +08:00
Q_INVOKABLE void publish(QString jsValueString, QString callbackId);
Q_INVOKABLE void subscribe(QString jsValueString, QString callbackId);
Q_INVOKABLE void unsubscribe(QString jsValueString, QString callbackId);
};
#endif // DORICNOTIFICATIONPLUGIN_H