~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to solid/control/solid/control/networkmanager_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
4
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
18
 
 
19
*/
 
20
#ifndef SOLID_NETWORKMANAGER_P_H
 
21
#define SOLID_NETWORKMANAGER_P_H
 
22
 
 
23
#include <QObject>
 
24
#include <QMap>
 
25
#include <QPair>
 
26
 
 
27
#include "managerbase_p.h"
 
28
 
 
29
#include "networkmanager.h"
 
30
#include "networkinterface.h"
 
31
 
 
32
namespace Solid
 
33
{
 
34
namespace Control
 
35
{
 
36
    namespace Ifaces
 
37
    {
 
38
        class NetworkInterface;
 
39
    }
 
40
 
 
41
    class NetworkManagerPrivate : public NetworkManager::Notifier, public ManagerBasePrivate
 
42
    {
 
43
        Q_OBJECT
 
44
    public:
 
45
        NetworkManagerPrivate();
 
46
        ~NetworkManagerPrivate();
 
47
 
 
48
        NetworkInterfaceList networkInterfaces();
 
49
        const NetworkInterface &findNetworkInterface(const QString &uni);
 
50
 
 
51
    private Q_SLOTS:
 
52
        void _k_networkInterfaceAdded(const QString &uni);
 
53
        void _k_networkInterfaceRemoved(const QString &uni);
 
54
        void _k_destroyed(QObject *object);
 
55
 
 
56
    private:
 
57
        NetworkInterfaceList buildDeviceList(const QStringList &uniList);
 
58
        QPair<NetworkInterface *, Ifaces::NetworkInterface *> findRegisteredNetworkInterface(const QString &uni);
 
59
 
 
60
        QMap<QString, QPair<NetworkInterface *, Ifaces::NetworkInterface *> > m_networkInterfaceMap;
 
61
        NetworkInterface m_invalidDevice;
 
62
    };
 
63
}
 
64
}
 
65
 
 
66
#endif