aboutsummaryrefslogtreecommitdiff
path: root/libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h')
-rw-r--r--libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h b/libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h
new file mode 100644
index 00000000..3a51fb5a
--- /dev/null
+++ b/libcontextsubscriber/customer-tests/testplugins/timeplugin2/timeplugin.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation.
+ *
+ * Contact: Marius Vollmer <marius.vollmer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+This is a test plugin for customer tests.
+*/
+
+#ifndef TIMEPLUGIN_H
+#define TIMEPLUGIN_H
+
+#include "iproviderplugin.h" // For IProviderPlugin definition
+#include <QTimer>
+
+using ContextSubscriber::IProviderPlugin;
+
+extern "C" {
+ IProviderPlugin* pluginFactory(QString constructionString);
+}
+
+namespace ContextSubscriberTime
+{
+
+class TimePlugin : public IProviderPlugin
+{
+ Q_OBJECT
+
+public:
+ explicit TimePlugin();
+ virtual void subscribe(QSet<QString> keys);
+ virtual void unsubscribe(QSet<QString> keys);
+
+private slots:
+ void onTimeout();
+
+private:
+ QTimer timer;
+ QString prefix;
+};
+}
+
+#endif