summaryrefslogtreecommitdiff
path: root/testnotification/testnotificationplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-11 15:30:38 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-11 15:30:38 +0200
commit51701e30d710ad016ddf2d306cdd7be122ddf25b (patch)
treed4a85bd4926c3f94411d3f6fa572e1a99be6bbb4 /testnotification/testnotificationplugin.cpp
parentf0564ad9d210cc68bfb1bfc6e56b86fa941ad830 (diff)
downloadsowatch-51701e30d710ad016ddf2d306cdd7be122ddf25b.tar.gz
sowatch-51701e30d710ad016ddf2d306cdd7be122ddf25b.zip
adding test notification backend
Diffstat (limited to 'testnotification/testnotificationplugin.cpp')
-rw-r--r--testnotification/testnotificationplugin.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/testnotification/testnotificationplugin.cpp b/testnotification/testnotificationplugin.cpp
new file mode 100644
index 0000000..7e65851
--- /dev/null
+++ b/testnotification/testnotificationplugin.cpp
@@ -0,0 +1,39 @@
+#include "testnotificationprovider.h"
+#include "testnotificationplugin.h"
+
+using namespace sowatch;
+
+static const QLatin1String providerId("testnotification");
+
+TestNotificationPlugin::TestNotificationPlugin(QObject *parent) :
+ QObject(parent)
+{
+}
+
+TestNotificationPlugin::~TestNotificationPlugin()
+{
+}
+
+QStringList TestNotificationPlugin::providers()
+{
+ QStringList providers;
+ providers << providerId;
+ return providers;
+}
+
+NotificationPluginInterface::NotificationProviderInfo TestNotificationPlugin::describeProvider(const QString &driver)
+{
+ NotificationProviderInfo info;
+ if (driver != providerId) return info;
+ info.name = "Test notifications";
+ return info;
+}
+
+NotificationProvider* TestNotificationPlugin::getProvider(const QString& id, ConfigKey *settings, QObject *parent)
+{
+ Q_UNUSED(settings);
+ if (id != providerId) return 0;
+ return new TestNotificationProvider(parent);
+}
+
+Q_EXPORT_PLUGIN2(testnotification, TestNotificationPlugin)