This is basically too old stuff from meego times, and is added only because telepathy-ofono needs it for now, I will talk with ubports people to get telepathy-ofono ported to libqofono so we can dump this 6 year old unmaintained library. (patches to make it build with qt5 and modern compiler are taken from ubuntu packaging)
122 lines
4.2 KiB
Diff
122 lines
4.2 KiB
Diff
Description: set errors on dial() and sendMessage()
|
|
Author: Tiago Salem Herrmann <tiago.herrmann@canonical.com>
|
|
Forwarded: no
|
|
|
|
diff:
|
|
=== modified file 'a/lib/ofonomessagemanager.cpp'
|
|
--- a/lib/ofonomessagemanager.cpp 2013-04-23 05:22:22 +0000
|
|
+++ b/lib/ofonomessagemanager.cpp 2013-05-13 18:02:33 +0000
|
|
@@ -175,7 +175,7 @@
|
|
}
|
|
|
|
|
|
-QDBusObjectPath OfonoMessageManager::sendMessage(const QString &to, const QString &message)
|
|
+QDBusObjectPath OfonoMessageManager::sendMessage(const QString &to, const QString &message, bool &success)
|
|
{
|
|
QDBusMessage request;
|
|
QDBusReply<QDBusObjectPath> reply;
|
|
@@ -188,6 +188,10 @@
|
|
reply = QDBusConnection::systemBus().call(request);
|
|
if (reply.isValid()) {
|
|
objpath = reply;
|
|
+ success = true;
|
|
+ } else {
|
|
+ m_if->setError(reply.error().name(), reply.error().message());
|
|
+ success = false;
|
|
}
|
|
return objpath;
|
|
}
|
|
|
|
=== modified file 'a/lib/ofonomessagemanager.h'
|
|
--- a/lib/ofonomessagemanager.h 2013-04-23 05:22:22 +0000
|
|
+++ b/lib/ofonomessagemanager.h 2013-05-13 18:02:33 +0000
|
|
@@ -64,7 +64,7 @@
|
|
void requestAlphabet();
|
|
void setAlphabet(QString alphabet);
|
|
|
|
- QDBusObjectPath sendMessage(const QString &to, const QString &message);
|
|
+ QDBusObjectPath sendMessage(const QString &to, const QString &message, bool &success);
|
|
|
|
Q_SIGNALS:
|
|
void serviceCenterAddressChanged(const QString &address);
|
|
@@ -76,7 +76,6 @@
|
|
void useDeliveryReportsComplete(bool success, const bool &useDeliveryReports);
|
|
void bearerComplete(bool success, const QString &bearer);
|
|
void alphabetComplete(bool success, const QString &alphabet);
|
|
- void sendMessageComplete(bool success, const QString& path);
|
|
|
|
void setServiceCenterAddressFailed();
|
|
void setUseDeliveryReportsFailed();
|
|
|
|
=== modified file 'a/lib/ofonovoicecallmanager.cpp'
|
|
--- a/lib/ofonovoicecallmanager.cpp 2013-04-23 05:22:22 +0000
|
|
+++ b/lib/ofonovoicecallmanager.cpp 2013-05-13 18:02:33 +0000
|
|
@@ -139,7 +139,7 @@
|
|
SIGNAL(forwarded(const QString&)));
|
|
}
|
|
|
|
-QDBusObjectPath OfonoVoiceCallManager::dial(const QString &number, const QString &callerid_hide)
|
|
+QDBusObjectPath OfonoVoiceCallManager::dial(const QString &number, const QString &callerid_hide, bool &success)
|
|
{
|
|
QDBusMessage request;
|
|
QDBusReply<QDBusObjectPath> reply;
|
|
@@ -155,6 +155,10 @@
|
|
reply = QDBusConnection::systemBus().call(request);
|
|
if (reply.isValid()) {
|
|
objpath = reply;
|
|
+ success = true;
|
|
+ } else {
|
|
+ m_if->setError(reply.error().name(), reply.error().message());
|
|
+ success = false;
|
|
}
|
|
return objpath;
|
|
}
|
|
@@ -354,17 +358,6 @@
|
|
emit swapCallsComplete(false);
|
|
}
|
|
|
|
-void OfonoVoiceCallManager::dialResp()
|
|
-{
|
|
- emit dialComplete(true);
|
|
-}
|
|
-
|
|
-void OfonoVoiceCallManager::dialErr(const QDBusError &error)
|
|
-{
|
|
- m_if->setError(error.name(), error.message());
|
|
- emit dialComplete(false);
|
|
-}
|
|
-
|
|
void OfonoVoiceCallManager::hangupAllResp()
|
|
{
|
|
emit hangupAllComplete(true);
|
|
|
|
=== modified file 'a/lib/ofonovoicecallmanager.h'
|
|
--- a/lib/ofonovoicecallmanager.h 2013-04-23 05:22:22 +0000
|
|
+++ b/lib/ofonovoicecallmanager.h 2013-05-13 18:02:33 +0000
|
|
@@ -65,7 +65,7 @@
|
|
Q_INVOKABLE QStringList getCalls() const;
|
|
|
|
public Q_SLOTS:
|
|
- QDBusObjectPath dial(const QString &number, const QString &callerid_hide);
|
|
+ QDBusObjectPath dial(const QString &number, const QString &callerid_hide, bool &success);
|
|
void hangupAll();
|
|
void sendTones(const QString &tonestring);
|
|
void transfer();
|
|
@@ -80,7 +80,6 @@
|
|
void emergencyNumbersChanged(const QStringList &numbers);
|
|
void callAdded(const QString &call, const QVariantMap &values);
|
|
void callRemoved(const QString &call);
|
|
- void dialComplete(const bool status);
|
|
void hangupAllComplete(const bool status);
|
|
void sendTonesComplete(const bool status);
|
|
void transferComplete(const bool status);
|
|
@@ -100,8 +99,6 @@
|
|
void propertyChanged(const QString &property, const QVariant &value);
|
|
void callAddedChanged(const QDBusObjectPath &call, const QVariantMap &values);
|
|
void callRemovedChanged(const QDBusObjectPath &call);
|
|
- void dialResp();
|
|
- void dialErr(const QDBusError &error);
|
|
void hangupAllResp();
|
|
void hangupAllErr(const QDBusError &error);
|
|
void sendTonesResp();
|