Hello community,
here is the log from the commit of package libKF5ModemManagerQt for
openSUSE:Factory checked in at 2018-07-21 10:16:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libKF5ModemManagerQt (Old)
and /work/SRC/openSUSE:Factory/.libKF5ModemManagerQt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libKF5ModemManagerQt"
Sat Jul 21 10:16:42 2018 rev:51 rq:623322 version:5.48.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/libKF5ModemManagerQt/libKF5ModemManagerQt.changes
2018-06-22 13:24:57.501769252 +0200
+++
/work/SRC/openSUSE:Factory/.libKF5ModemManagerQt.new/libKF5ModemManagerQt.changes
2018-07-21 10:16:42.235079742 +0200
@@ -1,0 +2,12 @@
+Mon Jul 16 04:37:45 UTC 2018 - [email protected]
+
+- Update to 5.48.0
+ * New feature release
+ * For more details please see:
+ * https://www.kde.org/announcements/kde-frameworks-5.48.0.php
+- Changes since 5.47.0:
+ * Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead
+ * Implement support for the Voice and Call interfaces
+ * Don't set custom domain filter rules
+
+-------------------------------------------------------------------
Old:
----
modemmanager-qt-5.47.0.tar.xz
New:
----
modemmanager-qt-5.48.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libKF5ModemManagerQt.spec ++++++
--- /var/tmp/diff_new_pack.hDTzIv/_old 2018-07-21 10:16:42.747079621 +0200
+++ /var/tmp/diff_new_pack.hDTzIv/_new 2018-07-21 10:16:42.747079621 +0200
@@ -17,13 +17,13 @@
%define soversion 6
-%define _tar_path 5.47
+%define _tar_path 5.48
# Full KF5 version (e.g. 5.33.0)
%{!?_kf5_version: %global _kf5_version %{version}}
# Last major and minor KF5 version (e.g. 5.33)
-%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} |
awk -F. '{print $1"."$2}')}
+%{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} |
awk -F. '{print $1"."$2}')}
Name: libKF5ModemManagerQt
-Version: 5.47.0
+Version: 5.48.0
Release: 0
Summary: Qt wrapper for ModemManager DBus API
License: LGPL-2.1-only OR LGPL-3.0-only
++++++ modemmanager-qt-5.47.0.tar.xz -> modemmanager-qt-5.48.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/CMakeLists.txt
new/modemmanager-qt-5.48.0/CMakeLists.txt
--- old/modemmanager-qt-5.47.0/CMakeLists.txt 2018-06-02 18:30:11.000000000
+0200
+++ new/modemmanager-qt-5.48.0/CMakeLists.txt 2018-07-07 23:54:00.000000000
+0200
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.0)
-set(KF5_VERSION "5.47.0") # handled by release scripts
+set(KF5_VERSION "5.48.0") # handled by release scripts
project(ModemManagerQt VERSION ${KF5_VERSION})
include(FeatureSummary)
-find_package(ECM 5.47.0 NO_MODULE)
+find_package(ECM 5.48.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake
Modules." URL
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -22,9 +22,6 @@
add_definitions(${QT_DEFINITIONS})
-add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
-
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/CMakeLists.txt
new/modemmanager-qt-5.48.0/src/CMakeLists.txt
--- old/modemmanager-qt-5.47.0/src/CMakeLists.txt 2018-06-02
18:30:11.000000000 +0200
+++ new/modemmanager-qt-5.48.0/src/CMakeLists.txt 2018-07-07
23:54:00.000000000 +0200
@@ -54,6 +54,20 @@
)
endif()
+if (${MODEMMANAGER_VERSION} VERSION_EQUAL 1.6.0 OR ${MODEMMANAGER_VERSION}
VERSION_GREATER 1.6.0)
+ set(ModemManagerQt_SRCS
+ ${ModemManagerQt_SRCS}
+ modemvoice.cpp
+ call.cpp
+ )
+
+ set(DBUS_INTERFACES_FILES
+ ${DBUS_INTERFACES_FILES}
+ dbus/callinterface.cpp
+ dbus/voiceinterface.cpp
+ )
+endif()
+
add_library(KF5ModemManagerQt SHARED ${ModemManagerQt_SRCS}
${DBUS_INTERFACES_FILES})
generate_export_header(KF5ModemManagerQt BASE_NAME ModemManagerQt)
add_library(KF5::ModemManagerQt ALIAS KF5ModemManagerQt)
@@ -78,6 +92,7 @@
ecm_generate_headers(ModemManagerQt_HEADERS
HEADER_NAMES
+ Call
Bearer
GenericTypes
Interface
@@ -94,6 +109,7 @@
ModemSimple
ModemTime
ModemOma
+ ModemVoice
Sim
Sms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/call.cpp
new/modemmanager-qt-5.48.0/src/call.cpp
--- old/modemmanager-qt-5.47.0/src/call.cpp 1970-01-01 01:00:00.000000000
+0100
+++ new/modemmanager-qt-5.48.0/src/call.cpp 2018-07-07 23:54:00.000000000
+0200
@@ -0,0 +1,157 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#include "call.h"
+#include "call_p.h"
+#include "mmdebug_p.h"
+
+#ifdef MMQT_STATIC
+#include "dbus/fakedbus.h"
+#else
+#include "dbus/dbus.h"
+#endif
+
+#include <ModemManager/ModemManager.h>
+
+ModemManager::CallPrivate::CallPrivate(const QString &path, Call *q)
+#ifdef MMQT_STATIC
+ : callIface(MMQT_DBUS_SERVICE, path, QDBusConnection::sessionBus())
+#else
+ : callIface(MMQT_DBUS_SERVICE, path, QDBusConnection::systemBus())
+#endif
+ , q_ptr(q)
+{
+ if (callIface.isValid()) {
+ uni = path;
+ state = (MMCallState) callIface.state();
+ stateReason = (MMCallStateReason) callIface.stateReason();
+ direction = (MMCallDirection) callIface.direction();
+ number = callIface.number();
+ }
+}
+
+ModemManager::Call::Call(const QString &path, QObject *parent)
+ : QObject(parent)
+ , d_ptr(new CallPrivate(path, this))
+{
+ Q_D(Call);
+
+ qRegisterMetaType<MMCallState>();
+ qRegisterMetaType<MMCallStateReason>();
+ qRegisterMetaType<MMCallDirection>();
+
+#ifdef MMQT_STATIC
+ QDBusConnection::sessionBus().connect(MMQT_DBUS_SERVICE, path,
DBUS_INTERFACE_PROPS, QStringLiteral("PropertiesChanged"), d,
+
SLOT(onPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
+ QDBusConnection::systemBus().connect(MMQT_DBUS_SERVICE, path,
DBUS_INTERFACE_PROPS, QStringLiteral("PropertiesChanged"), d,
+
SLOT(onPropertiesChanged(QString,QVariantMap,QStringList)));
+#endif
+
+ connect(&d->callIface,
&OrgFreedesktopModemManager1CallInterface::StateChanged, d,
&CallPrivate::onStateChanged);
+ connect(&d->callIface,
&OrgFreedesktopModemManager1CallInterface::DtmfReceived, d,
&CallPrivate::onDtmfReceived);
+}
+
+ModemManager::Call::~Call()
+{
+ delete d_ptr;
+}
+
+QString ModemManager::Call::uni() const
+{
+ Q_D(const Call);
+ return d->uni;
+}
+
+QDBusPendingReply<> ModemManager::Call::start()
+{
+ Q_D(Call);
+ return d->callIface.Start();
+}
+
+QDBusPendingReply<> ModemManager::Call::accept()
+{
+ Q_D(Call);
+ return d->callIface.Accept();
+}
+
+QDBusPendingReply<> ModemManager::Call::hangup()
+{
+ Q_D(Call);
+ return d->callIface.Hangup();
+}
+
+QDBusPendingReply<> ModemManager::Call::sendDtmf(const QString &dtmf)
+{
+ Q_D(Call);
+ return d->callIface.SendDtmf(dtmf);
+}
+
+MMCallState ModemManager::Call::state() const
+{
+ Q_D(const Call);
+ return d->state;
+}
+
+MMCallStateReason ModemManager::Call::stateReason() const
+{
+ Q_D(const Call);
+ return d->stateReason;
+}
+
+MMCallDirection ModemManager::Call::direction() const
+{
+ Q_D(const Call);
+ return d->direction;
+}
+
+QString ModemManager::Call::number() const
+{
+ Q_D(const Call);
+ return d->number;
+}
+
+void ModemManager::CallPrivate::onStateChanged(int oldState, int newState,
uint reason)
+{
+ Q_Q(Call);
+ state = (MMCallState)newState;
+ stateReason = (MMCallStateReason)reason;
+ Q_EMIT q->stateChanged((MMCallState) oldState, (MMCallState) newState,
(MMCallStateReason) reason);
+}
+
+void ModemManager::CallPrivate::onDtmfReceived(const QString &dtmf)
+{
+ Q_Q(Call);
+ Q_EMIT q->dtmfReceived(dtmf);
+}
+
+void ModemManager::CallPrivate::onPropertiesChanged(const QString
&interfaceName, const QVariantMap &changedProperties, const QStringList
&invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ Q_Q(Call);
+
+ if (interfaceName == QString(MMQT_DBUS_INTERFACE_CALL)) {
+ QVariantMap::const_iterator it =
changedProperties.constFind(QLatin1String(MM_CALL_PROPERTY_NUMBER));
+ if (it != changedProperties.constEnd()) {
+ number = it->toString();
+ Q_EMIT q->numberChanged(number);
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/call.h
new/modemmanager-qt-5.48.0/src/call.h
--- old/modemmanager-qt-5.47.0/src/call.h 1970-01-01 01:00:00.000000000
+0100
+++ new/modemmanager-qt-5.48.0/src/call.h 2018-07-07 23:54:00.000000000
+0200
@@ -0,0 +1,108 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MODEMMANAGERQT_CALL_H
+#define MODEMMANAGERQT_CALL_H
+
+#include <modemmanagerqt_export.h>
+
+#include <QObject>
+#include <QSharedPointer>
+#include <QDBusPendingReply>
+
+#include "generictypes.h"
+
+namespace ModemManager
+{
+
+class CallPrivate;
+
+/**
+* Provides an interface to manipulate and control a call
+*
+* Note: MMCallState, MMCallStateReason and MMCallDirection enums are defined
in <ModemManager/ModemManager-enums.h>
+* See
http://www.freedesktop.org/software/ModemManager/api/latest/ModemManager-Flags-and-Enumerations.html
+*/
+class MODEMMANAGERQT_EXPORT Call : public QObject
+{
+Q_OBJECT
+Q_DECLARE_PRIVATE(Call)
+
+public:
+ typedef QSharedPointer<Call> Ptr;
+ typedef QList<Ptr> List;
+
+ explicit Call(const QString &path, QObject *parent = nullptr);
+ ~Call();
+
+ QString uni() const;
+
+ /**
+ * Start a call
+ */
+ QDBusPendingReply<> start();
+
+ /**
+ * Accept a call
+ */
+ QDBusPendingReply<> accept();
+
+ /**
+ * Hangup a call
+ */
+ QDBusPendingReply<> hangup();
+
+ /**
+ * Send DTMF
+ */
+ QDBusPendingReply<> sendDtmf(const QString &dtmf);
+
+ /**
+ * This method returns the state of the call
+ */
+ MMCallState state() const;
+
+ /**
+ * This method returns the reason for the call state change
+ */
+ MMCallStateReason stateReason() const;
+
+ /**
+ * This method returns the direction of the call
+ */
+ MMCallDirection direction() const;
+
+ /**
+ * This method returns the remote phone number
+ */
+ QString number() const;
+
+Q_SIGNALS:
+ void stateChanged(MMCallState oldState, MMCallState newState,
MMCallStateReason reason);
+ void numberChanged(const QString &number);
+ void dtmfReceived(const QString &dtmf);
+
+private:
+ CallPrivate *const d_ptr;
+};
+
+} // namespace ModemManager
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/call_p.h
new/modemmanager-qt-5.48.0/src/call_p.h
--- old/modemmanager-qt-5.47.0/src/call_p.h 1970-01-01 01:00:00.000000000
+0100
+++ new/modemmanager-qt-5.48.0/src/call_p.h 2018-07-07 23:54:00.000000000
+0200
@@ -0,0 +1,53 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MODEMMANAGER_CALL_P_H
+#define MODEMMANAGER_CALL_P_H
+
+#include "dbus/callinterface.h"
+#include "call.h"
+
+namespace ModemManager
+{
+
+class CallPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CallPrivate(const QString &path, Call *q);
+ OrgFreedesktopModemManager1CallInterface callIface;
+
+ QString uni;
+ MMCallState state;
+ MMCallStateReason stateReason;
+ MMCallDirection direction;
+ QString number;
+
+ Q_DECLARE_PUBLIC(Call)
+ Call *q_ptr;
+private Q_SLOTS:
+ void onPropertiesChanged(const QString &interface, const QVariantMap
&properties, const QStringList &invalidatedProps);
+ void onStateChanged(int oldState, int newState, uint reason);
+ void onDtmfReceived(const QString &dtmf);
+};
+
+} // namespace ModemManager
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/CMakeLists.txt
new/modemmanager-qt-5.48.0/src/dbus/CMakeLists.txt
--- old/modemmanager-qt-5.47.0/src/dbus/CMakeLists.txt 2018-06-02
18:30:11.000000000 +0200
+++ new/modemmanager-qt-5.48.0/src/dbus/CMakeLists.txt 2018-07-07
23:54:00.000000000 +0200
@@ -2,6 +2,7 @@
add_definitions(${QT_DEFINITIONS})
set( INTERFACE_INTROSPECTION_XML_FILES
+ introspection/org.freedesktop.ModemManager1.Call.xml
introspection/org.freedesktop.ModemManager1.Bearer.xml
introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml
introspection/org.freedesktop.ModemManager1.Modem.Location.xml
@@ -13,6 +14,7 @@
introspection/org.freedesktop.ModemManager1.Modem.Signal.xml
introspection/org.freedesktop.ModemManager1.Modem.Simple.xml
introspection/org.freedesktop.ModemManager1.Modem.Time.xml
+ introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
introspection/org.freedesktop.ModemManager1.Modem.xml
introspection/org.freedesktop.ModemManager1.Sim.xml
introspection/org.freedesktop.ModemManager1.Sms.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/callinterface.cpp
new/modemmanager-qt-5.48.0/src/dbus/callinterface.cpp
--- old/modemmanager-qt-5.47.0/src/dbus/callinterface.cpp 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/dbus/callinterface.cpp 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,25 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -m -i generictypes.h -p callinterface
./introspection/org.freedesktop.ModemManager1.Call.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "callinterface.h"
+
+/*
+ * Implementation of interface class OrgFreedesktopModemManager1CallInterface
+ */
+
+OrgFreedesktopModemManager1CallInterface::OrgFreedesktopModemManager1CallInterface(const
QString &service, const QString &path, const QDBusConnection &connection,
QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection,
parent)
+{
+}
+
+OrgFreedesktopModemManager1CallInterface::~OrgFreedesktopModemManager1CallInterface()
+{
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/callinterface.h
new/modemmanager-qt-5.48.0/src/dbus/callinterface.h
--- old/modemmanager-qt-5.47.0/src/dbus/callinterface.h 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/dbus/callinterface.h 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,86 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -m -i generictypes.h -p callinterface
./introspection/org.freedesktop.ModemManager1.Call.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef CALLINTERFACE_H
+#define CALLINTERFACE_H
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+#include "generictypes.h"
+
+/*
+ * Proxy class for interface org.freedesktop.ModemManager1.Call
+ */
+class OrgFreedesktopModemManager1CallInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.freedesktop.ModemManager1.Call"; }
+
+public:
+ OrgFreedesktopModemManager1CallInterface(const QString &service, const
QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
+
+ ~OrgFreedesktopModemManager1CallInterface();
+
+ Q_PROPERTY(int Direction READ direction)
+ inline int direction() const
+ { return qvariant_cast< int >(property("Direction")); }
+
+ Q_PROPERTY(QString Number READ number)
+ inline QString number() const
+ { return qvariant_cast< QString >(property("Number")); }
+
+ Q_PROPERTY(int State READ state)
+ inline int state() const
+ { return qvariant_cast< int >(property("State")); }
+
+ Q_PROPERTY(int StateReason READ stateReason)
+ inline int stateReason() const
+ { return qvariant_cast< int >(property("StateReason")); }
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<> Accept()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Accept"),
argumentList);
+ }
+
+ inline QDBusPendingReply<> Hangup()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Hangup"),
argumentList);
+ }
+
+ inline QDBusPendingReply<> SendDtmf(const QString &dtmf)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(dtmf);
+ return asyncCallWithArgumentList(QStringLiteral("SendDtmf"),
argumentList);
+ }
+
+ inline QDBusPendingReply<> Start()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Start"),
argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void DtmfReceived(const QString &dtmf);
+ void StateChanged(int oldState, int newState, uint reason);
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/dbus.h
new/modemmanager-qt-5.48.0/src/dbus/dbus.h
--- old/modemmanager-qt-5.47.0/src/dbus/dbus.h 2018-06-02 18:30:11.000000000
+0200
+++ new/modemmanager-qt-5.48.0/src/dbus/dbus.h 2018-07-07 23:54:00.000000000
+0200
@@ -36,11 +36,13 @@
#define MMQT_DBUS_BEARER_PREFIX MM_DBUS_PATH "/Bearer"
#define MMQT_DBUS_SIM_PREFIX MM_DBUS_PATH "/SIM"
#define MMQT_DBUS_SMS_PREFIX MM_DBUS_PATH "/SMS"
+#define MMQT_DBUS_CALL_PREFIX MM_DBUS_PATH "/Call"
/* Interfaces */
#define MMQT_DBUS_INTERFACE MM_DBUS_INTERFACE
#define MMQT_DBUS_INTERFACE_SIM MM_DBUS_INTERFACE_SIM
#define MMQT_DBUS_INTERFACE_BEARER MM_DBUS_INTERFACE_BEARER
#define MMQT_DBUS_INTERFACE_SMS MM_DBUS_INTERFACE_SMS
+#define MMQT_DBUS_INTERFACE_CALL MM_DBUS_INTERFACE_CALL
#define MMQT_DBUS_INTERFACE_MODEM MM_DBUS_INTERFACE_MODEM
#define MMQT_DBUS_INTERFACE_MODEM_SIMPLE
"org.freedesktop.ModemManager1.Modem.Simple"
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP
MM_DBUS_INTERFACE_MODEM_MODEM3GPP
@@ -52,5 +54,6 @@
#define MMQT_DBUS_INTERFACE_MODEM_FIRMWARE
MM_DBUS_INTERFACE_MODEM_FIRMWARE
#define MMQT_DBUS_INTERFACE_MODEM_SIGNAL
MM_DBUS_INTERFACE_MODEM_SIGNAL
#define MMQT_DBUS_INTERFACE_MODEM_OMA MM_DBUS_INTERFACE_MODEM_OMA
+#define MMQT_DBUS_INTERFACE_MODEM_VOICE
MM_DBUS_INTERFACE_MODEM_VOICE
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/fakedbus.h
new/modemmanager-qt-5.48.0/src/dbus/fakedbus.h
--- old/modemmanager-qt-5.47.0/src/dbus/fakedbus.h 2018-06-02
18:30:11.000000000 +0200
+++ new/modemmanager-qt-5.48.0/src/dbus/fakedbus.h 2018-07-07
23:54:00.000000000 +0200
@@ -36,11 +36,13 @@
#define MMQT_DBUS_BEARER_PREFIX MMQT_DBUS_PATH "/Bearer"
#define MMQT_DBUS_SIM_PREFIX MMQT_DBUS_PATH "/SIM"
#define MMQT_DBUS_SMS_PREFIX MMQT_DBUS_PATH "/SMS"
+#define MMQT_DBUS_CALL_PREFIX MMQT_DBUS_PATH "/Call"
/* Interfaces */
#define MMQT_DBUS_INTERFACE "org.kde.fakemodem"
#define MMQT_DBUS_INTERFACE_SIM "org.kde.fakemodem.Sim"
#define MMQT_DBUS_INTERFACE_BEARER "org.kde.fakemodem.Bearer"
#define MMQT_DBUS_INTERFACE_SMS "org.kde.fakemodem.Sms"
+#define MMQT_DBUS_INTERFACE_CALL "org.kde.fakemodem.Call"
#define MMQT_DBUS_INTERFACE_MODEM "org.kde.fakemodem.Modem"
#define MMQT_DBUS_INTERFACE_MODEM_SIMPLE
"org.kde.fakemodem.Modem.Simple"
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP
"org.kde.fakemodem.Modem.Modem3gpp"
@@ -52,5 +54,6 @@
#define MMQT_DBUS_INTERFACE_MODEM_FIRMWARE
"org.kde.fakemodem.Modem.Firmware"
#define MMQT_DBUS_INTERFACE_MODEM_SIGNAL
"org.kde.fakemodem.Modem.Signal"
#define MMQT_DBUS_INTERFACE_MODEM_OMA
"org.kde.fakemodem.Modem.Oma"
+#define MMQT_DBUS_INTERFACE_MODEM_VOICE
"org.kde.fakemodem.Modem.Voice"
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/modemmanager-qt-5.47.0/src/dbus/introspection/org.freedesktop.ModemManager1.Call.xml
new/modemmanager-qt-5.48.0/src/dbus/introspection/org.freedesktop.ModemManager1.Call.xml
---
old/modemmanager-qt-5.47.0/src/dbus/introspection/org.freedesktop.ModemManager1.Call.xml
1970-01-01 01:00:00.000000000 +0100
+++
new/modemmanager-qt-5.48.0/src/dbus/introspection/org.freedesktop.ModemManager1.Call.xml
2018-07-07 23:54:00.000000000 +0200
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ ModemManager 1.0 Interface Specification
+
+ Copyright (C) 2015 Marco Bascetta <[email protected]>
+ Copyright (C) 2015 Riccardo Vangelisti <[email protected]>
+-->
+
+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <!--
+ org.freedesktop.ModemManager1.Call:
+ @short_description: The ModemManager Call interface.
+
+ The Call interface Defines operations and properties of a single Call.
+ -->
+ <interface name="org.freedesktop.ModemManager1.Call">
+
+ <!--
+ Start:
+
+ If the outgoing call has not yet been started, start it.
+
+ Applicable only if state is <link
linkend="MM-CALL-STATE-UNKNOWN:CAPS"><constant>MM_CALL_STATE_UNKNOWN</constant></link>
and direction is
+ <link
linkend="MM-CALL-DIRECTION-OUTGOING:CAPS"><constant>MM_CALL_DIRECTION_OUTGOING</constant></link>.
+ -->
+ <method name="Start" />
+
+ <!--
+ Accept:
+
+ Accept incoming call (answer).
+
+ Applicable only if state is <link
linkend="MM-CALL-STATE-RINGING-IN:CAPS"><constant>MM_CALL_STATE_RINGING_IN</constant></link>
and direction is
+ <link
linkend="MM-CALL-DIRECTION-INCOMING:CAPS"><constant>MM_CALL_DIRECTION_INCOMING</constant></link>.
+ -->
+ <method name="Accept" />
+
+ <!--
+ Hangup:
+
+ Hangup the active call.
+
+ Applicable only if state is <link
linkend="MM-CALL-STATE-UNKNOWN:CAPS"><constant>MM_CALL_STATE_UNKNOWN</constant></link>.
+ -->
+ <method name="Hangup"/>
+
+ <!--
+ SendDtmf:
+ @dtmf: DTMF tone identifier [0-9A-D*#].
+
+ Send a DTMF tone (Dual Tone Multi-Frequency) (only on supported modem).
+
+ Applicable only if state is <link
linkend="MM-CALL-STATE-ACTIVE:CAPS"><constant>MM_CALL_STATE_ACTIVE</constant></link>.
+ -->
+ <method name="SendDtmf">
+ <arg name="dtmf" type="s" direction="in"/>
+ </method>
+
+ <!--
+ DtmfReceived:
+ @dtmf: DTMF tone identifier [0-9A-D*#].
+
+ Emitted when a DTMF tone is received (only on supported modem)
+ -->
+ <signal name="DtmfReceived">
+ <arg name="dtmf" type="s" />
+ </signal>
+
+ <!--
+ StateChanged:
+ @old: Old state MMCallState
+ @new: New state MMCallState
+ @reason: A <link linkend="MMCallStateReason">MMCallStateReason</link>
value, specifying the reason for this state change.
+
+ Emitted when call changes state
+ -->
+ <signal name="StateChanged">
+ <arg name="old" type="i" />
+ <arg name="new" type="i" />
+ <arg name="reason" type="u" />
+ </signal>
+
+ <!--
+ State:
+
+ A <link linkend="MMCallState">MMCallState</link> value,
+ describing the state of the call.
+ -->
+ <property name="State" type="i" access="read" />
+
+ <!--
+ StateReason:
+
+ A <link linkend="MMCallStateReason">MMCallStateReason</link> value,
describing why the state is changed.
+ -->
+ <property name="StateReason" type="i" access="read" />
+
+ <!--
+ Direction:
+
+ A <link linkend="MMCallDirection">MMCallDirection</link> value,
+ describing the direction of the call.
+ -->
+ <property name="Direction" type="i" access="read" />
+
+ <!--
+ Number:
+
+ The remote phone number.
+ -->
+ <property name="Number" type="s" access="read" />
+ </interface>
+</node>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/modemmanager-qt-5.47.0/src/dbus/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
new/modemmanager-qt-5.48.0/src/dbus/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
---
old/modemmanager-qt-5.47.0/src/dbus/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
1970-01-01 01:00:00.000000000 +0100
+++
new/modemmanager-qt-5.48.0/src/dbus/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
2018-07-07 23:54:00.000000000 +0200
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ ModemManager 1.0 Interface Specification
+
+ Copyright (C) 2015 Marco Bascetta <[email protected]>
+ Copyright (C) 2015 Riccardo Vangelisti <[email protected]>
+-->
+
+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <!--
+ org.freedesktop.ModemManager1.Modem.Voice:
+ @short_description: The ModemManager Voice interface.
+
+ The Voice interface handles Calls.
+ -->
+ <interface name="org.freedesktop.ModemManager1.Modem.Voice">
+
+ <!--
+ ListCalls:
+ @result: The list of call object paths.
+
+ Retrieve all Calls.
+
+ This method should only be used once and subsequent information
+ retrieved either by listening for the
+ #org.freedesktop.ModemManager1.Modem.Voice::Added signal,
+ or by querying the specific Call object of interest.
+ -->
+ <method name="ListCalls">
+ <arg name="result" type="ao" direction="out" />
+ </method>
+
+ <!--
+ DeleteCall:
+ @path: The object path of the Call to delete.
+
+ Delete a Call from the list of calls.
+
+ The call will be hangup if it is still active.
+ -->
+ <method name="DeleteCall">
+ <arg name="path" type="o" direction="in" />
+ </method>
+
+ <!--
+ CreateCall:
+ @properties: Call properties from the <link
linkend="gdbus-org.freedesktop.ModemManager1.Call">Call D-Bus interface</link>.
+ @path: The object path of the new call object.
+
+ Creates a new call object.
+
+ The '<link
linkend="gdbus-property-org-freedesktop-ModemManager1-Call.Number">Number</link>'
is mandatory
+ -->
+ <method name="CreateCall">
+ <arg name="properties" type="a{sv}" direction="in"/>
+ <arg name="path" type="o" direction="out" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0"
value="QVariantMap"/>
+ </method>
+
+ <!--
+ CallAdded:
+ @path: Object path of the new call.
+
+ Emitted when any part of a Call has been received or added.
+ -->
+ <signal name="CallAdded">
+ <arg name="path" type="o" />
+ </signal>
+
+ <!--
+ CallDeleted:
+ @path: Object path of the now deleted Call.
+
+ Emitted when a call has been deleted.
+ -->
+ <signal name="CallDeleted">
+ <arg name="path" type="o" />
+ </signal>
+
+ <!--
+ Calls:
+
+ The list of calls object paths.
+ -->
+ <property name="Calls" type="ao" access="read" />
+
+ </interface>
+</node>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/voiceinterface.cpp
new/modemmanager-qt-5.48.0/src/dbus/voiceinterface.cpp
--- old/modemmanager-qt-5.47.0/src/dbus/voiceinterface.cpp 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/dbus/voiceinterface.cpp 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,25 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -m -i generictypes.h -p voiceinterface
./introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "voiceinterface.h"
+
+/*
+ * Implementation of interface class
OrgFreedesktopModemManager1ModemVoiceInterface
+ */
+
+OrgFreedesktopModemManager1ModemVoiceInterface::OrgFreedesktopModemManager1ModemVoiceInterface(const
QString &service, const QString &path, const QDBusConnection &connection,
QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection,
parent)
+{
+}
+
+OrgFreedesktopModemManager1ModemVoiceInterface::~OrgFreedesktopModemManager1ModemVoiceInterface()
+{
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/dbus/voiceinterface.h
new/modemmanager-qt-5.48.0/src/dbus/voiceinterface.h
--- old/modemmanager-qt-5.47.0/src/dbus/voiceinterface.h 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/dbus/voiceinterface.h 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,69 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -m -i generictypes.h -p voiceinterface
./introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef VOICEINTERFACE_H
+#define VOICEINTERFACE_H
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+#include "generictypes.h"
+
+/*
+ * Proxy class for interface org.freedesktop.ModemManager1.Modem.Voice
+ */
+class OrgFreedesktopModemManager1ModemVoiceInterface: public
QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.freedesktop.ModemManager1.Modem.Voice"; }
+
+public:
+ OrgFreedesktopModemManager1ModemVoiceInterface(const QString &service,
const QString &path, const QDBusConnection &connection, QObject *parent =
nullptr);
+
+ ~OrgFreedesktopModemManager1ModemVoiceInterface();
+
+ Q_PROPERTY(QList<QDBusObjectPath> Calls READ calls)
+ inline QList<QDBusObjectPath> calls() const
+ { return qvariant_cast< QList<QDBusObjectPath> >(property("Calls")); }
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<QDBusObjectPath> CreateCall(const QVariantMap
&properties)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(properties);
+ return asyncCallWithArgumentList(QStringLiteral("CreateCall"),
argumentList);
+ }
+
+ inline QDBusPendingReply<> DeleteCall(const QDBusObjectPath &path)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(path);
+ return asyncCallWithArgumentList(QStringLiteral("DeleteCall"),
argumentList);
+ }
+
+ inline QDBusPendingReply<QList<QDBusObjectPath> > ListCalls()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("ListCalls"),
argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void CallAdded(const QDBusObjectPath &path);
+ void CallDeleted(const QDBusObjectPath &path);
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/generictypes.h
new/modemmanager-qt-5.48.0/src/generictypes.h
--- old/modemmanager-qt-5.47.0/src/generictypes.h 2018-06-02
18:30:11.000000000 +0200
+++ new/modemmanager-qt-5.48.0/src/generictypes.h 2018-07-07
23:54:00.000000000 +0200
@@ -173,6 +173,11 @@
Q_DECLARE_METATYPE(MMSmsCdmaServiceCategory)
Q_DECLARE_METATYPE(MMSmsCdmaTeleserviceId)
#endif
+#if MM_CHECK_VERSION(1, 6, 0)
+Q_DECLARE_METATYPE(MMCallState)
+Q_DECLARE_METATYPE(MMCallStateReason)
+Q_DECLARE_METATYPE(MMCallDirection)
+#endif
// Others
Q_DECLARE_METATYPE(ModemManager::DBUSManagerStruct)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/manager.cpp
new/modemmanager-qt-5.48.0/src/manager.cpp
--- old/modemmanager-qt-5.47.0/src/manager.cpp 2018-06-02 18:30:11.000000000
+0200
+++ new/modemmanager-qt-5.48.0/src/manager.cpp 2018-07-07 23:54:00.000000000
+0200
@@ -49,9 +49,6 @@
, manager(MMQT_DBUS_SERVICE, MMQT_DBUS_PATH, QDBusConnection::systemBus(),
this)
#endif
{
- QLoggingCategory::setFilterRules(QStringLiteral("modemmaanger-qt.debug =
true"));
- QLoggingCategory::setFilterRules(QStringLiteral("modemmanager-qt.warning =
true"));
-
qDBusRegisterMetaType<QList<QDBusObjectPath> >();
registerModemManagerTypes();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/modemvoice.cpp
new/modemmanager-qt-5.48.0/src/modemvoice.cpp
--- old/modemmanager-qt-5.47.0/src/modemvoice.cpp 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/modemvoice.cpp 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,149 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#include "modemvoice.h"
+#include "modemvoice_p.h"
+
+#ifdef MMQT_STATIC
+#include "dbus/fakedbus.h"
+#else
+#include "dbus/dbus.h"
+#endif
+#include "mmdebug_p.h"
+
+#include "call.h"
+#include <ModemManager/ModemManager.h>
+
+ModemManager::ModemVoicePrivate::ModemVoicePrivate(const QString &path,
ModemVoice *q)
+ : InterfacePrivate(path, q)
+#ifdef MMQT_STATIC
+ , modemVoiceIface(MMQT_DBUS_SERVICE, path, QDBusConnection::sessionBus())
+#else
+ , modemVoiceIface(MMQT_DBUS_SERVICE, path, QDBusConnection::systemBus())
+#endif
+ , q_ptr(q)
+{
+ if (modemVoiceIface.isValid()) {
+ connect(&modemVoiceIface,
&OrgFreedesktopModemManager1ModemVoiceInterface::CallAdded, this,
&ModemVoicePrivate::onCallAdded);
+ connect(&modemVoiceIface,
&OrgFreedesktopModemManager1ModemVoiceInterface::CallDeleted, this,
&ModemVoicePrivate::onCallDeleted);
+ }
+}
+
+ModemManager::ModemVoice::ModemVoice(const QString &path, QObject *parent)
+ : Interface(*new ModemVoicePrivate(path, this), parent)
+{
+ Q_D(ModemVoice);
+
+ // Note: no need to listen for PropertiesChanged signals. Additions and
+ // removals of calls are already notified via CallAdded and CallRemoved
+
+ QList <QDBusObjectPath> calls = d->modemVoiceIface.calls();
+ Q_FOREACH (const QDBusObjectPath &op, calls) {
+ const QString path = op.path();
+ d->callList.insert(path, ModemManager::Call::Ptr());
+ Q_EMIT callAdded(path);
+ }
+}
+
+ModemManager::ModemVoice::~ModemVoice()
+{
+}
+
+ModemManager::Call::Ptr ModemManager::ModemVoicePrivate::findCall(const
QString &uni)
+{
+ ModemManager::Call::Ptr call;
+ if (callList.contains(uni)) {
+ if (callList.value(uni)) {
+ call = callList.value(uni);
+ } else {
+ call = ModemManager::Call::Ptr(new ModemManager::Call(uni),
&QObject::deleteLater);
+ callList[uni] = call;
+ }
+ }
+ return call;
+}
+
+ModemManager::Call::List
ModemManager::ModemVoicePrivate::ModemVoicePrivate::calls()
+{
+ ModemManager::Call::List list;
+
+ QMap<QString, ModemManager::Call::Ptr>::const_iterator i;
+ for (i = callList.constBegin(); i != callList.constEnd(); ++i) {
+ ModemManager::Call::Ptr call = findCall(i.key());
+ if (call) {
+ list.append(call);
+ } else {
+ qCWarning(MMQT) << "warning: null call for" << i.key();
+ }
+ }
+
+ return list;
+}
+
+void ModemManager::ModemVoicePrivate::onCallAdded(const QDBusObjectPath &path)
+{
+ Q_Q(ModemVoice);
+ callList.insert(path.path(), ModemManager::Call::Ptr());
+ Q_EMIT q->callAdded(path.path());
+}
+
+void ModemManager::ModemVoicePrivate::onCallDeleted(const QDBusObjectPath
&path)
+{
+ Q_Q(ModemVoice);
+ callList.remove(path.path());
+ Q_EMIT q->callDeleted(path.path());
+}
+
+ModemManager::Call::List ModemManager::ModemVoice::calls() const
+{
+ Q_D(const ModemVoice);
+ return const_cast<ModemVoicePrivate*>(d)->calls();
+}
+
+QDBusPendingReply<QDBusObjectPath> ModemManager::ModemVoice::createCall(const
QString &number)
+{
+ QVariantMap map;
+ map.insert("number", number);
+ return createCall(map);
+}
+
+QDBusPendingReply<QDBusObjectPath> ModemManager::ModemVoice::createCall(const
QVariantMap& call)
+{
+ Q_D(ModemVoice);
+
+ if (!call.contains("number")) {
+ qCDebug(MMQT) << "Unable to create call, missing some property";
+ return QDBusPendingReply<QDBusObjectPath>();
+ }
+
+ return d->modemVoiceIface.CreateCall(call);
+}
+
+QDBusPendingReply<void> ModemManager::ModemVoice::deleteCall(const QString
&uni)
+{
+ Q_D(ModemVoice);
+ return d->modemVoiceIface.DeleteCall(QDBusObjectPath(uni));
+}
+
+ModemManager::Call::Ptr ModemManager::ModemVoice::findCall(const QString& uni)
+{
+ Q_D(ModemVoice);
+ return d->findCall(uni);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/modemvoice.h
new/modemmanager-qt-5.48.0/src/modemvoice.h
--- old/modemmanager-qt-5.47.0/src/modemvoice.h 1970-01-01 01:00:00.000000000
+0100
+++ new/modemmanager-qt-5.48.0/src/modemvoice.h 2018-07-07 23:54:00.000000000
+0200
@@ -0,0 +1,107 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MODEMMANAGERQT_MODEMVOICE_H
+#define MODEMMANAGERQT_MODEMVOICE_H
+
+#include <modemmanagerqt_export.h>
+
+#include <QObject>
+#include <QSharedPointer>
+
+#include "call.h"
+#include "generictypes.h"
+#include "interface.h"
+
+namespace ModemManager
+{
+
+class ModemVoicePrivate;
+
+/**
+ * @brief The ModemVoice class
+ *
+ * The Voice interface handles call related actions
+ */
+class MODEMMANAGERQT_EXPORT ModemVoice : public Interface
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(ModemVoice)
+
+public:
+ typedef QSharedPointer<ModemVoice> Ptr;
+ typedef QList<Ptr> List;
+
+ explicit ModemVoice(const QString &path, QObject *parent = nullptr);
+ ~ModemVoice();
+
+ /**
+ * Retrieve all calls.
+ *
+ * This method should only be used once and subsequent information
retrieved
+ * either by listening for the callAdded() signal, or by
+ * querying the specific call object of interest using findCall()
+ */
+ ModemManager::Call::List calls() const;
+
+ /**
+ * Creates a new call object.
+ * @param number Number property
+ */
+ QDBusPendingReply<QDBusObjectPath> createCall(const QString &number);
+
+ /**
+ * Creates a new call object.
+ * @param call QVariantMap containing call properties
+ * The 'number' property is mandatory.
+ */
+ QDBusPendingReply<QDBusObjectPath> createCall(const QVariantMap &call);
+
+ /**
+ * Delete a call.
+ *
+ * @param uni path to the Call object
+ */
+ QDBusPendingReply<void> deleteCall(const QString &uni);
+
+ /**
+ * @param uni path to the Call object
+ * @return pointer to the found Call (may be null if not found)
+ */
+ ModemManager::Call::Ptr findCall(const QString &uni);
+
+Q_SIGNALS:
+ /**
+ * Emitted when an new Call is detected.
+ *
+ * @param uni path to the Call object
+ */
+ void callAdded(const QString &uni);
+
+ /**
+ * Emitted when a call has been deleted.
+ * @param uni path to the Call object
+ */
+ void callDeleted(const QString &uni);
+};
+
+} // namespace ModemManager
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/modemmanager-qt-5.47.0/src/modemvoice_p.h
new/modemmanager-qt-5.48.0/src/modemvoice_p.h
--- old/modemmanager-qt-5.47.0/src/modemvoice_p.h 1970-01-01
01:00:00.000000000 +0100
+++ new/modemmanager-qt-5.48.0/src/modemvoice_p.h 2018-07-07
23:54:00.000000000 +0200
@@ -0,0 +1,51 @@
+/*
+ Copyright 2018 Aleksander Morgado <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MODEMMANAGER_MODEMVOICE_P_H
+#define MODEMMANAGER_MODEMVOICE_P_H
+
+#include "dbus/voiceinterface.h"
+#include "interface_p.h"
+#include "modemvoice.h"
+#include "call.h"
+
+namespace ModemManager
+{
+
+class ModemVoicePrivate : public InterfacePrivate
+{
+public:
+ explicit ModemVoicePrivate(const QString &path, ModemVoice *q);
+ OrgFreedesktopModemManager1ModemVoiceInterface modemVoiceIface;
+
+ QMap<QString, ModemManager::Call::Ptr> callList;
+ ModemManager::Call::Ptr findCall(const QString &uni);
+ ModemManager::Call::List calls();
+
+ Q_DECLARE_PUBLIC(ModemVoice)
+ ModemVoice *q_ptr;
+private Q_SLOTS:
+ void onCallAdded(const QDBusObjectPath &path);
+ void onCallDeleted(const QDBusObjectPath &path);
+};
+
+} // namespace ModemManager
+
+#endif