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.
23
#include "modemgsmsmsinterface.h"
24
#include "modemgsmsmsinterface_p.h"
26
#include "frontendobject_p.h"
27
#include "soliddefs_p.h"
28
#include "ifaces/modemgsmsmsinterface.h"
30
Solid::Control::ModemGsmSmsInterface::ModemGsmSmsInterface(QObject *backendObject)
31
: ModemInterface(*new ModemGsmSmsInterfacePrivate(this), backendObject)
33
Q_D(ModemGsmSmsInterface);
34
d->setBackendObject(backendObject);
35
makeConnections( backendObject );
38
Solid::Control::ModemGsmSmsInterface::ModemGsmSmsInterface(const ModemGsmSmsInterface &smsinterface)
39
: ModemInterface(*new ModemGsmSmsInterfacePrivate(this), smsinterface)
41
Q_D(ModemGsmSmsInterface);
42
d->setBackendObject(smsinterface.d_ptr->backendObject());
43
makeConnections( smsinterface.d_ptr->backendObject() );
46
Solid::Control::ModemGsmSmsInterface::~ModemGsmSmsInterface()
50
void Solid::Control::ModemGsmSmsInterface::deleteSms(const int index) const
52
Q_D(const ModemGsmSmsInterface);
53
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), deleteSms(index));
56
QVariantMap Solid::Control::ModemGsmSmsInterface::get(const int index) const
58
Q_D(const ModemGsmSmsInterface);
59
return_SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), QVariantMap(), get(index));
62
int Solid::Control::ModemGsmSmsInterface::getFormat() const
64
Q_D(const ModemGsmSmsInterface);
65
return_SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), -1, getFormat());
68
void Solid::Control::ModemGsmSmsInterface::setFormat(const int format) const
70
Q_D(const ModemGsmSmsInterface);
71
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), setFormat(format));
74
QString Solid::Control::ModemGsmSmsInterface::getSmsc() const
76
Q_D(const ModemGsmSmsInterface);
77
return_SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), QString(), getSmsc());
80
QList<QVariantMap> Solid::Control::ModemGsmSmsInterface::list() const
82
Q_D(const ModemGsmSmsInterface);
83
return_SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), QList<QVariantMap>(), list());
86
void Solid::Control::ModemGsmSmsInterface::save(const QVariantMap & properties) const
88
Q_D(const ModemGsmSmsInterface);
89
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), save(properties));
92
void Solid::Control::ModemGsmSmsInterface::send(const QVariantMap & properties) const
94
Q_D(const ModemGsmSmsInterface);
95
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), send(properties));
98
void Solid::Control::ModemGsmSmsInterface::sendFromStorage(const int index) const
100
Q_D(const ModemGsmSmsInterface);
101
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), sendFromStorage(index));
104
void Solid::Control::ModemGsmSmsInterface::setIndication(const int mode, const int mt, const int bm, const int ds, const int brf) const
106
Q_D(const ModemGsmSmsInterface);
107
SOLID_CALL(Ifaces::ModemGsmSmsInterface *, d->backendObject(), setIndication(mode, mt, bm, ds, brf));
110
void Solid::Control::ModemGsmSmsInterface::makeConnections(QObject * source)
113
QObject::connect(source, SIGNAL(smsReceived(int, bool)),
114
this, SIGNAL(smsReceived(int, bool)));
115
QObject::connect(source, SIGNAL(completed(int, bool)),
116
this, SIGNAL(completed(int, bool)));
120
void Solid::Control::ModemGsmSmsInterfacePrivate::setBackendObject(QObject *object)
122
ModemInterfacePrivate::setBackendObject(object);
125
void Solid::Control::ModemGsmSmsInterface::_k_destroyed(QObject *object)