diff options
author | Gergely Risko <gergely+context@risko.hu> | 2009-09-10 13:35:16 +0300 |
---|---|---|
committer | Gergely Risko <gergely+context@risko.hu> | 2009-09-10 13:35:16 +0300 |
commit | 51d46276d0269521f6b0da8c6a4b2d772bbba750 (patch) | |
tree | 71dac037086df737be5ecd00a52a022460c6d77b /libcontextsubscriber/unit-tests/provider/contextkitplugin.h | |
parent | 9608fc9e92447cc5b40fcf2bf3a7b4f7ea4b952b (diff) |
libcontextsubscriber/src/provider: unit tests updated
Diffstat (limited to 'libcontextsubscriber/unit-tests/provider/contextkitplugin.h')
-rw-r--r-- | libcontextsubscriber/unit-tests/provider/contextkitplugin.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/libcontextsubscriber/unit-tests/provider/contextkitplugin.h b/libcontextsubscriber/unit-tests/provider/contextkitplugin.h new file mode 100644 index 00000000..39159c35 --- /dev/null +++ b/libcontextsubscriber/unit-tests/provider/contextkitplugin.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2008, 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 + * + */ + +// mock implementation + +#ifndef CONTEXTKITPLUGIN_H +#define CONTEXTKITPLUGIN_H + +#include <QString> +#include <QDBusConnection> +#include <QSet> +#include <QVariant> +#include "iproviderplugin.h" + +extern "C" { + ContextSubscriber::IProviderPlugin* contextKitPluginFactory(QString constructionString); +} + +namespace ContextSubscriber { +class ContextKitPlugin : public IProviderPlugin +{ + Q_OBJECT + +public: + void subscribe(QSet<QString> keys); + void unsubscribe(QSet<QString> keys); + +signals: + void ready(); + void failed(QString error); + void subscribeFinished(QString key); + void subscribeFailed(QString failedKey, QString error); + void valueChanged(QString key, QVariant value); + +private: + QSet<QString> subscribeRequested; + QSet<QString> unsubscribeRequested; + + friend class ProviderUnitTests; +}; + + +} + +#endif |