// // Copyright 2008 Jim Bublitz // Earlier copyrights 1998 - 2007 Jim Bublitz also apply // Generated by twine // This file is part of PyKDE4. // PyKDE4 is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // PyKDE4 is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . namespace KWallet { class Wallet : QObject { %TypeHeaderCode #include %End protected: Wallet (int handle, const QString& name); //ig Wallet (const KWallet::Wallet&); public: enum EntryType { Unknown, Password, Stream, Map, Unused }; static QStringList walletList (); static bool isEnabled (); static bool isOpen (const QString& name); static int closeWallet (const QString& name, bool force); static int deleteWallet (const QString& name); static bool disconnectApplication (const QString& wallet, const QString& app); enum OpenType { Synchronous, Asynchronous, Path, OpenTypeUnused }; static KWallet::Wallet* openWallet (const QString& name, WId w, KWallet::Wallet::OpenType ot = KWallet::Wallet::Synchronous); static QStringList users (const QString& wallet); static const QString LocalWallet (); static const QString NetworkWallet (); static const QString PasswordFolder (); static const QString FormDataFolder (); static void changePassword (const QString& name, WId w); virtual int sync (); virtual int lockWallet (); virtual const QString& walletName () const; virtual bool isOpen () const; virtual void requestChangePassword (WId w); virtual QStringList folderList (); virtual bool hasFolder (const QString& f); virtual bool setFolder (const QString& f); virtual bool removeFolder (const QString& f); virtual bool createFolder (const QString& f); virtual const QString& currentFolder () const; virtual QStringList entryList (); virtual int renameEntry (const QString& oldName, const QString& newName); virtual int readEntry (const QString& key, QByteArray& value /Out/); virtual int readMap (const QString& key, QMap& value /Out/); virtual int readPassword (const QString& key, QString& value /Out/); int readEntryList (const QString& key, QMap& value /Out/); //ig int readMapList (const QString& key, QMap>& value /Out/); int readPasswordList (const QString& key, QMap& value /Out/); virtual int writeEntry (const QString& key, const QByteArray& value, KWallet::Wallet::EntryType entryType); virtual int writeEntry (const QString& key, const QByteArray& value); virtual int writeMap (const QString& key, const QMap& value); virtual int writePassword (const QString& key, const QString& value); virtual bool hasEntry (const QString& key); virtual int removeEntry (const QString& key); virtual KWallet::Wallet::EntryType entryType (const QString& key); static bool folderDoesNotExist (const QString& wallet, const QString& folder); static bool keyDoesNotExist (const QString& wallet, const QString& folder, const QString& key); signals: void walletClosed (); void folderUpdated (const QString& folder); void folderListUpdated (); void folderRemoved (const QString& folder); void walletOpened (bool success); protected: public: ~Wallet (); }; // Wallet }; // KWallet