2
Copyright 2008 Will Stephenson <wstephenson@kde.org>
3
Copyright 2010 Lamarque Souza <lamarque@gmail.com>
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 published by the Free Software Foundation; either version 2 of
7
the License or (at your option) version 3 or any later version
8
accepted by the membership of KDE e.V. (or its successor approved
9
by the membership of KDE e.V.), which shall act as a proxy
10
defined in Section 14 of version 3 of the license.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
22
#include "modemgsmsmsinterface.h"
23
#include "modemgsmsmsinterface_p.h"
27
MMModemGsmSmsInterfacePrivate::MMModemGsmSmsInterfacePrivate(const QString &path, QObject *owner)
28
: MMModemInterfacePrivate(path, owner), modemGsmSmsIface(MMModemManager::DBUS_SERVICE, path, QDBusConnection::systemBus())
32
MMModemGsmSmsInterface::MMModemGsmSmsInterface(const QString & path, MMModemManager * manager, QObject * parent)
33
: MMModemInterface(*new MMModemGsmSmsInterfacePrivate(path, this), manager, parent)
35
Q_D(const MMModemGsmSmsInterface);
36
connect( &d->modemGsmSmsIface, SIGNAL(smsReceived(uint, bool)),
37
this, SIGNAL(smsReceived(int, bool)));
38
connect( &d->modemGsmSmsIface, SIGNAL(completed(uint, bool)),
39
this, SIGNAL(completed(int, bool)));
42
MMModemGsmSmsInterface::~MMModemGsmSmsInterface()
46
void MMModemGsmSmsInterface::deleteSms(const int index)
48
Q_D(MMModemGsmSmsInterface);
49
d->modemGsmSmsIface.Delete(index);
52
QVariantMap MMModemGsmSmsInterface::get(const int index)
54
Q_D(MMModemGsmSmsInterface);
55
QDBusReply<QVariantMap> sms = d->modemGsmSmsIface.Get(index);
64
int MMModemGsmSmsInterface::getFormat()
66
Q_D(MMModemGsmSmsInterface);
67
QDBusReply<uint> format = d->modemGsmSmsIface.GetFormat();
69
if (format.isValid()) {
70
return format.value();
76
void MMModemGsmSmsInterface::setFormat(const int format)
78
Q_D(MMModemGsmSmsInterface);
79
d->modemGsmSmsIface.SetFormat(format);
82
QString MMModemGsmSmsInterface::getSmsc()
84
Q_D(MMModemGsmSmsInterface);
85
QDBusReply<QString> smsc = d->modemGsmSmsIface.GetSmsc();
94
QList<QVariantMap> MMModemGsmSmsInterface::list()
96
Q_D(MMModemGsmSmsInterface);
97
QDBusReply<QList<QVariantMap> > sms = d->modemGsmSmsIface.List();
103
return QList<QVariantMap>();
106
void MMModemGsmSmsInterface::save(const QVariantMap & properties)
108
Q_D(MMModemGsmSmsInterface);
109
d->modemGsmSmsIface.Save(properties);
112
void MMModemGsmSmsInterface::send(const QVariantMap & properties)
114
Q_D(MMModemGsmSmsInterface);
115
d->modemGsmSmsIface.Save(properties);
118
void MMModemGsmSmsInterface::sendFromStorage(const int index)
120
Q_D(MMModemGsmSmsInterface);
121
d->modemGsmSmsIface.SendFromStorage(index);
124
void MMModemGsmSmsInterface::setIndication(const int mode, const int mt, const int bm, const int ds, const int brf)
126
Q_D(MMModemGsmSmsInterface);
127
d->modemGsmSmsIface.SetIndication(mode, mt, bm, ds, brf);
130
#include "modemgsmsmsinterface.moc"