2 Copyright 2008 Will Stephenson <wstephenson@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License or (at your option) version 3 or any later version
8 accepted by the membership of KDE e.V. (or its successor approved
9 by the membership of KDE e.V.), which shall act as a proxy
10 defined in Section 14 of version 3 of the license.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef NM07_NETWORKMANAGER_H
22 #define NM07_NETWORKMANAGER_H
24 #include "solid/control/ifaces/networkmanager.h"
25 #include <QDBusObjectPath>
26 #include <kdemacros.h>
28 class NMNetworkInterface
;
29 class NMNetworkManagerPrivate
;
31 class KDE_EXPORT NMNetworkManager
: public Solid::Control::Ifaces::NetworkManager
34 Q_DECLARE_PRIVATE(NMNetworkManager
)
35 Q_INTERFACES(Solid::Control::Ifaces::NetworkManager
)
38 static const QString DBUS_SERVICE
;
39 static const QString DBUS_DAEMON_PATH
;
40 static const QString DBUS_USER_SETTINGS_PATH
;
41 static const QString DBUS_SYSTEM_SETTINGS_PATH
;
43 NMNetworkManager(QObject
* parent
, const QStringList
& args
);
45 Solid::Networking::Status
status() const;
46 QStringList
networkInterfaces() const;
47 QObject
*createNetworkInterface(const QString
&uni
);
48 bool isNetworkingEnabled() const;
49 bool isWirelessEnabled() const;
50 bool isWirelessHardwareEnabled() const;
51 void activateConnection(const QString
& interfaceUni
, const QString
& connectionUni
, const QVariantMap
& connectionParameters
);
52 void deactivateConnection(const QString
& activeConnection
);
53 QStringList
activeConnections() const;
55 void setNetworkingEnabled(bool enabled
);
56 void setWirelessEnabled(bool enabled
);
59 void statusChanged(Solid::Networking::Status status
);
60 void networkInterfaceAdded(const QString
& uni
);
61 void networkInterfaceRemoved(const QString
& uni
);
62 void wirelessEnabledChanged(bool);
63 void networkingEnabledChanged(bool);
64 void activeConnectionsChanged();
67 void deviceAdded(const QDBusObjectPath
&state
);
68 void deviceRemoved(const QDBusObjectPath
&state
);
69 void stateChanged(uint state
);
70 void propertiesChanged(const QVariantMap
&properties
);
71 void nameOwnerChanged(QString
, QString
, QString
);
73 static Solid::Networking::Status
convertNMState(uint state
);
75 NMNetworkManagerPrivate
* d_ptr
;