• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kleopatra

refreshx509certscommand.cpp

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset:4 -*-
00002     commands/refreshx509certscommand.cpp
00003 
00004     This file is part of Kleopatra, the KDE keymanager
00005     Copyright (c) 2008 Klarälvdalens Datakonsult AB
00006 
00007     Kleopatra is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     Kleopatra is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021     In addition, as a special exception, the copyright holders give
00022     permission to link the code of this program with any edition of
00023     the Qt library by Trolltech AS, Norway (or with modified versions
00024     of Qt that use the same license as Qt), and distribute linked
00025     combinations including the two.  You must obey the GNU General
00026     Public License in all respects for all of the code used other than
00027     Qt.  If you modify this file, you may extend this exception to
00028     your version of the file, but you are not obligated to do so.  If
00029     you do not wish to do so, delete this exception statement from
00030     your version.
00031 */
00032 
00033 #include <config-kleopatra.h>
00034 
00035 #include "refreshx509certscommand.h"
00036 
00037 #include <utils/gnupg-helper.h>
00038 
00039 #include <KLocale>
00040 #include <KMessageBox>
00041 
00042 using namespace Kleo;
00043 using namespace Kleo::Commands;
00044 
00045 RefreshX509CertsCommand::RefreshX509CertsCommand( KeyListController * c )
00046     : GnuPGProcessCommand( c )
00047 {
00048 
00049 }
00050 
00051 RefreshX509CertsCommand::RefreshX509CertsCommand( QAbstractItemView * v, KeyListController * c )
00052     : GnuPGProcessCommand( v, c )
00053 {
00054 
00055 }
00056 
00057 RefreshX509CertsCommand::~RefreshX509CertsCommand() {}
00058 
00059 bool RefreshX509CertsCommand::preStartHook( QWidget * parent ) const {
00060     return KMessageBox::warningContinueCancel( parent,
00061                                                i18nc("@info",
00062                                                      "<para>Refreshing X.509 certificates implies downloading CRLs for all certificates, "
00063                                                      "even if they might otherwise still be valid.</para>"
00064                                                      "<para>This can put a severe strain on your own as well as other people's network "
00065                                                      "connection, and can take up to an hour or more to complete, depending on "
00066                                                      "your network connection, and the number of certificates to check.</para> "
00067                                                      "<para>Are you sure you want to continue?</para>"),
00068                                                i18n("X.509 Certificate Refresh"),
00069                                                KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
00070                                                QLatin1String( "warn-refresh-x509-expensive" ) )
00071         == KMessageBox::Continue;
00072 }
00073 
00074 QStringList RefreshX509CertsCommand::arguments() const {
00075     return QStringList() << gpgSmPath() << "-k" << "--with-validation" << "--force-crl-refresh" << "--enable-crl-checks";
00076 }
00077 
00078 QString RefreshX509CertsCommand::errorCaption() const {
00079     return i18n( "X.509 Certificate Refresh Error" );
00080 }
00081 
00082 QString RefreshX509CertsCommand::successCaption() const {
00083     return i18n( "X.509 Certificate Refresh Finished" );
00084 }
00085 
00086 QString RefreshX509CertsCommand::crashExitMessage( const QStringList & args ) const {
00087     return i18nc( "@info",
00088                   "<para>The GpgSM process that tried to refresh X.509 certificates "
00089                   "ended prematurely because of an unexpected error.</para>"
00090                   "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join( " " ) ) ;
00091 }
00092 
00093 QString RefreshX509CertsCommand::errorExitMessage( const QStringList & args ) const {
00094     return i18nc( "@info",
00095                   "<para>An error occurred while trying to refresh X.509 certificates.</para>"
00096                   "<para>The output from <command>%1</command> was: <message>%2</message></para>",
00097                  args[0], errorString() );
00098 }
00099 
00100 QString RefreshX509CertsCommand::successMessage( const QStringList & ) const {
00101     return i18n( "X.509 certificates refreshed successfully." );
00102 }
00103 
00104 #include "moc_refreshx509certscommand.cpp"

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal