Commit b0ecf1ec authored by Slava Monich's avatar Slava Monich

Merge branch 'jb34320' into 'master'

Get report flags from the correct place in dconf

IMSI wasn't set for the MMS event, flags were always zero, no reports
requested from the operator. Also, replaced MMS_PROPERTY_IMSI with
MMS_PROPERTY_UNREAD which better reflects its purpose. IMSI is provided
by EVENT_PROPERTY_SUBSCRIBER_ID property which isn't MMS specific.

Eventually, IMSI of the SIM card to use for sending the message should
be provided by the UI. Added a variant of sendMessage D-Bus call
which takes IMSI as a parameter.

Requires libcommhistory!12

See merge request !12
parents 2d0c9a74 ab05bfed
This diff is collapsed.
......@@ -2,7 +2,7 @@
** This file is part of commhistory-daemon.
** Copyright (C) 2014-2015 Jolla Ltd.
** Copyright (C) 2014-2016 Jolla Ltd.
** Contact: Slava Monich <>
** This library is free software; you can redistribute it and/or modify it
......@@ -25,6 +25,8 @@
#include <QHash>
#include <QMultiMap>
#include <qofonomanager.h>
#include <qofonoextmodemmanager.h>
#include "messagehandlerbase.h"
#include "mmspart.h"
......@@ -35,8 +37,6 @@ namespace CommHistory {
class QDBusPendingCallWatcher;
class QOfonoManager;
class QOfonoExtModemManager;
class MDConfGroup;
class MmsHandlerModem;
......@@ -61,6 +61,8 @@ public Q_SLOTS:
void readReport(const QString &imsi, const QString &mmsId, const QString &recipient, int status);
void readReportSendStatus(const QString &recId, int status);
int sendMessage(const QString &imsi, const QStringList &to, const QStringList &cc, const QStringList &bcc,
const QString &subject, MmsPartList parts);
int sendMessage(const QStringList &to, const QStringList &cc, const QStringList &bcc,
const QString &subject, MmsPartList parts);
void sendMessageFromEvent(int eventId);
......@@ -74,11 +76,11 @@ private Q_SLOTS:
void onGroupsUpdatedFull(const QList<CommHistory::Group> &groups);
void onStatusChanged(const QString &status);
void onRoamingAllowedChanged(bool roaming);
void onDefaultVoiceModemChanged(QString modem);
void addAllModems();
void addModem(const QString &path);
QString getModemPath(const CommHistory::Event &event) const;
QString getModemPath(const QString &imsi) const;
void dataProhibitedChanged(const QString &path);
static QDBusPendingCall callEngine(const QString &method, const QVariantList &args);
......@@ -94,12 +96,11 @@ private:
QString accountPath(const QString &modemPath);
QOfonoManager *m_ofonoManager;
QOfonoExtModemManager *m_ofonoExtModemManager;
QSharedPointer<QOfonoManager> m_ofonoManager;
QSharedPointer<QOfonoExtModemManager> m_ofonoExtModemManager;
QHash<QString, MmsHandlerModem*> m_modems;
MDConfGroup *m_imsiSettings;
QMultiMap<QString, int> m_activeEvents;
QString m_defaultVoiceModem;
#endif // MMSHANDLER_H
......@@ -225,6 +225,27 @@
<arg direction="out" type="i" name="eventId"/>
<method name="sendMessage">
<!-- IMSI -->
<arg direction="in" type="s" name="imsi"/>
<!-- To: list -->
<arg direction="in" type="as" name="to"/>
<!-- Cc: list -->
<arg direction="in" type="as" name="cc"/>
<!-- Bcc: list -->
<arg direction="in" type="as" name="bcc"/>
<!-- Subject -->
<arg direction="in" type="s" name="subject"/>
List of message parts in the usual format.
All files will be copied before this method returns.
<arg direction="in" type="a(sss)" name="parts"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="MmsPartList"/>
<!-- Event ID if successful, otherwise -1 -->
<arg direction="out" type="i" name="eventId"/>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment