add EXPORT to lib for shared symbols

This commit is contained in:
Simon Stürz 2016-01-11 10:27:58 +01:00 committed by Michael Zanetti
parent ca5fb4d102
commit 16e6e2de3b
46 changed files with 146 additions and 49 deletions

View File

@ -25,7 +25,9 @@
#include <QBluetoothServiceInfo> #include <QBluetoothServiceInfo>
#include <QLowEnergyController> #include <QLowEnergyController>
class BluetoothLowEnergyDevice : public QObject #include "libguh.h"
class LIBGUH_EXPORT BluetoothLowEnergyDevice : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -29,9 +29,10 @@
#include <QBluetoothLocalDevice> #include <QBluetoothLocalDevice>
#include <QBluetoothDeviceDiscoveryAgent> #include <QBluetoothDeviceDiscoveryAgent>
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
class BluetoothScanner : public QObject class LIBGUH_EXPORT BluetoothScanner : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -27,6 +27,7 @@
#include <QHostAddress> #include <QHostAddress>
#include <QQueue> #include <QQueue>
#include "libguh.h"
#include "coaprequest.h" #include "coaprequest.h"
#include "coapreply.h" #include "coapreply.h"
@ -38,7 +39,7 @@
* Observing Resources in CoAP : https://tools.ietf.org/html/rfc7641 * Observing Resources in CoAP : https://tools.ietf.org/html/rfc7641
*/ */
class Coap : public QObject class LIBGUH_EXPORT Coap : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -25,7 +25,9 @@
#include <QObject> #include <QObject>
#include <QByteArray> #include <QByteArray>
class CoapOption #include "libguh.h"
class LIBGUH_EXPORT CoapOption
{ {
Q_GADGET Q_GADGET
Q_ENUMS(Option) Q_ENUMS(Option)

View File

@ -27,6 +27,8 @@
#include "coapoption.h" #include "coapoption.h"
#include "coappdublock.h" #include "coappdublock.h"
#include "libguh.h"
// PDU = Protocol Data Unit // PDU = Protocol Data Unit
/* 0 1 2 3 /* 0 1 2 3
@ -42,7 +44,7 @@
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/ */
class CoapPdu : public QObject class LIBGUH_EXPORT CoapPdu : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(MessageType) Q_ENUMS(MessageType)

View File

@ -23,7 +23,9 @@
#include <QByteArray> #include <QByteArray>
class CoapPduBlock #include "libguh.h"
class LIBGUH_EXPORT CoapPduBlock
{ {
public: public:
CoapPduBlock(); CoapPduBlock();

View File

@ -24,11 +24,13 @@
#include <QObject> #include <QObject>
#include <QTimer> #include <QTimer>
#include "libguh.h"
#include "coappdu.h" #include "coappdu.h"
#include "coapoption.h" #include "coapoption.h"
#include "coaprequest.h" #include "coaprequest.h"
class CoapReply : public QObject class LIBGUH_EXPORT CoapReply : public QObject
{ {
friend class Coap; friend class Coap;

View File

@ -24,12 +24,14 @@
#include <QUrl> #include <QUrl>
#include <QHostAddress> #include <QHostAddress>
#include "libguh.h"
#include "coappdu.h" #include "coappdu.h"
#include "coapoption.h" #include "coapoption.h"
//class Coap; //class Coap;
class CoapRequest class LIBGUH_EXPORT CoapRequest
{ {
// friend class Coap; // friend class Coap;
public: public:

View File

@ -24,9 +24,10 @@
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
#include "libguh.h"
#include "coappdu.h" #include "coappdu.h"
class CoreLink class LIBGUH_EXPORT CoreLink
{ {
public: public:
CoreLink(); CoreLink();

View File

@ -23,11 +23,12 @@
#include <QObject> #include <QObject>
#include "libguh.h"
#include "corelink.h" #include "corelink.h"
// Constrained RESTful Environments (CoRE) Link Format : http://tools.ietf.org/html/rfc6690 // Constrained RESTful Environments (CoRE) Link Format : http://tools.ietf.org/html/rfc6690
class CoreLinkParser : public QObject class LIBGUH_EXPORT CoreLinkParser : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -22,6 +22,8 @@
#ifndef DEVICEMANAGER_H #ifndef DEVICEMANAGER_H
#define DEVICEMANAGER_H #define DEVICEMANAGER_H
#include "libguh.h"
#include "plugin/deviceclass.h" #include "plugin/deviceclass.h"
#include "plugin/device.h" #include "plugin/device.h"
#include "plugin/devicedescriptor.h" #include "plugin/devicedescriptor.h"
@ -45,10 +47,11 @@ class DevicePlugin;
class Radio433; class Radio433;
class UpnpDiscovery; class UpnpDiscovery;
class DeviceManager : public QObject class LIBGUH_EXPORT DeviceManager : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(DeviceError) Q_ENUMS(DeviceError)
public: public:
enum HardwareResource { enum HardwareResource {
HardwareResourceNone = 0x00, HardwareResourceNone = 0x00,
@ -204,6 +207,7 @@ private:
friend class DevicePlugin; friend class DevicePlugin;
}; };
Q_DECLARE_OPERATORS_FOR_FLAGS(DeviceManager::HardwareResources) Q_DECLARE_OPERATORS_FOR_FLAGS(DeviceManager::HardwareResources)
Q_DECLARE_METATYPE(DeviceManager::DeviceError) Q_DECLARE_METATYPE(DeviceManager::DeviceError)

View File

@ -24,9 +24,11 @@
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
#include "libguh.h"
class QSettings; class QSettings;
class GuhSettings : public QObject class LIBGUH_EXPORT GuhSettings : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -27,6 +27,8 @@
#include <QMutexLocker> #include <QMutexLocker>
#include <QDir> #include <QDir>
#include "libguh.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -73,7 +75,7 @@
********************************** **********************************
*/ */
class Gpio : public QObject class LIBGUH_EXPORT Gpio : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -28,9 +28,10 @@
#include <poll.h> #include <poll.h>
#include <errno.h> #include <errno.h>
#include "libguh.h"
#include "hardware/gpio.h" #include "hardware/gpio.h"
class GpioMonitor : public QThread class LIBGUH_EXPORT GpioMonitor : public QThread
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -28,9 +28,10 @@
#include "radio433transmitter.h" #include "radio433transmitter.h"
#endif #endif
#include "libguh.h"
#include "radio433brennenstuhlgateway.h" #include "radio433brennenstuhlgateway.h"
class Radio433 : public QObject class LIBGUH_EXPORT Radio433 : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -26,7 +26,9 @@
#include <QHostAddress> #include <QHostAddress>
#include <QTimer> #include <QTimer>
class Radio433BrennenstuhlGateway : public QObject #include "libguh.h"
class LIBGUH_EXPORT Radio433BrennenstuhlGateway : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -23,9 +23,10 @@
#include <QThread> #include <QThread>
#include "libguh.h"
#include "../gpio.h" #include "../gpio.h"
class Radio433Receiver : public QThread class LIBGUH_EXPORT Radio433Receiver : public QThread
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -27,10 +27,11 @@
#include <QQueue> #include <QQueue>
#include <QDebug> #include <QDebug>
#include "libguh.h"
#include "../gpio.h" #include "../gpio.h"
class Radio433Trasmitter : public QThread class LIBGUH_EXPORT Radio433Trasmitter : public QThread
{ {
Q_OBJECT Q_OBJECT
public: public:

33
libguh/libguh.h Normal file
View File

@ -0,0 +1,33 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2016 Simon Stuerz <simon.stuerz@guh.guru> *
* *
* This file is part of guh. *
* *
* Guh is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, version 2 of the License. *
* *
* Guh 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with guh. If not, see <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef LIBGUH
#define LIBGUH
#include <QtCore/QtGlobal>
#if defined(LIBGUH_LIBRARY)
# define LIBGUH_EXPORT Q_DECL_EXPORT
#else
# define LIBGUH_EXPORT Q_DECL_IMPORT
#endif
#endif // LIBGUH

View File

@ -4,6 +4,7 @@ TARGET = guh
TEMPLATE = lib TEMPLATE = lib
QT += network QT += network
DEFINES += LIBGUH_LIBRARY
target.path = /usr/lib target.path = /usr/lib
INSTALLS += target INSTALLS += target
@ -100,6 +101,7 @@ HEADERS += devicemanager.h \
types/ruleaction.h \ types/ruleaction.h \
types/ruleactionparam.h \ types/ruleactionparam.h \
types/statedescriptor.h \ types/statedescriptor.h \
libguh.h
# install plugininfo python script for libguh-dev # install plugininfo python script for libguh-dev
generateplugininfo.files = $$top_srcdir/plugins/guh-generateplugininfo generateplugininfo.files = $$top_srcdir/plugins/guh-generateplugininfo

View File

@ -21,6 +21,7 @@
#ifndef NETWORKMANAGER_H #ifndef NETWORKMANAGER_H
#define NETWORKMANAGER_H #define NETWORKMANAGER_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include <QObject> #include <QObject>
@ -30,9 +31,7 @@
#include <QDebug> #include <QDebug>
#include <QUrl> #include <QUrl>
class LIBGUH_EXPORT NetworkManager : public QObject
class NetworkManager : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -29,9 +29,11 @@
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QNetworkReply> #include <QNetworkReply>
#include "libguh.h"
// OAuth 2.0 - Resource Owner Password Credentials Grant: http://tools.ietf.org/html/rfc6749#section-4.3 // OAuth 2.0 - Resource Owner Password Credentials Grant: http://tools.ietf.org/html/rfc6749#section-4.3
class OAuth2 : public QObject class LIBGUH_EXPORT OAuth2 : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -23,9 +23,10 @@
#include <QObject> #include <QObject>
#include "libguh.h"
#include "upnpdevicedescriptor.h" #include "upnpdevicedescriptor.h"
class UpnpDevice : public QObject class LIBGUH_EXPORT UpnpDevice : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -25,9 +25,11 @@
#include <QHostAddress> #include <QHostAddress>
#include <QUrl> #include <QUrl>
#include "libguh.h"
// reference: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf // reference: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf
class UpnpDeviceDescriptor class LIBGUH_EXPORT UpnpDeviceDescriptor
{ {
public: public:
explicit UpnpDeviceDescriptor(); explicit UpnpDeviceDescriptor();

View File

@ -32,13 +32,14 @@
#include "upnpdiscoveryrequest.h" #include "upnpdiscoveryrequest.h"
#include "upnpdevicedescriptor.h" #include "upnpdevicedescriptor.h"
#include "devicemanager.h" #include "devicemanager.h"
#include "libguh.h"
// Discovering UPnP devices reference: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf // Discovering UPnP devices reference: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf
// guh basic device reference: http://upnp.org/specs/basic/UPnP-basic-Basic-v1-Device.pdf // guh basic device reference: http://upnp.org/specs/basic/UPnP-basic-Basic-v1-Device.pdf
class UpnpDiscoveryRequest; class UpnpDiscoveryRequest;
class UpnpDiscovery : public QUdpSocket class LIBGUH_EXPORT UpnpDiscovery : public QUdpSocket
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -23,13 +23,15 @@
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
#include "upnpdiscovery.h" #include "upnpdiscovery.h"
#include "upnpdevicedescriptor.h" #include "upnpdevicedescriptor.h"
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
class UpnpDiscovery; class UpnpDiscovery;
class UpnpDiscoveryRequest : public QObject class LIBGUH_EXPORT UpnpDiscoveryRequest : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -23,6 +23,7 @@
#define DEVICE_H #define DEVICE_H
#include "typeutils.h" #include "typeutils.h"
#include "libguh.h"
#include "plugin/deviceclass.h" #include "plugin/deviceclass.h"
#include "types/state.h" #include "types/state.h"
@ -32,7 +33,7 @@
#include <QUuid> #include <QUuid>
#include <QVariant> #include <QVariant>
class Device: public QObject class LIBGUH_EXPORT Device: public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -22,6 +22,7 @@
#ifndef DEVICECLASS_H #ifndef DEVICECLASS_H
#define DEVICECLASS_H #define DEVICECLASS_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "types/vendor.h" #include "types/vendor.h"
#include "types/eventtype.h" #include "types/eventtype.h"
@ -32,7 +33,7 @@
#include <QList> #include <QList>
#include <QUuid> #include <QUuid>
class DeviceClass class LIBGUH_EXPORT DeviceClass
{ {
Q_GADGET Q_GADGET
Q_ENUMS(CreateMethod) Q_ENUMS(CreateMethod)

View File

@ -22,12 +22,13 @@
#ifndef DEVICEDESCRIPTION_H #ifndef DEVICEDESCRIPTION_H
#define DEVICEDESCRIPTION_H #define DEVICEDESCRIPTION_H
#include "libguh.h"
#include <typeutils.h> #include <typeutils.h>
#include <types/param.h> #include <types/param.h>
#include <QVariantMap> #include <QVariantMap>
class DeviceDescriptor class LIBGUH_EXPORT DeviceDescriptor
{ {
public: public:
DeviceDescriptor(); DeviceDescriptor();

View File

@ -25,7 +25,9 @@
#include "devicemanager.h" #include "devicemanager.h"
#include "deviceclass.h" #include "deviceclass.h"
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "types/event.h" #include "types/event.h"
#include "types/action.h" #include "types/action.h"
#include "types/vendor.h" #include "types/vendor.h"
@ -41,7 +43,7 @@
class DeviceManager; class DeviceManager;
class Device; class Device;
class DevicePlugin: public QObject class LIBGUH_EXPORT DevicePlugin: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -22,12 +22,13 @@
#ifndef ACTION_H #ifndef ACTION_H
#define ACTION_H #define ACTION_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "param.h" #include "param.h"
#include <QVariantList> #include <QVariantList>
class Action class LIBGUH_EXPORT Action
{ {
public: public:
explicit Action(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId()); explicit Action(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId());

View File

@ -22,12 +22,13 @@
#ifndef ACTIONTYPE_H #ifndef ACTIONTYPE_H
#define ACTIONTYPE_H #define ACTIONTYPE_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "paramtype.h" #include "paramtype.h"
#include <QVariantList> #include <QVariantList>
class ActionType class LIBGUH_EXPORT ActionType
{ {
public: public:
ActionType(const ActionTypeId &id); ActionType(const ActionTypeId &id);

View File

@ -22,6 +22,7 @@
#ifndef EVENT_H #ifndef EVENT_H
#define EVENT_H #define EVENT_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "types/param.h" #include "types/param.h"
@ -29,7 +30,7 @@
#include <QVariantList> #include <QVariantList>
#include <QDebug> #include <QDebug>
class Event class LIBGUH_EXPORT Event
{ {
public: public:
Event(); Event();

View File

@ -22,6 +22,7 @@
#ifndef EVENTDESCRIPTOR_H #ifndef EVENTDESCRIPTOR_H
#define EVENTDESCRIPTOR_H #define EVENTDESCRIPTOR_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "paramdescriptor.h" #include "paramdescriptor.h"
#include "event.h" #include "event.h"
@ -30,7 +31,7 @@
#include <QVariantList> #include <QVariantList>
#include <QDebug> #include <QDebug>
class EventDescriptor class LIBGUH_EXPORT EventDescriptor
{ {
public: public:
EventDescriptor(const EventTypeId &eventTypeId, const DeviceId &deviceId, const QList<ParamDescriptor> &paramDescriptors = QList<ParamDescriptor>()); EventDescriptor(const EventTypeId &eventTypeId, const DeviceId &deviceId, const QList<ParamDescriptor> &paramDescriptors = QList<ParamDescriptor>());
@ -51,6 +52,7 @@ private:
DeviceId m_deviceId; DeviceId m_deviceId;
QList<ParamDescriptor> m_paramDescriptors; QList<ParamDescriptor> m_paramDescriptors;
}; };
QDebug operator<<(QDebug dbg, const EventDescriptor &eventDescriptor); QDebug operator<<(QDebug dbg, const EventDescriptor &eventDescriptor);
QDebug operator<<(QDebug dbg, const QList<EventDescriptor> &eventDescriptors); QDebug operator<<(QDebug dbg, const QList<EventDescriptor> &eventDescriptors);

View File

@ -22,12 +22,13 @@
#ifndef TRIGGERTYPE_H #ifndef TRIGGERTYPE_H
#define TRIGGERTYPE_H #define TRIGGERTYPE_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "paramtype.h" #include "paramtype.h"
#include <QVariantMap> #include <QVariantMap>
class EventType class LIBGUH_EXPORT EventType
{ {
public: public:
EventType(const EventTypeId &id); EventType(const EventTypeId &id);

View File

@ -22,10 +22,12 @@
#ifndef PARAM_H #ifndef PARAM_H
#define PARAM_H #define PARAM_H
#include "libguh.h"
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
class Param class LIBGUH_EXPORT Param
{ {
public: public:
Param(const QString &name = QString(), const QVariant &value = QVariant()); Param(const QString &name = QString(), const QVariant &value = QVariant());
@ -46,7 +48,7 @@ private:
Q_DECLARE_METATYPE(Param) Q_DECLARE_METATYPE(Param)
QDebug operator<<(QDebug dbg, const Param &param); QDebug operator<<(QDebug dbg, const Param &param);
class ParamList: public QList<Param> class LIBGUH_EXPORT ParamList: public QList<Param>
{ {
public: public:
bool hasParam(const QString &paramName) const; bool hasParam(const QString &paramName) const;

View File

@ -22,10 +22,12 @@
#ifndef PARAMDESCRIPTOR_H #ifndef PARAMDESCRIPTOR_H
#define PARAMDESCRIPTOR_H #define PARAMDESCRIPTOR_H
#include "libguh.h"
#include "param.h" #include "param.h"
#include "typeutils.h" #include "typeutils.h"
class ParamDescriptor : public Param class LIBGUH_EXPORT ParamDescriptor : public Param
{ {
public: public:
ParamDescriptor(const QString &name, const QVariant &value = QVariant()); ParamDescriptor(const QString &name, const QVariant &value = QVariant());

View File

@ -24,9 +24,11 @@
#include <QVariant> #include <QVariant>
#include <QDebug> #include <QDebug>
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
class ParamType class LIBGUH_EXPORT ParamType
{ {
public: public:
ParamType(const QString &name, const QVariant::Type type, const QVariant &defaultValue = QVariant()); ParamType(const QString &name, const QVariant::Type type, const QVariant &defaultValue = QVariant());

View File

@ -22,10 +22,11 @@
#ifndef RULEACTION_H #ifndef RULEACTION_H
#define RULEACTION_H #define RULEACTION_H
#include "libguh.h"
#include "action.h" #include "action.h"
#include "ruleactionparam.h" #include "ruleactionparam.h"
class RuleAction class LIBGUH_EXPORT RuleAction
{ {
public: public:
explicit RuleAction(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId()); explicit RuleAction(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId());

View File

@ -27,9 +27,10 @@
#include <QVariant> #include <QVariant>
#include "param.h" #include "param.h"
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
class RuleActionParam class LIBGUH_EXPORT RuleActionParam
{ {
public: public:
RuleActionParam(const Param &param); RuleActionParam(const Param &param);
@ -60,7 +61,7 @@ private:
Q_DECLARE_METATYPE(RuleActionParam) Q_DECLARE_METATYPE(RuleActionParam)
QDebug operator<<(QDebug dbg, const RuleActionParam &ruleActionParam); QDebug operator<<(QDebug dbg, const RuleActionParam &ruleActionParam);
class RuleActionParamList: public QList<RuleActionParam> class LIBGUH_EXPORT RuleActionParamList: public QList<RuleActionParam>
{ {
public: public:
bool hasParam(const QString &ruleActionParamName) const; bool hasParam(const QString &ruleActionParamName) const;

View File

@ -22,12 +22,13 @@
#ifndef STATE_H #ifndef STATE_H
#define STATE_H #define STATE_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include <QVariant> #include <QVariant>
#include <QDebug> #include <QDebug>
class State class LIBGUH_EXPORT State
{ {
public: public:
State(const StateTypeId &stateTypeId, const DeviceId &deviceId); State(const StateTypeId &stateTypeId, const DeviceId &deviceId);

View File

@ -22,6 +22,7 @@
#ifndef STATEDESCRIPTOR_H #ifndef STATEDESCRIPTOR_H
#define STATEDESCRIPTOR_H #define STATEDESCRIPTOR_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include "paramdescriptor.h" #include "paramdescriptor.h"
#include "state.h" #include "state.h"
@ -31,7 +32,7 @@
#include <QVariantList> #include <QVariantList>
#include <QDebug> #include <QDebug>
class StateDescriptor class LIBGUH_EXPORT StateDescriptor
{ {
public: public:
StateDescriptor(); StateDescriptor();
@ -55,6 +56,7 @@ private:
QVariant m_stateValue; QVariant m_stateValue;
Types::ValueOperator m_operatorType; Types::ValueOperator m_operatorType;
}; };
QDebug operator<<(QDebug dbg, const StateDescriptor &eventDescriptor); QDebug operator<<(QDebug dbg, const StateDescriptor &eventDescriptor);
QDebug operator<<(QDebug dbg, const QList<StateDescriptor> &eventDescriptors); QDebug operator<<(QDebug dbg, const QList<StateDescriptor> &eventDescriptors);

View File

@ -22,11 +22,12 @@
#ifndef STATETYPE_H #ifndef STATETYPE_H
#define STATETYPE_H #define STATETYPE_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include <QVariant> #include <QVariant>
class StateType class LIBGUH_EXPORT StateType
{ {
public: public:
StateType(const StateTypeId &id); StateType(const StateTypeId &id);

View File

@ -22,11 +22,12 @@
#ifndef VENDOR_H #ifndef VENDOR_H
#define VENDOR_H #define VENDOR_H
#include "libguh.h"
#include "typeutils.h" #include "typeutils.h"
#include <QString> #include <QString>
class Vendor class LIBGUH_EXPORT Vendor
{ {
public: public:
Vendor(const VendorId &id, const QString &name = QString()); Vendor(const VendorId &id, const QString &name = QString());

View File

@ -25,6 +25,8 @@
#include <QMetaType> #include <QMetaType>
#include <QUuid> #include <QUuid>
#include "libguh.h"
#define DECLARE_TYPE_ID(type) class type##Id: public QUuid \ #define DECLARE_TYPE_ID(type) class type##Id: public QUuid \
{ \ { \
public: \ public: \
@ -38,7 +40,6 @@ public: \
}; \ }; \
Q_DECLARE_METATYPE(type##Id); Q_DECLARE_METATYPE(type##Id);
DECLARE_TYPE_ID(Vendor) DECLARE_TYPE_ID(Vendor)
DECLARE_TYPE_ID(DeviceClass) DECLARE_TYPE_ID(DeviceClass)
DECLARE_TYPE_ID(Device) DECLARE_TYPE_ID(Device)
@ -55,7 +56,7 @@ DECLARE_TYPE_ID(Rule)
DECLARE_TYPE_ID(PairingTransaction) DECLARE_TYPE_ID(PairingTransaction)
class Types class LIBGUH_EXPORT Types
{ {
Q_GADGET Q_GADGET
Q_ENUMS(InputType) Q_ENUMS(InputType)

View File

@ -1,4 +1,4 @@
{ {
"name": "Generic Elements", "name": "Generic Elements",
"idName": "GenericElements", "idName": "GenericElements",
"id": "6e22161e-39b7-4416-8623-39e730721efb", "id": "6e22161e-39b7-4416-8623-39e730721efb",