• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdewallet
 

tdewallet

  • tdewallet
  • client
tdewallet.cpp
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2002-2004 George Staikos <staikos@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #include "tdewallettypes.h"
22 #include "tdewallet.h"
23 #include <tdeconfig.h>
24 #include <kdebug.h>
25 #include <dcopclient.h>
26 #include <dcopref.h>
27 #include <tqpopupmenu.h>
28 #include <tqapplication.h>
29 
30 #include <assert.h>
31 
32 using namespace TDEWallet;
33 
34 
35 const TQString Wallet::LocalWallet() {
36  TDEConfig cfg("tdewalletrc", true);
37  cfg.setGroup("Wallet");
38  if (!cfg.readBoolEntry("Use One Wallet", true)) {
39  TQString tmp = cfg.readEntry("Local Wallet", "localwallet");
40  if (tmp.isEmpty()) {
41  return "localwallet";
42  }
43  return tmp;
44  }
45 
46  TQString tmp = cfg.readEntry("Default Wallet", "kdewallet");
47  if (tmp.isEmpty()) {
48  return "kdewallet";
49  }
50  return tmp;
51 }
52 
53 const TQString Wallet::NetworkWallet() {
54  TDEConfig cfg("tdewalletrc", true);
55  cfg.setGroup("Wallet");
56 
57  TQString tmp = cfg.readEntry("Default Wallet", "kdewallet");
58  if (tmp.isEmpty()) {
59  return "kdewallet";
60  }
61  return tmp;
62 }
63 
64 const TQString Wallet::PasswordFolder() {
65  return "Passwords";
66 }
67 
68 const TQString Wallet::FormDataFolder() {
69  return "Form Data";
70 }
71 
72 
73 
74 Wallet::Wallet(int handle, const TQString& name)
75 : TQObject(0L), DCOPObject(), d(0L), _name(name), _handle(handle) {
76 
77  _dcopRef = new DCOPRef("kded", "tdewalletd");
78 
79  _dcopRef->dcopClient()->setNotifications(true);
80  connect(_dcopRef->dcopClient(),
81  TQ_SIGNAL(applicationRemoved(const TQCString&)),
82  this,
83  TQ_SLOT(slotAppUnregistered(const TQCString&)));
84 
85  connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "walletClosed(int)", "slotWalletClosed(int)", false);
86  connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderListUpdated(TQString)", "slotFolderListUpdated(TQString)", false);
87  connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderUpdated(TQString, TQString)", "slotFolderUpdated(TQString, TQString)", false);
88  connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "applicationDisconnected(TQString, TQCString)", "slotApplicationDisconnected(TQString, TQCString)", false);
89 
90  // Verify that the wallet is still open
91  if (_handle != -1) {
92  DCOPReply r = _dcopRef->call("isOpen", _handle);
93  if (r.isValid()) {
94  bool rc = false;
95  r.get(rc);
96  if (!rc) {
97  _handle = -1;
98  _name = TQString::null;
99  }
100  }
101  }
102 }
103 
104 
105 Wallet::~Wallet() {
106  if (_handle != -1) {
107  _dcopRef->call("close", _handle, false);
108  _handle = -1;
109  _folder = TQString::null;
110  _name = TQString::null;
111  }
112 
113  delete _dcopRef;
114  _dcopRef = 0L;
115 }
116 
117 
118 TQStringList Wallet::walletList() {
119  DCOPReply r = DCOPRef("kded", "tdewalletd").call("wallets");
120  TQStringList rc;
121  if (r.isValid()) {
122  r.get(rc);
123  }
124  return rc;
125 }
126 
127 
128 void Wallet::changePassword(const TQString& name, WId w) {
129  DCOPRef("kded", "tdewalletd").send("changePassword", name, uint(w));
130 }
131 
132 
133 bool Wallet::isEnabled() {
134  DCOPReply r = DCOPRef("kded", "tdewalletd").call("isEnabled");
135  bool rc = false;
136  if (r.isValid()) {
137  r.get(rc);
138  }
139  return rc;
140 }
141 
142 
143 bool Wallet::isOpen(const TQString& name) {
144  DCOPReply r = DCOPRef("kded", "tdewalletd").call("isOpen", name);
145  bool rc = false;
146  if (r.isValid()) {
147  r.get(rc);
148  }
149  return rc;
150 }
151 
152 
153 int Wallet::closeWallet(const TQString& name, bool force) {
154  DCOPReply r = DCOPRef("kded", "tdewalletd").call("close", name, force);
155  int rc = -1;
156  if (r.isValid()) {
157  r.get(rc);
158  }
159  return rc;
160 }
161 
162 
163 int Wallet::deleteWallet(const TQString& name) {
164  DCOPReply r = DCOPRef("kded", "tdewalletd").call("deleteWallet", name);
165  int rc = -1;
166  if (r.isValid()) {
167  r.get(rc);
168  }
169  return rc;
170 }
171 
172 
173 Wallet *Wallet::openWallet(const TQString& name, WId w, OpenType ot) {
174  if (ot == Asynchronous) {
175  Wallet *wallet = new Wallet(-1, name);
176  DCOPRef("kded", "tdewalletd").send("openAsynchronous", name, wallet->objId(), uint(w));
177  return wallet;
178  }
179 
180  // avoid deadlock if the app has some popup open (#65978/#71048)
181  while( TQWidget* widget = tqApp->activePopupWidget())
182  widget->close();
183 
184  bool isPath = ot == Path;
185  DCOPReply r;
186 
187  if (isPath) {
188  r = DCOPRef("kded", "tdewalletd").call("openPath", name, uint(w));
189  } else {
190  r = DCOPRef("kded", "tdewalletd").call("open", name, uint(w));
191  }
192 
193  if (r.isValid()) {
194  int drc = -1;
195  r.get(drc);
196  if (drc != -1) {
197  return new Wallet(drc, name);
198  }
199  }
200 
201  return 0;
202 }
203 
204 
205 bool Wallet::disconnectApplication(const TQString& wallet, const TQCString& app) {
206  DCOPReply r = DCOPRef("kded", "tdewalletd").call("disconnectApplication", wallet, app);
207  bool rc = false;
208  if (r.isValid()) {
209  r.get(rc);
210  }
211  return rc;
212 }
213 
214 
215 TQStringList Wallet::users(const TQString& name) {
216  DCOPReply r = DCOPRef("kded", "tdewalletd").call("users", name);
217  TQStringList drc;
218  if (r.isValid()) {
219  r.get(drc);
220  }
221  return drc;
222 }
223 
224 
225 int Wallet::sync() {
226  if (_handle == -1) {
227  return -1;
228  }
229 
230  _dcopRef->call("sync", _handle);
231  return 0;
232 }
233 
234 
235 int Wallet::lockWallet() {
236  if (_handle == -1) {
237  return -1;
238  }
239 
240  DCOPReply r = _dcopRef->call("close", _handle, true);
241  _handle = -1;
242  _folder = TQString::null;
243  _name = TQString::null;
244  if (r.isValid()) {
245  int drc = -1;
246  r.get(drc);
247  return drc;
248  }
249  return -1;
250 }
251 
252 
253 const TQString& Wallet::walletName() const {
254  return _name;
255 }
256 
257 
258 bool Wallet::isOpen() const {
259  return _handle != -1;
260 }
261 
262 
263 void Wallet::requestChangePassword(WId w) {
264  if (_handle == -1) {
265  return;
266  }
267 
268  _dcopRef->send("changePassword", _name, uint(w));
269 }
270 
271 
272 void Wallet::slotWalletClosed(int handle) {
273  if (_handle == handle) {
274  _handle = -1;
275  _folder = TQString::null;
276  _name = TQString::null;
277  emit walletClosed();
278  }
279 }
280 
281 
282 TQStringList Wallet::folderList() {
283  TQStringList rc;
284 
285  if (_handle == -1) {
286  return rc;
287  }
288 
289  DCOPReply r = _dcopRef->call("folderList", _handle);
290  if (r.isValid()) {
291  r.get(rc);
292  }
293 
294  return rc;
295 }
296 
297 
298 TQStringList Wallet::entryList() {
299  TQStringList rc;
300 
301  if (_handle == -1) {
302  return rc;
303  }
304 
305  DCOPReply r = _dcopRef->call("entryList", _handle, _folder);
306  if (r.isValid()) {
307  r.get(rc);
308  }
309 
310  return rc;
311 }
312 
313 
314 bool Wallet::hasFolder(const TQString& f) {
315  bool rc = false;
316 
317  if (_handle == -1) {
318  return rc;
319  }
320 
321  DCOPReply r = _dcopRef->call("hasFolder", _handle, f);
322  if (r.isValid()) {
323  r.get(rc);
324  }
325 
326  return rc;
327 }
328 
329 
330 bool Wallet::createFolder(const TQString& f) {
331  bool rc = true;
332 
333  if (_handle == -1) {
334  return false;
335  }
336 
337  if (!hasFolder(f)) {
338  DCOPReply r = _dcopRef->call("createFolder", _handle, f);
339  if (r.isValid()) {
340  r.get(rc);
341  }
342  }
343 
344  return rc;
345 }
346 
347 
348 bool Wallet::setFolder(const TQString& f) {
349  bool rc = false;
350 
351  if (_handle == -1) {
352  return rc;
353  }
354 
355  // Don't do this - the folder could have disappeared?
356 #if 0
357  if (f == _folder) {
358  return true;
359  }
360 #endif
361 
362  if (hasFolder(f)) {
363  _folder = f;
364  rc = true;
365  }
366 
367  return rc;
368 }
369 
370 
371 bool Wallet::removeFolder(const TQString& f) {
372  bool rc = false;
373 
374  if (_handle == -1) {
375  return rc;
376  }
377 
378  DCOPReply r = _dcopRef->call("removeFolder", _handle, f);
379  if (r.isValid()) {
380  r.get(rc);
381  }
382 
383  if (_folder == f) {
384  setFolder(TQString::null);
385  }
386 
387  return rc;
388 }
389 
390 
391 const TQString& Wallet::currentFolder() const {
392  return _folder;
393 }
394 
395 
396 int Wallet::readEntry(const TQString& key, TQByteArray& value) {
397  int rc = -1;
398 
399  if (_handle == -1) {
400  return rc;
401  }
402 
403  DCOPReply r = _dcopRef->call("readEntry", _handle, _folder, key);
404  if (r.isValid()) {
405  r.get(value);
406  rc = 0;
407  }
408 
409  return rc;
410 }
411 
412 
413 int Wallet::readEntryList(const TQString& key, TQMap<TQString, TQByteArray>& value) {
414  int rc = -1;
415 
416  if (_handle == -1) {
417  return rc;
418  }
419 
420  DCOPReply r = _dcopRef->call("readEntryList", _handle, _folder, key);
421  if (r.isValid()) {
422  r.get(value);
423  rc = 0;
424  }
425 
426  return rc;
427 }
428 
429 
430 int Wallet::renameEntry(const TQString& oldName, const TQString& newName) {
431  int rc = -1;
432 
433  if (_handle == -1) {
434  return rc;
435  }
436 
437  DCOPReply r = _dcopRef->call("renameEntry", _handle, _folder, oldName, newName);
438  if (r.isValid()) {
439  r.get(rc);
440  }
441 
442  return rc;
443 }
444 
445 
446 int Wallet::readMap(const TQString& key, TQMap<TQString,TQString>& value) {
447  int rc = -1;
448 
449  if (_handle == -1) {
450  return rc;
451  }
452 
453  DCOPReply r = _dcopRef->call("readMap", _handle, _folder, key);
454  if (r.isValid()) {
455  TQByteArray v;
456  r.get(v);
457  if (!v.isEmpty()) {
458  TQDataStream ds(v, IO_ReadOnly);
459  ds >> value;
460  }
461  rc = 0;
462  }
463 
464  return rc;
465 }
466 
467 
468 int Wallet::readMapList(const TQString& key, TQMap<TQString, TQMap<TQString, TQString> >& value) {
469  int rc = -1;
470 
471  if (_handle == -1) {
472  return rc;
473  }
474 
475  DCOPReply r = _dcopRef->call("readMapList", _handle, _folder, key);
476  if (r.isValid()) {
477  TQMap<TQString,TQByteArray> unparsed;
478  r.get(unparsed);
479  for (TQMap<TQString,TQByteArray>::ConstIterator i = unparsed.begin(); i != unparsed.end(); ++i) {
480  if (!i.data().isEmpty()) {
481  TQDataStream ds(i.data(), IO_ReadOnly);
482  TQMap<TQString,TQString> v;
483  ds >> v;
484  value.insert(i.key(), v);
485  }
486  }
487  rc = 0;
488  }
489 
490  return rc;
491 }
492 
493 
494 int Wallet::readPassword(const TQString& key, TQString& value) {
495  int rc = -1;
496 
497  if (_handle == -1) {
498  return rc;
499  }
500 
501  DCOPReply r = _dcopRef->call("readPassword", _handle, _folder, key);
502  if (r.isValid()) {
503  r.get(value);
504  rc = 0;
505  }
506 
507  return rc;
508 }
509 
510 
511 int Wallet::readPasswordList(const TQString& key, TQMap<TQString, TQString>& value) {
512  int rc = -1;
513 
514  if (_handle == -1) {
515  return rc;
516  }
517 
518  DCOPReply r = _dcopRef->call("readPasswordList", _handle, _folder, key);
519  if (r.isValid()) {
520  r.get(value);
521  rc = 0;
522  }
523 
524  return rc;
525 }
526 
527 
528 int Wallet::writeEntry(const TQString& key, const TQByteArray& value, EntryType entryType) {
529  int rc = -1;
530 
531  if (_handle == -1) {
532  return rc;
533  }
534 
535  DCOPReply r = _dcopRef->call("writeEntry", _handle, _folder, key, value, int(entryType));
536  if (r.isValid()) {
537  r.get(rc);
538  }
539 
540  return rc;
541 }
542 
543 
544 int Wallet::writeEntry(const TQString& key, const TQByteArray& value) {
545  int rc = -1;
546 
547  if (_handle == -1) {
548  return rc;
549  }
550 
551  DCOPReply r = _dcopRef->call("writeEntry", _handle, _folder, key, value);
552  if (r.isValid()) {
553  r.get(rc);
554  }
555 
556  return rc;
557 }
558 
559 
560 int Wallet::writeMap(const TQString& key, const TQMap<TQString,TQString>& value) {
561  int rc = -1;
562 
563  if (_handle == -1) {
564  return rc;
565  }
566 
567  TQByteArray a;
568  TQDataStream ds(a, IO_WriteOnly);
569  ds << value;
570  DCOPReply r = _dcopRef->call("writeMap", _handle, _folder, key, a);
571  if (r.isValid()) {
572  r.get(rc);
573  }
574 
575  return rc;
576 }
577 
578 
579 int Wallet::writePassword(const TQString& key, const TQString& value) {
580  int rc = -1;
581 
582  if (_handle == -1) {
583  return rc;
584  }
585 
586  DCOPReply r = _dcopRef->call("writePassword", _handle, _folder, key, value);
587  if (r.isValid()) {
588  r.get(rc);
589  }
590 
591  return rc;
592 }
593 
594 
595 bool Wallet::hasEntry(const TQString& key) {
596  bool rc = false;
597 
598  if (_handle == -1) {
599  return rc;
600  }
601 
602  DCOPReply r = _dcopRef->call("hasEntry", _handle, _folder, key);
603  if (r.isValid()) {
604  r.get(rc);
605  }
606 
607  return rc;
608 }
609 
610 
611 int Wallet::removeEntry(const TQString& key) {
612  int rc = -1;
613 
614  if (_handle == -1) {
615  return rc;
616  }
617 
618  DCOPReply r = _dcopRef->call("removeEntry", _handle, _folder, key);
619  if (r.isValid()) {
620  r.get(rc);
621  }
622 
623  return rc;
624 }
625 
626 
627 Wallet::EntryType Wallet::entryType(const TQString& key) {
628  int rc = 0;
629 
630  if (_handle == -1) {
631  return Wallet::Unknown;
632  }
633 
634  DCOPReply r = _dcopRef->call("entryType", _handle, _folder, key);
635  if (r.isValid()) {
636  r.get(rc);
637  }
638 
639  return static_cast<EntryType>(rc);
640 }
641 
642 
643 void Wallet::slotAppUnregistered(const TQCString& app) {
644  if (_handle >= 0 && app == "kded") {
645  slotWalletClosed(_handle);
646  }
647 }
648 
649 
650 void Wallet::slotFolderUpdated(const TQString& wallet, const TQString& folder) {
651  if (_name == wallet) {
652  emit folderUpdated(folder);
653  }
654 }
655 
656 
657 void Wallet::slotFolderListUpdated(const TQString& wallet) {
658  if (_name == wallet) {
659  emit folderListUpdated();
660  }
661 }
662 
663 
664 void Wallet::slotApplicationDisconnected(const TQString& wallet, const TQCString& application) {
665  if (_handle >= 0
666  && _name == wallet
667  && application == _dcopRef->dcopClient()->appId()) {
668  slotWalletClosed(_handle);
669  }
670 }
671 
672 
673 void Wallet::walletOpenResult(int id) {
674  if (_handle != -1) {
675  // This is BAD.
676  return;
677  }
678 
679  if (id > 0) {
680  _handle = id;
681  emit walletOpened(true);
682  } else if (id < 0) {
683  emit walletOpened(false);
684  } // id == 0 => wait
685 }
686 
687 
688 bool Wallet::folderDoesNotExist(const TQString& wallet, const TQString& folder) {
689 DCOPReply r = DCOPRef("kded", "tdewalletd").call("folderDoesNotExist", wallet, folder);
690 bool rc = true;
691  if (r.isValid()) {
692  r.get(rc);
693  }
694 return rc;
695 }
696 
697 
698 bool Wallet::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) {
699 DCOPReply r = DCOPRef("kded", "tdewalletd").call("keyDoesNotExist", wallet, folder, key);
700 bool rc = true;
701  if (r.isValid()) {
702  r.get(rc);
703  }
704 return rc;
705 }
706 
707 
708 void Wallet::virtual_hook(int, void*) {
709  //BASE::virtual_hook( id, data );
710 }
711 
712 #include "tdewallet.moc"
DCOPClient::appId
TQCString appId() const
DCOPClient::setNotifications
void setNotifications(bool enabled)
DCOPObject
DCOPObject::connectDCOPSignal
bool connectDCOPSignal(const TQCString &sender, const TQCString &senderObj, const TQCString &signal, const TQCString &slot, bool Volatile)
DCOPObject::objId
TQCString objId() const
DCOPRef
DCOPRef::dcopClient
DCOPClient * dcopClient() const
DCOPRef::obj
TQCString obj() const
DCOPRef::app
TQCString app() const
DCOPRef::call
DCOPReply call(const TQCString &fun)
DCOPRef::send
bool send(const TQCString &fun)
DCOPReply
DCOPReply::get
bool get(T &t, const char *tname)
DCOPReply::isValid
bool isValid() const
TDEWallet::Wallet
KDE Wallet.
Definition: tdewallet.h:49
TDEWallet::Wallet::readMapList
int readMapList(const TQString &key, TQMap< TQString, TQMap< TQString, TQString > > &value)
Read the map entry key from the current folder.
Definition: tdewallet.cpp:468
TDEWallet::Wallet::Wallet
Wallet(int handle, const TQString &name)
Construct a TDEWallet object.
Definition: tdewallet.cpp:74
TDEWallet::Wallet::walletClosed
void walletClosed()
Emitted when this wallet is closed.
TDEWallet::Wallet::sync
virtual int sync()
This syncs the wallet file on disk with what is in memory.
Definition: tdewallet.cpp:225
TDEWallet::Wallet::lockWallet
virtual int lockWallet()
This closes and locks the current wallet.
Definition: tdewallet.cpp:235
TDEWallet::Wallet::folderListUpdated
void folderListUpdated()
Emitted when the folder list is changed in this wallet.
TDEWallet::Wallet::folderUpdated
void folderUpdated(const TQString &folder)
Emitted when a folder in this wallet is updated.
TDEWallet::Wallet::deleteWallet
static int deleteWallet(const TQString &name)
Delete the wallet name.
Definition: tdewallet.cpp:163
TDEWallet::Wallet::entryType
virtual EntryType entryType(const TQString &key)
Determine the type of the entry key in this folder.
Definition: tdewallet.cpp:627
TDEWallet::Wallet::openWallet
static Wallet * openWallet(const TQString &name, WId w=0, OpenType ot=Synchronous)
Open the wallet name.
Definition: tdewallet.cpp:173
TDEWallet::Wallet::readPasswordList
int readPasswordList(const TQString &key, TQMap< TQString, TQString > &value)
Read the password entry key from the current folder.
Definition: tdewallet.cpp:511
TDEWallet::Wallet::currentFolder
virtual const TQString & currentFolder() const
Determine the current working folder in the wallet.
Definition: tdewallet.cpp:391
TDEWallet::Wallet::~Wallet
virtual ~Wallet()
Destroy a TDEWallet object.
Definition: tdewallet.cpp:105
TDEWallet::Wallet::isOpen
virtual bool isOpen() const
Determine if the current wallet is open, and is a valid wallet handle.
Definition: tdewallet.cpp:258
TDEWallet::Wallet::writeMap
virtual int writeMap(const TQString &key, const TQMap< TQString, TQString > &value)
Write key = value as a map to the current folder.
Definition: tdewallet.cpp:560
TDEWallet::Wallet::keyDoesNotExist
static bool keyDoesNotExist(const TQString &wallet, const TQString &folder, const TQString &key)
Determine if an entry in a folder does not exist in a wallet.
Definition: tdewallet.cpp:698
TDEWallet::Wallet::folderDoesNotExist
static bool folderDoesNotExist(const TQString &wallet, const TQString &folder)
Determine if a folder does not exist in a wallet.
Definition: tdewallet.cpp:688
TDEWallet::Wallet::writeEntry
virtual int writeEntry(const TQString &key, const TQByteArray &value, EntryType entryType)
Write key = value as a binary entry to the current folder.
Definition: tdewallet.cpp:528
TDEWallet::Wallet::folderList
virtual TQStringList folderList()
Obtain the list of all folders contained in the wallet.
Definition: tdewallet.cpp:282
TDEWallet::Wallet::closeWallet
static int closeWallet(const TQString &name, bool force)
Close the wallet name.
Definition: tdewallet.cpp:153
TDEWallet::Wallet::writePassword
virtual int writePassword(const TQString &key, const TQString &value)
Write key = value as a password to the current folder.
Definition: tdewallet.cpp:579
TDEWallet::Wallet::renameEntry
virtual int renameEntry(const TQString &oldName, const TQString &newName)
Rename the entry oldName to newName.
Definition: tdewallet.cpp:430
TDEWallet::Wallet::hasEntry
virtual bool hasEntry(const TQString &key)
Determine if the current folder has they entry key.
Definition: tdewallet.cpp:595
TDEWallet::Wallet::LocalWallet
static const TQString LocalWallet()
The name of the wallet used to store local passwords.
Definition: tdewallet.cpp:35
TDEWallet::Wallet::createFolder
virtual bool createFolder(const TQString &f)
Created the folder f.
Definition: tdewallet.cpp:330
TDEWallet::Wallet::setFolder
virtual bool setFolder(const TQString &f)
Set the current working folder to f.
Definition: tdewallet.cpp:348
TDEWallet::Wallet::disconnectApplication
static bool disconnectApplication(const TQString &wallet, const TQCString &app)
Disconnect the application app from wallet.
Definition: tdewallet.cpp:205
TDEWallet::Wallet::removeEntry
virtual int removeEntry(const TQString &key)
Remove the entry key from the current folder.
Definition: tdewallet.cpp:611
TDEWallet::Wallet::readPassword
virtual int readPassword(const TQString &key, TQString &value)
Read the password entry key from the current folder.
Definition: tdewallet.cpp:494
TDEWallet::Wallet::isEnabled
static bool isEnabled()
Determine if the KDE wallet is enabled.
Definition: tdewallet.cpp:133
TDEWallet::Wallet::PasswordFolder
static const TQString PasswordFolder()
The standardized name of the password folder.
Definition: tdewallet.cpp:64
TDEWallet::Wallet::FormDataFolder
static const TQString FormDataFolder()
The standardized name of the form data folder.
Definition: tdewallet.cpp:68
TDEWallet::Wallet::walletName
virtual const TQString & walletName() const
The name of the current wallet.
Definition: tdewallet.cpp:253
TDEWallet::Wallet::users
static TQStringList users(const TQString &wallet)
List the applications that are using the wallet wallet.
Definition: tdewallet.cpp:215
TDEWallet::Wallet::changePassword
static void changePassword(const TQString &name, WId w=0)
Request to the wallet service to change the password of the wallet name.
Definition: tdewallet.cpp:128
TDEWallet::Wallet::walletList
static TQStringList walletList()
List all the wallets available.
Definition: tdewallet.cpp:118
TDEWallet::Wallet::readMap
virtual int readMap(const TQString &key, TQMap< TQString, TQString > &value)
Read the map entry key from the current folder.
Definition: tdewallet.cpp:446
TDEWallet::Wallet::NetworkWallet
static const TQString NetworkWallet()
The name of the wallet used to store network passwords.
Definition: tdewallet.cpp:53
TDEWallet::Wallet::removeFolder
virtual bool removeFolder(const TQString &f)
Remove the folder f and all its entries from the wallet.
Definition: tdewallet.cpp:371
TDEWallet::Wallet::readEntryList
int readEntryList(const TQString &key, TQMap< TQString, TQByteArray > &value)
Read the entries matching key from the current folder.
Definition: tdewallet.cpp:413
TDEWallet::Wallet::entryList
virtual TQStringList entryList()
Return the list of keys of all entries in this folder.
Definition: tdewallet.cpp:298
TDEWallet::Wallet::hasFolder
virtual bool hasFolder(const TQString &f)
Determine if the folder f exists in the wallet.
Definition: tdewallet.cpp:314
TDEWallet::Wallet::walletOpened
void walletOpened(bool success)
Emitted when a wallet is opened in asynchronous mode.
TDEWallet::Wallet::readEntry
virtual int readEntry(const TQString &key, TQByteArray &value)
Read the entry key from the current folder.
Definition: tdewallet.cpp:396
TDEWallet::Wallet::requestChangePassword
virtual void requestChangePassword(WId w=0)
Request to the wallet service to change the password of the current wallet.
Definition: tdewallet.cpp:263
TDEWallet
Namespace collecting all the Wallet-related classes.
Definition: tdewallet.h:37

tdewallet

Skip menu "tdewallet"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

tdewallet

Skip menu "tdewallet"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdewallet by doxygen 1.9.1
This website is maintained by Timothy Pearson.