2013-05-15 21:30:20 +02:00
|
|
|
/* ============================================================
|
|
|
|
* KWalletPasswords - KWallet support plugin for QupZilla
|
2014-01-11 16:11:42 +01:00
|
|
|
* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
|
2013-05-15 21:30:20 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
|
|
|
#ifndef KWALLETPASSWORDBACKEND_H
|
|
|
|
#define KWALLETPASSWORDBACKEND_H
|
|
|
|
|
|
|
|
#include <QVector>
|
|
|
|
#include <KDE/KWallet/Wallet>
|
|
|
|
|
|
|
|
#include "passwordbackends/passwordbackend.h"
|
|
|
|
#include "passwordmanager.h"
|
|
|
|
|
|
|
|
class KWalletPasswordBackend : public PasswordBackend
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit KWalletPasswordBackend();
|
|
|
|
~KWalletPasswordBackend();
|
|
|
|
|
2013-05-17 15:42:06 +02:00
|
|
|
QString name() const;
|
|
|
|
|
2013-05-15 21:30:20 +02:00
|
|
|
QVector<PasswordEntry> getEntries(const QUrl &url);
|
|
|
|
QVector<PasswordEntry> getAllEntries();
|
|
|
|
|
|
|
|
void addEntry(const PasswordEntry &entry);
|
2013-06-08 13:14:00 +02:00
|
|
|
bool updateEntry(const PasswordEntry &entry);
|
2013-05-20 11:05:54 +02:00
|
|
|
void updateLastUsed(PasswordEntry &entry);
|
2013-05-15 21:30:20 +02:00
|
|
|
|
|
|
|
void removeEntry(const PasswordEntry &entry);
|
|
|
|
void removeAll();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void initialize();
|
|
|
|
|
|
|
|
KWallet::Wallet* m_wallet;
|
|
|
|
QVector<PasswordEntry> m_allEntries;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // KWALLETPASSWORDBACKEND_H
|