summaryrefslogtreecommitdiff
path: root/fmrxserviceplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fmrxserviceplugin.cpp')
-rw-r--r--fmrxserviceplugin.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/fmrxserviceplugin.cpp b/fmrxserviceplugin.cpp
new file mode 100644
index 0000000..38c4ce8
--- /dev/null
+++ b/fmrxserviceplugin.cpp
@@ -0,0 +1,24 @@
+#include <QMediaServiceProvider>
+
+#include "fmrxserviceplugin.h"
+#include "fmrxservice.h"
+
+QStringList FmRxServicePlugin::keys() const
+{
+ return QStringList() << QLatin1String(Q_MEDIASERVICE_RADIO);
+}
+
+QMediaService* FmRxServicePlugin::create(const QString &key)
+{
+ if (key == QLatin1String(Q_MEDIASERVICE_RADIO))
+ return new FmRxService;
+
+ return 0;
+}
+
+void FmRxServicePlugin::release(QMediaService *service)
+{
+ delete service;
+}
+
+Q_EXPORT_PLUGIN2(fmrx-qt, FmRxServicePlugin)