File indexing completed on 2024-03-24 15:27:57
0001 /* This file is part of the KDE project 0002 0003 Copyright (c) 2011 Lamarque V. Souza <lamarque@gmail.com> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Lesser General Public 0007 License as published by the Free Software Foundation; either 0008 version 2.1 of the License, or (at your option) version 3, or any 0009 later version accepted by the membership of KDE e.V. (or its 0010 successor approved by the membership of KDE e.V.), which shall 0011 act as a proxy defined in Section 6 of version 3 of the license. 0012 0013 This library is distributed in the hope that it will be useful, 0014 but WITHOUT ANY WARRANTY; without even the implied warranty of 0015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0016 Lesser General Public License for more details. 0017 0018 You should have received a copy of the GNU Lesser General Public 0019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 0020 */ 0021 0022 #ifndef NETWORKSTATUS_WICDSTATUS_H 0023 #define NETWORKSTATUS_WICDSTATUS_H 0024 0025 #include "systemstatusinterface.h" 0026 0027 #include <QDBusInterface> 0028 0029 class WicdStatus : public SystemStatusInterface 0030 { 0031 Q_OBJECT 0032 public: 0033 WicdStatus( QObject *parent = nullptr ); 0034 0035 Solid::Networking::Status status() const override; 0036 bool isSupported() const override; 0037 QString serviceName() const override; 0038 0039 private Q_SLOTS: 0040 void wicdStateChanged(); 0041 0042 private: 0043 class Wicd { 0044 public: 0045 enum ConnectionStatus { 0046 NOT_CONNECTED = 0, 0047 CONNECTING = 1, 0048 WIRELESS = 2, 0049 WIRED = 3, 0050 SUSPENDED = 4, 0051 Unknown = 16 0052 }; 0053 }; 0054 0055 mutable QDBusInterface m_wicd; 0056 Solid::Networking::Status cachedState; 0057 }; 0058 0059 #endif 0060