• 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_MOC_RUN
28 #define Q_OS_UNIX
29 #endif // Q_MOC_RUN
30 
31 #ifdef Q_OS_UNIX
32 
33 #include <tqstring.h>
34 #include <tqstringlist.h>
35 #include <tqobject.h>
36 #include <dcopobject.h>
37 
38 class DCOPRef;
39 
41 namespace TDEWallet {
42 
53 class TDEIO_EXPORT Wallet : public TQObject, public DCOPObject {
54  K_DCOP
55  Q_OBJECT
56  protected:
63  Wallet(int handle, const TQString& name);
68  Wallet(const Wallet&);
69 
70  public:
71  enum EntryType { Unknown=0, Password, Stream, Map, Unused=0xffff };
72 
76  virtual ~Wallet();
77 
83  static TQStringList walletList();
84 
90  static bool isEnabled();
91 
97  static bool isOpen(const TQString& name);
98 
108  static int closeWallet(const TQString& name, bool force);
109 
116  static int deleteWallet(const TQString& name);
117 
124  static bool disconnectApplication(const TQString& wallet, const TQCString& app);
125 
126  enum OpenType { Synchronous=0, Asynchronous, Path, OpenTypeUnused=0xff };
127 
144  static Wallet* openWallet(const TQString& name, WId w = 0, OpenType ot = Synchronous);
145 
152  static TQStringList users(const TQString& wallet);
153 
157  static const TQString LocalWallet();
158 
162  static const TQString NetworkWallet();
163 
170  static const TQString PasswordFolder();
171 
178  static const TQString FormDataFolder();
179 
186  static void changePassword(const TQString& name, WId w = 0);
187 
194  virtual int sync();
195 
201  virtual int lockWallet();
202 
206  virtual const TQString& walletName() const;
207 
213  virtual bool isOpen() const;
214 
220  virtual void requestChangePassword(WId w = 0);
221 
226  virtual TQStringList folderList();
227 
233  virtual bool hasFolder(const TQString& f);
234 
242  virtual bool setFolder(const TQString& f);
243 
249  virtual bool removeFolder(const TQString& f);
250 
256  virtual bool createFolder(const TQString& f);
257 
264  virtual const TQString& currentFolder() const;
265 
271  virtual TQStringList entryList();
272 
279  virtual int renameEntry(const TQString& oldName, const TQString& newName);
280 
290  virtual int readEntry(const TQString& key, TQByteArray& value);
291 
300  virtual int readMap(const TQString& key, TQMap<TQString,TQString>& value);
301 
310  virtual int readPassword(const TQString& key, TQString& value);
311 
324  int readEntryList(const TQString& key, TQMap<TQString, TQByteArray>& value);
325 
337  int readMapList(const TQString& key, TQMap<TQString, TQMap<TQString, TQString> >& value);
338 
350  int readPasswordList(const TQString& key, TQMap<TQString, TQString>& value);
351 
362  virtual int writeEntry(const TQString& key, const TQByteArray& value, EntryType entryType);
363 
371  virtual int writeEntry(const TQString& key, const TQByteArray& value);
372 
379  virtual int writeMap(const TQString& key, const TQMap<TQString,TQString>& value);
380 
387  virtual int writePassword(const TQString& key, const TQString& value);
388 
394  virtual bool hasEntry(const TQString& key);
395 
401  virtual int removeEntry(const TQString& key);
402 
409  virtual EntryType entryType(const TQString& key);
410 
421  static bool folderDoesNotExist(const TQString& wallet, const TQString& folder);
422 
434  static bool keyDoesNotExist(const TQString& wallet, const TQString& folder,
435  const TQString& key);
436 
437  signals:
441  void walletClosed();
442 
447  void folderUpdated(const TQString& folder);
448 
452  void folderListUpdated();
453 
458  void folderRemoved(const TQString& folder);
459 
464  void walletOpened(bool success);
465 
466  private:
467  k_dcop:
472  ASYNC slotWalletClosed(int handle);
473 
478  ASYNC slotFolderUpdated(const TQString& wallet, const TQString& folder);
479 
484  ASYNC slotFolderListUpdated(const TQString& wallet);
485 
490  ASYNC slotApplicationDisconnected(const TQString& wallet, const TQCString& application);
491 
496  ASYNC walletOpenResult(int rc);
497 
498  private slots:
503  void slotAppUnregistered(const TQCString&);
504 
505  private:
506  class WalletPrivate;
507  WalletPrivate *d;
508  TQString _name;
509  TQString _folder;
510  int _handle;
511  DCOPRef *_dcopRef;
512 
513  protected:
517  virtual void virtual_hook(int id, void *data);
518 };
519 
520 }
521 
522 #endif //Q_OS_UNIX
523 
524 #endif //_TDEWALLET_H
525 
TDEWallet::Wallet
KDE Wallet.
Definition: tdewallet.h:53
DCOPRef
TDEWallet
Namespace collecting all the Wallet-related classes.
Definition: tdewallet.h:41
DCOPObject

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdewallet by doxygen 1.8.8
This website is maintained by Timothy Pearson.