diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-02 16:15:01 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-07-08 10:33:34 +0900 |
commit | bd9913481762ac2dd5677479197c7ed4c2152d5e (patch) | |
tree | 59723f3f8ac2b8414076a8c43c857a044cdb0ca5 /tdeioslave | |
parent | b4754b0e6fc213e0880947cb2c01dfab834fa264 (diff) | |
download | tdebase-bd9913481762ac2dd5677479197c7ed4c2152d5e.tar.gz tdebase-bd9913481762ac2dd5677479197c7ed4c2152d5e.zip |
Renamed methods decrypt/undecrypt to unlock/lock.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeioslave')
-rw-r--r-- | tdeioslave/media/mediamanager/halbackend.cpp | 16 | ||||
-rw-r--r-- | tdeioslave/media/mediamanager/halbackend.h | 4 | ||||
-rw-r--r-- | tdeioslave/media/mediamanager/mediamanager.cpp | 24 | ||||
-rw-r--r-- | tdeioslave/media/mediamanager/mediamanager.h | 8 | ||||
-rw-r--r-- | tdeioslave/media/mediamanager/tdehardwarebackend.cpp | 24 | ||||
-rw-r--r-- | tdeioslave/media/mediamanager/tdehardwarebackend.h | 6 |
6 files changed, 41 insertions, 41 deletions
diff --git a/tdeioslave/media/mediamanager/halbackend.cpp b/tdeioslave/media/mediamanager/halbackend.cpp index 071752d5a..ae14a580f 100644 --- a/tdeioslave/media/mediamanager/halbackend.cpp +++ b/tdeioslave/media/mediamanager/halbackend.cpp @@ -1804,7 +1804,7 @@ TQStringVariantMap HALBackend::unmount(const TQString &id) return result; } -TQStringVariantMap HALBackend::decrypt(const TQString &id, const TQString &password) +TQStringVariantMap HALBackend::unlock(const TQString &id, const TQString &password) { TQStringVariantMap result; @@ -1831,7 +1831,7 @@ TQStringVariantMap HALBackend::decrypt(const TQString &id, const TQString &passw "org.freedesktop.Hal.Device.Volume.Crypto", "Setup"); if (msg == NULL) { - kdDebug() << "decrypt failed for " << udi << ": could not create dbus message\n"; + kdDebug() << "unlock failed for " << udi << ": could not create dbus message\n"; result["errStr"] = i18n("Internal error"); result["result"] = false; return result; @@ -1840,7 +1840,7 @@ TQStringVariantMap HALBackend::decrypt(const TQString &id, const TQString &passw TQCString pwdUtf8 = password.utf8(); const char *pwd_utf8 = pwdUtf8; if (!dbus_message_append_args (msg, DBUS_TYPE_STRING, &pwd_utf8, DBUS_TYPE_INVALID)) { - kdDebug() << "decrypt failed for " << udi << ": could not append args to dbus message\n"; + kdDebug() << "unlock failed for " << udi << ": could not append args to dbus message\n"; dbus_message_unref (msg); result["errStr"] = i18n("Internal error"); result["result"] = false; @@ -1852,7 +1852,7 @@ TQStringVariantMap HALBackend::decrypt(const TQString &id, const TQString &passw dbus_error_is_set (&error)) { TQString qerror = i18n("Internal Error"); - kdDebug() << "decrypt failed for " << udi << ": " << error.name << " " << error.message << endl; + kdDebug() << "unlock failed for " << udi << ": " << error.name << " " << error.message << endl; if (strcmp (error.name, "org.freedesktop.Hal.Device.Volume.Crypto.SetupPasswordError") == 0) { qerror = i18n("Wrong password"); } @@ -1873,7 +1873,7 @@ TQStringVariantMap HALBackend::decrypt(const TQString &id, const TQString &passw return result; } -TQStringVariantMap HALBackend::undecrypt(const TQString &id) +TQStringVariantMap HALBackend::lock(const TQString &id) { TQStringVariantMap result; @@ -1900,14 +1900,14 @@ TQStringVariantMap HALBackend::undecrypt(const TQString &id) "org.freedesktop.Hal.Device.Volume.Crypto", "Teardown"); if (msg == NULL) { - kdDebug() << "teardown failed for " << udi << ": could not create dbus message\n"; + kdDebug() << "lock failed for " << udi << ": could not create dbus message\n"; result["errStr"] = i18n("Internal error"); result["result"] = false; return result; } if (!dbus_message_append_args (msg, DBUS_TYPE_INVALID)) { - kdDebug() << "teardown failed for " << udi << ": could not append args to dbus message\n"; + kdDebug() << "lock failed for " << udi << ": could not append args to dbus message\n"; dbus_message_unref (msg); result["errStr"] = i18n("Internal error"); result["result"] = false; @@ -1919,7 +1919,7 @@ TQStringVariantMap HALBackend::undecrypt(const TQString &id) dbus_error_is_set (&error)) { TQString qerror = i18n("Internal Error"); - kdDebug() << "teardown failed for " << udi << ": " << error.name << " " << error.message << endl; + kdDebug() << "lock failed for " << udi << ": " << error.name << " " << error.message << endl; dbus_error_free (&error); dbus_message_unref (msg); while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ; diff --git a/tdeioslave/media/mediamanager/halbackend.h b/tdeioslave/media/mediamanager/halbackend.h index e799ad6e0..ed512fa7b 100644 --- a/tdeioslave/media/mediamanager/halbackend.h +++ b/tdeioslave/media/mediamanager/halbackend.h @@ -86,8 +86,8 @@ public: TQStringVariantMap mount(const TQString &id); TQStringVariantMap mount(const Medium *medium); TQStringVariantMap unmount(const TQString &id); - TQStringVariantMap decrypt(const TQString &id, const TQString &password); - TQStringVariantMap undecrypt(const TQString &id); + TQStringVariantMap unlock(const TQString &id, const TQString &password); + TQStringVariantMap lock(const TQString &id); private: /** diff --git a/tdeioslave/media/mediamanager/mediamanager.cpp b/tdeioslave/media/mediamanager/mediamanager.cpp index 6f498ffc8..7a8262eec 100644 --- a/tdeioslave/media/mediamanager/mediamanager.cpp +++ b/tdeioslave/media/mediamanager/mediamanager.cpp @@ -294,7 +294,7 @@ TQStringVariantMap MediaManager::unmount(const TQString &uid) #endif } -TQStringVariantMap MediaManager::decrypt(const TQString &uid, const TQString &password) +TQStringVariantMap MediaManager::unlock(const TQString &uid, const TQString &password) { TQStringVariantMap result; /* @@ -304,7 +304,7 @@ TQStringVariantMap MediaManager::decrypt(const TQString &uid, const TQString &pa result["result"] = false; return result; } - return m_tdebackend->decrypt(uid, password); + return m_tdebackend->unlock(uid, password); #elif defined COMPILE_HALBACKEND */ #if defined COMPILE_HALBACKEND @@ -313,7 +313,7 @@ TQStringVariantMap MediaManager::decrypt(const TQString &uid, const TQString &pa result["result"] = false; return result; } - return m_halbackend->decrypt(uid, password); + return m_halbackend->unlock(uid, password); #else // if (!m_fstabbackend) { @@ -321,11 +321,11 @@ TQStringVariantMap MediaManager::decrypt(const TQString &uid, const TQString &pa result["result"] = false; return result; // } -// return m_fstabbackend->decrypt(uid, password); +// return m_fstabbackend->unlock(uid, password); #endif } -TQStringVariantMap MediaManager::undecrypt(const TQString &uid) +TQStringVariantMap MediaManager::lock(const TQString &uid) { TQStringVariantMap result; /* @@ -335,7 +335,7 @@ TQStringVariantMap MediaManager::undecrypt(const TQString &uid) result["result"] = false; return result; } - return m_tdebackend->undecrypt(uid); + return m_tdebackend->lock(uid); #elif defined COMPILE_HALBACKEND */ #if defined COMPILE_HALBACKEND @@ -344,14 +344,14 @@ TQStringVariantMap MediaManager::undecrypt(const TQString &uid) result["result"] = false; return result; } - return m_halbackend->undecrypt(uid); + return m_halbackend->lock(uid); #else // if (!m_fstabbackend) { result["errStr"] = i18n("Feature only available with HAL or TDE hardware backend"); result["result"] = false; return result; // } -// return m_fstabbackend->undecrypt(uid); +// return m_fstabbackend->lock(uid); #endif } @@ -379,7 +379,7 @@ TQStringVariantMap MediaManager::unmountByNode(const TQString &deviceNode) return unmount(medium->id()); } -TQStringVariantMap MediaManager::decryptByNode(const TQString &deviceNode, const TQString &password) +TQStringVariantMap MediaManager::unlockByNode(const TQString &deviceNode, const TQString &password) { const Medium *medium = m_mediaList.findByNode(deviceNode); if (!medium) { @@ -388,10 +388,10 @@ TQStringVariantMap MediaManager::decryptByNode(const TQString &deviceNode, const result["result"] = false; return result; } - return decrypt(medium->id(), password); + return unlock(medium->id(), password); } -TQStringVariantMap MediaManager::undecryptByNode(const TQString &deviceNode) +TQStringVariantMap MediaManager::lockByNode(const TQString &deviceNode) { const Medium *medium = m_mediaList.findByNode(deviceNode); if (!medium) { @@ -400,7 +400,7 @@ TQStringVariantMap MediaManager::undecryptByNode(const TQString &deviceNode) result["result"] = false; return result; } - return undecrypt(medium->id()); + return lock(medium->id()); } TQString MediaManager::nameForLabel(const TQString &label) diff --git a/tdeioslave/media/mediamanager/mediamanager.h b/tdeioslave/media/mediamanager/mediamanager.h index 667626370..d8a31d8e1 100644 --- a/tdeioslave/media/mediamanager/mediamanager.h +++ b/tdeioslave/media/mediamanager/mediamanager.h @@ -49,13 +49,13 @@ k_dcop: TQStringVariantMap mount(const TQString &uid); TQStringVariantMap unmount(const TQString &uid); - TQStringVariantMap decrypt(const TQString &uid, const TQString &password); - TQStringVariantMap undecrypt(const TQString &uid); + TQStringVariantMap unlock(const TQString &uid, const TQString &password); + TQStringVariantMap lock(const TQString &uid); TQStringVariantMap mountByNode(const TQString &deviceNode); TQStringVariantMap unmountByNode(const TQString &deviceNode); - TQStringVariantMap decryptByNode(const TQString &deviceNode, const TQString &password); - TQStringVariantMap undecryptByNode(const TQString &deviceNode); + TQStringVariantMap unlockByNode(const TQString &deviceNode, const TQString &password); + TQStringVariantMap lockByNode(const TQString &deviceNode); TQString nameForLabel(const TQString &label); ASYNC setUserLabel(const TQString &name, const TQString &label); diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp index c228caf71..02971639d 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp @@ -55,7 +55,7 @@ TDEBackend::TDEBackend(MediaList &list, TQObject* parent) : TQObject() , BackendBase(list) - , m_decryptDialog(0) + , m_unlockDialog(0) , m_parent(parent) { // Initialize the TDE device manager @@ -929,7 +929,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name) } if (medium->isEncrypted()) { - // if not decrypted yet then there are no mountoptions + // if not unlocked yet then there are no mountoptions return TQStringList(); } @@ -1177,7 +1177,7 @@ bool TDEBackend::setMountoptions(const TQString &name, const TQStringList &optio } void TDEBackend::slotPasswordReady() { - m_decryptionPassword = m_decryptDialog->getPassword(); + m_decryptionPassword = m_unlockDialog->getPassword(); m_decryptPasswordValid = true; } @@ -1267,22 +1267,22 @@ TQStringVariantMap TDEBackend::mount(const Medium *medium) while (continue_trying_to_decrypt == true) { m_decryptPasswordValid = false; - m_decryptDialog = new Dialog(sdevice->deviceNode(), iconName); - m_decryptDialog->show(); + m_unlockDialog = new Dialog(sdevice->deviceNode(), iconName); + m_unlockDialog->show(); - connect(m_decryptDialog, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotPasswordReady())); - connect(m_decryptDialog, TQT_SIGNAL (cancelClicked()), this, TQT_SLOT (slotPasswordCancel())); - connect(this, TQT_SIGNAL (signalDecryptionPasswordError(TQString)), m_decryptDialog, TQT_SLOT (slotDialogError(TQString))); + connect(m_unlockDialog, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotPasswordReady())); + connect(m_unlockDialog, TQT_SIGNAL (cancelClicked()), this, TQT_SLOT (slotPasswordCancel())); + connect(this, TQT_SIGNAL (signalDecryptionPasswordError(TQString)), m_unlockDialog, TQT_SLOT (slotDialogError(TQString))); while (m_decryptPasswordValid == false) { tqApp->processEvents(); } - m_decryptDialog->setEnabled(false); + m_unlockDialog->setEnabled(false); tqApp->processEvents(); if (m_decryptionPassword.isNull()) { - delete m_decryptDialog; + delete m_unlockDialog; result["errStr"] = i18n("Decryption aborted"); result["result"] = false; return result; @@ -1317,7 +1317,7 @@ TQStringVariantMap TDEBackend::mount(const Medium *medium) if (mountResult.contains("retCode") && mountResult["retCode"].toInt() == 25600) { // Probable LUKS failure // Retry - m_decryptDialog->setEnabled(true); + m_unlockDialog->setEnabled(true); continue_trying_to_decrypt = true; } else { @@ -1334,7 +1334,7 @@ TQStringVariantMap TDEBackend::mount(const Medium *medium) continue_trying_to_decrypt = false; } - delete m_decryptDialog; + delete m_unlockDialog; } } } diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.h b/tdeioslave/media/mediamanager/tdehardwarebackend.h index bc9bcca4a..5c6ce1260 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.h +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.h @@ -71,8 +71,8 @@ public: TQStringVariantMap mount(const TQString &id); TQStringVariantMap mount(const Medium *medium); TQStringVariantMap unmount(const TQString &id); -// TQStringVariantMap decrypt(const TQString &id, const TQString &password); -// TQStringVariantMap undecrypt(const TQString &id); +// TQStringVariantMap unlock(const TQString &id, const TQString &password); +// TQStringVariantMap lock(const TQString &id); private: /** @@ -138,7 +138,7 @@ private: TQString driveUDIFromDeviceUID(TQString uuid); // Decryption - Dialog* m_decryptDialog; + Dialog* m_unlockDialog; TQString m_decryptionPassword; bool m_decryptPasswordValid; |