ofonomodeminterface.h
/*
* This file is part of ofono-qt
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: Alexander Kanavin <alex.kanavin@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef OFONOMODEMINTERFACE_H
#define OFONOMODEMINTERFACE_H
#include <QtCore/QObject>
#include <QStringList>
#include "ofonomodem.h"
#include "ofonopropertysetting.h"
#include "libofono-qt_global.h"
class OfonoInterface;
class OFONO_QT_EXPORT OfonoModemInterface : public QObject
{
Q_OBJECT
Q_PROPERTY(bool isValid READ isValid NOTIFY validityChanged)
Q_PROPERTY(QString path READ path)
Q_PROPERTY(QString errorName READ errorName)
Q_PROPERTY(QString errorMessage READ errorMessage)
public:
OfonoModemInterface(OfonoModem::SelectionSetting modemSetting, const QString& modemPath, const QString& ifname, OfonoGetPropertySetting propertySetting, QObject *parent=0);
~OfonoModemInterface();
bool isValid() const;
OfonoModem *modem() const;
QString path() const;
QString errorName() const;
QString errorMessage() const;
Q_SIGNALS:
void validityChanged(bool validity);
private:
bool checkValidity();
void updateValidity();
private Q_SLOTS:
void modemValidityChanged(bool validity);
void interfacesChanged(const QStringList &interfaces);
protected:
OfonoInterface *m_if;
private:
OfonoModem *m_m;
bool m_isValid;
};
#endif
OfonoModemInterface::isValid
bool isValid() const
Check that the modem interface object is valid.
OfonoModemInterface::errorMessage
QString errorMessage() const
Get the D-Bus error message of the last operation.
OfonoModemInterface::validityChanged
void validityChanged(bool validity)
Interface validity has changed.
OfonoModemInterface::modem
OfonoModem * modem() const
Get the modem object that this interface belongs to.
OfonoModemInterface::OfonoModemInterface
OfonoModemInterface(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, const QString &ifname, OfonoGetPropertySetting propertySetting, QObject *parent=0)
Construct a modem interface object.
OfonoModemInterface::errorName
QString errorName() const
Get the D-Bus error name of the last operation.
OfonoModemInterface::path
QString path() const
Returns the D-Bus object path of the interface.
OfonoModem
This class is used to access an oFono modem object and its properties.
Definition ofonomodem.h:41
OfonoModem::SelectionSetting
SelectionSetting
How the modem object should select a modem.
Definition ofonomodem.h:68