Debian Codegraph @

plugins/ubuntu-notification-plugin/plugin/notifyserviceplugin.h

raw symbols SCIP
1 #ifndef NOTIFYSERVICEPLUGIN_H
2 #define NOTIFYSERVICEPLUGIN_H
3
4 #include <QObject>
5 #include <PluginInfo.h>
6 #include <PluginLoader.h>
7 #include <QScopedPointer>
8
9 class NotifyService : public ServicePlugin
10 {
11 Q_OBJECT
12 public:
13 explicit NotifyService(QObject *parent = 0);
14
15 // PluginInfo interface
16 public:
17 virtual QString pluginId() const override;
18 virtual QString location() const override;
19 virtual QString i18n() const override;
20 virtual QVariantMap documentation() const override;
21
22 // ServicePlugin interface
23 public:
24 virtual void start();
25 virtual void stop();
26
27 protected:
28 bool serviceFileInstalled() const;
29 bool newVersion();
30 bool installServiceFile() const;
31 bool removeServiceFile() const;
32 bool serviceRunning() const;
33 bool startService();
34 bool restartService();
35 bool stopService();
36
37 private:
38 QString m_service;
39 QString m_serviceFile;
40 };
41
42 class NotifyServicePlugin : public QObject, public PluginInterface
43 {
44 Q_OBJECT
45 Q_INTERFACES(PluginInterface)
46 Q_PLUGIN_METADATA(IID "org.dekkoproject.dekkod-notify")
47
48 // PluginInterface interface
49 public:
50 virtual QString name() const;
51 virtual QString description() const;
52 virtual PluginInfo *create(QObject *parent) const;
53 };
54
55
56 #endif // NOTIFYSERVICEPLUGIN_H