not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / solid / control / networkmanager_p.h
blob98081aae364809773e87c59fe43fd9cf82cbda5a
1 /* This file is part of the KDE project
2 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2006-2007 Kevin Ottens <ervin@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef SOLID_NETWORKMANAGER_P_H
21 #define SOLID_NETWORKMANAGER_P_H
23 #include <QObject>
24 #include <QMap>
25 #include <QPair>
27 #include "managerbase_p.h"
29 #include "networkmanager.h"
30 #include "networkinterface.h"
32 namespace Solid
34 namespace Control
36 namespace Ifaces
38 class NetworkInterface;
41 class NetworkManagerPrivate : public NetworkManager::Notifier, public ManagerBasePrivate
43 Q_OBJECT
44 public:
45 NetworkManagerPrivate();
46 ~NetworkManagerPrivate();
48 NetworkInterfaceList networkInterfaces();
49 NetworkInterface *findNetworkInterface(const QString &uni);
51 private Q_SLOTS:
52 void _k_networkInterfaceAdded(const QString &uni);
53 void _k_networkInterfaceRemoved(const QString &uni);
54 void _k_destroyed(QObject *object);
56 private:
57 NetworkInterfaceList buildDeviceList(const QStringList &uniList);
58 QPair<NetworkInterface *, QObject *> findRegisteredNetworkInterface(const QString &uni);
60 QMap<QString, QPair<NetworkInterface *, QObject *> > m_networkInterfaceMap;
61 NetworkInterface m_invalidDevice;
66 #endif