diff --git a/doc/plugin-json.qdoc b/doc/plugin-json.qdoc index efe5d2cf..710255d0 100644 --- a/doc/plugin-json.qdoc +++ b/doc/plugin-json.qdoc @@ -150,6 +150,9 @@ "name": "The name of the device class", "idName": "deviceClassName", "deviceClassId": "uuid", + "basicTags": [ + "BasicTag" + ], "createMethods": [ "CreateMethod" ], @@ -177,6 +180,14 @@ \li - \underline{\e name:} The visible name of the \l{DeviceClass} \unicode{0x2192} \l{DeviceClass::name()} \li - \underline{\e idName:} This parameter will be used to define the DeviceClassId variable named DeviceClassId in the plugininfo.h, so it can be used in the code. \li - \underline{\e deviceClassesId:} The actual uuid (\l{DeviceClassId}) of the \l{DeviceClass} \unicode{0x2192} \l{DeviceClass::id()}. + \li - \underline{\e basicTags:} A list of \l{Types::BasicTag}{BasicTags} for this device \unicode{0x2192} \l{DeviceClass::basicTags()}. A \l{DeviceClass} can have multiple \l{Types::BasicTag}{BasicTags} which describe the basic category of the DeviceClass. A \l{DeviceClass} should be eighter a Service or a Device, never both. See enum \l{Types::BasicTag} for more information. The expected value for the \e basicTags parameters matches the enum name like this: + + \tt {Types::BasicTagService} \unicode{0x2192} \tt {"basicTags": [ "Service" ]} + + \tt {Types::BasicTagLighting} \unicode{0x2192} \tt {"basicTags": [ "Lighting" ]} + + \tt ... + \li - \underline{\e createMethods:} A list of possible \l{DeviceClass::CreateMethod}{CreateMethods} for this device \unicode{0x2192} \l{DeviceClass::createMethods()}. Some devices can be created in different ways. Possible values are: \list \li \e user \unicode{0x2192} \l{DeviceClass::CreateMethodUser} diff --git a/doc/typeutils.qdoc b/doc/typeutils.qdoc index c68295f3..f4da6ab1 100644 --- a/doc/typeutils.qdoc +++ b/doc/typeutils.qdoc @@ -52,7 +52,6 @@ \li The \tt >= operator to compare two \a values of a \l{Param}. \endtable - \chapter Types::InputType \table \header @@ -102,6 +101,87 @@ \endtable + \chapter Types::BasicTag + A \l{DeviceClass} can have multiple \l{Types::BasicTag}{BasicTags} which describe the basic category of the DeviceClass. A \l{DeviceClass} should be at least a \tt Service or a \tt Device, never both. + \table + \header + \li Constant + \li Value + \li Description + \row + \li Types::BasicTagService + \li 0 + \li The \l{DeviceClass} describes a service. + \row + \li Types::BasicTagDevice + \li 1 + \li The \l{DeviceClass} describes a real device. + \row + \li Types::BasicTagSensor + \li 2 + \li The \l{DeviceClass} describes a sensor. Any device which can measure or detect something is a sensor. + \row + \li Types::BasicTagActuator + \li 3 + \li The \l{DeviceClass} describes an actuator. Any device which can do something is an actuator. + \row + \li Types::BasicTagLighting + \li 4 + \li The \l{DeviceClass} describes a lighting device. + \row + \li Types::BasicTagEnergy + \li 5 + \li The \l{DeviceClass} describes an energy device. + \row + \li Types::BasicTagMultimedia + \li 6 + \li The \l{DeviceClass} describes a multimedia device. + \row + \li Types::BasicTagWeather + \li 7 + \li The \l{DeviceClass} describes a weather service/device. + \row + \li Types::BasicTagGateway + \li 8 + \li The \l{DeviceClass} describes a gateway device. + \row + \li Types::BasicTagHeating + \li 9 + \li The \l{DeviceClass} describes a heating device. + \row + \li Types::BasicTagCooling + \li 10 + \li The \l{DeviceClass} describes a cooling device. + \row + \li Types::BasicTagNotification + \li 11 + \li The \l{DeviceClass} describes a notification device/service. + \row + \li Types::BasicTagSecurity + \li 12 + \li The \l{DeviceClass} describes a security device/service. + \row + \li Types::BasicTagTime + \li 13 + \li The \l{DeviceClass} describes a time device/service. + \row + \li Types::BasicTagShading + \li 14 + \li The \l{DeviceClass} describes a shading device. + \row + \li Types::BasicTagAppliance + \li 15 + \li The \l{DeviceClass} describes an appliance. + \row + \li Types::BasicTagCamera + \li 16 + \li The \l{DeviceClass} describes a camera device. + \row + \li Types::BasicTagLock + \li 17 + \li The \l{DeviceClass} describes a lock device. + \endtable + \chapter Types::Unit \table \header diff --git a/libguh/plugin/deviceclass.cpp b/libguh/plugin/deviceclass.cpp index 224a1a51..b9d87b3f 100644 --- a/libguh/plugin/deviceclass.cpp +++ b/libguh/plugin/deviceclass.cpp @@ -111,13 +111,19 @@ void DeviceClass::setName(const QString &name) m_name = name; } -/*! Returns the list of basicTags of this DeviceClass. */ +/*! Returns the list of basicTags of this DeviceClass. + + \sa Types::BasicTag +*/ QList DeviceClass::basicTags() const { return m_basicTags; } -/*! Set the list of \a basicTags of this DeviceClass. */ +/*! Set the list of \a basicTags of this DeviceClass. + + \sa Types::BasicTag +*/ void DeviceClass::setBasicTags(const QList &basicTags) { m_basicTags = basicTags;