~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/solid/control/modemmanager_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

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
    Copyright (C) 2010-2011 Lamarque Souza <lamarque@gmail.com>
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Library General Public
 
8
    License version 2 as published by the Free Software Foundation.
 
9
 
 
10
    This library is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
    Library General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU Library General Public License
 
16
    along with this library; see the file COPYING.LIB.  If not, write to
 
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
    Boston, MA 02110-1301, USA.
 
19
 
 
20
*/
 
21
#ifndef SOLID_MODEMMANAGER_P_H
 
22
#define SOLID_MODEMMANAGER_P_H
 
23
 
 
24
#include <QObject>
 
25
#include <QMap>
 
26
#include <QPair>
 
27
 
 
28
#include "managerbase_p.h"
 
29
 
 
30
#include "modemmanager.h"
 
31
#include "modemmanagerinterface.h"
 
32
 
 
33
namespace Solid
 
34
{
 
35
namespace Control
 
36
{
 
37
    namespace Ifaces
 
38
    {
 
39
        class ModemManagerInterface;
 
40
    }
 
41
 
 
42
    class ModemManagerPrivate : public ModemManager::Notifier, public ManagerBasePrivate
 
43
    {
 
44
        Q_OBJECT
 
45
    public:
 
46
        ModemManagerPrivate();
 
47
        ~ModemManagerPrivate();
 
48
 
 
49
        ModemInterfaceList modemInterfaces();
 
50
        ModemInterface *findModemInterface(const QString &udi, const ModemInterface::GsmInterfaceType ifaceType);
 
51
 
 
52
    private Q_SLOTS:
 
53
        void _k_modemInterfaceAdded(const QString &udi);
 
54
        void _k_modemInterfaceRemoved(const QString &udi);
 
55
        void _k_destroyed(QObject *object);
 
56
 
 
57
    private:
 
58
        typedef QPair<ModemInterface *, QObject *> ModemInterfaceIfacePair;
 
59
 
 
60
        ModemInterfaceList buildDeviceList(const QStringList &udiList);
 
61
        ModemInterfaceIfacePair findRegisteredModemInterface(const QString &udi, const ModemInterface::GsmInterfaceType ifaceType);
 
62
 
 
63
        QMap<QString, QMap<ModemInterface::GsmInterfaceType, ModemInterfaceIfacePair> > m_modemInterfaceMap;
 
64
        ModemInterface m_invalidDevice;
 
65
    };
 
66
}
 
67
}
 
68
 
 
69
#endif