2 * This file is part of ofono-qt
4 * Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Kanavin <alex.kanavin@gmail.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 OFONOMESSAGEMANAGER_H
25 #define OFONOMESSAGEMANAGER_H
27 #include <QtCore/QObject>
29 #include <QDBusObjectPath>
30 #include "ofonomodeminterface.h"
31 #include "libofono-qt_global.h"
33 struct OfonoMessageManagerStruct {
35 QVariantMap properties;
37 typedef QList<OfonoMessageManagerStruct> OfonoMessageManagerList;
39 Q_DECLARE_METATYPE(OfonoMessageManagerStruct)
40 Q_DECLARE_METATYPE(OfonoMessageManagerList)
42 //! This class is used to access oFono message manager API
44 * oFono message manager API is documented in
45 * http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/messagemanager-api.txt
47 class OFONO_QT_EXPORT OfonoMessageManager : public OfonoModemInterface
52 OfonoMessageManager(OfonoModem::SelectionSetting modemSetting, const QString &modemPath, QObject *parent=0);
53 ~OfonoMessageManager();
55 Q_INVOKABLE QStringList getMessages() const;
58 void requestServiceCenterAddress();
59 void setServiceCenterAddress(QString address);
60 void requestUseDeliveryReports();
61 void setUseDeliveryReports(bool useDeliveryReports);
63 void setBearer(QString bearer);
64 void requestAlphabet();
65 void setAlphabet(QString alphabet);
67 void sendMessage(const QString &to, const QString &message);
70 void serviceCenterAddressChanged(const QString &address);
71 void useDeliveryReportsChanged(const bool &useDeliveryReports);
72 void bearerChanged(const QString &bearer);
73 void alphabetChanged(const QString &alphabet);
75 void serviceCenterAddressComplete(bool success, const QString &address);
76 void useDeliveryReportsComplete(bool success, const bool &useDeliveryReports);
77 void bearerComplete(bool success, const QString &bearer);
78 void alphabetComplete(bool success, const QString &alphabet);
79 void sendMessageComplete(bool success, const QString& path);
81 void setServiceCenterAddressFailed();
82 void setUseDeliveryReportsFailed();
83 void setBearerFailed();
84 void setAlphabetFailed();
86 void messageAdded(const QString &message);
87 void messageRemoved(const QString &message);
88 void immediateMessage(const QString &message, const QVariantMap &info);
89 void incomingMessage(const QString &message, const QVariantMap &info);
92 void validityChanged(bool);
93 void pathChanged(const QString& path);
94 void propertyChanged(const QString &property, const QVariant &value);
95 void setPropertyFailed(const QString &property);
96 void requestPropertyComplete(bool success, const QString &property, const QVariant &value);
97 void onMessageAdded(const QDBusObjectPath &message, const QVariantMap &properties);
98 void onMessageRemoved(const QDBusObjectPath &message);
99 void sendMessageResp(const QDBusObjectPath& objectPath);
100 void sendMessageErr(QDBusError error);
103 QStringList getMessageList();
104 void connectDbusSignals(const QString& path);
107 QStringList m_messagelist;
110 #endif /* !OFONOMESSAGEMANAGER_H */