File indexing completed on 2024-03-24 15:41:26

0001 /*
0002     SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef NETWORKMANAGERQT_ACTIVECONNECTION_P_H
0008 #define NETWORKMANAGERQT_ACTIVECONNECTION_P_H
0009 
0010 #include "activeconnection.h"
0011 #include "activeconnectioninterface.h"
0012 
0013 namespace NetworkManager
0014 {
0015 class ActiveConnectionPrivate : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit ActiveConnectionPrivate(const QString &, ActiveConnection *q);
0020     ~ActiveConnectionPrivate() override;
0021     static NetworkManager::ActiveConnection::State convertActiveConnectionState(uint);
0022     static NetworkManager::ActiveConnection::Reason convertActiveConnectionReason(uint);
0023     NetworkManager::Connection::Ptr connection;
0024     QString path;
0025     bool default4;
0026     bool default6;
0027     QStringList devices;
0028     OrgFreedesktopNetworkManagerConnectionActiveInterface iface;
0029     mutable Dhcp4Config::Ptr dhcp4Config;
0030     QString dhcp4ConfigPath;
0031     mutable Dhcp6Config::Ptr dhcp6Config;
0032     QString dhcp6ConfigPath;
0033     mutable IpConfig ipV4Config;
0034     QString ipV4ConfigPath;
0035     mutable IpConfig ipV6Config;
0036     QString ipV6ConfigPath;
0037     QString id;
0038     QString type;
0039     QString specificObject;
0040     ActiveConnection::State state;
0041     bool vpn;
0042     QString uuid;
0043     QString master;
0044 
0045     Q_DECLARE_PUBLIC(ActiveConnection)
0046     ActiveConnection *q_ptr;
0047 
0048 public:
0049     /**
0050      * When subclassing make sure to call the parent class method
0051      * if the property was not useful to your new class
0052      */
0053     virtual void propertyChanged(const QString &property, const QVariant &value);
0054 
0055 public Q_SLOTS:
0056     void propertiesChanged(const QVariantMap &properties);
0057     void stateChanged(uint state, uint reason);
0058 
0059 private Q_SLOTS:
0060     void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
0061 };
0062 
0063 }
0064 #endif