From b93069608e1d1fa71996ba158f8cbba4377acc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 16 Sep 2019 16:53:58 +0200 Subject: [PATCH] Update license header --- debian/control | 5 +- .../bluetooth/bluetoothserver.cpp | 25 +++++++- .../bluetooth/bluetoothserver.h | 21 +++++++ .../bluetooth/bluetoothuuids.h | 37 +++++++----- .../bluetooth/networkservice.cpp | 56 ++++++++++++------ .../bluetooth/networkservice.h | 31 ++++++---- .../bluetooth/wirelessservice.cpp | 58 ++++++++++--------- .../bluetooth/wirelessservice.h | 33 +++++++---- .../libnymea-networkmanager.pro | 22 ++++--- libnymea-networkmanager/networkconnection.cpp | 41 ++++++------- libnymea-networkmanager/networkconnection.h | 41 ++++++------- libnymea-networkmanager/networkdevice.cpp | 47 +++++++-------- libnymea-networkmanager/networkdevice.h | 41 ++++++------- libnymea-networkmanager/networkmanager.cpp | 41 ++++++------- libnymea-networkmanager/networkmanager.h | 41 ++++++------- .../networkmanagerutils.cpp | 41 ++++++------- libnymea-networkmanager/networkmanagerutils.h | 41 ++++++------- libnymea-networkmanager/networksettings.cpp | 43 +++++++------- libnymea-networkmanager/networksettings.h | 41 ++++++------- .../wirednetworkdevice.cpp | 41 ++++++------- libnymea-networkmanager/wirednetworkdevice.h | 41 ++++++------- .../wirelessaccesspoint.cpp | 41 ++++++------- libnymea-networkmanager/wirelessaccesspoint.h | 41 ++++++------- .../wirelessnetworkdevice.cpp | 41 ++++++------- .../wirelessnetworkdevice.h | 41 ++++++------- 25 files changed, 532 insertions(+), 420 deletions(-) diff --git a/debian/control b/debian/control index b6642eb..5f2dc95 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,8 @@ Build-Depends: debhelper (>= 9.0.0), qt5-qmake, qtbase5-dev, qtbase5-dev-tools, + libqt5bluetooth5, + qtconnectivity5-dev Standards-Version: 3.9.7 Package: libnymea-networkmanager @@ -15,7 +17,8 @@ Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - libqt5network5 + libqt5network5, + libqt5bluetooth5 Description: Qt 5 based library for the network-manager DBus API. Qt 5 based library for the network-manager DBus API. diff --git a/libnymea-networkmanager/bluetooth/bluetoothserver.cpp b/libnymea-networkmanager/bluetooth/bluetoothserver.cpp index eec76de..3eb3120 100644 --- a/libnymea-networkmanager/bluetooth/bluetoothserver.cpp +++ b/libnymea-networkmanager/bluetooth/bluetoothserver.cpp @@ -1,3 +1,24 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "bluetoothserver.h" #include "../networkmanager.h" #include "../networkmanagerutils.h" @@ -358,8 +379,8 @@ void BluetoothServer::start() m_genericAttributeService = m_controller->addService(genericAttributeServiceData(), m_controller); // Create custom services - m_networkService = new NetworkService(m_controller->addService(NetworkService::serviceData(), m_controller), m_controller); - m_wirelessService = new WirelessService(m_controller->addService(WirelessService::serviceData(), m_controller), m_controller); + m_networkService = new NetworkService(m_controller->addService(NetworkService::serviceData(), m_controller), m_networkManager, m_controller); + m_wirelessService = new WirelessService(m_controller->addService(WirelessService::serviceData(), m_controller), m_networkManager, m_controller); QLowEnergyAdvertisingData advertisingData; advertisingData.setDiscoverability(QLowEnergyAdvertisingData::DiscoverabilityGeneral); diff --git a/libnymea-networkmanager/bluetooth/bluetoothserver.h b/libnymea-networkmanager/bluetooth/bluetoothserver.h index 171ae1a..c16cc7b 100644 --- a/libnymea-networkmanager/bluetooth/bluetoothserver.h +++ b/libnymea-networkmanager/bluetooth/bluetoothserver.h @@ -1,3 +1,24 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef BLUETOOTHSERVER_H #define BLUETOOTHSERVER_H diff --git a/libnymea-networkmanager/bluetooth/bluetoothuuids.h b/libnymea-networkmanager/bluetooth/bluetoothuuids.h index bdf420e..3d32643 100644 --- a/libnymea-networkmanager/bluetooth/bluetoothuuids.h +++ b/libnymea-networkmanager/bluetooth/bluetoothuuids.h @@ -1,13 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2016 Simon Stürz * - * * - * This file is part of loopd. * - * * - * Loopd can not be copied and/or distributed without the express * - * permission of guh GmbH. * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef BLUETOOTHUUIDS_H #define BLUETOOTHUUIDS_H @@ -26,10 +37,4 @@ static QBluetoothUuid wirelessCommanderCharacteristicUuid = QBluetoothUuid(QUuid static QBluetoothUuid wirelessResponseCharacteristicUuid = QBluetoothUuid(QUuid("e081fec2-f757-4449-b9c9-bfa83133f7fc")); static QBluetoothUuid wirelessStateCharacteristicUuid = QBluetoothUuid(QUuid("e081fec3-f757-4449-b9c9-bfa83133f7fc")); -static QBluetoothUuid systemServiceUuid = QBluetoothUuid(QUuid("e081fed0-f757-4449-b9c9-bfa83133f7fc")); -static QBluetoothUuid systemCommanderCharacteristicUuid = QBluetoothUuid(QUuid("e081fed1-f757-4449-b9c9-bfa83133f7fc")); -static QBluetoothUuid systemResponseCharacteristicUuid = QBluetoothUuid(QUuid("e081fed2-f757-4449-b9c9-bfa83133f7fc")); -static QBluetoothUuid systemUpdateCharacteristicUuid = QBluetoothUuid(QUuid("e081fed3-f757-4449-b9c9-bfa83133f7fc")); - - #endif // BLUETOOTHUUIDS_H diff --git a/libnymea-networkmanager/bluetooth/networkservice.cpp b/libnymea-networkmanager/bluetooth/networkservice.cpp index 007aa41..9427739 100644 --- a/libnymea-networkmanager/bluetooth/networkservice.cpp +++ b/libnymea-networkmanager/bluetooth/networkservice.cpp @@ -1,3 +1,25 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + #include "networkservice.h" #include "bluetoothuuids.h" @@ -19,9 +41,9 @@ NetworkService::NetworkService(QLowEnergyService *service, NetworkManager *netwo connect(m_service, SIGNAL(error(QLowEnergyService::ServiceError)), this, SLOT(serviceError(QLowEnergyService::ServiceError))); // NetworkManager - connect(Loopd::instance()->networkManager(), &NetworkManager::stateChanged, this, &NetworkService::onNetworkManagerStateChanged); - connect(Loopd::instance()->networkManager(), &NetworkManager::networkingEnabledChanged, this, &NetworkService::onNetworkingEnabledChanged); - connect(Loopd::instance()->networkManager(), &NetworkManager::wirelessEnabledChanged, this, &NetworkService::onWirelessEnabledChanged); + connect(m_networkManager, &NetworkManager::stateChanged, this, &NetworkService::onNetworkManagerStateChanged); + connect(m_networkManager, &NetworkManager::networkingEnabledChanged, this, &NetworkService::onNetworkingEnabledChanged); + connect(m_networkManager, &NetworkManager::wirelessEnabledChanged, this, &NetworkService::onWirelessEnabledChanged); } QLowEnergyService *NetworkService::service() @@ -43,7 +65,7 @@ QLowEnergyServiceData NetworkService::serviceData() networkStatusData.setValue(QByteArray(1, 0)); networkStatusData.setProperties(QLowEnergyCharacteristic::Read | QLowEnergyCharacteristic::Notify); networkStatusData.addDescriptor(clientConfigDescriptorData); - networkStatusData.setValue(NetworkService::getNetworkManagerStateByteArray(Loopd::instance()->networkManager()->state())); + networkStatusData.setValue(NetworkService::getNetworkManagerStateByteArray(NetworkManager::NetworkManagerStateUnknown)); serviceData.addCharacteristic(networkStatusData); // Network manager commander ef6d6612-b8af-49e0-9eca-ab343513641c @@ -66,7 +88,7 @@ QLowEnergyServiceData NetworkService::serviceData() networkingEnabledStatusData.setUuid(networkingEnabledCharacteristicUuid); networkingEnabledStatusData.setValue(QByteArray(1, 0)); networkingEnabledStatusData.setProperties(QLowEnergyCharacteristic::Read | QLowEnergyCharacteristic::Notify); - networkingEnabledStatusData.setValue(QByteArray::number(static_cast(Loopd::instance()->networkManager()->networkingEnabled()))); + networkingEnabledStatusData.setValue(QByteArray::number(0)); serviceData.addCharacteristic(networkingEnabledStatusData); // Wireless enabled ef6d6615-b8af-49e0-9eca-ab343513641c @@ -74,7 +96,7 @@ QLowEnergyServiceData NetworkService::serviceData() wirelessEnabledStatusData.setUuid(wirelessEnabledCharacteristicUuid); wirelessEnabledStatusData.setValue(QByteArray(1, 0)); wirelessEnabledStatusData.setProperties(QLowEnergyCharacteristic::Read | QLowEnergyCharacteristic::Notify); - wirelessEnabledStatusData.setValue(QByteArray::number(static_cast(Loopd::instance()->networkManager()->wirelessEnabled()))); + wirelessEnabledStatusData.setValue(QByteArray::number(0)); serviceData.addCharacteristic(wirelessEnabledStatusData); return serviceData; @@ -179,7 +201,7 @@ void NetworkService::characteristicChanged(const QLowEnergyCharacteristic &chara return; } - if (!Loopd::instance()->networkManager()->available()) { + if (!m_networkManager->available()) { qCWarning(dcNetworkManagerBluetoothServer()) << "NetworkService: Networkmanager not available"; sendResponse(NetworkServiceResponseNetworkManagerNotAvailable); return; @@ -249,19 +271,19 @@ void NetworkService::processCommand(const NetworkServiceCommand &command) switch (command) { case NetworkServiceCommandEnableNetworking: qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: received \"Enable networking\" command"; - Loopd::instance()->networkManager()->enableNetworking(true); + m_networkManager->enableNetworking(true); break; case NetworkServiceCommandDisableNetworking: qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: received \"Disable networking\" command"; - Loopd::instance()->networkManager()->enableNetworking(false); + m_networkManager->enableNetworking(false); break; case NetworkServiceCommandEnableWireless: qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: received \"Enable wireless networking\" command"; - Loopd::instance()->networkManager()->enableWireless(true); + m_networkManager->enableWireless(true); break; case NetworkServiceCommandDisableWireless: qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: received \"Disable wireless networking\" command"; - Loopd::instance()->networkManager()->enableWireless(false); + m_networkManager->enableWireless(false); break; default: qCWarning(dcNetworkManagerBluetoothServer()) << "NetworkService: Unhandled command" << command; @@ -283,8 +305,8 @@ bool NetworkService::onNetworkManagerStateChanged() return false; } - qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify state changed" << NetworkService::getNetworkManagerStateByteArray(Loopd::instance()->networkManager()->state()); - m_service->writeCharacteristic(characteristic, NetworkService::getNetworkManagerStateByteArray(Loopd::instance()->networkManager()->state())); + qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify state changed" << NetworkService::getNetworkManagerStateByteArray(m_networkManager->state()); + m_service->writeCharacteristic(characteristic, NetworkService::getNetworkManagerStateByteArray(m_networkManager->state())); return true; } @@ -301,8 +323,8 @@ bool NetworkService::onNetworkingEnabledChanged() return false; } - qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify networking enabled changed:" << (Loopd::instance()->networkManager()->networkingEnabled() ? "enabled" : "disabled"); - m_service->writeCharacteristic(characteristic, Loopd::instance()->networkManager()->networkingEnabled() ? QByteArray::fromHex("01") : QByteArray::fromHex("00")); + qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify networking enabled changed:" << (m_networkManager->networkingEnabled() ? "enabled" : "disabled"); + m_service->writeCharacteristic(characteristic, m_networkManager->networkingEnabled() ? QByteArray::fromHex("01") : QByteArray::fromHex("00")); return true; } @@ -319,7 +341,7 @@ bool NetworkService::onWirelessEnabledChanged() return false; } - qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify wireless networking enabled changed:" << (Loopd::instance()->networkManager()->wirelessEnabled() ? "enabled" : "disabled"); - m_service->writeCharacteristic(characteristic, Loopd::instance()->networkManager()->wirelessEnabled() ? QByteArray::fromHex("01") : QByteArray::fromHex("00")); + qCDebug(dcNetworkManagerBluetoothServer()) << "NetworkService: Notify wireless networking enabled changed:" << (m_networkManager->wirelessEnabled() ? "enabled" : "disabled"); + m_service->writeCharacteristic(characteristic, m_networkManager->wirelessEnabled() ? QByteArray::fromHex("01") : QByteArray::fromHex("00")); return true; } diff --git a/libnymea-networkmanager/bluetooth/networkservice.h b/libnymea-networkmanager/bluetooth/networkservice.h index c9059d8..66c3a86 100644 --- a/libnymea-networkmanager/bluetooth/networkservice.h +++ b/libnymea-networkmanager/bluetooth/networkservice.h @@ -1,13 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2016 Simon Stürz * - * * - * This file is part of loopd. * - * * - * Loopd can not be copied and/or distributed without the express * - * permission of guh GmbH. * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKSERVICE_H #define NETWORKSERVICE_H diff --git a/libnymea-networkmanager/bluetooth/wirelessservice.cpp b/libnymea-networkmanager/bluetooth/wirelessservice.cpp index 1e3a7b3..809b742 100644 --- a/libnymea-networkmanager/bluetooth/wirelessservice.cpp +++ b/libnymea-networkmanager/bluetooth/wirelessservice.cpp @@ -1,29 +1,37 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2016 Simon Stürz * - * * - * This file is part of loopd. * - * * - * Loopd can not be copied and/or distributed without the express * - * permission of guh GmbH. * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "wirelessservice.h" #include "bluetoothuuids.h" -#include "loggingcategory.h" -#include "loopd.h" #include #include #include #include -WirelessService::WirelessService(QLowEnergyService *service, QObject *parent) : +WirelessService::WirelessService(QLowEnergyService *service, NetworkManager *networkManager, QObject *parent) : QObject(parent), m_service(service), - m_device(nullptr), - m_readingInputData(false) + m_networkManager(networkManager) { qCDebug(dcNetworkManagerBluetoothServer()) << "Create WirelessService."; @@ -35,13 +43,13 @@ WirelessService::WirelessService(QLowEnergyService *service, QObject *parent) : connect(m_service, SIGNAL(error(QLowEnergyService::ServiceError)), this, SLOT(serviceError(QLowEnergyService::ServiceError))); // Get the wireless network device if there is any - if (!Loopd::instance()->networkManager()->wirelessAvailable()) { + if (!m_networkManager->wirelessAvailable()) { qCWarning(dcNetworkManagerBluetoothServer()) << "WirelessService: There is no wireless network device available"; return; } - qCDebug(dcNetworkManagerBluetoothServer()) << "WirelessService: Using" << Loopd::instance()->networkManager()->wirelessNetworkDevices().first(); - m_device = Loopd::instance()->networkManager()->wirelessNetworkDevices().first(); + qCDebug(dcNetworkManagerBluetoothServer()) << "WirelessService: Using" << m_networkManager->wirelessNetworkDevices().first(); + m_device = m_networkManager->wirelessNetworkDevices().first(); connect(m_device, &WirelessNetworkDevice::bitRateChanged, this, &WirelessService::onWirelessDeviceBitRateChanged); connect(m_device, &WirelessNetworkDevice::stateChanged, this, &WirelessService::onWirelessDeviceStateChanged); } @@ -80,11 +88,7 @@ QLowEnergyServiceData WirelessService::serviceData() wirelessStatusCharacteristicData.setProperties(QLowEnergyCharacteristic::Read | QLowEnergyCharacteristic::Notify); wirelessStatusCharacteristicData.addDescriptor(clientConfigDescriptorData); wirelessStatusCharacteristicData.setValueLength(1, 1); - if (!Loopd::instance()->networkManager()->wirelessAvailable()) { - wirelessStatusCharacteristicData.setValue(WirelessService::getWirelessNetworkDeviceState(NetworkDevice::NetworkDeviceStateUnavailable)); - } else { - wirelessStatusCharacteristicData.setValue(WirelessService::getWirelessNetworkDeviceState(Loopd::instance()->networkManager()->wirelessNetworkDevices().first()->deviceState())); - } + wirelessStatusCharacteristicData.setValue(WirelessService::getWirelessNetworkDeviceState(NetworkDevice::NetworkDeviceStateUnavailable)); serviceData.addCharacteristic(wirelessStatusCharacteristicData); return serviceData; @@ -94,7 +98,7 @@ QLowEnergyServiceData WirelessService::serviceData() WirelessService::WirelessServiceResponse WirelessService::checkWirelessErrors() { // Check possible errors - if (!Loopd::instance()->networkManager()->available()) { + if (!m_networkManager->available()) { qCWarning(dcNetworkManagerBluetoothServer()) << "WirelessService: The networkmanager is not available."; return WirelessServiceResponseNetworkManagerNotAvailable; } @@ -104,12 +108,12 @@ WirelessService::WirelessServiceResponse WirelessService::checkWirelessErrors() return WirelessServiceResponseWirelessNotAvailable; } - if (!Loopd::instance()->networkManager()->networkingEnabled()) { + if (!m_networkManager->networkingEnabled()) { qCWarning(dcNetworkManagerBluetoothServer()) << "WirelessService: Networking not enabled"; return WirelessServiceResponseNetworkingNotEnabled; } - if (!Loopd::instance()->networkManager()->wirelessEnabled()) { + if (!m_networkManager->wirelessEnabled()) { qCWarning(dcNetworkManagerBluetoothServer()) << "WirelessService: Wireless not enabled"; return WirelessServiceResponseWirelessNotEnabled; } @@ -241,7 +245,7 @@ void WirelessService::commandConnect(const QVariantMap &request) return; } - NetworkManager::NetworkManagerError networkError = Loopd::instance()->networkManager()->connectWifi(m_device->interface(), parameters.value("e").toString(), parameters.value("p").toString()); + NetworkManager::NetworkManagerError networkError = m_networkManager->connectWifi(m_device->interface(), parameters.value("e").toString(), parameters.value("p").toString()); WirelessService::WirelessServiceResponse responseCode = WirelessService::WirelessServiceResponseSuccess; switch (networkError) { case NetworkManager::NetworkManagerErrorNoError: diff --git a/libnymea-networkmanager/bluetooth/wirelessservice.h b/libnymea-networkmanager/bluetooth/wirelessservice.h index 92c641f..71185ea 100644 --- a/libnymea-networkmanager/bluetooth/wirelessservice.h +++ b/libnymea-networkmanager/bluetooth/wirelessservice.h @@ -1,13 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2016 Simon Stürz * - * * - * This file is part of loopd. * - * * - * Loopd can not be copied and/or distributed without the express * - * permission of guh GmbH. * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef WIRELESSSERVICE_H #define WIRELESSSERVICE_H @@ -59,7 +70,7 @@ private: NetworkManager *m_networkManager = nullptr; WirelessNetworkDevice *m_device = nullptr; - bool m_readingInputData; + bool m_readingInputData = false; QByteArray m_inputDataStream; WirelessServiceResponse checkWirelessErrors(); diff --git a/libnymea-networkmanager/libnymea-networkmanager.pro b/libnymea-networkmanager/libnymea-networkmanager.pro index bda3742..3463fe6 100644 --- a/libnymea-networkmanager/libnymea-networkmanager.pro +++ b/libnymea-networkmanager/libnymea-networkmanager.pro @@ -9,10 +9,6 @@ QMAKE_LFLAGS *= -std=c++11 DEFINES += VERSION_STRING=\\\"$${VERSION_STRING}\\\" HEADERS += \ - bluetooth/bluetoothserver.h \ - bluetooth/bluetoothuuids.h \ - bluetooth/networkservice.h \ - bluetooth/wirelessservice.h \ networkmanager.h \ networkconnection.h \ networkdevice.h \ @@ -20,11 +16,9 @@ HEADERS += \ wirednetworkdevice.h \ wirelessaccesspoint.h \ wirelessnetworkdevice.h \ - networkmanagerutils.h \ + networkmanagerutils.h SOURCES += \ - bluetooth/networkservice.cpp \ - bluetooth/wirelessservice.cpp \ networkmanager.cpp \ networkconnection.cpp \ networkdevice.cpp \ @@ -32,19 +26,23 @@ SOURCES += \ wirednetworkdevice.cpp \ wirelessaccesspoint.cpp \ wirelessnetworkdevice.cpp \ - networkmanagerutils.cpp \ + networkmanagerutils.cpp equals(QT_MAJOR_VERSION, 5):!lessThan(QT_MINOR_VERSION, 7) { message(Building with Bluetooth LE server functionality. Qt $${QT_VERSION}.) QT += bluetooth + HEADERS += \ - bluetooth/bluetoothserver.h + bluetooth/bluetoothserver.h \ + bluetooth/bluetoothuuids.h \ + bluetooth/networkservice.h \ + bluetooth/wirelessservice.h \ SOURCES += \ - bluetooth/bluetoothserver.cpp - - + bluetooth/bluetoothserver.cpp \ + bluetooth/networkservice.cpp \ + bluetooth/wirelessservice.cpp \ } else { message(Bluetooth LE server functionality not supported with Qt $${QT_VERSION}.) } diff --git a/libnymea-networkmanager/networkconnection.cpp b/libnymea-networkmanager/networkconnection.cpp index a81a358..040f00d 100644 --- a/libnymea-networkmanager/networkconnection.cpp +++ b/libnymea-networkmanager/networkconnection.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "networkconnection.h" #include "networkmanagerutils.h" diff --git a/libnymea-networkmanager/networkconnection.h b/libnymea-networkmanager/networkconnection.h index 8da6d84..312332f 100644 --- a/libnymea-networkmanager/networkconnection.h +++ b/libnymea-networkmanager/networkconnection.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKCONNECTION_H #define NETWORKCONNECTION_H diff --git a/libnymea-networkmanager/networkdevice.cpp b/libnymea-networkmanager/networkdevice.cpp index 4bf6931..1521cd7 100644 --- a/libnymea-networkmanager/networkdevice.cpp +++ b/libnymea-networkmanager/networkdevice.cpp @@ -1,25 +1,26 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/*! \enum guhserver::NetworkDevice::NetworkDeviceState +/*! \enum NetworkDevice::NetworkDeviceState \value NetworkDeviceStateUnknown \value NetworkDeviceStateUnmanaged \value NetworkDeviceStateUnavailable @@ -35,7 +36,7 @@ \value NetworkDeviceStateFailed */ -/*! \enum guhserver::NetworkDevice::NetworkDeviceStateReason +/*! \enum NetworkDevice::NetworkDeviceStateReason \value NetworkDeviceStateReasonNone \value NetworkDeviceStateReasonUnknown \value NetworkDeviceStateReasonNowManaged @@ -102,7 +103,7 @@ */ -/*! \enum guhserver::NetworkDevice::NetworkDeviceType +/*! \enum NetworkDevice::NetworkDeviceType \value NetworkDeviceTypeUnknown \value NetworkDeviceTypeEthernet \value NetworkDeviceTypeWifi diff --git a/libnymea-networkmanager/networkdevice.h b/libnymea-networkmanager/networkdevice.h index f381c1b..8a04bee 100644 --- a/libnymea-networkmanager/networkdevice.h +++ b/libnymea-networkmanager/networkdevice.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKDEVICE_H #define NETWORKDEVICE_H diff --git a/libnymea-networkmanager/networkmanager.cpp b/libnymea-networkmanager/networkmanager.cpp index 18d7d1f..2544a04 100644 --- a/libnymea-networkmanager/networkmanager.cpp +++ b/libnymea-networkmanager/networkmanager.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "networkmanager.h" #include "networkconnection.h" diff --git a/libnymea-networkmanager/networkmanager.h b/libnymea-networkmanager/networkmanager.h index 5e21a89..58caa90 100644 --- a/libnymea-networkmanager/networkmanager.h +++ b/libnymea-networkmanager/networkmanager.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKMANAGER_H #define NETWORKMANAGER_H diff --git a/libnymea-networkmanager/networkmanagerutils.cpp b/libnymea-networkmanager/networkmanagerutils.cpp index a1857f8..7b53e45 100644 --- a/libnymea-networkmanager/networkmanagerutils.cpp +++ b/libnymea-networkmanager/networkmanagerutils.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "networkmanagerutils.h" diff --git a/libnymea-networkmanager/networkmanagerutils.h b/libnymea-networkmanager/networkmanagerutils.h index 742afe9..ac5e50c 100644 --- a/libnymea-networkmanager/networkmanagerutils.h +++ b/libnymea-networkmanager/networkmanagerutils.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKMANAGERUTILS_H #define NETWORKMANAGERUTILS_H diff --git a/libnymea-networkmanager/networksettings.cpp b/libnymea-networkmanager/networksettings.cpp index f6bbaba..25ad349 100644 --- a/libnymea-networkmanager/networksettings.cpp +++ b/libnymea-networkmanager/networksettings.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "networksettings.h" #include "networkmanagerutils.h" @@ -100,7 +101,7 @@ void NetworkSettings::connectionRemoved(const QDBusObjectPath &objectPath) void NetworkSettings::propertiesChanged(const QVariantMap &properties) { - Q_UNUSED(properties); + Q_UNUSED(properties) // TODO: handle settings changes //qCDebug(dcNetworkManager()) << "Settins: properties changed" << properties; } diff --git a/libnymea-networkmanager/networksettings.h b/libnymea-networkmanager/networksettings.h index f1b56ab..7d0e1d7 100644 --- a/libnymea-networkmanager/networksettings.h +++ b/libnymea-networkmanager/networksettings.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NETWORKSETTINGS_H #define NETWORKSETTINGS_H diff --git a/libnymea-networkmanager/wirednetworkdevice.cpp b/libnymea-networkmanager/wirednetworkdevice.cpp index c2bf35c..8269139 100644 --- a/libnymea-networkmanager/wirednetworkdevice.cpp +++ b/libnymea-networkmanager/wirednetworkdevice.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "wirednetworkdevice.h" diff --git a/libnymea-networkmanager/wirednetworkdevice.h b/libnymea-networkmanager/wirednetworkdevice.h index 10d22fd..3de3b46 100644 --- a/libnymea-networkmanager/wirednetworkdevice.h +++ b/libnymea-networkmanager/wirednetworkdevice.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef WIREDNETWORKDEVICE_H #define WIREDNETWORKDEVICE_H diff --git a/libnymea-networkmanager/wirelessaccesspoint.cpp b/libnymea-networkmanager/wirelessaccesspoint.cpp index c74e4ac..8c8260c 100644 --- a/libnymea-networkmanager/wirelessaccesspoint.cpp +++ b/libnymea-networkmanager/wirelessaccesspoint.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*! \enum guhserver::WirelessAccessPoint::ApSecurityMode \value ApSecurityModeNone diff --git a/libnymea-networkmanager/wirelessaccesspoint.h b/libnymea-networkmanager/wirelessaccesspoint.h index 7f3ce42..390acbc 100644 --- a/libnymea-networkmanager/wirelessaccesspoint.h +++ b/libnymea-networkmanager/wirelessaccesspoint.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef WIRELESSACCESSPOINT_H #define WIRELESSACCESSPOINT_H diff --git a/libnymea-networkmanager/wirelessnetworkdevice.cpp b/libnymea-networkmanager/wirelessnetworkdevice.cpp index 693533f..17cdcbb 100644 --- a/libnymea-networkmanager/wirelessnetworkdevice.cpp +++ b/libnymea-networkmanager/wirelessnetworkdevice.cpp @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*! \fn void WirelessNetworkDevice::bitRateChanged(const int &bitRate); This signal will be emitted when the \a bitRate of this \l{WirelessNetworkDevice} has changed. diff --git a/libnymea-networkmanager/wirelessnetworkdevice.h b/libnymea-networkmanager/wirelessnetworkdevice.h index f406ec8..15185ce 100644 --- a/libnymea-networkmanager/wirelessnetworkdevice.h +++ b/libnymea-networkmanager/wirelessnetworkdevice.h @@ -1,23 +1,24 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * - * Copyright (C) 2018 Simon Stürz * - * * - * This file is part of libnymea-networkmanager. * - * * - * libnymea-networkmanager is free software: you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, * - * or (at your option) any later version. * - * * - * libnymea-networkmanager is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along * - * with libnymea-networkmanager. If not, see . * - * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * Copyright (C) 2018-2019 Simon Stürz * + * * + * This file is part of libnymea-networkmanager. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; If not, see * + * . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef WIRELESSNETWORKMANAGER_H #define WIRELESSNETWORKMANAGER_H