Description: update connman interface to the new layout
Author: Tiago Salem Herrmann <tiago.herrmann@canonical.com>
Forwarded: no

diff:
=== modified file 'a/lib/ofonoconnman.cpp'
--- a/lib/ofonoconnman.cpp	2013-04-23 05:18:36 +0000
+++ b/lib/ofonoconnman.cpp	2013-05-14 16:19:47 +0000
@@ -146,9 +146,11 @@
     emit deactivateAllComplete(false);
 }
 
-void OfonoConnMan::addContext(const QString& type)
+QDBusObjectPath OfonoConnMan::addContext(const QString& type, bool &success)
 {
     QDBusMessage request;
+    QDBusReply<QDBusObjectPath> reply;
+    QDBusObjectPath objpath;
 
     request = QDBusMessage::createMethodCall("org.ofono",
 					     path(), m_if->ifname(),
@@ -158,10 +160,15 @@
     arg.append(QVariant(type));
     request.setArguments(arg);
 
-    QDBusConnection::systemBus().callWithCallback(request, this,
-                                        SLOT(addContextResp(const QDBusObjectPath &)),
-                                        SLOT(addContextErr(const QDBusError&)),
-                                        ADD_TIMEOUT);
+    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;
 }
 
 void OfonoConnMan::addContextResp(const QDBusObjectPath &path)

=== modified file 'a/lib/ofonoconnman.h'
--- a/lib/ofonoconnman.h	2013-04-23 05:21:32 +0000
+++ b/lib/ofonoconnman.h	2013-05-14 16:19:47 +0000
@@ -71,7 +71,7 @@
     void setPowered(const bool);
     void setRoamingAllowed(const bool);
     void deactivateAll();
-    void addContext(const QString& type);
+    QDBusObjectPath addContext(const QString& type, bool &success);
     void removeContext(const QString& path);
 
 Q_SIGNALS:
