File indexing completed on 2024-06-16 03:53:04

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 2001-2003 George Staikos <staikos@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef _KWALLETENTRY_H
0009 #define _KWALLETENTRY_H
0010 
0011 #include <QString>
0012 
0013 #include <kwallet.h>
0014 
0015 #include "kwalletbackend_export.h"
0016 
0017 namespace KWallet
0018 {
0019 /* @internal
0020  */
0021 class KWALLETBACKEND_EXPORT Entry
0022 {
0023 public:
0024     Entry();
0025     ~Entry();
0026 
0027     const QString &key() const;
0028     const QByteArray &value() const;
0029     QString password() const;
0030     const QByteArray &map() const
0031     {
0032         return value();
0033     }
0034 
0035     void setValue(const QByteArray &val);
0036     void setValue(const QString &val);
0037     void setKey(const QString &key);
0038 
0039     Wallet::EntryType type() const;
0040     void setType(Wallet::EntryType type);
0041 
0042     void copy(const Entry *x);
0043 
0044 private:
0045     QString _key;
0046     QByteArray _value;
0047     Wallet::EntryType _type;
0048 };
0049 
0050 }
0051 
0052 #endif