| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#ifndef WALLET_H |
| 26 |
#define WALLET_H |
| 27 |
|
| 28 |
#include <kwallet_interface.h> |
| 29 |
|
| 30 |
namespace QTerm{ |
| 31 |
|
| 32 |
class Wallet : public QObject |
| 33 |
{ |
| 34 |
Q_OBJECT |
| 35 |
public: |
| 36 |
Wallet(QObject * parent = 0); |
| 37 |
~Wallet(); |
| 38 |
static bool isWalletAvailable(); |
| 39 |
QString readPassword(const QString & site, const QString & username); |
| 40 |
bool writePassword(const QString & site, const QString & username, const QString & password); |
| 41 |
bool removePassword(const QString & site, const QString & username); |
| 42 |
void open(); |
| 43 |
void close(); |
| 44 |
signals: |
| 45 |
void error(const QString & message); |
| 46 |
private slots: |
| 47 |
void walletOpened(const QString & wallet); |
| 48 |
void walletClosed(int handle); |
| 49 |
private: |
| 50 |
OrgKdeKWalletInterface * m_wallet; |
| 51 |
QString m_walletName; |
| 52 |
int m_handle; |
| 53 |
}; |
| 54 |
|
| 55 |
} |
| 56 |
#endif |