1 #ifndef _AMB_BLUEMONKEY_PLUGIN_H_
2 #define _AMB_BLUEMONKEY_PLUGIN_H_
4 #include "bluemonkey.h"
6 #include <abstractsource.h>
7 #include <ambpluginimpl.h>
8 #include <uuidhelper.h>
16 Q_PROPERTY(QString name READ name)
17 Q_PROPERTY(QString source READ source)
18 Q_PROPERTY(
double timestamp READ timestamp)
19 Q_PROPERTY(QVariant value READ value WRITE setValue)
20 Q_PROPERTY(
int zone READ zone)
26 void setType(QString t);
38 virtual PropertyList subscriptions() {
return PropertyList(); }
41 DebugOut()<<
"Bluemonkey Property Supported Changed"<<endl;
46 virtual const std::string
uuid() {
return mUuid; }
49 void setValue(QVariant v);
51 void getHistory(QDateTime begin, QDateTime end, QJSValue cbFunction);
53 Zone::Type zone() {
return mZone; }
57 void changed(QVariant val);
61 const std::string mUuid;
73 using QObject::setProperty;
78 virtual PropertyList subscriptions();
81 virtual const std::string
uuid()
const;
83 virtual int supportedOperations();
87 PropertyList mSupported;
88 std::list<AbstractPropertyType*> propertyValueCache;
93 QObject* subscribeTo(QString str);
94 QObject* subscribeTo(QString str,
int zone);
95 QObject* subscribeTo(QString str,
int zone, QString srcFilter);
97 QStringList sourcesForProperty(QString
property);
98 QVariant zonesForProperty(QString property, QString src);
100 QStringList supportedProperties();
102 bool authenticate(QString pass);
104 void getHistory(QStringList
properties, QDateTime begin, QDateTime end, QJSValue cbFunction);
106 void setSilentMode(
bool m)
111 void createCustomProperty(QString
name, QJSValue defaultValue)
113 createCustomProperty(name, defaultValue, Zone::None);
116 void createCustomProperty(QString name, QJSValue defaultValue,
int zone);
118 void exportInterface(QString name, QJSValue properties);