KDEUI
kwallet.cpp
Go to the documentation of this file.
168 KSecretsService::CreateCollectionItemJob *createItemJob = secretsCollection->createItem( key, attrs, secret );
186 KSecretsService::SearchCollectionItemsJob *searchItemsJob = secretsCollection->searchItems(attrs);
205 kDebug(285) << "Cannot execute KSecretsService::SearchCollectionItemsJob " << searchItemsJob->errorString();
250 QDBusServiceWatcher *watcher = new QDBusServiceWatcher(QString::fromLatin1(s_kwalletdServiceName), QDBusConnection::sessionBus(),
255 connect(&walletLauncher->getInterface(), SIGNAL(walletClosed(int)), SLOT(slotWalletClosed(int)));
256 connect(&walletLauncher->getInterface(), SIGNAL(folderListUpdated(QString)), SLOT(slotFolderListUpdated(QString)));
257 connect(&walletLauncher->getInterface(), SIGNAL(folderUpdated(QString,QString)), SLOT(slotFolderUpdated(QString,QString)));
460 wallet->d->secretsCollection = KSecretsService::Collection::findCollection(name, KSecretsService::Collection::CreateCollection, QVariantMap(), w);
461 connect( wallet->d->secretsCollection, SIGNAL(statusChanged(int)), wallet, SLOT(slotCollectionStatusChanged(int)) );
462 connect( wallet->d->secretsCollection, SIGNAL(deleted()), wallet, SLOT(slotCollectionDeleted()) );
633 kDebug(285) << "Cannot execute KSecretsService::CollectionLockJob : " << lockJob->errorString();
733 attrs[KSS_ATTR_ENTRYFOLDER] = ""; // search for items having this attribute no matter what value it has
734 KSecretsService::SearchCollectionItemsJob *searchJob = d->secretsCollection->searchItems(attrs);
783 KSecretsService::SearchCollectionItemsJob *readItemsJob = d->secretsCollection->searchItems( attrs );
806 QDBusReply<QStringList> r = walletLauncher->getInterface().entryList(d->handle, d->folder, appid());
924 KSecretsService::SearchCollectionItemsJob *searchJob = d->secretsCollection->searchItems(attrs);
940 kDebug(285) << "Cannot execute KSecretsService::SearchCollectionItemsJob : " << searchJob->errorString();
973QExplicitlySharedDataPointer<KSecretsService::SecretItem> Wallet::WalletPrivate::findItem( const QString& key ) const
990 kDebug(285) << "Cannot exec KSecretsService::SearchCollectionItemsJob : " << searchJob->errorString();
1016bool Wallet::WalletPrivate::readSecret(const QString& key, KSecretsService::Secret& value) const
1047 QDBusReply<QByteArray> r = walletLauncher->getInterface().readEntry(d->handle, d->folder, key, appid());
1062 bool operator() ( Wallet::WalletPrivate*, const QString& label, KSecretsService::SecretItem* item ) {
1094 QDBusReply<QVariantMap> r = walletLauncher->getInterface().readEntryList(d->handle, d->folder, key, appid());
1134 QDBusReply<int> r = walletLauncher->getInterface().renameEntry(d->handle, d->folder, oldName, newName, appid());
1166 QDBusReply<QByteArray> r = walletLauncher->getInterface().readMap(d->handle, d->folder, key, appid());
1185 bool operator() ( Wallet::WalletPrivate* d, const QString& label, KSecretsService::SecretItem* ) {
1249 QDBusReply<QString> r = walletLauncher->getInterface().readPassword(d->handle, d->folder, key, appid());
1264 bool operator() ( Wallet::WalletPrivate* d, const QString& label, KSecretsService::SecretItem* ) {
1292 QDBusReply<QVariantMap> r = walletLauncher->getInterface().readPasswordList(d->handle, d->folder, key, appid());
1346 QDBusReply<int> r = walletLauncher->getInterface().writeEntry(d->handle, d->folder, key, value, appid());
1376 QDBusReply<int> r = walletLauncher->getInterface().writeMap(d->handle, d->folder, key, mapData, appid());
1401 QDBusReply<int> r = walletLauncher->getInterface().writePassword(d->handle, d->folder, key, value, appid());
1425 QDBusReply<bool> r = walletLauncher->getInterface().hasEntry(d->handle, d->folder, key, appid());
1459 QDBusReply<int> r = walletLauncher->getInterface().removeEntry(d->handle, d->folder, key, appid());
1480 KSecretsService::StringStringMap attrs = readAttrsJob->propertyValue().value<KSecretsService::StringStringMap>();
1487 kDebug(285) << KSS_ATTR_WALLETTYPE << " attribute holds non int value " << attrs[KSS_ATTR_WALLETTYPE];
1502 QDBusReply<int> r = walletLauncher->getInterface().entryType(d->handle, d->folder, key, appid());
1607 kDebug(285) << "WARNING: changing semantics of folderDoesNotExist with KSS: will prompt for the password";
1636 kDebug(285) << "WARNING: changing semantics of keyDoesNotExist with KSS: will prompt for the password";
1674 m_wallet = new org::kde::KWallet(QString::fromLatin1(s_kwalletdServiceName), "/modules/kwalletd", QDBusConnection::sessionBus());
1691 if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(QString::fromLatin1(s_kwalletdServiceName)))
1698 int ret = KToolInvocation::startServiceByDesktopPath("kwalletd.desktop", QStringList(), &error);
1705 (!QDBusConnection::sessionBus().interface()->isServiceRegistered(QString::fromLatin1(s_kwalletdServiceName))) {
QString programName() const
bool isValid() const
QString componentName() const
const KAboutData * aboutData() const
QString readEntry(const char *key, const char *aDefault=0) const
bool exec()
virtual QString errorString() const
int error() const
static int startServiceByDesktopPath(const QString &_name, const QString &URL, QString *error=0, QString *serviceName=0, int *pid=0, const QByteArray &startup_id=QByteArray(), bool noWait=false)
static const QString PasswordFolder()
The standardized name of the password folder.
Definition kwallet.cpp:138
int readEntryList(const QString &key, QMap< QString, QByteArray > &value)
Read the entries matching key from the current folder.
Definition kwallet.cpp:1078
virtual void virtual_hook(int id, void *data)
Definition kwallet.cpp:1658
virtual int renameEntry(const QString &oldName, const QString &newName)
Rename the entry oldName to newName.
Definition kwallet.cpp:1111
virtual int sync()
This syncs the wallet file on disk with what is in memory.
Definition kwallet.cpp:605
static QStringList users(const QString &wallet)
List the applications that are using the wallet wallet.
Definition kwallet.cpp:583
virtual int removeEntry(const QString &key)
Remove the entry key from the current folder.
Definition kwallet.cpp:1439
void folderUpdated(const QString &folder)
Emitted when a folder in this wallet is updated.
static int closeWallet(const QString &name, bool force)
Close the wallet name.
Definition kwallet.cpp:403
virtual bool hasEntry(const QString &key)
Determine if the current folder has they entry key.
Definition kwallet.cpp:1413
virtual QStringList folderList()
Obtain the list of all folders contained in the wallet.
Definition kwallet.cpp:727
virtual bool isOpen() const
Determine if the current wallet is open, and is a valid wallet handle.
Definition kwallet.cpp:666
static const QString NetworkWallet()
The name of the wallet used to store network passwords.
Definition kwallet.cpp:127
virtual const QString & currentFolder() const
Determine the current working folder in the wallet.
Definition kwallet.cpp:968
void folderListUpdated()
Emitted when the folder list is changed in this wallet.
virtual int writeEntry(const QString &key, const QByteArray &value, EntryType entryType)
Write key = value as a binary entry to the current folder.
Definition kwallet.cpp:1308
int readPasswordList(const QString &key, QMap< QString, QString > &value)
Read the password entry key from the current folder.
Definition kwallet.cpp:1277
virtual bool hasFolder(const QString &f)
Determine if the folder f exists in the wallet.
Definition kwallet.cpp:820
static void changePassword(const QString &name, WId w)
Request to the wallet service to change the password of the wallet name.
Definition kwallet.cpp:328
virtual int readEntry(const QString &key, QByteArray &value)
Read the entry key from the current folder.
Definition kwallet.cpp:1034
virtual QStringList entryList()
Return the list of keys of all entries in this folder.
Definition kwallet.cpp:777
int readMapList(const QString &key, QMap< QString, QMap< QString, QString > > &value)
Read the map entry key from the current folder.
Definition kwallet.cpp:1198
virtual int readMap(const QString &key, QMap< QString, QString > &value)
Read the map entry key from the current folder.
Definition kwallet.cpp:1146
virtual void requestChangePassword(WId w)
Request to the wallet service to change the password of the current wallet.
Definition kwallet.cpp:680
static bool disconnectApplication(const QString &wallet, const QString &app)
Disconnect the application app from wallet.
Definition kwallet.cpp:560
virtual bool removeFolder(const QString &f)
Remove the folder f and all its entries from the wallet.
Definition kwallet.cpp:917
static const QString LocalWallet()
The name of the wallet used to store local passwords.
Definition kwallet.cpp:109
static bool folderDoesNotExist(const QString &wallet, const QString &folder)
Determine if a folder does not exist in a wallet.
Definition kwallet.cpp:1603
virtual EntryType entryType(const QString &key)
Determine the type of the entry key in this folder.
Definition kwallet.cpp:1471
virtual int readPassword(const QString &key, QString &value)
Read the password entry key from the current folder.
Definition kwallet.cpp:1236
static bool isUsingKSecretsService()
Determine if the KWallet API is using the KSecretsService infrastructure This can ben changed in syst...
Definition kwallet.cpp:104
static Wallet * openWallet(const QString &name, WId w, OpenType ot=Synchronous)
Open the wallet name.
Definition kwallet.cpp:452
virtual int writePassword(const QString &key, const QString &value)
Write key = value as a password to the current folder.
Definition kwallet.cpp:1388
virtual bool setFolder(const QString &f)
Set the current working folder to f.
Definition kwallet.cpp:882
void walletOpened(bool success)
Emitted when a wallet is opened in asynchronous mode.
static bool keyDoesNotExist(const QString &wallet, const QString &folder, const QString &key)
Determine if an entry in a folder does not exist in a wallet.
Definition kwallet.cpp:1632
static const QString FormDataFolder()
The standardized name of the form data folder.
Definition kwallet.cpp:142
virtual int writeMap(const QString &key, const QMap< QString, QString > &value)
Write key = value as a map to the current folder.
Definition kwallet.cpp:1358
static void allowExternalProcessWindowActivation(int pid=-1)
Allows a window from another process to raise and activate itself.
Definition kwindowsystem_mac.cpp:622
#define K_GLOBAL_STATIC(TYPE, NAME)
#define kDebug
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KAutostart::StartPhase readEntry(const KConfigGroup &group, const char *key, const KAutostart::StartPhase &aDefault)
#define T
#define KSS_ATTR_ENTRYFOLDER
NOTE: KSecretsService folder semantics The KWallet API uses folders for organising items.
Definition kwallet.h:46
QMap< QString, StringStringMap > StringToStringStringMapMap
Definition kwallet_mac.cpp:48
bool hasMainComponent()
const KComponentData & mainComponent()
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition kstandardshortcut.cpp:267
Definition kwallet.cpp:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.