add documentation

This commit is contained in:
Simon Stürz 2015-03-31 14:27:31 +02:00 committed by Michael Zanetti
parent 6ea0e0c4a9
commit 549a2c8402
3 changed files with 26 additions and 1 deletions

View File

@ -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<QBluetoothDeviceInfo> &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" #include "bluetoothscanner.h"
/*! Construct the hardware resource BluetoothScanner with the given \a parent. */
BluetoothScanner::BluetoothScanner(QObject *parent) : BluetoothScanner::BluetoothScanner(QObject *parent) :
QObject(parent) QObject(parent)
{ {
@ -27,6 +46,7 @@ BluetoothScanner::BluetoothScanner(QObject *parent) :
connect(m_timer, &QTimer::timeout, this, &BluetoothScanner::discoveryTimeout); connect(m_timer, &QTimer::timeout, this, &BluetoothScanner::discoveryTimeout);
} }
/*! Returns true, if a bluetooth hardware is available. */
bool BluetoothScanner::isAvailable() bool BluetoothScanner::isAvailable()
{ {
//Using default Bluetooth adapter //Using default Bluetooth adapter
@ -66,11 +86,14 @@ bool BluetoothScanner::isAvailable()
return true; return true;
} }
/*! Returns true, if the discovering agent currently is running. */
bool BluetoothScanner::isRunning() bool BluetoothScanner::isRunning()
{ {
return m_discoveryAgent->isActive(); 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) bool BluetoothScanner::discover(const PluginId &pluginId)
{ {
if (m_available && !m_discoveryAgent->isActive()) { if (m_available && !m_discoveryAgent->isActive()) {

View File

@ -49,6 +49,8 @@
Allows to send network requests and receive replies. Allows to send network requests and receive replies.
\value HardwareResourceUpnpDisovery \value HardwareResourceUpnpDisovery
Allowes to search a UPnP devices in the network. Allowes to search a UPnP devices in the network.
\value HardwareResourceBluetoothLE
Allows to interact with bluetooth low energy devices.
*/ */
/*! \enum DeviceManager::DeviceError /*! \enum DeviceManager::DeviceError

View File

@ -68,7 +68,7 @@
\value RuleErrorInvalidRuleActionParameter \value RuleErrorInvalidRuleActionParameter
One of the given \l{RuleActionParam}{RuleActionParams} is not valid. One of the given \l{RuleActionParam}{RuleActionParams} is not valid.
\value RuleErrorTypesNotMatching \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 /*! \enum guhserver::RuleEngine::RemovePolicy