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

« back to all changes in this revision

Viewing changes to solid/modemmanager-0.4/modeminterface.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
/*
 
2
Copyright 2008 Will Stephenson <wstephenson@kde.org>
 
3
Copyright 2010 Lamarque Souza <lamarque@gmail.com>
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public License as
 
7
published by the Free Software Foundation; either version 2 of
 
8
the License or (at your option) version 3 or any later version
 
9
accepted by the membership of KDE e.V. (or its successor approved
 
10
by the membership of KDE e.V.), which shall act as a prox
 
11
defined in Section 14 of version 3 of the license.
 
12
 
 
13
This program is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU General Public License
 
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
 
 
22
#ifndef MM04_MODEMINTERFACE_H
 
23
#define MM04_MODEMINTERFACE_H
 
24
 
 
25
#include "solid/control/solid_control_export.h"
 
26
#include "solid/control/ifaces/modeminterface.h"
 
27
 
 
28
class MMModemInterfacePrivate;
 
29
class MMModemManager;
 
30
 
 
31
class KDE_EXPORT MMModemInterface : public QObject, virtual public Solid::Control::Ifaces::ModemInterface
 
32
{
 
33
Q_OBJECT
 
34
Q_DECLARE_PRIVATE(MMModemInterface)
 
35
Q_INTERFACES(Solid::Control::Ifaces::ModemInterface)
 
36
Q_PROPERTY(QString udi READ udi)
 
37
 
 
38
public:
 
39
    MMModemInterface( const QString & path, MMModemManager * manager, QObject * parent );
 
40
    MMModemInterface( MMModemInterfacePrivate &dd, MMModemManager * manager, QObject * parent );
 
41
    virtual ~MMModemInterface();
 
42
 
 
43
    QString udi() const;
 
44
 
 
45
    // From org.freedesktop.ModemManager.Modem
 
46
    void enable(const bool enable);
 
47
    void connectModem(const QString & number);
 
48
    void disconnectModem();
 
49
    Solid::Control::ModemInterface::Ip4ConfigType getIp4Config();
 
50
    Solid::Control::ModemInterface::InfoType getInfo();
 
51
 
 
52
    QString device() const;
 
53
    QString masterDevice() const;
 
54
    QString driver() const;
 
55
    Solid::Control::ModemInterface::Type type() const;
 
56
    bool enabled() const;
 
57
    QString unlockRequired() const;
 
58
    Solid::Control::ModemInterface::Method ipMethod() const;
 
59
 
 
60
    // From org.freedesktop.ModemManager.Modem.Simple
 
61
    void connectModem(const QVariantMap & properties);
 
62
    QVariantMap getStatus();
 
63
public Q_SLOTS:
 
64
    void propertiesChanged(const QString & interface, const QVariantMap & properties);
 
65
 
 
66
Q_SIGNALS:
 
67
    void deviceChanged(const QString & device);
 
68
    void masterDeviceChanged(const QString & masterDevice);
 
69
    void driverChanged(const QString & driver);
 
70
    void typeChanged(const Solid::Control::ModemInterface::Type type);
 
71
    void enabledChanged(const bool enabled);
 
72
    void unlockRequiredChanged(const QString & codeRequired);
 
73
    void ipMethodChanged(const Solid::Control::ModemInterface::Method ipMethod);
 
74
 
 
75
private:
 
76
    void init();
 
77
 
 
78
protected:
 
79
    MMModemInterfacePrivate * d_ptr;
 
80
};
 
81
 
 
82
#endif
 
83