|
|
|
@ -21,13 +21,13 @@
|
|
|
|
|
#define KORNPASSWORD_H
|
|
|
|
|
|
|
|
|
|
class TDEConfigBase;
|
|
|
|
|
namespace KWallet { class Wallet; }
|
|
|
|
|
namespace TDEWallet { class Wallet; }
|
|
|
|
|
|
|
|
|
|
class TQString;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This class can be used to store and retrieve passwords.
|
|
|
|
|
* It uses KWallet if possible, and the configuartion files otherwise.
|
|
|
|
|
* It uses TDEWallet if possible, and the configuartion files otherwise.
|
|
|
|
|
*/
|
|
|
|
|
class KOrnPassword
|
|
|
|
|
{
|
|
|
|
@ -46,15 +46,15 @@ public:
|
|
|
|
|
*
|
|
|
|
|
* @param box The boxnumber of the account
|
|
|
|
|
* @param account The accountnumber of the account
|
|
|
|
|
* @param fallbackConfig The configuration file if KWallet cannot be used.
|
|
|
|
|
* @param fallbackConfig The configuration file if TDEWallet cannot be used.
|
|
|
|
|
* @return The password, or TQString() if it failes.
|
|
|
|
|
*/
|
|
|
|
|
static TQString readKOrnPassword( int box, int account, const TDEConfigBase& fallbackConfig );
|
|
|
|
|
/**
|
|
|
|
|
* This function gets a password with is puts in KWallet by KMail
|
|
|
|
|
* This function gets a password with is puts in TDEWallet by KMail
|
|
|
|
|
*
|
|
|
|
|
* @param accountnr The id of the KMail account
|
|
|
|
|
* @param fallbackConfig The configuration used if KWallet isn't available.
|
|
|
|
|
* @param fallbackConfig The configuration used if TDEWallet isn't available.
|
|
|
|
|
* @return The password, TQStirng::null if it failes.
|
|
|
|
|
*/
|
|
|
|
|
static TQString readKMailPassword( int accountnr, const TDEConfigBase& fallbackConfig );
|
|
|
|
@ -64,22 +64,22 @@ public:
|
|
|
|
|
*
|
|
|
|
|
* @param box The boxnumber of the account.
|
|
|
|
|
* @param account The accountnumber of the account.
|
|
|
|
|
* @param fallbackConfig The configuration file if KWallet isn't available.
|
|
|
|
|
* @param fallbackConfig The configuration file if TDEWallet isn't available.
|
|
|
|
|
* @param password The password to be stored.
|
|
|
|
|
*/
|
|
|
|
|
static void writeKOrnPassword( int box, int account, TDEConfigBase& fallbackConfig, const TQString& password );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This function deletes a password from both KWallet and the configuration file
|
|
|
|
|
* This function deletes a password from both TDEWallet and the configuration file
|
|
|
|
|
*
|
|
|
|
|
* @param box The boxnumber of the account.
|
|
|
|
|
* @param account The accountnumber of the account.
|
|
|
|
|
* @param fallbackConfig The configuration file if KWallet isn't available.
|
|
|
|
|
* @param fallbackConfig The configuration file if TDEWallet isn't available.
|
|
|
|
|
*/
|
|
|
|
|
static void deleteKOrnPassword( int box, int account, TDEConfigBase& fallbackConfig );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This function deletes a password from KWallet
|
|
|
|
|
* This function deletes a password from TDEWallet
|
|
|
|
|
*
|
|
|
|
|
* @param box The boxnumber of the account.
|
|
|
|
|
* @param account The accountnumber of the account.
|
|
|
|
@ -143,7 +143,7 @@ public:
|
|
|
|
|
static void rewritePassword( int box, int account, TDEConfigBase &config, bool newUseWalletValue );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* If set to true, this class will try to use KWallet,
|
|
|
|
|
* If set to true, this class will try to use TDEWallet,
|
|
|
|
|
* if false, it will not.
|
|
|
|
|
*
|
|
|
|
|
* The default value is true.
|
|
|
|
@ -159,7 +159,7 @@ private:
|
|
|
|
|
|
|
|
|
|
static TQString KMailDecrypt( const TQString& enc );
|
|
|
|
|
|
|
|
|
|
static KWallet::Wallet *m_wallet;
|
|
|
|
|
static TDEWallet::Wallet *m_wallet;
|
|
|
|
|
static bool m_openFailed;
|
|
|
|
|
static bool m_useWallet;
|
|
|
|
|
};
|
|
|
|
|