diff --git a/doc/api.qdoc b/doc/api.qdoc index 5e0b26e5..ea5d02b2 100644 --- a/doc/api.qdoc +++ b/doc/api.qdoc @@ -2,13 +2,18 @@ \page api.html \title Overview of guh API's - The guh server provides two different API's: + The guh server provides two different API's: \list \li \l{JSON-RPC API}{JSON-RPC} \li \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST} \endlist - + The \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST API} is accessable on the \l{guhserver::WebServer}{WebServer}. The JSON-RPC API can be accessed from the \l {guhserver::TcpServer}{TcpServer} and the \l {guhserver::WebSocketServer}{WebSocketServer} interface. The command line interface \b {\tt guh-cli} communicates with the \l {guhserver::TcpServer}{TcpServer} and \l {JSON-RPC API}. The \b {\tt guh-webinterface} uses the \l{guhserver::WebServer}{WebServer} with the \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST-API} and catches notifications from the \l {guhserver::WebSocketServer}{WebSocketServer}. + + \image api-overview.png + + + */ diff --git a/doc/config.qdocconf b/doc/config.qdocconf index 550715d2..db2fdecf 100644 --- a/doc/config.qdocconf +++ b/doc/config.qdocconf @@ -1,6 +1,6 @@ include(html-template.qdocconf) -project = guh | documentation +project = guh - developer description = Gear up your Home! dita.metadata.default.author = Simon Stürz diff --git a/doc/favicons/apple-touch-icon-114x114.png b/doc/favicons/apple-touch-icon-114x114.png new file mode 100644 index 00000000..f67b4a2d Binary files /dev/null and b/doc/favicons/apple-touch-icon-114x114.png differ diff --git a/doc/favicons/apple-touch-icon-120x120.png b/doc/favicons/apple-touch-icon-120x120.png new file mode 100644 index 00000000..bc715687 Binary files /dev/null and b/doc/favicons/apple-touch-icon-120x120.png differ diff --git a/doc/favicons/apple-touch-icon-144x144.png b/doc/favicons/apple-touch-icon-144x144.png new file mode 100644 index 00000000..f4ebd8df Binary files /dev/null and b/doc/favicons/apple-touch-icon-144x144.png differ diff --git a/doc/favicons/apple-touch-icon-152x152.png b/doc/favicons/apple-touch-icon-152x152.png new file mode 100644 index 00000000..ec83a6a8 Binary files /dev/null and b/doc/favicons/apple-touch-icon-152x152.png differ diff --git a/doc/favicons/apple-touch-icon-57x57.png b/doc/favicons/apple-touch-icon-57x57.png new file mode 100644 index 00000000..f5c78f9d Binary files /dev/null and b/doc/favicons/apple-touch-icon-57x57.png differ diff --git a/doc/favicons/apple-touch-icon-60x60.png b/doc/favicons/apple-touch-icon-60x60.png new file mode 100644 index 00000000..51ff9932 Binary files /dev/null and b/doc/favicons/apple-touch-icon-60x60.png differ diff --git a/doc/favicons/apple-touch-icon-72x72.png b/doc/favicons/apple-touch-icon-72x72.png new file mode 100644 index 00000000..558d2d06 Binary files /dev/null and b/doc/favicons/apple-touch-icon-72x72.png differ diff --git a/doc/favicons/apple-touch-icon-76x76.png b/doc/favicons/apple-touch-icon-76x76.png new file mode 100644 index 00000000..4c15f845 Binary files /dev/null and b/doc/favicons/apple-touch-icon-76x76.png differ diff --git a/doc/favicons/favicon-128.png b/doc/favicons/favicon-128.png new file mode 100644 index 00000000..fe3ff757 Binary files /dev/null and b/doc/favicons/favicon-128.png differ diff --git a/doc/favicons/favicon-16x16.png b/doc/favicons/favicon-16x16.png new file mode 100644 index 00000000..6581a72f Binary files /dev/null and b/doc/favicons/favicon-16x16.png differ diff --git a/doc/favicons/favicon-196x196.png b/doc/favicons/favicon-196x196.png new file mode 100644 index 00000000..d0a4bd55 Binary files /dev/null and b/doc/favicons/favicon-196x196.png differ diff --git a/doc/favicons/favicon-32x32.png b/doc/favicons/favicon-32x32.png new file mode 100644 index 00000000..64bb80f9 Binary files /dev/null and b/doc/favicons/favicon-32x32.png differ diff --git a/doc/favicons/favicon-96x96.png b/doc/favicons/favicon-96x96.png new file mode 100644 index 00000000..9539882f Binary files /dev/null and b/doc/favicons/favicon-96x96.png differ diff --git a/doc/favicons/favicon.ico b/doc/favicons/favicon.ico new file mode 100644 index 00000000..a39e20a8 Binary files /dev/null and b/doc/favicons/favicon.ico differ diff --git a/doc/favicons/favicon.svg b/doc/favicons/favicon.svg new file mode 100644 index 00000000..a59d0af1 --- /dev/null +++ b/doc/favicons/favicon.svg @@ -0,0 +1,57 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/doc/favicons/mstile-144x144.png b/doc/favicons/mstile-144x144.png new file mode 100644 index 00000000..f4ebd8df Binary files /dev/null and b/doc/favicons/mstile-144x144.png differ diff --git a/doc/favicons/mstile-150x150.png b/doc/favicons/mstile-150x150.png new file mode 100644 index 00000000..9620ec3b Binary files /dev/null and b/doc/favicons/mstile-150x150.png differ diff --git a/doc/favicons/mstile-310x150.png b/doc/favicons/mstile-310x150.png new file mode 100644 index 00000000..a3356003 Binary files /dev/null and b/doc/favicons/mstile-310x150.png differ diff --git a/doc/favicons/mstile-310x310.png b/doc/favicons/mstile-310x310.png new file mode 100644 index 00000000..28ac2872 Binary files /dev/null and b/doc/favicons/mstile-310x310.png differ diff --git a/doc/favicons/mstile-70x70.png b/doc/favicons/mstile-70x70.png new file mode 100644 index 00000000..fe3ff757 Binary files /dev/null and b/doc/favicons/mstile-70x70.png differ diff --git a/doc/html-styles.qdocconf b/doc/html-styles.qdocconf index 1208496a..d915f1a6 100644 --- a/doc/html-styles.qdocconf +++ b/doc/html-styles.qdocconf @@ -14,8 +14,28 @@ extraimages.HTML = images/logo.png \ # Include the style sheets and scripts used. HTML.headerstyles = \ - " \n" \ - " \n" + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + HTML.headerscripts = diff --git a/doc/images/api-overview.odg b/doc/images/api-overview.odg new file mode 100644 index 00000000..37fddb70 Binary files /dev/null and b/doc/images/api-overview.odg differ diff --git a/doc/images/api-overview.png b/doc/images/api-overview.png new file mode 100644 index 00000000..f9e061e2 Binary files /dev/null and b/doc/images/api-overview.png differ diff --git a/doc/images/favicon.ico b/doc/images/favicon.ico deleted file mode 100644 index 5a95c3e8..00000000 Binary files a/doc/images/favicon.ico and /dev/null differ diff --git a/doc/images/minimal-project-open.png b/doc/images/minimal-project-open.png index 6b0c1368..eb4a5cc3 100644 Binary files a/doc/images/minimal-project-open.png and b/doc/images/minimal-project-open.png differ diff --git a/doc/setup-environment.qdoc b/doc/setup-environment.qdoc index e1e84069..ad49c064 100644 --- a/doc/setup-environment.qdoc +++ b/doc/setup-environment.qdoc @@ -5,6 +5,8 @@ Assuming you are working on an Ubuntu system here are the steps how to set up the build environment. Basically you can choose your prefered SDK but all tutorials are based on the Qt Creator and we recommand to use that one. You can also use the Ubuntu SDK, which is basically a modified Qt Creator. + \note Please take care that you are using the Qt version from the system for building. The guh server will allways be built with the official Qt version for the appropriate system version. The plugin \underline{must} have the same version like the guh server. + \section2 Install Qt In the first step you need to install the Qt libraries: diff --git a/doc/tutorial1.qdoc b/doc/tutorial1.qdoc index b236fa06..18b56223 100644 --- a/doc/tutorial1.qdoc +++ b/doc/tutorial1.qdoc @@ -6,14 +6,14 @@ This first tutorial shows you how to open, edit, build and load the first plugin. - \section1 Open + \section1 Open the project Assuming you already have downloaded the \l{https://github.com/guh/plugin-templates}{plugin-templates} you can open the \tt {plugin-templates \unicode{0x2192} minimal \unicode{0x2192} minimal.pro} file with the Qt Creator. \image minimal-project-open.png "Qt Creator" Qt will create next to the \tt {plugin-templates \unicode{0x2192} minimal \unicode{0x2192}} folder the build directory (shadow build). - \section1 Build + \section1 Build the plugin In order to compile your first plugin you can press the \b "Build" button in the lower left corner of the \e {Qt Creator} window. You can follow the build process in the \e {Compile Output} window (\tt alt + \tt 4). The resulting build directory should look like this: @@ -34,7 +34,7 @@ The \b {\tt libguh_devicepluginminimal.so} file is our fresh compiled deviceplugin. - \section1 Install + \section1 Install the plugin I you have installed guh using the repository (see \l{Set up the build environment}) you will find the installed plugins here: @@ -60,7 +60,7 @@ Once you have installed the new plugin you can test it. - \section1 Test + \section1 Test the plugin If order to test the new plugin we need to restart the guh daemon. Please make shore there is only one instance of guh running on your system, otherwise one of the daemons will colide with the ports of the other one. Once you have installed the \b {\tt libguh_devicepluginminimal.so} file you need a clean start of the guh daemon. diff --git a/doc/tutorial2.qdoc b/doc/tutorial2.qdoc index e49a8234..581902c6 100644 --- a/doc/tutorial2.qdoc +++ b/doc/tutorial2.qdoc @@ -440,7 +440,7 @@ You can see in the implementation that a new \l{Event} will be generated in guh. This is the way how you emit an Event for a device. \section1 Test the plugin - Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Tutorial 1 - The "Minimal" plugin}{Tutorial 1}). + Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Install the plugin}{Tutorial 1 - Install the plugin}). \list 1 \li Start guh with following command: diff --git a/doc/tutorial3.qdoc b/doc/tutorial3.qdoc index 3f26e5f9..f12ed1a6 100644 --- a/doc/tutorial3.qdoc +++ b/doc/tutorial3.qdoc @@ -101,7 +101,7 @@ \note You \underline don't have to check if the \l State value has changed or not when you set the value. i.e. if the current \l State value of the power \l State is \tt true, and the \l Action \l Param is also \tt true, this code will not generate the \l Event because the value has not changed. \section1 Test the plugin - Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Tutorial 1 - The "Minimal" plugin}{Tutorial 1}). + Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Install the plugin}{Tutorial 1 - Install the plugin}). \list 1 \li Start guh with following command: diff --git a/doc/tutorial4.qdoc b/doc/tutorial4.qdoc index f131c659..a3dc8a43 100644 --- a/doc/tutorial4.qdoc +++ b/doc/tutorial4.qdoc @@ -81,7 +81,7 @@ \section1 Test the plugin - Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Tutorial 1 - The "Minimal" plugin}{Tutorial 1}). + Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Install the plugin}{Tutorial 1 - Install the plugin}). \list 1 \li Start guh with following command: @@ -94,10 +94,10 @@ \li Use guh-cli to check the current power \l State, it should be \tt false (default value). \li Use guh-cli to execute the \b {set power} \l Action: - \tt "Devices" \unicode{0x2192} \tt "Execute an action" \unicode{0x2192} \tt {"Your device name (Alternative Power Button)"} \unicode{0x2192} \tt {set power} \unicode{0x2192} \tt {true} + \tt "Devices" \unicode{0x2192} \tt {"Execute an action"} \unicode{0x2192} \tt {"Your device name (Alternative Power Button)"} \unicode{0x2192} \tt {set power} \unicode{0x2192} \tt {true} \endlist - In the guhd stdout you should see the debug output from you plugin. You will notice that the ActionTypeId, StateTypeId and EventTypeId are equal. + In the guhd STDOUT you should see the debug output from you plugin. You will notice that the ActionTypeId, StateTypeId and EventTypeId are equal. \code ... @@ -112,6 +112,5 @@ \endcode - - + Now you can take a look at \l{Tutorial 5 - The "Network Info" plugin}. */ diff --git a/doc/tutorial5.qdoc b/doc/tutorial5.qdoc index 181cf93e..e2f5a96c 100644 --- a/doc/tutorial5.qdoc +++ b/doc/tutorial5.qdoc @@ -1,13 +1,11 @@ /*! \page tutorial5.html \title Tutorial 5 - The "Network Info" plugin - \brief The plugin shows you how the Network Manager hardware resource works + \brief The plugin shows you how to use the NetworkManager and how asynchronous actions work \ingroup tutorials - In the second tutorial we make our own first plugin with the name \b {"Network Info"}. We will use this name for the naming concentions of the filenames. - - This plugin will use the \l{NetworkManager} hardware resource to fetch the location and WAN ip of your internet connection from \l{http://ip-api.com/json}. It will have an \l Action called \e "update" which will refresh the \l{State}{States} of the \l{Device}. + In the tutorial we make a plugin with the name \b {"Network Info"}. This plugin will use the \l{NetworkManager} hardware resource to fetch the location and WAN ip of your internet connection from \l{http://ip-api.com/json}. It will have an \l Action called \e "update" which will refresh the \l{State}{States} of the \l{Device}. In order to get started with our new \b {"Network Info"} plugin we use the minimal plugin as template and start from there. Make a copy of the minimal folder and name the new folder \b networkinfo-diy. In this case \b{networkinfo-diy} because the folder \b networkinfo already exits from the \tt plugin-template repository. @@ -560,7 +558,7 @@ parameter from \l{The Plugin JSON file}. \section1 Test the plugin - Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Tutorial 1 - The "Minimal" plugin}{Tutorial 1}). + Rebuild the whole project to make shore all changes are registered and install the plugin (see \l{Install the plugin}{Tutorial 1 - Install the plugin}). \list 1 \li Start guh with following command: diff --git a/doc/tutorials.qdoc b/doc/tutorials.qdoc index 3bb1e009..0996bb03 100644 --- a/doc/tutorials.qdoc +++ b/doc/tutorials.qdoc @@ -1,6 +1,8 @@ /*! \page tutorials.html \title Tutorials + + In order to getting started with your own \l DevicePlugin it is recommanded to walk trough following tutorials to understand how the mechanism works: \annotatedlist tutorials */ diff --git a/guh.pro b/guh.pro index 5c2f0de6..6ffaa8fc 100644 --- a/guh.pro +++ b/guh.pro @@ -25,7 +25,7 @@ tests.depends = libguh doc.depends = libguh server doc.commands = cd $$top_srcdir/doc; qdoc config.qdocconf; cp images/logo.png html/images/; \ - cp images/favicon.ico html; cp -r $$top_srcdir/doc/html $$top_builddir/ + cp -v favicons/* html/; cp -r $$top_srcdir/doc/html $$top_builddir/ licensecheck.commands = $$top_srcdir/tests/auto/checklicenseheaders.sh $$top_srcdir diff --git a/libguh/libguh.pro b/libguh/libguh.pro index 0b887c85..7fbec106 100644 --- a/libguh/libguh.pro +++ b/libguh/libguh.pro @@ -90,10 +90,10 @@ INSTALLS += generateplugininfo # install header file with relative subdirectory for(header, HEADERS) { - path = /usr/include/guh/$${dirname(header)} - eval(headers_$${path}.files += $${header}) - eval(headers_$${path}.path = $${path}) - eval(INSTALLS *= headers_$${path}) + path = /usr/include/guh/$${dirname(header)} + eval(headers_$${path}.files += $${header}) + eval(headers_$${path}.path = $${path}) + eval(INSTALLS *= headers_$${path}) } diff --git a/server/webserver.cpp b/server/webserver.cpp index 0144a57c..d0b951ca 100644 --- a/server/webserver.cpp +++ b/server/webserver.cpp @@ -39,7 +39,7 @@ \code https://localhost:3333\endcode The URL for the insecure REST API access to a \l{RestResource}: - \code http://localhost:3333/api/v1/{resource}\endcode + \code http://localhost:3333/api/v1/{RestResource}\endcode The URL for the secure HTTPS (TLS 1.2) REST API access to a \l{RestResource}: \code https://localhost:3333/api/v1/{RestResource}\endcode