summaryrefslogtreecommitdiff
path: root/testnotification/testnotificationplugin.cpp
blob: 7e658518d07f0f485ed42b07f0b5ea088db8352e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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)