From 549a2c8402078618d083e345d4aba88f369d2d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 31 Mar 2015 14:27:31 +0200 Subject: [PATCH] add documentation --- libguh/bluetooth/bluetoothscanner.cpp | 23 +++++++++++++++++++++++ libguh/devicemanager.cpp | 2 ++ server/ruleengine.cpp | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libguh/bluetooth/bluetoothscanner.cpp b/libguh/bluetooth/bluetoothscanner.cpp index 2816ed1c..7b1b5ff8 100644 --- a/libguh/bluetooth/bluetoothscanner.cpp +++ b/libguh/bluetooth/bluetoothscanner.cpp @@ -16,8 +16,27 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/*! + \class BluetoothScanner + \brief Allows to discover bluetooth low energy devices. + + \ingroup hardware + \inmodule libguh + + The bluetooth scanner hardware resource allows to discover bluetooth low energy devices. + + \note: Only available for Qt >= 5.4.0! +*/ + +/*! + * \fn BluetoothScanner::bluetoothDiscoveryFinished(const PluginId &pluginId, const QList &deviceInfos) + * This signal will be emitted whenever a bluetooth discover for the plugin with the given \a pluginId is finished. + * The passed list of \a deviceInfos contains the information of the discovered devices. + */ + #include "bluetoothscanner.h" +/*! Construct the hardware resource BluetoothScanner with the given \a parent. */ BluetoothScanner::BluetoothScanner(QObject *parent) : QObject(parent) { @@ -27,6 +46,7 @@ BluetoothScanner::BluetoothScanner(QObject *parent) : connect(m_timer, &QTimer::timeout, this, &BluetoothScanner::discoveryTimeout); } +/*! Returns true, if a bluetooth hardware is available. */ bool BluetoothScanner::isAvailable() { //Using default Bluetooth adapter @@ -66,11 +86,14 @@ bool BluetoothScanner::isAvailable() return true; } +/*! Returns true, if the discovering agent currently is running. */ bool BluetoothScanner::isRunning() { return m_discoveryAgent->isActive(); } +/*! This method will start the discovering process for the plugin with the given \a pluginId. + * Returns true if the discovery could be started. */ bool BluetoothScanner::discover(const PluginId &pluginId) { if (m_available && !m_discoveryAgent->isActive()) { diff --git a/libguh/devicemanager.cpp b/libguh/devicemanager.cpp index 043be2e7..f45e60c3 100644 --- a/libguh/devicemanager.cpp +++ b/libguh/devicemanager.cpp @@ -49,6 +49,8 @@ Allows to send network requests and receive replies. \value HardwareResourceUpnpDisovery Allowes to search a UPnP devices in the network. + \value HardwareResourceBluetoothLE + Allows to interact with bluetooth low energy devices. */ /*! \enum DeviceManager::DeviceError diff --git a/server/ruleengine.cpp b/server/ruleengine.cpp index 44b597c6..d57aa589 100644 --- a/server/ruleengine.cpp +++ b/server/ruleengine.cpp @@ -68,7 +68,7 @@ \value RuleErrorInvalidRuleActionParameter One of the given \l{RuleActionParam}{RuleActionParams} is not valid. \value RuleErrorTypesNotMatching - One of the RuleActionParams type does not match with the corresponding EventParam type. + The types of the \l{RuleActionParam} and the corresponding \l{Event} \l{Param} do not match. */ /*! \enum guhserver::RuleEngine::RemovePolicy