From b1246c70673b6024314964c991ab0e59174fcbdb Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 31 May 2019 11:08:37 +0900 Subject: Adjusted to new TDEStorageOpResult-based tdelibs api. Signed-off-by: Michele Calgaro --- libk3bdevice/k3bhalconnection.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libk3bdevice') diff --git a/libk3bdevice/k3bhalconnection.cpp b/libk3bdevice/k3bhalconnection.cpp index 476d016..7a17bf7 100644 --- a/libk3bdevice/k3bhalconnection.cpp +++ b/libk3bdevice/k3bhalconnection.cpp @@ -22,6 +22,7 @@ #include #include +#include #ifdef HAVE_HAL // We acknowledge the the dbus API is unstable @@ -842,8 +843,9 @@ int K3bDevice::HalConnection::mount( K3bDevice::Device* dev, // FIXME // Options from 'options' are not currently loaded into 'mountOptions' TDEStorageMountOptions mountOptions; - TQString mountedPath = sdevice->mountDevice(mountPoint, mountOptions); - if (mountedPath.isNull()) { + TDEStorageOpResult mountResult = sdevice->mountDevice(mountPoint, mountOptions); + TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null; + if (mountedPath.isEmpty()) { return org_freedesktop_Hal_CommunicationError; } else { @@ -872,7 +874,8 @@ int K3bDevice::HalConnection::unmount(K3bDevice::Device* dev, const TQStringList // Options from 'options' are not currently loaded into 'mountOptions' TQString mountOptions; - if (!sdevice->unmountDevice(NULL)) { + TDEStorageOpResult unmountResult = sdevice->unmountDevice(); + if (unmountResult["result"].toBool() == false) { // Unmount failed! return org_freedesktop_Hal_CommunicationError; } -- cgit v1.2.1