From 4ad9e1874af29864ca8531e5ba033b85d6616639 Mon Sep 17 00:00:00 2001
From: "Javier S. Pedro" <maemo@javispedro.com>
Date: Fri, 10 Aug 2012 17:49:45 +0200
Subject: cleanup and bump version to 0.4

---
 qmafwwatchlet/qmafwwatchletplugin.cpp | 15 ++++++++++++---
 qmafwwatchlet/qmafwwatchletplugin.h   |  3 ++-
 2 files changed, 14 insertions(+), 4 deletions(-)

(limited to 'qmafwwatchlet')

diff --git a/qmafwwatchlet/qmafwwatchletplugin.cpp b/qmafwwatchlet/qmafwwatchletplugin.cpp
index 09984b4..713c199 100644
--- a/qmafwwatchlet/qmafwwatchletplugin.cpp
+++ b/qmafwwatchlet/qmafwwatchletplugin.cpp
@@ -19,10 +19,19 @@ QStringList QMafwWatchletPlugin::watchlets()
 	return l;
 }
 
-Watchlet* QMafwWatchletPlugin::getWatchlet(const QString& driver, QSettings& settings, WatchServer *server)
+WatchletPluginInterface::WatchletInfo QMafwWatchletPlugin::describeWatchlet(const QString &id)
 {
-	Q_UNUSED(driver);
-	Q_UNUSED(settings);
+	WatchletInfo info;
+	if (id != "com.javispedro.sowatch.qmafw") return info;
+	info.name = "Music player";
+	info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qmafwwatchlet/icon.png");
+	return info;
+}
+
+Watchlet* QMafwWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server)
+{
+	Q_UNUSED(config);
+	if (id != "com.javispedro.sowatch.qmafw") return 0;
 	return new QMafwWatchlet(server);
 }
 
diff --git a/qmafwwatchlet/qmafwwatchletplugin.h b/qmafwwatchlet/qmafwwatchletplugin.h
index c4ff3ef..11e99af 100644
--- a/qmafwwatchlet/qmafwwatchletplugin.h
+++ b/qmafwwatchlet/qmafwwatchletplugin.h
@@ -16,7 +16,8 @@ public:
 	~QMafwWatchletPlugin();
 
 	QStringList watchlets();
-	Watchlet* getWatchlet(const QString& driver, QSettings& settings, WatchServer* server);
+	WatchletInfo describeWatchlet(const QString &id);
+	Watchlet* getWatchlet(const QString &id, ConfigKey *config, WatchServer *server);
 };
 
 }
-- 
cgit v1.2.3