first working prototype of dynamically loaded kwallet storage
This commit is contained in:
parent
7ce27d1c11
commit
543538fc56
8 changed files with 484 additions and 17 deletions
33
core/passwordStorageEngines/wrappers/kwallet.cpp
Normal file
33
core/passwordStorageEngines/wrappers/kwallet.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <KF5/KWallet/KWallet>
|
||||
|
||||
extern "C" KWallet::Wallet* openWallet(const QString &name, WId w, KWallet::Wallet::OpenType ot = KWallet::Wallet::Synchronous) {
|
||||
return KWallet::Wallet::openWallet(name, w, ot);
|
||||
}
|
||||
|
||||
extern "C" void deleteWallet(KWallet::Wallet* w) {
|
||||
w->deleteLater();
|
||||
}
|
||||
|
||||
extern "C" const char* networkWallet() {
|
||||
return KWallet::Wallet::NetworkWallet().toStdString().c_str();
|
||||
}
|
||||
|
||||
extern "C" int readPassword(KWallet::Wallet* w, const QString &key, QString &value) {
|
||||
return w->readPassword(key, value);
|
||||
}
|
||||
|
||||
extern "C" int writePassword(KWallet::Wallet* w, const QString &key, const QString &value) {
|
||||
return w->writePassword(key, value);
|
||||
}
|
||||
|
||||
extern "C" bool hasFolder(KWallet::Wallet* w, const QString &f) {
|
||||
return w->hasFolder(f);
|
||||
}
|
||||
|
||||
extern "C" bool createFolder(KWallet::Wallet* w, const QString &f) {
|
||||
return w->createFolder(f);
|
||||
}
|
||||
|
||||
extern "C" bool setFolder(KWallet::Wallet* w, const QString &f) {
|
||||
return w->setFolder(f);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue