00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef IPROVIDERPLUGIN_H
00023 #define IPROVIDERPLUGIN_H
00024
00025 #include "timedvalue.h"
00026
00027 #include <QObject>
00028 #include <QVariant>
00029
00030 namespace ContextSubscriber {
00031
00032
00033
00034
00035
00036
00037 class IProviderPlugin : public QObject
00038 {
00039 Q_OBJECT
00040 public:
00041 virtual void subscribe(QSet<QString> keys) = 0;
00042 virtual void unsubscribe(QSet<QString> keys) = 0;
00043 virtual void blockUntilReady() = 0;
00044 virtual void blockUntilSubscribed(const QString& key) = 0;
00045
00046 Q_SIGNALS:
00047 void ready();
00048 void failed(QString error);
00049 void subscribeFinished(QString key);
00050 void subscribeFinished(QString key, TimedValue timedvalue);
00051 void subscribeFailed(QString failedKey, QString error);
00052 void valueChanged(QString key, QVariant value);
00053 void valueChanged(QString key, TimedValue timedvalue);
00054 };
00055
00056 typedef IProviderPlugin* (*PluginFactoryFunc)(QString constructionString);
00057
00058 }
00059
00060 #endif