File indexing completed on 2024-05-12 17:00:16
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "systemstats/SensorPlugin.h" 0010 0011 class NetworkPrivate; 0012 class NetworkDevice; 0013 0014 class NetworkPlugin : public KSysGuard::SensorPlugin 0015 { 0016 Q_OBJECT 0017 public: 0018 NetworkPlugin(QObject *parent, const QVariantList &args); 0019 ~NetworkPlugin() override; 0020 0021 QString providerName() const override 0022 { 0023 return QStringLiteral("network"); 0024 } 0025 0026 void onDeviceAdded(NetworkDevice *device); 0027 void onDeviceRemoved(NetworkDevice *device); 0028 0029 void update() override; 0030 0031 private: 0032 std::unique_ptr<NetworkPrivate> d; 0033 };