summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdestoragedevice.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-30 23:28:23 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-07-07 23:44:28 +0900
commitbf683427937ea0cfd90749b833456377de6ffa10 (patch)
tree6b911cc13766cfb54dc6e8b0211e7138e64cba7b /tdecore/tdehw/tdestoragedevice.h
parent7214a7b6b590d62aac622dbf2de31b1ca1ba78d5 (diff)
downloadtdelibs-bf683427937ea0cfd90749b833456377de6ffa10.tar.gz
tdelibs-bf683427937ea0cfd90749b833456377de6ffa10.zip
Reworked code for eject/mount/unmount operations to support new TDEStorageOpResult return type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tdehw/tdestoragedevice.h')
-rw-r--r--tdecore/tdehw/tdestoragedevice.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h
index 0d4e06f63..d6a4269a8 100644
--- a/tdecore/tdehw/tdestoragedevice.h
+++ b/tdecore/tdehw/tdestoragedevice.h
@@ -166,7 +166,9 @@ enum TDELUKSResult {
};
};
-typedef TQMap<TQString,TQString> TDEStorageMountOptions;
+class TQVariant;
+typedef TQMap<TQString, TQString> TDEStorageMountOptions;
+typedef TQMap<TQString, TQVariant> TDEStorageOpResult;
class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
{
@@ -231,36 +233,31 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
* Mounts the device if not encrypted
*
* @param a TQString containing a requested mount name under /media, if desired
- * @param a TQString containing any mount options for pmount, if desired
- * @param a pointer to a TQString which will be populated with any error messages from pmount, if desired
- * @param a pointer to an integer which will be populated with the return code from pmount, if desired
+ * @param a TDEStorageMountOptions containing any mount options for pmount, if desired
*
- * @return a TQString with the mount path, if successful
+ * @return a TDEStorageOpResult object containing information about the operation outcome
*/
- TQString mountDevice(TQString mediaName=TQString::null, TDEStorageMountOptions mountOptions=TDEStorageMountOptions(), TQString* errRet=0, int* retcode=0);
+ TDEStorageOpResult mountDevice(TQString mediaName = TQString::null,
+ TDEStorageMountOptions mountOptions = TDEStorageMountOptions());
/**
* Mounts the encrypted device if the correct passphrase is given
*
* @param a TQString containing the passphrase
* @param a TQString containing a requested mount name under /media, if desired
- * @param a TQString containing any mount options for pmount, if desired
- * @param a pointer to a TQString which will be populated with any error messages from pmount, if desired
- * @param a pointer to an integer which will be populated with the return code from pmount, if desired
+ * @param a TDEStorageMountOptions containing any mount options for pmount, if desired
*
- * @return a TQString with the mount path, if successful
+ * @return a TDEStorageOpResult object containing information about the operation outcome
*/
- TQString mountEncryptedDevice(TQString passphrase, TQString mediaName=TQString::null, TDEStorageMountOptions mountOptions=TDEStorageMountOptions(), TQString* errRet=0, int* retcode=0);
+ TDEStorageOpResult mountEncryptedDevice(TQString passphrase, TQString mediaName = TQString::null,
+ TDEStorageMountOptions mountOptions = TDEStorageMountOptions());
/**
* Unmounts the device
*
- * @param a pointer to a TQString which will be populated with any error messages from pmount, if desired
- * @param a pointer to an integer which will be populated with the return code from pmount, if desired
- *
- * @return true if unmount was successful
+ * @return a TDEStorageOpResult object containing information about the operation outcome
*/
- bool unmountDevice(TQString* errRet, int* retcode=0);
+ TDEStorageOpResult unmountDevice();
/**
* @return a TQString with the mount path, if mounted