1
/* This file is part of the KDE project
2
Copyright (C) 2010 Lamarque Souza <lamarque@gmail.com>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
22
#include "modemgsmussdinterface.h"
23
#include "modemgsmussdinterface_p.h"
25
#include "frontendobject_p.h"
26
#include "soliddefs_p.h"
27
#include "ifaces/modemgsmussdinterface.h"
29
Solid::Control::ModemGsmUssdInterface::ModemGsmUssdInterface(QObject *backendObject)
30
: ModemInterface(*new ModemGsmUssdInterfacePrivate(this), backendObject)
32
Q_D(ModemGsmUssdInterface);
33
d->setBackendObject(backendObject);
34
makeConnections( backendObject );
37
Solid::Control::ModemGsmUssdInterface::ModemGsmUssdInterface(const ModemGsmUssdInterface &ussdinterface)
38
: ModemInterface(*new ModemGsmUssdInterfacePrivate(this), ussdinterface)
40
Q_D(ModemGsmUssdInterface);
41
d->setBackendObject(ussdinterface.d_ptr->backendObject());
42
makeConnections(ussdinterface.d_ptr->backendObject());
45
Solid::Control::ModemGsmUssdInterface::~ModemGsmUssdInterface()
49
QString Solid::Control::ModemGsmUssdInterface::initiate(const QString & command) const
51
Q_D(const ModemGsmUssdInterface);
52
return_SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), QString(), initiate(command));
55
void Solid::Control::ModemGsmUssdInterface::respond(const QString response) const
57
Q_D(const ModemGsmUssdInterface);
58
SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), respond(response));
61
void Solid::Control::ModemGsmUssdInterface::cancel() const
63
Q_D(const ModemGsmUssdInterface);
64
SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), cancel());
67
QString Solid::Control::ModemGsmUssdInterface::getState() const
69
Q_D(const ModemGsmUssdInterface);
70
return_SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), QString(), getState());
73
QString Solid::Control::ModemGsmUssdInterface::getNetworkNotification() const
75
Q_D(const ModemGsmUssdInterface);
76
return_SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), QString(), getNetworkNotification());
79
QString Solid::Control::ModemGsmUssdInterface::getNetworkRequest() const
81
Q_D(const ModemGsmUssdInterface);
82
return_SOLID_CALL(Ifaces::ModemGsmUssdInterface *, d->backendObject(), QString(), getNetworkRequest());
85
void Solid::Control::ModemGsmUssdInterface::slotStateChanged(const QString & state)
87
emit stateChanged(state);
90
void Solid::Control::ModemGsmUssdInterface::slotNetworkNotificationChanged(const QString & networkNotification)
92
emit networkNotificationChanged(networkNotification);
95
void Solid::Control::ModemGsmUssdInterface::slotNetworkRequestChanged(const QString & networkRequest)
97
emit networkRequestChanged(networkRequest);
100
void Solid::Control::ModemGsmUssdInterface::makeConnections(QObject * source)
103
QObject::connect(source, SIGNAL(stateChanged(const QString &)),
104
this, SLOT(slotStateChanged(const QString &)));
105
QObject::connect(source, SIGNAL(networkNotificationChanged(const QString &)),
106
this, SLOT(slotNetworkNotificationChanged(const QString &)));
107
QObject::connect(source, SIGNAL(networkRequestChanged(const QString &)),
108
this, SLOT(slotNetworkRequestChanged(const QString &)));
112
void Solid::Control::ModemGsmUssdInterfacePrivate::setBackendObject(QObject *object)
114
ModemInterfacePrivate::setBackendObject(object);
117
void Solid::Control::ModemGsmUssdInterface::_k_destroyed(QObject *object)