summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-30 18:02:28 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-30 18:02:28 -0500
commit0aed61de3581997e04c6d5fb8de2333b7e115452 (patch)
tree5144e4dc8f3fd8b538a9aa691beb0529dbf148e3 /tdecore/tdehardwaredevices.h
parente428644d86c505207079914f592d5275205493d1 (diff)
downloadtdelibs-0aed61de3581997e04c6d5fb8de2333b7e115452.tar.gz
tdelibs-0aed61de3581997e04c6d5fb8de2333b7e115452.zip
Add mount and unmount functionality to TDE disk hardware class
Diffstat (limited to 'tdecore/tdehardwaredevices.h')
-rw-r--r--tdecore/tdehardwaredevices.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h
index 531106c36..d309ff650 100644
--- a/tdecore/tdehardwaredevices.h
+++ b/tdecore/tdehardwaredevices.h
@@ -348,6 +348,30 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
void setSlaveDevices(TQStringList sd);
/**
+ * Mounts the device if not encrypted
+ *
+ * @param a TQString containing a requested mount name under /media, if desired
+ * @return a TQString with the mount path, if successful
+ */
+ TQString mountDevice(TQString mediaName=TQString::null);
+
+ /**
+ * 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
+ * @return a TQString with the mount path, if successful
+ */
+ TQString mountEncryptedDevice(TQString passphrase, TQString mediaName=TQString::null);
+
+ /**
+ * Unmounts the device
+ *
+ * @return TRUE if unmount was successful
+ */
+ bool unmountDevice();
+
+ /**
* @return a TQString with the mount path, if mounted
*/
TQString mountPath();
@@ -400,6 +424,12 @@ class TDECORE_EXPORT TDEHardwareDevices : TQObject
*/
TQPtrList<TDEGenericDevice> &listAllPhysicalDevices();
+ /**
+ * Return the device with system path @arg syspath, or 0 if no device exists for that path
+ * @return TDEGenericDevice
+ */
+ TDEGenericDevice* findBySystemPath(TQString syspath);
+
signals:
void hardwareAdded(TDEGenericDevice);
void hardwareRemoved(TDEGenericDevice);