diff --git a/libguh/bluetooth/bluetoothlowenergydevice.h b/libguh/bluetooth/bluetoothlowenergydevice.h index cce83efb..f281a98f 100644 --- a/libguh/bluetooth/bluetoothlowenergydevice.h +++ b/libguh/bluetooth/bluetoothlowenergydevice.h @@ -25,7 +25,9 @@ #include #include -class BluetoothLowEnergyDevice : public QObject +#include "libguh.h" + +class LIBGUH_EXPORT BluetoothLowEnergyDevice : public QObject { Q_OBJECT public: diff --git a/libguh/bluetooth/bluetoothscanner.h b/libguh/bluetooth/bluetoothscanner.h index 1f081004..e0f253c6 100644 --- a/libguh/bluetooth/bluetoothscanner.h +++ b/libguh/bluetooth/bluetoothscanner.h @@ -29,9 +29,10 @@ #include #include +#include "libguh.h" #include "typeutils.h" -class BluetoothScanner : public QObject +class LIBGUH_EXPORT BluetoothScanner : public QObject { Q_OBJECT public: diff --git a/libguh/coap/coap.h b/libguh/coap/coap.h index 3135635b..eae731df 100644 --- a/libguh/coap/coap.h +++ b/libguh/coap/coap.h @@ -27,6 +27,7 @@ #include #include +#include "libguh.h" #include "coaprequest.h" #include "coapreply.h" @@ -38,7 +39,7 @@ * Observing Resources in CoAP : https://tools.ietf.org/html/rfc7641 */ -class Coap : public QObject +class LIBGUH_EXPORT Coap : public QObject { Q_OBJECT diff --git a/libguh/coap/coapoption.h b/libguh/coap/coapoption.h index 830bb0b4..62760db9 100644 --- a/libguh/coap/coapoption.h +++ b/libguh/coap/coapoption.h @@ -25,7 +25,9 @@ #include #include -class CoapOption +#include "libguh.h" + +class LIBGUH_EXPORT CoapOption { Q_GADGET Q_ENUMS(Option) diff --git a/libguh/coap/coappdu.h b/libguh/coap/coappdu.h index 864d4fd4..ccee96b9 100644 --- a/libguh/coap/coappdu.h +++ b/libguh/coap/coappdu.h @@ -27,6 +27,8 @@ #include "coapoption.h" #include "coappdublock.h" +#include "libguh.h" + // PDU = Protocol Data Unit /* 0 1 2 3 @@ -42,7 +44,7 @@ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ -class CoapPdu : public QObject +class LIBGUH_EXPORT CoapPdu : public QObject { Q_OBJECT Q_ENUMS(MessageType) diff --git a/libguh/coap/coappdublock.h b/libguh/coap/coappdublock.h index bbc3f289..3ae85ab0 100644 --- a/libguh/coap/coappdublock.h +++ b/libguh/coap/coappdublock.h @@ -23,7 +23,9 @@ #include -class CoapPduBlock +#include "libguh.h" + +class LIBGUH_EXPORT CoapPduBlock { public: CoapPduBlock(); diff --git a/libguh/coap/coapreply.h b/libguh/coap/coapreply.h index 7b21161d..3f5a739c 100644 --- a/libguh/coap/coapreply.h +++ b/libguh/coap/coapreply.h @@ -24,11 +24,13 @@ #include #include +#include "libguh.h" + #include "coappdu.h" #include "coapoption.h" #include "coaprequest.h" -class CoapReply : public QObject +class LIBGUH_EXPORT CoapReply : public QObject { friend class Coap; diff --git a/libguh/coap/coaprequest.h b/libguh/coap/coaprequest.h index 4934a64f..9738c6e6 100644 --- a/libguh/coap/coaprequest.h +++ b/libguh/coap/coaprequest.h @@ -24,12 +24,14 @@ #include #include +#include "libguh.h" + #include "coappdu.h" #include "coapoption.h" //class Coap; -class CoapRequest +class LIBGUH_EXPORT CoapRequest { // friend class Coap; public: diff --git a/libguh/coap/corelink.h b/libguh/coap/corelink.h index 18fab0b7..7c3e65de 100644 --- a/libguh/coap/corelink.h +++ b/libguh/coap/corelink.h @@ -24,9 +24,10 @@ #include #include +#include "libguh.h" #include "coappdu.h" -class CoreLink +class LIBGUH_EXPORT CoreLink { public: CoreLink(); diff --git a/libguh/coap/corelinkparser.h b/libguh/coap/corelinkparser.h index 160f817f..6a2f91dc 100644 --- a/libguh/coap/corelinkparser.h +++ b/libguh/coap/corelinkparser.h @@ -23,11 +23,12 @@ #include +#include "libguh.h" #include "corelink.h" // Constrained RESTful Environments (CoRE) Link Format : http://tools.ietf.org/html/rfc6690 -class CoreLinkParser : public QObject +class LIBGUH_EXPORT CoreLinkParser : public QObject { Q_OBJECT public: diff --git a/libguh/devicemanager.h b/libguh/devicemanager.h index 4bcd78b0..42758c6b 100644 --- a/libguh/devicemanager.h +++ b/libguh/devicemanager.h @@ -22,6 +22,8 @@ #ifndef DEVICEMANAGER_H #define DEVICEMANAGER_H +#include "libguh.h" + #include "plugin/deviceclass.h" #include "plugin/device.h" #include "plugin/devicedescriptor.h" @@ -45,10 +47,11 @@ class DevicePlugin; class Radio433; class UpnpDiscovery; -class DeviceManager : public QObject +class LIBGUH_EXPORT DeviceManager : public QObject { Q_OBJECT Q_ENUMS(DeviceError) + public: enum HardwareResource { HardwareResourceNone = 0x00, @@ -204,6 +207,7 @@ private: friend class DevicePlugin; }; + Q_DECLARE_OPERATORS_FOR_FLAGS(DeviceManager::HardwareResources) Q_DECLARE_METATYPE(DeviceManager::DeviceError) diff --git a/libguh/guhsettings.h b/libguh/guhsettings.h index 9828573f..63b3bf99 100644 --- a/libguh/guhsettings.h +++ b/libguh/guhsettings.h @@ -24,9 +24,11 @@ #include #include +#include "libguh.h" + class QSettings; -class GuhSettings : public QObject +class LIBGUH_EXPORT GuhSettings : public QObject { Q_OBJECT public: diff --git a/libguh/hardware/gpio.h b/libguh/hardware/gpio.h index 7a8b8052..19b3df3b 100644 --- a/libguh/hardware/gpio.h +++ b/libguh/hardware/gpio.h @@ -27,6 +27,8 @@ #include #include +#include "libguh.h" + #include #include #include @@ -73,7 +75,7 @@ ********************************** */ -class Gpio : public QObject +class LIBGUH_EXPORT Gpio : public QObject { Q_OBJECT public: diff --git a/libguh/hardware/gpiomonitor.h b/libguh/hardware/gpiomonitor.h index 28cf7657..bb5dd368 100644 --- a/libguh/hardware/gpiomonitor.h +++ b/libguh/hardware/gpiomonitor.h @@ -28,9 +28,10 @@ #include #include +#include "libguh.h" #include "hardware/gpio.h" -class GpioMonitor : public QThread +class LIBGUH_EXPORT GpioMonitor : public QThread { Q_OBJECT public: diff --git a/libguh/hardware/radio433/radio433.h b/libguh/hardware/radio433/radio433.h index f0672bb6..e72ae5b7 100644 --- a/libguh/hardware/radio433/radio433.h +++ b/libguh/hardware/radio433/radio433.h @@ -28,9 +28,10 @@ #include "radio433transmitter.h" #endif +#include "libguh.h" #include "radio433brennenstuhlgateway.h" -class Radio433 : public QObject +class LIBGUH_EXPORT Radio433 : public QObject { Q_OBJECT public: diff --git a/libguh/hardware/radio433/radio433brennenstuhlgateway.h b/libguh/hardware/radio433/radio433brennenstuhlgateway.h index eeba8b75..6a4ec56c 100644 --- a/libguh/hardware/radio433/radio433brennenstuhlgateway.h +++ b/libguh/hardware/radio433/radio433brennenstuhlgateway.h @@ -26,7 +26,9 @@ #include #include -class Radio433BrennenstuhlGateway : public QObject +#include "libguh.h" + +class LIBGUH_EXPORT Radio433BrennenstuhlGateway : public QObject { Q_OBJECT public: diff --git a/libguh/hardware/radio433/radio433receiver.h b/libguh/hardware/radio433/radio433receiver.h index 8b76c6ba..635be8bd 100644 --- a/libguh/hardware/radio433/radio433receiver.h +++ b/libguh/hardware/radio433/radio433receiver.h @@ -23,9 +23,10 @@ #include +#include "libguh.h" #include "../gpio.h" -class Radio433Receiver : public QThread +class LIBGUH_EXPORT Radio433Receiver : public QThread { Q_OBJECT public: diff --git a/libguh/hardware/radio433/radio433transmitter.h b/libguh/hardware/radio433/radio433transmitter.h index a3aafe5e..1bce5d74 100644 --- a/libguh/hardware/radio433/radio433transmitter.h +++ b/libguh/hardware/radio433/radio433transmitter.h @@ -27,10 +27,11 @@ #include #include +#include "libguh.h" #include "../gpio.h" -class Radio433Trasmitter : public QThread +class LIBGUH_EXPORT Radio433Trasmitter : public QThread { Q_OBJECT public: diff --git a/libguh/libguh.h b/libguh/libguh.h new file mode 100644 index 00000000..37aa71dd --- /dev/null +++ b/libguh/libguh.h @@ -0,0 +1,33 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2016 Simon Stuerz * + * * + * 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 . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef LIBGUH +#define LIBGUH + +#include + +#if defined(LIBGUH_LIBRARY) +# define LIBGUH_EXPORT Q_DECL_EXPORT +#else +# define LIBGUH_EXPORT Q_DECL_IMPORT +#endif + +#endif // LIBGUH + diff --git a/libguh/libguh.pro b/libguh/libguh.pro index e0e7b23d..03f1176c 100644 --- a/libguh/libguh.pro +++ b/libguh/libguh.pro @@ -4,6 +4,7 @@ TARGET = guh TEMPLATE = lib QT += network +DEFINES += LIBGUH_LIBRARY target.path = /usr/lib INSTALLS += target @@ -100,6 +101,7 @@ HEADERS += devicemanager.h \ types/ruleaction.h \ types/ruleactionparam.h \ types/statedescriptor.h \ + libguh.h # install plugininfo python script for libguh-dev generateplugininfo.files = $$top_srcdir/plugins/guh-generateplugininfo diff --git a/libguh/network/networkmanager.h b/libguh/network/networkmanager.h index fd8a6fbe..9786e278 100644 --- a/libguh/network/networkmanager.h +++ b/libguh/network/networkmanager.h @@ -21,6 +21,7 @@ #ifndef NETWORKMANAGER_H #define NETWORKMANAGER_H +#include "libguh.h" #include "typeutils.h" #include @@ -30,9 +31,7 @@ #include #include - - -class NetworkManager : public QObject +class LIBGUH_EXPORT NetworkManager : public QObject { Q_OBJECT public: diff --git a/libguh/network/oauth2.h b/libguh/network/oauth2.h index 0e6bc064..648cb088 100644 --- a/libguh/network/oauth2.h +++ b/libguh/network/oauth2.h @@ -29,9 +29,11 @@ #include #include +#include "libguh.h" + // 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 public: diff --git a/libguh/network/upnpdiscovery/upnpdevice.h b/libguh/network/upnpdiscovery/upnpdevice.h index ede165dd..e1847b3c 100644 --- a/libguh/network/upnpdiscovery/upnpdevice.h +++ b/libguh/network/upnpdiscovery/upnpdevice.h @@ -23,9 +23,10 @@ #include +#include "libguh.h" #include "upnpdevicedescriptor.h" -class UpnpDevice : public QObject +class LIBGUH_EXPORT UpnpDevice : public QObject { Q_OBJECT public: diff --git a/libguh/network/upnpdiscovery/upnpdevicedescriptor.h b/libguh/network/upnpdiscovery/upnpdevicedescriptor.h index e16f9614..a82ad041 100644 --- a/libguh/network/upnpdiscovery/upnpdevicedescriptor.h +++ b/libguh/network/upnpdiscovery/upnpdevicedescriptor.h @@ -25,9 +25,11 @@ #include #include +#include "libguh.h" + // reference: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf -class UpnpDeviceDescriptor +class LIBGUH_EXPORT UpnpDeviceDescriptor { public: explicit UpnpDeviceDescriptor(); diff --git a/libguh/network/upnpdiscovery/upnpdiscovery.h b/libguh/network/upnpdiscovery/upnpdiscovery.h index c95018f9..137a7d1a 100644 --- a/libguh/network/upnpdiscovery/upnpdiscovery.h +++ b/libguh/network/upnpdiscovery/upnpdiscovery.h @@ -32,13 +32,14 @@ #include "upnpdiscoveryrequest.h" #include "upnpdevicedescriptor.h" #include "devicemanager.h" +#include "libguh.h" // 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 class UpnpDiscoveryRequest; -class UpnpDiscovery : public QUdpSocket +class LIBGUH_EXPORT UpnpDiscovery : public QUdpSocket { Q_OBJECT public: diff --git a/libguh/network/upnpdiscovery/upnpdiscoveryrequest.h b/libguh/network/upnpdiscovery/upnpdiscoveryrequest.h index aa0065e3..9647cc79 100644 --- a/libguh/network/upnpdiscovery/upnpdiscoveryrequest.h +++ b/libguh/network/upnpdiscovery/upnpdiscoveryrequest.h @@ -23,13 +23,15 @@ #include #include + #include "upnpdiscovery.h" #include "upnpdevicedescriptor.h" +#include "libguh.h" #include "typeutils.h" class UpnpDiscovery; -class UpnpDiscoveryRequest : public QObject +class LIBGUH_EXPORT UpnpDiscoveryRequest : public QObject { Q_OBJECT public: diff --git a/libguh/plugin/device.h b/libguh/plugin/device.h index 29922a7d..16d56500 100644 --- a/libguh/plugin/device.h +++ b/libguh/plugin/device.h @@ -23,6 +23,7 @@ #define DEVICE_H #include "typeutils.h" +#include "libguh.h" #include "plugin/deviceclass.h" #include "types/state.h" @@ -32,7 +33,7 @@ #include #include -class Device: public QObject +class LIBGUH_EXPORT Device: public QObject { Q_OBJECT diff --git a/libguh/plugin/deviceclass.h b/libguh/plugin/deviceclass.h index a92cf50b..25907629 100644 --- a/libguh/plugin/deviceclass.h +++ b/libguh/plugin/deviceclass.h @@ -22,6 +22,7 @@ #ifndef DEVICECLASS_H #define DEVICECLASS_H +#include "libguh.h" #include "typeutils.h" #include "types/vendor.h" #include "types/eventtype.h" @@ -32,7 +33,7 @@ #include #include -class DeviceClass +class LIBGUH_EXPORT DeviceClass { Q_GADGET Q_ENUMS(CreateMethod) diff --git a/libguh/plugin/devicedescriptor.h b/libguh/plugin/devicedescriptor.h index 676aade6..e5db6bf0 100644 --- a/libguh/plugin/devicedescriptor.h +++ b/libguh/plugin/devicedescriptor.h @@ -22,12 +22,13 @@ #ifndef DEVICEDESCRIPTION_H #define DEVICEDESCRIPTION_H +#include "libguh.h" #include #include #include -class DeviceDescriptor +class LIBGUH_EXPORT DeviceDescriptor { public: DeviceDescriptor(); diff --git a/libguh/plugin/deviceplugin.h b/libguh/plugin/deviceplugin.h index fc7b709d..711041ad 100644 --- a/libguh/plugin/deviceplugin.h +++ b/libguh/plugin/deviceplugin.h @@ -25,7 +25,9 @@ #include "devicemanager.h" #include "deviceclass.h" +#include "libguh.h" #include "typeutils.h" + #include "types/event.h" #include "types/action.h" #include "types/vendor.h" @@ -41,7 +43,7 @@ class DeviceManager; class Device; -class DevicePlugin: public QObject +class LIBGUH_EXPORT DevicePlugin: public QObject { Q_OBJECT public: diff --git a/libguh/types/action.h b/libguh/types/action.h index cebb2878..9044f5e3 100644 --- a/libguh/types/action.h +++ b/libguh/types/action.h @@ -22,12 +22,13 @@ #ifndef ACTION_H #define ACTION_H +#include "libguh.h" #include "typeutils.h" #include "param.h" #include -class Action +class LIBGUH_EXPORT Action { public: explicit Action(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId()); diff --git a/libguh/types/actiontype.h b/libguh/types/actiontype.h index f64cb125..a7c05e45 100644 --- a/libguh/types/actiontype.h +++ b/libguh/types/actiontype.h @@ -22,12 +22,13 @@ #ifndef ACTIONTYPE_H #define ACTIONTYPE_H +#include "libguh.h" #include "typeutils.h" #include "paramtype.h" #include -class ActionType +class LIBGUH_EXPORT ActionType { public: ActionType(const ActionTypeId &id); diff --git a/libguh/types/event.h b/libguh/types/event.h index 96562f9d..8da4959b 100644 --- a/libguh/types/event.h +++ b/libguh/types/event.h @@ -22,6 +22,7 @@ #ifndef EVENT_H #define EVENT_H +#include "libguh.h" #include "typeutils.h" #include "types/param.h" @@ -29,7 +30,7 @@ #include #include -class Event +class LIBGUH_EXPORT Event { public: Event(); diff --git a/libguh/types/eventdescriptor.h b/libguh/types/eventdescriptor.h index 0a391752..ebe81199 100644 --- a/libguh/types/eventdescriptor.h +++ b/libguh/types/eventdescriptor.h @@ -22,6 +22,7 @@ #ifndef EVENTDESCRIPTOR_H #define EVENTDESCRIPTOR_H +#include "libguh.h" #include "typeutils.h" #include "paramdescriptor.h" #include "event.h" @@ -30,7 +31,7 @@ #include #include -class EventDescriptor +class LIBGUH_EXPORT EventDescriptor { public: EventDescriptor(const EventTypeId &eventTypeId, const DeviceId &deviceId, const QList ¶mDescriptors = QList()); @@ -51,6 +52,7 @@ private: DeviceId m_deviceId; QList m_paramDescriptors; }; + QDebug operator<<(QDebug dbg, const EventDescriptor &eventDescriptor); QDebug operator<<(QDebug dbg, const QList &eventDescriptors); diff --git a/libguh/types/eventtype.h b/libguh/types/eventtype.h index 4afa4de1..a818bda7 100644 --- a/libguh/types/eventtype.h +++ b/libguh/types/eventtype.h @@ -22,12 +22,13 @@ #ifndef TRIGGERTYPE_H #define TRIGGERTYPE_H +#include "libguh.h" #include "typeutils.h" #include "paramtype.h" #include -class EventType +class LIBGUH_EXPORT EventType { public: EventType(const EventTypeId &id); diff --git a/libguh/types/param.h b/libguh/types/param.h index 09b101eb..f5fa2450 100644 --- a/libguh/types/param.h +++ b/libguh/types/param.h @@ -22,10 +22,12 @@ #ifndef PARAM_H #define PARAM_H +#include "libguh.h" + #include #include -class Param +class LIBGUH_EXPORT Param { public: Param(const QString &name = QString(), const QVariant &value = QVariant()); @@ -46,7 +48,7 @@ private: Q_DECLARE_METATYPE(Param) QDebug operator<<(QDebug dbg, const Param ¶m); -class ParamList: public QList +class LIBGUH_EXPORT ParamList: public QList { public: bool hasParam(const QString ¶mName) const; diff --git a/libguh/types/paramdescriptor.h b/libguh/types/paramdescriptor.h index 964de83a..f7bc168f 100644 --- a/libguh/types/paramdescriptor.h +++ b/libguh/types/paramdescriptor.h @@ -22,10 +22,12 @@ #ifndef PARAMDESCRIPTOR_H #define PARAMDESCRIPTOR_H +#include "libguh.h" + #include "param.h" #include "typeutils.h" -class ParamDescriptor : public Param +class LIBGUH_EXPORT ParamDescriptor : public Param { public: ParamDescriptor(const QString &name, const QVariant &value = QVariant()); diff --git a/libguh/types/paramtype.h b/libguh/types/paramtype.h index b90ad0f0..35a3ddbb 100644 --- a/libguh/types/paramtype.h +++ b/libguh/types/paramtype.h @@ -24,9 +24,11 @@ #include #include + +#include "libguh.h" #include "typeutils.h" -class ParamType +class LIBGUH_EXPORT ParamType { public: ParamType(const QString &name, const QVariant::Type type, const QVariant &defaultValue = QVariant()); diff --git a/libguh/types/ruleaction.h b/libguh/types/ruleaction.h index 35df6024..92c4e61c 100644 --- a/libguh/types/ruleaction.h +++ b/libguh/types/ruleaction.h @@ -22,10 +22,11 @@ #ifndef RULEACTION_H #define RULEACTION_H +#include "libguh.h" #include "action.h" #include "ruleactionparam.h" -class RuleAction +class LIBGUH_EXPORT RuleAction { public: explicit RuleAction(const ActionTypeId &actionTypeId = ActionTypeId(), const DeviceId &deviceId = DeviceId()); diff --git a/libguh/types/ruleactionparam.h b/libguh/types/ruleactionparam.h index a26438ec..d8c3c1d9 100644 --- a/libguh/types/ruleactionparam.h +++ b/libguh/types/ruleactionparam.h @@ -27,9 +27,10 @@ #include #include "param.h" +#include "libguh.h" #include "typeutils.h" -class RuleActionParam +class LIBGUH_EXPORT RuleActionParam { public: RuleActionParam(const Param ¶m); @@ -60,7 +61,7 @@ private: Q_DECLARE_METATYPE(RuleActionParam) QDebug operator<<(QDebug dbg, const RuleActionParam &ruleActionParam); -class RuleActionParamList: public QList +class LIBGUH_EXPORT RuleActionParamList: public QList { public: bool hasParam(const QString &ruleActionParamName) const; diff --git a/libguh/types/state.h b/libguh/types/state.h index 012d2273..1e9a0b9e 100644 --- a/libguh/types/state.h +++ b/libguh/types/state.h @@ -22,12 +22,13 @@ #ifndef STATE_H #define STATE_H +#include "libguh.h" #include "typeutils.h" #include #include -class State +class LIBGUH_EXPORT State { public: State(const StateTypeId &stateTypeId, const DeviceId &deviceId); diff --git a/libguh/types/statedescriptor.h b/libguh/types/statedescriptor.h index 0b28de0b..ee96d4ce 100644 --- a/libguh/types/statedescriptor.h +++ b/libguh/types/statedescriptor.h @@ -22,6 +22,7 @@ #ifndef STATEDESCRIPTOR_H #define STATEDESCRIPTOR_H +#include "libguh.h" #include "typeutils.h" #include "paramdescriptor.h" #include "state.h" @@ -31,7 +32,7 @@ #include #include -class StateDescriptor +class LIBGUH_EXPORT StateDescriptor { public: StateDescriptor(); @@ -55,6 +56,7 @@ private: QVariant m_stateValue; Types::ValueOperator m_operatorType; }; + QDebug operator<<(QDebug dbg, const StateDescriptor &eventDescriptor); QDebug operator<<(QDebug dbg, const QList &eventDescriptors); diff --git a/libguh/types/statetype.h b/libguh/types/statetype.h index 28737edb..461aca4a 100644 --- a/libguh/types/statetype.h +++ b/libguh/types/statetype.h @@ -22,11 +22,12 @@ #ifndef STATETYPE_H #define STATETYPE_H +#include "libguh.h" #include "typeutils.h" #include -class StateType +class LIBGUH_EXPORT StateType { public: StateType(const StateTypeId &id); diff --git a/libguh/types/vendor.h b/libguh/types/vendor.h index 90e7f007..510748af 100644 --- a/libguh/types/vendor.h +++ b/libguh/types/vendor.h @@ -22,11 +22,12 @@ #ifndef VENDOR_H #define VENDOR_H +#include "libguh.h" #include "typeutils.h" #include -class Vendor +class LIBGUH_EXPORT Vendor { public: Vendor(const VendorId &id, const QString &name = QString()); diff --git a/libguh/typeutils.h b/libguh/typeutils.h index 3a8453f9..0a4fe19b 100644 --- a/libguh/typeutils.h +++ b/libguh/typeutils.h @@ -25,6 +25,8 @@ #include #include +#include "libguh.h" + #define DECLARE_TYPE_ID(type) class type##Id: public QUuid \ { \ public: \ @@ -38,7 +40,6 @@ public: \ }; \ Q_DECLARE_METATYPE(type##Id); - DECLARE_TYPE_ID(Vendor) DECLARE_TYPE_ID(DeviceClass) DECLARE_TYPE_ID(Device) @@ -55,7 +56,7 @@ DECLARE_TYPE_ID(Rule) DECLARE_TYPE_ID(PairingTransaction) -class Types +class LIBGUH_EXPORT Types { Q_GADGET Q_ENUMS(InputType) diff --git a/plugins/deviceplugins/genericelements/deviceplugingenericelements.json b/plugins/deviceplugins/genericelements/deviceplugingenericelements.json index e2ecb1ec..b69b6e28 100644 --- a/plugins/deviceplugins/genericelements/deviceplugingenericelements.json +++ b/plugins/deviceplugins/genericelements/deviceplugingenericelements.json @@ -1,4 +1,4 @@ -{ + { "name": "Generic Elements", "idName": "GenericElements", "id": "6e22161e-39b7-4416-8623-39e730721efb",