certmanager Library API Documentation

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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 
00044 #include <kpgpkey.h> // for EncryptPref
00045 #include <gpgmepp/key.h>
00046 
00047 #include <vector>
00048 
00049 namespace GpgME {
00050   class Key;
00051 }
00052 
00053 class QStringList;
00054 
00055 namespace Kleo {
00056 
00057   class KeyApprovalDialog : public KDialogBase {
00058     Q_OBJECT
00059   public:
00060     struct Item {
00061       Item() : pref( UnknownPreference ) {}
00062       Item( const QString & a, const std::vector<GpgME::Key> & k,
00063         EncryptionPreference p=UnknownPreference )
00064     : address( a ), keys( k ), pref( p ) {}
00065       QString address;
00066       std::vector<GpgME::Key> keys;
00067       EncryptionPreference pref;
00068     };
00069 
00070     KeyApprovalDialog( const std::vector<Item> & recipients,
00071                const std::vector<GpgME::Key> & sender,
00072                QWidget * parent=0, const char * name=0,
00073                        bool modal=true );
00074     ~KeyApprovalDialog();
00075 
00076     std::vector<Item> items() const;
00077     std::vector<GpgME::Key> senderKeys() const;
00078 
00079     bool preferencesChanged() const;
00080 
00081   private slots:
00082     void slotPrefsChanged();
00083 
00084   private:
00085     class Private;
00086     Private * d;
00087   };
00088 
00089 } // namespace Kleo
00090 
00091 #endif // __KLEO_KEYAPPROVALDIALOG_H__
KDE Logo
This file is part of the documentation for certmanager Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Dec 21 14:22:38 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003