File indexing completed on 2024-04-21 15:42:51

0001 /***************************************************************************
0002     Private helper classes for the wallet manager of Smb4K.
0003                              -------------------
0004     begin                : Mo Dez 31 2012
0005     copyright            : (C) 2012-2019 by Alexander Reinholdt
0006     email                : alexander.reinholdt@kdemail.net
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *   This program is free software; you can redistribute it and/or modify  *
0011  *   it under the terms of the GNU General Public License as published by  *
0012  *   the Free Software Foundation; either version 2 of the License, or     *
0013  *   (at your option) any later version.                                   *
0014  *                                                                         *
0015  *   This program is distributed in the hope that it will be useful, but   *
0016  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
0017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
0018  *   General Public License for more details.                              *
0019  *                                                                         *
0020  *   You should have received a copy of the GNU General Public License     *
0021  *   along with this program; if not, write to the                         *
0022  *   Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,*
0023  *   MA 02110-1335, USA                                                    *
0024  ***************************************************************************/
0025 
0026 #ifndef SMB4KWALLETMANAGER_P_H
0027 #define SMB4KWALLETMANAGER_P_H
0028 
0029 // application specific includes
0030 #include "smb4kwalletmanager.h"
0031 #include "smb4kbasicnetworkitem.h"
0032 
0033 // KDE includes
0034 #include <KWallet/KWallet>
0035 #include <KWidgetsAddons/KPasswordDialog>
0036 
0037 
0038 class Smb4KPasswordDialog : public KPasswordDialog
0039 {
0040   Q_OBJECT
0041   
0042   public:
0043     Smb4KPasswordDialog(const NetworkItemPtr &networkItem,
0044                         const QMap<QString,QString> &knownLogins,
0045                         QWidget *parent = 0);
0046     virtual ~Smb4KPasswordDialog();
0047 
0048   protected Q_SLOTS:
0049     void slotGotUsernameAndPassword(const QString &user,
0050                                     const QString &pass,
0051                                     bool keep);
0052 
0053   private:
0054     NetworkItemPtr m_item;
0055 };
0056 
0057 
0058 class Smb4KWalletManagerPrivate
0059 {
0060   public:
0061     KWallet::Wallet *wallet;
0062 };
0063 
0064 
0065 class Smb4KWalletManagerStatic
0066 {
0067   public:
0068     Smb4KWalletManager instance;
0069 };
0070 
0071 #endif