2 * This file is part of ofono-qt
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Kanavin <alexander.kanavin@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #ifndef OFONOMODEMINTERFACE_H
25 #define OFONOMODEMINTERFACE_H
27 #include <QtCore/QObject>
28 #include <QStringList>
29 #include "ofonointerface.h"
30 #include "ofonomodem.h"
31 #include "libofono-qt_global.h"
33 //! This class implements a generic modem interface object
35 * It adds validity checking and modem binding to OfonoInterface class.
36 * It should not be instantiated directly; instead you should instantiate
37 * interface-specific subclasses.
39 class OFONO_QT_EXPORT OfonoModemInterface : public OfonoInterface
44 //! Construct a modem interface object
46 * \param modemSetting modem selection setting
47 * \param modemPath path to the modem (may not be significant, depending on modemSetting)
48 * \param ifname d-bus interface name
49 * \param propertySetting oFono d-bus properties setting
51 OfonoModemInterface(OfonoModem::SelectionSetting modemSetting, const QString& modemPath, const QString& ifname, GetPropertySetting propertySetting, QObject *parent=0);
52 ~OfonoModemInterface();
54 //! Check that the modem interface object is valid
56 * This means that a modem d-bus object
57 * exists and has the d-bus interface specified in the contstructor.
61 //! Get the modem object that this interface belongs to
62 OfonoModem *modem() const;
65 //! Interface validity has changed
67 * This may mean that modem has become unavailable
68 * (or available again) or that the modem interface has become unavailable
69 * (or available again)
71 void validityChanged(bool validity);
75 void updateValidity();
78 void modemValidityChanged(bool validity);
79 void interfacesChanged(const QStringList &interfaces);