update plugin compiler

pull/135/head
Simon Stürz 2017-03-06 20:52:30 +01:00 committed by Michael Zanetti
parent 8d648b7eb8
commit b9053a31ae
8 changed files with 406 additions and 319 deletions

View File

@ -1,6 +1,6 @@
.\" Manpage for guh-generateplugininfo.
.\" Contact simon.stuerz@guh.io to correct errors or typos.
.TH man 1 "September 2016" "1.0" "guh-generateplugininfo man page"
.TH man 1 "March 2017" "1.0.1" "guh-generateplugininfo man page"
.SH NAME
guh-generateplugininfo \- A precompiler for building guh plugins.
.SH SYNOPSIS
@ -18,6 +18,9 @@ Displays this help.
\fB\-v\fR, \fB\-\-version\fR
Displays version information.
.TP
\fB\-f\fR, \fB\-\-filetype\fR, \fB{e, i}\fR
The file type to generate: e = extern infofile, i = infofile.
.TP
\fB\-j\fR, \fB\-\-jsonfile\fR, \fB\<jsonfile>\fR
The JSON input file name with the plugin description.
.TP
@ -42,7 +45,7 @@ How to report bugs: <https://github.com/guh/guh/wiki/Reporting-bugs>
.SH AUTHOR
Written by Simon Stürz
.SH COPYRIGHT
Copyright \(co 2014-2016 guh GmbH.
Copyright \(co 2014-2017 guh GmbH.
.br
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.

4
debian/man/guhd.1 vendored
View File

@ -1,6 +1,6 @@
.\" Manpage for guhd.
.\" Contact simon.stuerz@guh.io to correct errors or typos.
.TH man 1 "June 2016" "1.7" "guhd man page"
.TH man 1 "March 2017" "1.8" "guhd man page"
.SH NAME
guhd \- An open source IoT (Internet of Things) server
.SH SYNOPSIS
@ -106,7 +106,7 @@ How to report bugs: <https://github.com/guh/guh/wiki/Reporting-bugs>
.SH AUTHOR
Written by Simon Stürz and Michael Zanetti
.SH COPYRIGHT
Copyright \(co 2014-2016 guh GmbH.
Copyright \(co 2014-2017 guh GmbH.
.br
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.

View File

@ -256,7 +256,7 @@ DeviceManager::DeviceError DevicePluginMock::executeAction(Device *device, const
device->setStateValue(doubleStateTypeId, action.param(doubleStateParamTypeId).value().toDouble());
return DeviceManager::DeviceErrorNoError;
} else if (action.actionTypeId() == boolActionTypeId) {
device->setStateValue(boolStateTypeId, action.param(boolStateParamTypeId).value().toBool());
device->setStateValue(boolValueStateTypeId, action.param(boolValueStateParamTypeId).value().toBool());
return DeviceManager::DeviceErrorNoError;
} else if (action.actionTypeId() == timeoutActionTypeId) {
return DeviceManager::DeviceErrorAsync;

View File

@ -91,7 +91,7 @@
},
{
"id": "9dd6a97c-dfd1-43dc-acbd-367932742310",
"idName": "bool",
"idName": "boolValue",
"name": "Dummy bool state",
"eventTypeName": "Dummy bool state changed",
"index": 1,
@ -223,7 +223,7 @@
},
{
"id": "9dd6a97c-dfd1-43dc-acbd-367932742310",
"idName": "bool",
"idName": "boolValue",
"name": "Dummy bool state",
"eventTypeName": "Dummy bool state changed",
"index": 1,

View File

@ -4,7 +4,7 @@
<context>
<name>DevicePluginMock</name>
<message>
<location filename="../devicepluginmock.cpp" line="215"/>
<location filename="../devicepluginmock.cpp" line="217"/>
<source>Display pin!! The pin is 243681</source>
<translation>Pin anzeigen!! Der pin lautet 243581</translation>
</message>
@ -12,230 +12,230 @@
<context>
<name>MockDevice</name>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="97"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="100"/>
<source>guh</source>
<extracomment>The name of the vendor (2062d64d-3232-433c-88bc-0d33c0ba2ba6)</extracomment>
<translation>guh</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="100"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="103"/>
<source>Mock Device</source>
<extracomment>The name of the DeviceClass (753f0d32-0468-4d08-82ed-1964aab03298)</extracomment>
<translation>Mock Gerät</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="103"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="106"/>
<source>http port</source>
<extracomment>The name of the paramType (d4f06047-125e-4479-9810-b54c189917f5) of Mock Device</extracomment>
<translation>HTTP Port</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="139"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="142"/>
<source>Mock Action 3 (async)</source>
<extracomment>The name of the ActionType fbae06d3-7666-483e-a39e-ec50fe89054e of deviceClass Mock Device</extracomment>
<translation>Mock Aktion 3 (async)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="142"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="145"/>
<source>Mock Action 4 (broken)</source>
<extracomment>The name of the ActionType df3cf33d-26d5-4577-9132-9823bd33fad0 of deviceClass Mock Device</extracomment>
<translation>Mock Aktion 4 (kaputt)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="145"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="148"/>
<source>Mock Action 5 (async, broken)</source>
<extracomment>The name of the ActionType bfe89a1d-3497-4121-8318-e77c37537219 of deviceClass Mock Device</extracomment>
<translation>Mock Aktion 5 (async, kaputt)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="151"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="154"/>
<source>Mock Device (Auto created)</source>
<extracomment>The name of the DeviceClass (ab4257b3-7548-47ee-9bd4-7dc3004fd197)</extracomment>
<translation>Mock Gerät (Auto erstellt)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="163"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="166"/>
<source>Mock Device (Push Button)</source>
<extracomment>The name of the DeviceClass (9e03144c-e436-4eea-82d9-ccb33ef778db)</extracomment>
<translation>Mock Gerät (Drückknopf)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="160"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="163"/>
<source>Wait 3 second before you continue, the push button will be pressed automatically.</source>
<extracomment>The pairing info of deviceClass Mock Device (Push Button)</extracomment>
<translation>Warte 3 Sekunden bevor du fortfährst, the Knopf wird automatisch gerückt.</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="91"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="94"/>
<source>configParamInt</source>
<extracomment>The name of the paramType (e1f72121-a426-45e2-b475-8262b5cdf103) of Mock Devices</extracomment>
<translation>configParamInt</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="94"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="97"/>
<source>configParamBool</source>
<extracomment>The name of the paramType (c75723b6-ea4f-4982-9751-6c5e39c88145) of Mock Devices</extracomment>
<translation>configParamBool</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="106"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="109"/>
<source>async</source>
<extracomment>The name of the paramType (f2977061-4dd0-4ef5-85aa-3b7134743be3) of Mock Device</extracomment>
<translation>async</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="109"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="112"/>
<source>broken</source>
<extracomment>The name of the paramType (ae8f8901-f2c1-42a5-8111-6d2fc8e4c1e4) of Mock Device</extracomment>
<translation>kaputt</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="112"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="115"/>
<source>resultCount</source>
<extracomment>The name of the paramType (d222adb4-2f9c-4c3f-8655-76400d0fb6ce) of Mock Device</extracomment>
<translation>Resultat Anzahl</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="115"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="118"/>
<source>Dummy int state changed</source>
<extracomment>The name of the autocreated EventType (80baec19-54de-4948-ac46-31eabfaceb83)</extracomment>
<translation>Int Zustand verändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="118"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="121"/>
<source>Dummy int state</source>
<extracomment>The name of the ParamType of StateType (80baec19-54de-4948-ac46-31eabfaceb83) of DeviceClass Mock Device</extracomment>
<translation>Dummy Int Zustand</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="121"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="124"/>
<source>Dummy bool state changed</source>
<extracomment>The name of the autocreated EventType (9dd6a97c-dfd1-43dc-acbd-367932742310)</extracomment>
<translation>Bool Zustand verändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="124"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="127"/>
<source>Dummy bool state</source>
<extracomment>The name of the ParamType of StateType (9dd6a97c-dfd1-43dc-acbd-367932742310) of DeviceClass Mock Device</extracomment>
<translation>Dummy Bool Zustand</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="127"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="130"/>
<source>Mock Action 1 (with params)</source>
<extracomment>The name of the ActionType dea0f4e1-65e3-4981-8eaa-2701c53a9185 of deviceClass Mock Device</extracomment>
<translation>Mock Aktion 1 (Mit Parametern)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="130"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="133"/>
<source>mockActionParam1</source>
<extracomment>The name of the paramType (a2d3a256-a551-4712-a65b-ecd5a436a1cb) of Mock Device</extracomment>
<translation>mockActionParam1</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="133"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="136"/>
<source>mockActionParam2</source>
<extracomment>The name of the paramType (304a4899-18be-4e3b-94f4-d03be52f3233) of Mock Device</extracomment>
<translation>mockActionParam2</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="136"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="139"/>
<source>Mock Action 2 (without params)</source>
<extracomment>The name of the ActionType defd3ed6-1a0d-400b-8879-a0202cf39935 of deviceClass Mock Device</extracomment>
<translation>Mock Aktion (ohne Parameter</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="148"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="151"/>
<source>mockParamInt</source>
<extracomment>The name of the paramType (0550e16d-60b9-4ba5-83f4-4d3cee656121) of Mock Device</extracomment>
<translation>mockParamInt</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="154"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="157"/>
<source>Mock Event 1</source>
<extracomment>The name of the EventType 45bf3752-0fc6-46b9-89fd-ffd878b5b22b of deviceClass Mock Device (Auto created)</extracomment>
<translation>Mock Event 1</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="157"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="160"/>
<source>Mock Event 2</source>
<extracomment>The name of the EventType 863d5920-b1cf-4eb9-88bd-8f7b8583b1cf of deviceClass Mock Device (Auto created)</extracomment>
<translation>Mock Event 2</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="166"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="169"/>
<source>color changed</source>
<extracomment>The name of the autocreated EventType (20dc7c22-c50e-42db-837c-2bbced939f8e)</extracomment>
<translation>Farbe geändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="169"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="172"/>
<source>color</source>
<extracomment>The name of the ParamType of StateType (20dc7c22-c50e-42db-837c-2bbced939f8e) of DeviceClass Mock Device (Push Button)</extracomment>
<translation>Farbe</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="172"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="175"/>
<source>Set color</source>
<extracomment>The name of the autocreated ActionType (20dc7c22-c50e-42db-837c-2bbced939f8e)</extracomment>
<translation>Setze Farbe</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="175"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="178"/>
<source>percentage changed</source>
<extracomment>The name of the autocreated EventType (72981c04-267a-4ba0-a59e-9921d2f3af9c)</extracomment>
<translation>Prozent gändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="178"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="181"/>
<source>percentage</source>
<extracomment>The name of the ParamType of StateType (72981c04-267a-4ba0-a59e-9921d2f3af9c) of DeviceClass Mock Device (Push Button)</extracomment>
<translation>Prozent</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="181"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="184"/>
<source>Set percentage</source>
<extracomment>The name of the autocreated ActionType (72981c04-267a-4ba0-a59e-9921d2f3af9c)</extracomment>
<translation>Setze Prozentwert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="184"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="187"/>
<source>allowed values changed</source>
<extracomment>The name of the autocreated EventType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b)</extracomment>
<translation>Erlaubter Wert geändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="187"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="190"/>
<source>allowed values</source>
<extracomment>The name of the ParamType of StateType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) of DeviceClass Mock Device (Push Button)</extracomment>
<translation>Erlaubte Werte</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="190"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="193"/>
<source>Set allowed values</source>
<extracomment>The name of the autocreated ActionType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b)</extracomment>
<translation>Setze erlaubten Wert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="193"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="196"/>
<source>double value changed</source>
<extracomment>The name of the autocreated EventType (53cd7c55-49b7-441b-b970-9048f20f0e2c)</extracomment>
<translation>Double Wert geändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="196"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="199"/>
<source>double value</source>
<extracomment>The name of the ParamType of StateType (53cd7c55-49b7-441b-b970-9048f20f0e2c) of DeviceClass Mock Device (Push Button)</extracomment>
<translation>Double Wert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="199"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="202"/>
<source>Set double value</source>
<extracomment>The name of the autocreated ActionType (53cd7c55-49b7-441b-b970-9048f20f0e2c)</extracomment>
<translation>Setze double Wert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="202"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="226"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="211"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="235"/>
<source>Set bool value</source>
<extracomment>The name of the autocreated ActionType (e680f7a4-b39e-46da-be41-fa3170fe3768)
----------
@ -243,121 +243,127 @@ The name of the autocreated ActionType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</e
<translation>Setze boll Wert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="205"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="214"/>
<source>Timeout action</source>
<extracomment>The name of the ActionType 54646e7c-bc54-4895-81a2-590d72d120f9 of deviceClass Mock Device (Push Button)</extracomment>
<translation>Timeout Aktion</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="211"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="220"/>
<source>Mock Device (Display Pin)</source>
<extracomment>The name of the DeviceClass (296f1fd4-e893-46b2-8a42-50d1bceb8730)</extracomment>
<translation>Mock Gerät (Pin anzeigen)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="220"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="205"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="229"/>
<source>bool value changed</source>
<extracomment>The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</extracomment>
<extracomment>The name of the autocreated EventType (e680f7a4-b39e-46da-be41-fa3170fe3768)
----------
The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</extracomment>
<translation>Bool Wert geändert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="223"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="208"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="232"/>
<source>bool value</source>
<extracomment>The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of DeviceClass Mock Device (Parent)</extracomment>
<extracomment>The name of the ParamType of StateType (e680f7a4-b39e-46da-be41-fa3170fe3768) of DeviceClass Mock Device (Push Button)
----------
The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of DeviceClass Mock Device (Parent)</extracomment>
<translation>Bool Wert</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="238"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="247"/>
<source>Text line</source>
<extracomment>The name of the paramType (e6acf0c7-4b8e-4296-ac62-855d20deb816) of Mock Device (InputTypes)</extracomment>
<translation>Textzeile</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="241"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="250"/>
<source>Text area</source>
<extracomment>The name of the paramType (716f0994-bc01-42b0-b64d-59236f7320d2) of Mock Device (InputTypes)</extracomment>
<translation>Textfeld</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="244"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="253"/>
<source>Password text</source>
<extracomment>The name of the paramType (e5c0d14b-c9f1-4aca-a56e-85bfa6977150) of Mock Device (InputTypes)</extracomment>
<translation>Passwort Text</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="247"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="256"/>
<source>Search text</source>
<extracomment>The name of the paramType (22add8c9-ee4f-43ad-8931-58e999313ac3) of Mock Device (InputTypes)</extracomment>
<translation>Suchtext</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="250"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="259"/>
<source>Mail address</source>
<extracomment>The name of the paramType (a8494faf-3a0f-4cf3-84b7-4b39148a838d) of Mock Device (InputTypes)</extracomment>
<translation>Mail Adresse</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="253"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="262"/>
<source>IPv4 address</source>
<extracomment>The name of the paramType (9e5f86a0-4bb3-4892-bff8-3fc4032af6e2) of Mock Device (InputTypes)</extracomment>
<translation>IPv4 Adresse</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="256"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="265"/>
<source>IPv6 address</source>
<extracomment>The name of the paramType (43bf3832-dd48-4090-a836-656e8b60216e) of Mock Device (InputTypes)</extracomment>
<translation>IPv6 Adresse</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="259"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="268"/>
<source>URL</source>
<extracomment>The name of the paramType (fa67229f-fcef-496f-b671-59a4b48f3ab5) of Mock Device (InputTypes)</extracomment>
<translation>URL</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="262"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="271"/>
<source>Mac address</source>
<extracomment>The name of the paramType (e93db587-7919-48f3-8c88-1651de63c765) of Mock Device (InputTypes)</extracomment>
<translation>Mac Adresse</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="208"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="217"/>
<source>Please enter the secret which normaly will be displayed on the device. For the mockdevice the pin is 243681.</source>
<extracomment>The pairing info of deviceClass Mock Device (Display Pin)</extracomment>
<translation>Bitte geben sie den Pincode ein der normalerweise auf dem Gerät angezeit werden würde. In diesem fall lautet der Pincode 243681.</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="88"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="91"/>
<source>Mock Devices</source>
<extracomment>The name of the plugin Mock Devices (727a4a9a-c187-446f-aadf-f1b2220607d1)</extracomment>
<translation>Mock Gerät</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="214"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="223"/>
<source>pin</source>
<extracomment>The name of the paramType (da820e07-22dc-4173-9c07-2f49a4e265f9) of Mock Device (Display Pin)</extracomment>
<translation>Pin</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="217"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="226"/>
<source>Mock Device (Parent)</source>
<extracomment>The name of the DeviceClass (a71fbde9-9a38-4bf8-beab-c8aade2608ba)</extracomment>
<translation>Mock Gerät (Elternteil)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="229"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="238"/>
<source>Mock Device (Child)</source>
<extracomment>The name of the DeviceClass (40893c9f-bc47-40c1-8bf7-b390c7c1b4fc)</extracomment>
<translation>Mock Gerät (Kind)</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="232"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="241"/>
<source>parent uuid</source>
<extracomment>The name of the paramType (104b5288-404e-42d3-bf38-e40682e75681) of Mock Device (Child)</extracomment>
<translation>Elternteil Uuid</translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="235"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="244"/>
<source>Mock Device (InputTypes)</source>
<extracomment>The name of the DeviceClass (515ffdf1-55e5-498d-9abc-4e2fe768f3a9)</extracomment>
<translation>Mock Gerät (Eingabemethoden)</translation>

View File

@ -4,7 +4,7 @@
<context>
<name>DevicePluginMock</name>
<message>
<location filename="../devicepluginmock.cpp" line="215"/>
<location filename="../devicepluginmock.cpp" line="217"/>
<source>Display pin!! The pin is 243681</source>
<translation type="unfinished"></translation>
</message>
@ -12,230 +12,230 @@
<context>
<name>MockDevice</name>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="97"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="100"/>
<source>guh</source>
<extracomment>The name of the vendor (2062d64d-3232-433c-88bc-0d33c0ba2ba6)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="100"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="103"/>
<source>Mock Device</source>
<extracomment>The name of the DeviceClass (753f0d32-0468-4d08-82ed-1964aab03298)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="103"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="106"/>
<source>http port</source>
<extracomment>The name of the paramType (d4f06047-125e-4479-9810-b54c189917f5) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="139"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="142"/>
<source>Mock Action 3 (async)</source>
<extracomment>The name of the ActionType fbae06d3-7666-483e-a39e-ec50fe89054e of deviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="142"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="145"/>
<source>Mock Action 4 (broken)</source>
<extracomment>The name of the ActionType df3cf33d-26d5-4577-9132-9823bd33fad0 of deviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="145"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="148"/>
<source>Mock Action 5 (async, broken)</source>
<extracomment>The name of the ActionType bfe89a1d-3497-4121-8318-e77c37537219 of deviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="151"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="154"/>
<source>Mock Device (Auto created)</source>
<extracomment>The name of the DeviceClass (ab4257b3-7548-47ee-9bd4-7dc3004fd197)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="163"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="166"/>
<source>Mock Device (Push Button)</source>
<extracomment>The name of the DeviceClass (9e03144c-e436-4eea-82d9-ccb33ef778db)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="160"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="163"/>
<source>Wait 3 second before you continue, the push button will be pressed automatically.</source>
<extracomment>The pairing info of deviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="91"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="94"/>
<source>configParamInt</source>
<extracomment>The name of the paramType (e1f72121-a426-45e2-b475-8262b5cdf103) of Mock Devices</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="94"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="97"/>
<source>configParamBool</source>
<extracomment>The name of the paramType (c75723b6-ea4f-4982-9751-6c5e39c88145) of Mock Devices</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="106"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="109"/>
<source>async</source>
<extracomment>The name of the paramType (f2977061-4dd0-4ef5-85aa-3b7134743be3) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="109"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="112"/>
<source>broken</source>
<extracomment>The name of the paramType (ae8f8901-f2c1-42a5-8111-6d2fc8e4c1e4) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="112"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="115"/>
<source>resultCount</source>
<extracomment>The name of the paramType (d222adb4-2f9c-4c3f-8655-76400d0fb6ce) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="115"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="118"/>
<source>Dummy int state changed</source>
<extracomment>The name of the autocreated EventType (80baec19-54de-4948-ac46-31eabfaceb83)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="118"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="121"/>
<source>Dummy int state</source>
<extracomment>The name of the ParamType of StateType (80baec19-54de-4948-ac46-31eabfaceb83) of DeviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="121"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="124"/>
<source>Dummy bool state changed</source>
<extracomment>The name of the autocreated EventType (9dd6a97c-dfd1-43dc-acbd-367932742310)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="124"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="127"/>
<source>Dummy bool state</source>
<extracomment>The name of the ParamType of StateType (9dd6a97c-dfd1-43dc-acbd-367932742310) of DeviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="127"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="130"/>
<source>Mock Action 1 (with params)</source>
<extracomment>The name of the ActionType dea0f4e1-65e3-4981-8eaa-2701c53a9185 of deviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="130"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="133"/>
<source>mockActionParam1</source>
<extracomment>The name of the paramType (a2d3a256-a551-4712-a65b-ecd5a436a1cb) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="133"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="136"/>
<source>mockActionParam2</source>
<extracomment>The name of the paramType (304a4899-18be-4e3b-94f4-d03be52f3233) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="136"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="139"/>
<source>Mock Action 2 (without params)</source>
<extracomment>The name of the ActionType defd3ed6-1a0d-400b-8879-a0202cf39935 of deviceClass Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="148"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="151"/>
<source>mockParamInt</source>
<extracomment>The name of the paramType (0550e16d-60b9-4ba5-83f4-4d3cee656121) of Mock Device</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="154"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="157"/>
<source>Mock Event 1</source>
<extracomment>The name of the EventType 45bf3752-0fc6-46b9-89fd-ffd878b5b22b of deviceClass Mock Device (Auto created)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="157"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="160"/>
<source>Mock Event 2</source>
<extracomment>The name of the EventType 863d5920-b1cf-4eb9-88bd-8f7b8583b1cf of deviceClass Mock Device (Auto created)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="166"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="169"/>
<source>color changed</source>
<extracomment>The name of the autocreated EventType (20dc7c22-c50e-42db-837c-2bbced939f8e)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="169"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="172"/>
<source>color</source>
<extracomment>The name of the ParamType of StateType (20dc7c22-c50e-42db-837c-2bbced939f8e) of DeviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="172"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="175"/>
<source>Set color</source>
<extracomment>The name of the autocreated ActionType (20dc7c22-c50e-42db-837c-2bbced939f8e)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="175"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="178"/>
<source>percentage changed</source>
<extracomment>The name of the autocreated EventType (72981c04-267a-4ba0-a59e-9921d2f3af9c)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="178"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="181"/>
<source>percentage</source>
<extracomment>The name of the ParamType of StateType (72981c04-267a-4ba0-a59e-9921d2f3af9c) of DeviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="181"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="184"/>
<source>Set percentage</source>
<extracomment>The name of the autocreated ActionType (72981c04-267a-4ba0-a59e-9921d2f3af9c)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="184"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="187"/>
<source>allowed values changed</source>
<extracomment>The name of the autocreated EventType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="187"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="190"/>
<source>allowed values</source>
<extracomment>The name of the ParamType of StateType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) of DeviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="190"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="193"/>
<source>Set allowed values</source>
<extracomment>The name of the autocreated ActionType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="193"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="196"/>
<source>double value changed</source>
<extracomment>The name of the autocreated EventType (53cd7c55-49b7-441b-b970-9048f20f0e2c)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="196"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="199"/>
<source>double value</source>
<extracomment>The name of the ParamType of StateType (53cd7c55-49b7-441b-b970-9048f20f0e2c) of DeviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="199"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="202"/>
<source>Set double value</source>
<extracomment>The name of the autocreated ActionType (53cd7c55-49b7-441b-b970-9048f20f0e2c)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="202"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="226"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="211"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="235"/>
<source>Set bool value</source>
<extracomment>The name of the autocreated ActionType (e680f7a4-b39e-46da-be41-fa3170fe3768)
----------
@ -243,121 +243,127 @@ The name of the autocreated ActionType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</e
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="205"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="214"/>
<source>Timeout action</source>
<extracomment>The name of the ActionType 54646e7c-bc54-4895-81a2-590d72d120f9 of deviceClass Mock Device (Push Button)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="211"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="220"/>
<source>Mock Device (Display Pin)</source>
<extracomment>The name of the DeviceClass (296f1fd4-e893-46b2-8a42-50d1bceb8730)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="220"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="205"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="229"/>
<source>bool value changed</source>
<extracomment>The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</extracomment>
<extracomment>The name of the autocreated EventType (e680f7a4-b39e-46da-be41-fa3170fe3768)
----------
The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="223"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="208"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="232"/>
<source>bool value</source>
<extracomment>The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of DeviceClass Mock Device (Parent)</extracomment>
<extracomment>The name of the ParamType of StateType (e680f7a4-b39e-46da-be41-fa3170fe3768) of DeviceClass Mock Device (Push Button)
----------
The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of DeviceClass Mock Device (Parent)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="238"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="247"/>
<source>Text line</source>
<extracomment>The name of the paramType (e6acf0c7-4b8e-4296-ac62-855d20deb816) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="241"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="250"/>
<source>Text area</source>
<extracomment>The name of the paramType (716f0994-bc01-42b0-b64d-59236f7320d2) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="244"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="253"/>
<source>Password text</source>
<extracomment>The name of the paramType (e5c0d14b-c9f1-4aca-a56e-85bfa6977150) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="247"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="256"/>
<source>Search text</source>
<extracomment>The name of the paramType (22add8c9-ee4f-43ad-8931-58e999313ac3) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="250"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="259"/>
<source>Mail address</source>
<extracomment>The name of the paramType (a8494faf-3a0f-4cf3-84b7-4b39148a838d) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="253"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="262"/>
<source>IPv4 address</source>
<extracomment>The name of the paramType (9e5f86a0-4bb3-4892-bff8-3fc4032af6e2) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="256"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="265"/>
<source>IPv6 address</source>
<extracomment>The name of the paramType (43bf3832-dd48-4090-a836-656e8b60216e) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="259"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="268"/>
<source>URL</source>
<extracomment>The name of the paramType (fa67229f-fcef-496f-b671-59a4b48f3ab5) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="262"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="271"/>
<source>Mac address</source>
<extracomment>The name of the paramType (e93db587-7919-48f3-8c88-1651de63c765) of Mock Device (InputTypes)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="208"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="217"/>
<source>Please enter the secret which normaly will be displayed on the device. For the mockdevice the pin is 243681.</source>
<extracomment>The pairing info of deviceClass Mock Device (Display Pin)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="88"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="91"/>
<source>Mock Devices</source>
<extracomment>The name of the plugin Mock Devices (727a4a9a-c187-446f-aadf-f1b2220607d1)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="214"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="223"/>
<source>pin</source>
<extracomment>The name of the paramType (da820e07-22dc-4173-9c07-2f49a4e265f9) of Mock Device (Display Pin)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="217"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="226"/>
<source>Mock Device (Parent)</source>
<extracomment>The name of the DeviceClass (a71fbde9-9a38-4bf8-beab-c8aade2608ba)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="229"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="238"/>
<source>Mock Device (Child)</source>
<extracomment>The name of the DeviceClass (40893c9f-bc47-40c1-8bf7-b390c7c1b4fc)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="232"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="241"/>
<source>parent uuid</source>
<extracomment>The name of the paramType (104b5288-404e-42d3-bf38-e40682e75681) of Mock Device (Child)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="235"/>
<location filename="../../../../../build-guh-Desktop-Debug/plugins/deviceplugins/mock/plugininfo.h" line="244"/>
<source>Mock Device (InputTypes)</source>
<extracomment>The name of the DeviceClass (515ffdf1-55e5-498d-9abc-4e2fe768f3a9)</extracomment>
<translation type="unfinished"></translation>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (C) 2015-2016 Simon Stuerz <simon.stuerz@guh.io> #
# Copyright (C) 2015-2017 Simon Stuerz <simon.stuerz@guh.io> #
# Copyright (C) 2014 Michael Zanetti <michael_zanetti@gmx.net> #
# #
# This file is part of guh. #
@ -27,148 +27,132 @@ import argparse
import traceback
import json
import os
import subprocess
import subprocess
__version__='1.0.0'
# Argument parser
parser = argparse.ArgumentParser(description='The guh-generateplugininfo is a precompiler for building plugins. This precompiler will create a plugininfo.h containing the uuid definitions from the plugin json file and creates the translations for the plugin.')
parser.add_argument('-j', '--jsonfile', help='The JSON input file name with the plugin description', metavar='jsonfile')
parser.add_argument('-b', '--builddir', help='The path to the build directory of the plugin where the plugininfo.h file can be found.', metavar='buildpath')
parser.add_argument('-o', '--output', help='The plugininfo.h outputFile with the uuid declarations', metavar='output')
parser.add_argument('-t', '--translations', help='The translation files for the plugin.', nargs='*', type=str, metavar='*.ts')
parser.add_argument('-v', '--version', action='version', version=__version__)
args = parser.parse_args()
# Get the source directors
sourceDir = os.path.dirname(os.path.abspath(args.jsonfile))
print 'Json file: %s' % args.jsonfile
print 'Output: %s/%s' % (args.builddir, args.output)
print 'Build directory: %s' % args.builddir
print 'Source directory: %s' % sourceDir
print 'Translations: %s' % args.translations
# Tuple ('string to translate', 'comment for translater')
translationStrings = []
variableNames = []
externDefinitions = []
# Open files
inputFile = open(args.jsonfile, 'r')
outputFile = open(args.builddir + '/' + args.output, 'w')
outputFileExtern = open(args.builddir + '/' + 'extern-' + args.output, 'w')
# Read json file
try:
pluginMap = json.loads(inputFile.read())
inputFile.close()
except ValueError as error:
print ' --> Error loading input file \"%s\"' % (args.input)
print ' %s' % (error)
inputFile.close()
exit -1
__version__='1.0.1'
##################################################################################################################
# Methods
def writePluginInfo(line):
#-----------------------------------------------------------------------------------------------------------------
def printInfo(info):
if args.filetype is 'i':
print(info)
#-----------------------------------------------------------------------------------------------------------------
def printWarning(warning):
if args.filetype is 'i':
print("Warning:" + warning)
#-----------------------------------------------------------------------------------------------------------------
def printError(error):
if args.filetype is 'i':
print('Error:' + error)
#-----------------------------------------------------------------------------------------------------------------
def writeToFile(line):
outputFile.write('%s\n' % line)
def writeExternPluginInfo(line):
outputFileExtern.write('%s\n' % line)
#-----------------------------------------------------------------------------------------------------------------
def extractPlugin(pluginMap):
variableName = 'pluginId'
if not variableName in variableNames:
variableNames.append(variableName)
print('Define PluginId pluginId = %s' % (pluginMap['id']))
writePluginInfo('PluginId pluginId = PluginId(\"%s\");' % (pluginMap['id']))
printInfo('Define PluginId pluginId = %s' % (pluginMap['id']))
if args.filetype is 'i':
writeToFile('PluginId pluginId = PluginId(\"%s\");' % (pluginMap['id']))
addTranslationString(pluginMap['name'], 'The name of the plugin %s (%s)' % (pluginMap['name'], pluginMap['id']))
createExternDefinition('PluginId', variableName)
if 'paramTypes' in pluginMap:
extractParamTypes(pluginMap['paramTypes'], pluginMap['name'])
if 'vendors' in pluginMap:
extractVendors(pluginMap['vendors'])
#-----------------------------------------------------------------------------------------------------------------
def extractParamTypes(paramTypes, contextName):
for paramType in paramTypes:
try:
variableName = '%sParamTypeId' % (paramType['idName'])
if not variableName in variableNames:
variableNames.append(variableName)
print('Define ParamTypeId %s = %s' % (variableName, paramType['id']))
writePluginInfo('ParamTypeId %s = ParamTypeId(\"%s\");' % (variableName, paramType['id']))
printInfo('Define ParamTypeId %s = %s' % (variableName, paramType['id']))
if args.filetype is 'i':
writeToFile('ParamTypeId %s = ParamTypeId(\"%s\");' % (variableName, paramType['id']))
addTranslationString(paramType['name'], 'The name of the paramType (%s) of %s' % (paramType['id'], contextName))
createExternDefinition('ParamTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for ParamTypeId %s -> skipping') % (variableName, paramType['id'])
printWarning('Duplicated variable name \"%s\" for ParamTypeId %s -> skipping') % (variableName, paramType['id'])
except:
pass
#-----------------------------------------------------------------------------------------------------------------
def extractVendors(vendors):
for vendor in vendors:
try:
variableName = '%sVendorId' % (vendor['idName'])
if not variableName in variableNames:
variableNames.append(variableName)
print('Define VendorId %s = %s' % (variableName, vendor['id']))
writePluginInfo('VendorId %s = VendorId(\"%s\");' % (variableName, vendor['id']))
printInfo('Define VendorId %s = %s' % (variableName, vendor['id']))
if args.filetype is 'i':
writeToFile('VendorId %s = VendorId(\"%s\");' % (variableName, vendor['id']))
addTranslationString(vendor['name'], 'The name of the vendor (%s)' % vendor['id'])
createExternDefinition('VendorId', variableName)
else:
print('Duplicated variable name \"%s\" for VendorId %s -> skipping') % (variableName, param['id'])
printWarning('Duplicated variable name \"%s\" for VendorId %s -> skipping') % (variableName, param['id'])
except:
pass
if 'deviceClasses' in vendor:
extractDeviceClasses(vendor['deviceClasses'])
extractDeviceClasses(vendor['deviceClasses'])
#-----------------------------------------------------------------------------------------------------------------
def extractDeviceClasses(deviceClasses):
for deviceClass in deviceClasses:
try:
variableName = '%sDeviceClassId' % (deviceClass['idName'])
if 'pairingInfo' in deviceClass:
addTranslationString(deviceClass['pairingInfo'], 'The pairing info of deviceClass %s' % deviceClass['name'])
if not variableName in variableNames:
variableNames.append(variableName)
print('Define DeviceClassId %s = %s' % (variableName, deviceClass['id']))
writePluginInfo('DeviceClassId %s = DeviceClassId(\"%s\");' % (variableName, deviceClass['id']))
printInfo('Define DeviceClassId %s = %s' % (variableName, deviceClass['id']))
if args.filetype is 'i':
writeToFile('DeviceClassId %s = DeviceClassId(\"%s\");' % (variableName, deviceClass['id']))
addTranslationString(deviceClass['name'], 'The name of the DeviceClass (%s)' %(deviceClass['id']))
createExternDefinition('DeviceClassId', variableName)
else:
print('Duplicated variable name \"%s\" for DeviceClassId %s -> skipping') % (variableName, deviceClass['deviceClassId'])
printWarning('Duplicated variable name \"%s\" for DeviceClassId %s -> skipping') % (variableName, deviceClass['deviceClassId'])
except:
pass
if 'paramTypes' in deviceClass:
extractParamTypes(deviceClass['paramTypes'], deviceClass['name'])
if 'discoveryParamTypes' in deviceClass:
extractParamTypes(deviceClass['discoveryParamTypes'], deviceClass['name'])
if 'stateTypes' in deviceClass:
extractStateTypes(deviceClass['stateTypes'], deviceClass['name'])
if 'actionTypes' in deviceClass:
extractActionTypes(deviceClass['actionTypes'], deviceClass['name'])
if 'eventTypes' in deviceClass:
extractEventTypes(deviceClass['eventTypes'], deviceClass['name'])
#-----------------------------------------------------------------------------------------------------------------
def extractStateTypes(stateTypes, deviceClassName):
for stateType in stateTypes:
try:
@ -177,51 +161,55 @@ def extractStateTypes(stateTypes, deviceClassName):
#addTranslationString(stateType['name'], 'The name of the stateType (%s) of DeviceClass %s' % (stateType['id'], deviceClassName))
if not variableName in variableNames:
variableNames.append(variableName)
print('Define StateTypeId %s = %s' % (variableName, stateType['id']))
writePluginInfo('StateTypeId %s = StateTypeId(\"%s\");' % (variableName, stateType['id']))
printInfo('Define StateTypeId %s = %s' % (variableName, stateType['id']))
if args.filetype is 'i':
writeToFile('StateTypeId %s = StateTypeId(\"%s\");' % (variableName, stateType['id']))
createExternDefinition('StateTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for StateTypeId %s -> skipping') % (variableName, stateType['id'])
printWarning('Duplicated variable name \"%s\" for StateTypeId %s -> skipping') % (variableName, stateType['id'])
# Create EventTypeId for this state
variableName = '%sEventTypeId' % (stateType['idName'])
if not variableName in variableNames:
addTranslationString(stateType['eventTypeName'], 'The name of the autocreated EventType (%s)' % stateType['id'])
variableNames.append(variableName)
print('Define EventTypeId %s = %s' % (variableName, stateType['id']))
writePluginInfo('EventTypeId %s = EventTypeId(\"%s\");' % (variableName, stateType['id']))
printInfo('Define EventTypeId %s = %s' % (variableName, stateType['id']))
if args.filetype is 'i':
writeToFile('EventTypeId %s = EventTypeId(\"%s\");' % (variableName, stateType['id']))
createExternDefinition('EventTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for autocreated EventTypeId %s -> skipping') % (variableName, stateType['id'])
printWarning('Duplicated variable name \"%s\" for autocreated EventTypeId %s -> skipping') % (variableName, stateType['id'])
#ParamType for EventType/ActionType
variableName = '%sStateParamTypeId' % (stateType['idName'])
variableName = '%sStateParamTypeId' % (stateType['idName'])
if not variableName in variableNames:
variableNames.append(variableName)
print('Define ParamTypeId %s for StateType %s = %s' % (variableName, variableName, stateType['id']))
writePluginInfo('ParamTypeId %s = ParamTypeId(\"%s\");' % (variableName, stateType['id']))
printInfo('Define ParamTypeId %s for StateType %s = %s' % (variableName, variableName, stateType['id']))
if args.filetype is 'i':
writeToFile('ParamTypeId %s = ParamTypeId(\"%s\");' % (variableName, stateType['id']))
createExternDefinition('ParamTypeId', variableName)
addTranslationString(stateType['name'], 'The name of the ParamType of StateType (%s) of DeviceClass %s' % (stateType['id'], deviceClassName))
else:
print('duplicated variable name \"%s\" for ParamTypeId %s -> skipping') % (variableName, stateType['id'])
printWarning('duplicated variable name \"%s\" for ParamTypeId %s -> skipping') % (variableName, stateType['id'])
# Create ActionTypeId if the state is writable
if 'writable' in stateType and stateType['writable']:
variableName = '%sActionTypeId' % (stateType['idName'])
variableName = '%sActionTypeId' % (stateType['idName'])
if not variableName in variableNames:
variableNames.append(variableName)
print('Define ActionTypeId for writable StateType %s = %s' % (variableName, stateType['id']))
printInfo('Define ActionTypeId for writable StateType %s = %s' % (variableName, stateType['id']))
addTranslationString(stateType['actionTypeName'], 'The name of the autocreated ActionType (%s)' % stateType['id'])
writePluginInfo('ActionTypeId %s = ActionTypeId(\"%s\");' % (variableName, stateType['id']))
if args.filetype is 'i':
writeToFile('ActionTypeId %s = ActionTypeId(\"%s\");' % (variableName, stateType['id']))
createExternDefinition('ActionTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for autocreated ActionTypeId %s -> skipping') % (variableName, stateType['id'])
printWarning('Duplicated variable name \"%s\" for autocreated ActionTypeId %s -> skipping') % (variableName, stateType['id'])
except:
pass
#-----------------------------------------------------------------------------------------------------------------
def extractActionTypes(actionTypes, deviceClassName):
for actionType in actionTypes:
try:
@ -230,19 +218,21 @@ def extractActionTypes(actionTypes, deviceClassName):
if not variableName in variableNames:
variableNames.append(variableName)
addTranslationString(actionType['name'], 'The name of the ActionType %s of deviceClass %s' % (actionType['id'], deviceClassName))
writePluginInfo('ActionTypeId %s = ActionTypeId(\"%s\");' % (variableName, actionType['id']))
if args.filetype is 'i':
writeToFile('ActionTypeId %s = ActionTypeId(\"%s\");' % (variableName, actionType['id']))
createExternDefinition('ActionTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for ActionTypeId %s -> skipping') % (variableName, actionType['id'])
printWarning('Duplicated variable name \"%s\" for ActionTypeId %s -> skipping') % (variableName, actionType['id'])
except:
pass
# Define paramTypes of this ActionType
if 'paramTypes' in actionType:
extractParamTypes(actionType['paramTypes'], deviceClassName)
#-----------------------------------------------------------------------------------------------------------------
def extractEventTypes(eventTypes, deviceClassName):
for eventType in eventTypes:
try:
@ -251,10 +241,11 @@ def extractEventTypes(eventTypes, deviceClassName):
if not variableName in variableNames:
variableNames.append(variableName)
addTranslationString(eventType['name'], 'The name of the EventType %s of deviceClass %s' % (eventType['id'], deviceClassName))
writePluginInfo('EventTypeId %s = EventTypeId(\"%s\");' % (variableName, eventType['id']))
createExternDefinition('EventTypeId', variableName)
if args.filetype is 'i':
writeToFile('EventTypeId %s = EventTypeId(\"%s\");' % (variableName, eventType['id']))
createExternDefinition('EventTypeId', variableName)
else:
print('Duplicated variable name \"%s\" for EventTypeId %s -> skipping') % (variableName, eventType['id'])
printWarning('Duplicated variable name \"%s\" for EventTypeId %s -> skipping') % (variableName, eventType['id'])
except:
pass
@ -263,6 +254,7 @@ def extractEventTypes(eventTypes, deviceClassName):
extractParamTypes(eventType['paramTypes'], deviceClassName)
#-----------------------------------------------------------------------------------------------------------------
def createExternDefinition(type, name):
definition = {}
definition['type'] = type
@ -270,120 +262,185 @@ def createExternDefinition(type, name):
externDefinitions.append(definition)
#-----------------------------------------------------------------------------------------------------------------
def addTranslationString(string, comment):
translationStrings.append([string, comment])
#-----------------------------------------------------------------------------------------------------------------
def writeTranslationStrings():
if len(args.translations) is 0:
return
if len(translationStrings) is not 0:
writePluginInfo('// Translation strings')
writePluginInfo('const QString translations[] {')
writeToFile('// Translation strings')
writeToFile('const QString translations[] {')
for index, value in enumerate(translationStrings):
writePluginInfo(' //: %s' % value[1])
writeToFile(' //: %s' % value[1])
if index != len(translationStrings) - 1:
writePluginInfo(' QT_TRANSLATE_NOOP(\"%s\", \"%s\"), \n' % (pluginMap['idName'], value[0]))
writeToFile(' QT_TRANSLATE_NOOP(\"%s\", \"%s\"), \n' % (pluginMap['idName'], value[0]))
else:
writePluginInfo(' QT_TRANSLATE_NOOP(\"%s\", \"%s\")' % (pluginMap['idName'], value[0]))
writeToFile(' QT_TRANSLATE_NOOP(\"%s\", \"%s\")' % (pluginMap['idName'], value[0]))
writePluginInfo('};')
writeToFile('};')
#-----------------------------------------------------------------------------------------------------------------
def createTranslationFiles():
for translation in args.translations:
translationFile = (sourceDir + '/' + translation)
path, fileName = os.path.split(translationFile)
translationOutput = (path + '/' + pluginMap['id'] + '-' + os.path.splitext(fileName)[0] + '.qm')
print(' --> Translation update %s' % translationFile)
print(subprocess.check_output(['mkdir', '-p', path]))
print(subprocess.check_output(['lupdate', '-recursive', '-no-obsolete', sourceDir, (args.builddir + '/' + args.output), '-ts', translationFile]))
print(' --> Translation release %s' % translationOutput)
print(subprocess.check_output(['lrelease', translationFile, '-qm', translationOutput]))
print(' --> Copy translation files to build dir %s' % args.builddir + '/translations/')
printInfo(' --> Translation update %s' % translationFile)
printInfo(subprocess.check_output(['mkdir', '-p', path]))
printInfo(subprocess.check_output(['lupdate', '-recursive', '-no-obsolete', sourceDir, (args.builddir + '/' + args.output), '-ts', translationFile]))
printInfo(' --> Translation release %s' % translationOutput)
printInfo(subprocess.check_output(['lrelease', translationFile, '-qm', translationOutput]))
printInfo(' --> Copy translation files to build dir %s' % args.builddir + '/translations/')
subprocess.check_output(['rsync', '-a', translationOutput, args.builddir + '/translations/'])
##################################################################################################################
# write plugininfo.h
#-----------------------------------------------------------------------------------------------------------------
def writePluginInfoFile():
printInfo(' --> generate plugininfo.h for plugin \"%s\" = %s' % (pluginMap['name'], pluginMap['id']))
print ' --> generate plugininfo.h for plugin \"%s\" = %s' % (pluginMap['name'], pluginMap['id'])
writePluginInfo('/* This file is generated by the guh build system. Any changes to this file will')
writePluginInfo(' * be lost.')
writePluginInfo(' *')
writePluginInfo(' * If you want to change this file, edit the plugin\'s json file.')
writePluginInfo(' */')
writePluginInfo('')
writePluginInfo('#ifndef PLUGININFO_H')
writePluginInfo('#define PLUGININFO_H')
writePluginInfo('')
writePluginInfo('#include <QLoggingCategory>')
writePluginInfo('#include <QObject>')
writePluginInfo('')
writePluginInfo('#include \"typeutils.h\"')
writePluginInfo('')
writePluginInfo('// Id definitions')
writeToFile('/* This file is generated by the guh build system. Any changes to this file will')
writeToFile(' * be lost.')
writeToFile(' *')
writeToFile(' * If you want to change this file, edit the plugin\'s json file.')
writeToFile(' */')
writeToFile('')
writeToFile('#ifndef PLUGININFO_H')
writeToFile('#define PLUGININFO_H')
writeToFile('')
writeToFile('#include <QLoggingCategory>')
writeToFile('#include <QObject>')
writeToFile('')
writeToFile('#include \"typeutils.h\"')
writeToFile('')
writeToFile('// Id definitions')
extractPlugin(pluginMap)
writeToFile('')
writeToFile('// Logging category')
extractPlugin(pluginMap)
if 'idName' in pluginMap:
writeToFile('Q_DECLARE_LOGGING_CATEGORY(dc%s)' % pluginMap['idName'])
writeToFile('Q_LOGGING_CATEGORY(dc%s, \"%s\")' % (pluginMap['idName'], pluginMap['idName']))
printInfo('Define logging category: \'dc%s\'' % pluginMap['idName'])
writePluginInfo('')
writePluginInfo('// Logging category')
writeToFile('')
if 'idName' in pluginMap:
writePluginInfo('Q_DECLARE_LOGGING_CATEGORY(dc%s)' % pluginMap['idName'])
writePluginInfo('Q_LOGGING_CATEGORY(dc%s, \"%s\")' % (pluginMap['idName'], pluginMap['idName']))
print 'define logging category: \'dc%s\'' % pluginMap['idName']
writePluginInfo('')
# Write translation strings
writeTranslationStrings()
# Write translation strings
writeTranslationStrings()
writeToFile('')
writeToFile('#endif // PLUGININFO_H')
outputFile.close()
printInfo(' --> generated successfully \"%s\"' % (args.output))
# Translate
if len(translationStrings) is not 0:
createTranslationFiles()
#-----------------------------------------------------------------------------------------------------------------
def writeExternPluginInfoFile():
printInfo(' --> generate extern-plugininfo.h for plugin \"%s\" = %s' % (pluginMap['name'], pluginMap['id']))
extractPlugin(pluginMap)
writeToFile('/* This file is generated by the guh build system. Any changes to this file will')
writeToFile(' * be lost.')
writeToFile(' *')
writeToFile(' * If you want to change this file, edit the plugin\'s json file and add')
writeToFile(' * idName tags where appropriate.')
writeToFile(' */')
writeToFile('')
writeToFile('#ifndef EXTERNPLUGININFO_H')
writeToFile('#define EXTERNPLUGININFO_H')
writeToFile('#include \"typeutils.h\"')
writeToFile('#include <QLoggingCategory>')
writeToFile('')
writeToFile('// Id definitions')
for externDefinition in externDefinitions:
writeToFile('extern %s %s;' % (externDefinition['type'], externDefinition['variable']))
writeToFile('')
writeToFile('// Logging category definition')
if 'idName' in pluginMap:
writeToFile('Q_DECLARE_LOGGING_CATEGORY(dc%s)' % pluginMap['idName'])
writeToFile('')
writeToFile('#endif // EXTERNPLUGININFO_H')
outputFile.close()
printInfo(' --> generated successfully \'%s\'' % (args.output))
writePluginInfo('')
writePluginInfo('#endif // PLUGININFO_H')
outputFile.close()
print ' --> generated successfully \"%s\"' % (args.output)
##################################################################################################################
# Write extern-plugininfo.h
print ' --> generate extern-plugininfo.h for plugin \"%s\" = %s' % (pluginMap['name'], pluginMap['id'])
writeExternPluginInfo('/* This file is generated by the guh build system. Any changes to this file will')
writeExternPluginInfo(' * be lost.')
writeExternPluginInfo(' *')
writeExternPluginInfo(' * If you want to change this file, edit the plugin\'s json file and add')
writeExternPluginInfo(' * idName tags where appropriate.')
writeExternPluginInfo(' */')
writeExternPluginInfo('')
writeExternPluginInfo('#ifndef EXTERNPLUGININFO_H')
writeExternPluginInfo('#define EXTERNPLUGININFO_H')
writeExternPluginInfo('#include \"typeutils.h\"')
writeExternPluginInfo('#include <QLoggingCategory>')
writeExternPluginInfo('')
writeExternPluginInfo('// Id definitions')
for externDefinition in externDefinitions:
writeExternPluginInfo('extern %s %s;' % (externDefinition['type'], externDefinition['variable']))
writeExternPluginInfo('')
writeExternPluginInfo('// Logging category definition')
if 'idName' in pluginMap:
writeExternPluginInfo('Q_DECLARE_LOGGING_CATEGORY(dc%s)' % pluginMap['idName'])
writeExternPluginInfo('')
writeExternPluginInfo('#endif // EXTERNPLUGININFO_H')
outputFileExtern.close()
print ' --> generated successfully \'extern-%s\'' % (args.output)
# Main
##################################################################################################################
# Translate
if len(translationStrings) is not 0:
createTranslationFiles()
if __name__ == '__main__':
# Argument parser
parser = argparse.ArgumentParser(description='The guh-generateplugininfo is a precompiler for building plugins. This precompiler will create a plugininfo.h containing the uuid definitions from the plugin json file and creates the translations for the plugin.')
parser.add_argument('-j', '--jsonfile', help='The JSON input file name with the plugin description', metavar='jsonfile', required=True)
parser.add_argument('-b', '--builddir', help='The path to the build directory of the plugin where the plugininfo.h file can be found.', metavar='buildpath', required=True)
parser.add_argument('-f', '--filetype', help='The file type to generate: e = extern infofile, i = infofile', action='store', choices=['e', 'i'], default='i')
parser.add_argument('-o', '--output', help='The plugininfo.h outputFile with the uuid declarations', metavar='output')
parser.add_argument('-t', '--translations', help='The translation files for the plugin.', nargs='*', type=str, metavar='*.ts')
parser.add_argument('-v', '--version', action='version', version=__version__)
args = parser.parse_args()
# Get the source directors
sourceDir = os.path.dirname(os.path.abspath(args.jsonfile))
# Print build information for debugging
printInfo('Json file: %s' % args.jsonfile)
printInfo('Output: %s/%s' % (args.builddir, args.output))
printInfo('Build directory: %s' % args.builddir)
printInfo('Source directory: %s' % sourceDir)
printInfo('Translations: %s' % args.translations)
printInfo('FileType: %s' % args.filetype)
# Tuple ('string to translate', 'comment for translater')
translationStrings = []
variableNames = []
externDefinitions = []
# Open files
try:
inputFile = open(args.jsonfile, 'r')
except:
printError('Could not open file \"%s\"' % (args.jsonfile))
exit -1
try:
outputFile = open(args.builddir + '/' + args.output, 'w')
except:
printError('Could not open file \"%s\"' % (args.jsonfile))
exit -1
# Read json file
try:
pluginMap = json.loads(inputFile.read())
inputFile.close()
except ValueError as error:
printError(' --> Could not load json input file \"%s\"' % (args.input))
printError(' %s' % (error))
inputFile.close()
exit -1
# Write files
if args.filetype is 'i':
writePluginInfoFile()
else:
writeExternPluginInfoFile()

View File

@ -14,19 +14,34 @@ INCLUDEPATH += $$top_srcdir/libguh
LIBS += -L../../../libguh -lguh
# Create plugininfo file
infofile.output = plugininfo.h
infofile.depends = $$top_srcdir/plugins/guh-generateplugininfo
infofile.CONFIG = no_link
JSONFILES = deviceplugin"$$TARGET".json
infofile.input = JSONFILES
infofile.commands = $$top_srcdir/plugins/guh-generateplugininfo -j ${QMAKE_FILE_NAME} \
-o ${QMAKE_FILE_OUT} \
-b $$OUT_PWD \
-t $$TRANSLATIONS; \
rsync -a "$$OUT_PWD"/translations/*.qm $$top_builddir/translations/;
plugininfo.target = plugininfo.h
plugininfo.output = plugininfo.h
plugininfo.CONFIG = no_link
plugininfo.input = JSONFILES
plugininfo.commands = touch ${QMAKE_FILE_OUT}; $$top_srcdir/plugins/guh-generateplugininfo \
--filetype i \
--jsonfile ${QMAKE_FILE_NAME} \
--output ${QMAKE_FILE_OUT} \
--builddir $$OUT_PWD \
--translations $$TRANSLATIONS; \
rsync -a "$$OUT_PWD"/translations/*.qm $$top_builddir/translations/;
PRE_TARGETDEPS +=
QMAKE_EXTRA_COMPILERS +=
externplugininfo.target = extern-plugininfo.h
externplugininfo.output = extern-plugininfo.h
externplugininfo.CONFIG = no_link
externplugininfo.input = JSONFILES
externplugininfo.commands = touch ${QMAKE_FILE_OUT}; $$top_srcdir/plugins/guh-generateplugininfo \
--filetype e \
--jsonfile ${QMAKE_FILE_NAME} \
--output ${QMAKE_FILE_OUT} \
--builddir $$OUT_PWD \
--translations $$TRANSLATIONS;
PRE_TARGETDEPS += compiler_plugininfo_make_all compiler_externplugininfo_make_all
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
QMAKE_EXTRA_COMPILERS += infofile
PRE_TARGETDEPS += compiler_infofile_make_all
# Install translation files
translations.path = /usr/share/guh/translations