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

tdewallet

  • tdewallet
  • client
tdewallet.h
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
22#ifndef _TDEWALLET_H
23#define _TDEWALLET_H
24
25#include <tqglobal.h>
26
27#ifdef Q_OS_UNIX
28
29#include <tqstring.h>
30#include <tqstringlist.h>
31#include <tqobject.h>
32#include <dcopobject.h>
33
34class DCOPRef;
35
37namespace TDEWallet {
38
49class TDEIO_EXPORT Wallet : public TQObject, public DCOPObject {
50 K_DCOP
51 TQ_OBJECT
52 protected:
59 Wallet(int handle, const TQString& name);
64 Wallet(const Wallet&);
65
66 public:
67 enum EntryType { Unknown=0, Password, Stream, Map, Unused=0xffff };
68
72 virtual ~Wallet();
73
79 static TQStringList walletList();
80
86 static bool isEnabled();
87
93 static bool isOpen(const TQString& name);
94
104 static int closeWallet(const TQString& name, bool force);
105
112 static int deleteWallet(const TQString& name);
113
120 static bool disconnectApplication(const TQString& wallet, const TQCString& app);
121
122 enum OpenType { Synchronous=0, Asynchronous, Path, OpenTypeUnused=0xff };
123
140 static Wallet* openWallet(const TQString& name, WId w = 0, OpenType ot = Synchronous);
141
148 static TQStringList users(const TQString& wallet);
149
153 static const TQString LocalWallet();
154
158 static const TQString NetworkWallet();
159
166 static const TQString PasswordFolder();
167
174 static const TQString FormDataFolder();
175
182 static void changePassword(const TQString& name, WId w = 0);
183
190 virtual int sync();
191
197 virtual int lockWallet();
198
202 virtual const TQString& walletName() const;
203
209 virtual bool isOpen() const;
210
216 virtual void requestChangePassword(WId w = 0);
217
222 virtual TQStringList folderList();
223
229 virtual bool hasFolder(const TQString& f);
230
238 virtual bool setFolder(const TQString& f);
239
245 virtual bool removeFolder(const TQString& f);
246
252 virtual bool createFolder(const TQString& f);
253
260 virtual const TQString& currentFolder() const;
261
267 virtual TQStringList entryList();
268
275 virtual int renameEntry(const TQString& oldName, const TQString& newName);
276
286 virtual int readEntry(const TQString& key, TQByteArray& value);
287
296 virtual int readMap(const TQString& key, TQMap<TQString,TQString>& value);
297
306 virtual int readPassword(const TQString& key, TQString& value);
307
320 int readEntryList(const TQString& key, TQMap<TQString, TQByteArray>& value);
321
333 int readMapList(const TQString& key, TQMap<TQString, TQMap<TQString, TQString> >& value);
334
346 int readPasswordList(const TQString& key, TQMap<TQString, TQString>& value);
347
358 virtual int writeEntry(const TQString& key, const TQByteArray& value, EntryType entryType);
359
367 virtual int writeEntry(const TQString& key, const TQByteArray& value);
368
375 virtual int writeMap(const TQString& key, const TQMap<TQString,TQString>& value);
376
383 virtual int writePassword(const TQString& key, const TQString& value);
384
390 virtual bool hasEntry(const TQString& key);
391
397 virtual int removeEntry(const TQString& key);
398
405 virtual EntryType entryType(const TQString& key);
406
417 static bool folderDoesNotExist(const TQString& wallet, const TQString& folder);
418
430 static bool keyDoesNotExist(const TQString& wallet, const TQString& folder,
431 const TQString& key);
432
433 signals:
437 void walletClosed();
438
443 void folderUpdated(const TQString& folder);
444
448 void folderListUpdated();
449
454 void folderRemoved(const TQString& folder);
455
460 void walletOpened(bool success);
461
462 private:
463 k_dcop:
468 ASYNC slotWalletClosed(int handle);
469
474 ASYNC slotFolderUpdated(const TQString& wallet, const TQString& folder);
475
480 ASYNC slotFolderListUpdated(const TQString& wallet);
481
486 ASYNC slotApplicationDisconnected(const TQString& wallet, const TQCString& application);
487
492 ASYNC walletOpenResult(int rc);
493
494 private slots:
499 void slotAppUnregistered(const TQCString&);
500
501 private:
502 class WalletPrivate;
503 WalletPrivate *d;
504 TQString _name;
505 TQString _folder;
506 int _handle;
507 DCOPRef *_dcopRef;
508
509 protected:
513 virtual void virtual_hook(int id, void *data);
514};
515
516}
517
518#endif //Q_OS_UNIX
519
520#endif //_TDEWALLET_H
521
DCOPObject
DCOPRef
TDEWallet::Wallet
KDE Wallet.
Definition: tdewallet.h:49
TDEWallet::Wallet::walletClosed
void walletClosed()
Emitted when this wallet is closed.
TDEWallet::Wallet::folderListUpdated
void folderListUpdated()
Emitted when the folder list is changed in this wallet.
TDEWallet::Wallet::Wallet
Wallet(const Wallet &)
Copy a TDEWallet object.
TDEWallet::Wallet::folderUpdated
void folderUpdated(const TQString &folder)
Emitted when a folder in this wallet is updated.
TDEWallet::Wallet::folderRemoved
void folderRemoved(const TQString &folder)
Emitted when a folder in this wallet is removed.
TDEWallet::Wallet::walletOpened
void walletOpened(bool success)
Emitted when a wallet is opened in asynchronous mode.
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.4
This website is maintained by Timothy Pearson.