certmanager/lib

keyapprovaldialog.h

00001 /*  -*- c++ -*-
00002     keyselectiondialog.h
00003 
00004     This file is part of libkleopatra, the KDE keymanagement library
00005     Copyright (c) 2004 Klarälvdalens Datakonsult AB
00006 
00007     Based on kpgpui.h
00008     Copyright (C) 2001,2002 the KPGP authors
00009     See file libkdenetwork/AUTHORS.kpgp for details
00010 
00011     Libkleopatra is free software; you can redistribute it and/or
00012     modify it under the terms of the GNU General Public License as
00013     published by the Free Software Foundation; either version 2 of the
00014     License, or (at your option) any later version.
00015 
00016     Libkleopatra is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019     General Public License for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with this program; if not, write to the Free Software
00023     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00024 
00025     In addition, as a special exception, the copyright holders give
00026     permission to link the code of this program with any edition of
00027     the Qt library by Trolltech AS, Norway (or with modified versions
00028     of Qt that use the same license as Qt), and distribute linked
00029     combinations including the two.  You must obey the GNU General
00030     Public License in all respects for all of the code used other than
00031     Qt.  If you modify this file, you may extend this exception to
00032     your version of the file, but you are not obligated to do so.  If
00033     you do not wish to do so, delete this exception statement from
00034     your version.
00035 */
00036 
00037 #ifndef __KLEO_KEYAPPROVALDIALOG_H__
00038 #define __KLEO_KEYAPPROVALDIALOG_H__
00039 
00040 #include <kleo/enum.h>
00041 
00042 #include <kdialogbase.h>
00043 #include <kdepimmacros.h>
00044 
00045 #include <kpgpkey.h> // for EncryptPref
00046 #include <gpgmepp/key.h>
00047 
00048 #include <vector>
00049 
00050 namespace GpgME {
00051   class Key;
00052 }
00053 
00054 class QStringList;
00055 
00056 namespace Kleo {
00057 
00058   class KDE_EXPORT KeyApprovalDialog : public KDialogBase {
00059     Q_OBJECT
00060   public:
00061     struct Item {
00062       Item() : pref( UnknownPreference ) {}
00063       Item( const QString & a, const std::vector<GpgME::Key> & k,
00064         EncryptionPreference p=UnknownPreference )
00065     : address( a ), keys( k ), pref( p ) {}
00066       QString address;
00067       std::vector<GpgME::Key> keys;
00068       EncryptionPreference pref;
00069     };
00070 
00071     KeyApprovalDialog( const std::vector<Item> & recipients,
00072                const std::vector<GpgME::Key> & sender,
00073                QWidget * parent=0, const char * name=0,
00074                        bool modal=true );
00075     ~KeyApprovalDialog();
00076 
00077     std::vector<Item> items() const;
00078     std::vector<GpgME::Key> senderKeys() const;
00079 
00080     bool preferencesChanged() const;
00081 
00082   private slots:
00083     void slotPrefsChanged();
00084 
00085   private:
00086     class Private;
00087     Private * d;
00088   };
00089 
00090 } // namespace Kleo
00091 
00092 #endif // __KLEO_KEYAPPROVALDIALOG_H__
KDE Home | KDE Accessibility Home | Description of Access Keys