kleopatra
archivedefinition.cpp
Go to the documentation of this file.
107 : Kleo::Exception( GPG_ERR_INV_PARAMETER, i18n("Error in archive definition %1: %2", id, message ), MessageOnly ),
133 QString * command, QStringList * prefix, QStringList * suffix, ArchiveDefinition::ArgumentPassingMethod * method, bool parseFilePlaceholder )
158 l = l.replaceInStrings( QLatin1String("__path_goes_here__"), ArchiveDefinition::installPath() );
187 kDebug() << "ArchiveDefinition[" << id << ']' << *command << *prefix << FILE_PLACEHOLDER << *suffix;
240 &m_packCommand[OpenPGP], &m_packPrefixArguments[OpenPGP], &m_packPostfixArguments[OpenPGP], &method, true );
243 &m_packCommand[OpenPGP], &m_packPrefixArguments[OpenPGP], &m_packPostfixArguments[OpenPGP], &method, true );
249 &m_packCommand[CMS], &m_packPrefixArguments[CMS], &m_packPostfixArguments[CMS], &method, true );
252 &m_packCommand[CMS], &m_packPrefixArguments[CMS], &m_packPostfixArguments[CMS], &method, true );
259 parse_command( group.readEntry( UNPACK_COMMAND_OPENPGP_ENTRY ), id(), UNPACK_COMMAND_OPENPGP_ENTRY,
265 throw ArchiveDefinitionError( id(), i18n("cannot use argument passing on standard input for unpack-command") );
275 throw ArchiveDefinitionError( id(), i18n("cannot use argument passing on standard input for unpack-command") );
316 shared_ptr<Input> ArchiveDefinition::createInputFromPackCommand( GpgME::Protocol p, const QStringList & files ) const {
320 throw Kleo::Exception( GPG_ERR_CONFLICT, i18n("Cannot find common base directory for these files:\n%1", files.join( QLatin1String("\n") ) ) );
345 shared_ptr<Output> ArchiveDefinition::createOutputFromUnpackCommand( GpgME::Protocol p, const QString & file, const QDir & wd ) const {
360 std::vector< shared_ptr<ArchiveDefinition> > ArchiveDefinition::getArchiveDefinitions( QStringList & errors ) {
363 const QStringList groups = config->groupList().filter( QRegExp(QLatin1String("^Archive Definition #")) );
367 const shared_ptr<ArchiveDefinition> ad( new KConfigBasedArchiveDefinition( KConfigGroup( config, group ) ) );
QString heuristicBaseDirectory(const QStringList &files)
Definition: path-helper.cpp:69
ArgumentPassingMethod
Definition: archivedefinition.h:63
void checkProtocol(GpgME::Protocol p) const
Definition: archivedefinition.cpp:379
static QString try_extensions(const QString &path)
Definition: archivedefinition.cpp:119
static const QLatin1Char NEWLINE_SEPARATED_STDIN_INDICATOR( '|')
static const QLatin1String PACK_COMMAND_CMS_ENTRY("pack-command-cms")
static const QLatin1String PACK_COMMAND_ENTRY("pack-command")
static const QLatin1String PACK_COMMAND_OPENPGP_ENTRY("pack-command-openpgp")
static const QLatin1String UNPACK_COMMAND_ENTRY("unpack-command")
virtual ~ArchiveDefinition()
Definition: archivedefinition.cpp:305
QStringList makeRelativeTo(const QDir &dir, const QStringList &files)
Definition: path-helper.cpp:88
Definition: classify.h:49
static void parse_command(QString cmdline, const QString &id, const QString &whichCommand, QString *command, QStringList *prefix, QStringList *suffix, ArchiveDefinition::ArgumentPassingMethod *method, bool parseFilePlaceholder)
Definition: archivedefinition.cpp:132
static const QLatin1String ID_ENTRY("id")
Definition: classify.h:48
static const QLatin1String NAME_ENTRY("Name")
static const QLatin1String EXTENSIONS_CMS_ENTRY("extensions-cms")
static const QLatin1String EXTENSIONS_OPENPGP_ENTRY("extensions-openpgp")
boost::shared_ptr< Output > createOutputFromUnpackCommand(GpgME::Protocol p, const QString &file, const QDir &wd) const
Definition: archivedefinition.cpp:345
static const QLatin1String EXTENSIONS_ENTRY("extensions")
static QByteArray make_input(const QStringList &files, char sep)
Definition: archivedefinition.cpp:307
static const QLatin1String FILE_PLACEHOLDER("%f")
static boost::shared_ptr< Output > createFromProcessStdIn(const QString &command)
Definition: output.cpp:430
static const QLatin1String NULL_SEPARATED_STDIN_INDICATOR("0|")
static boost::shared_ptr< Input > createFromProcessStdOut(const QString &command)
Definition: input.cpp:241
static const QLatin1String UNPACK_COMMAND_OPENPGP_ENTRY("unpack-command-openpgp")
static const QLatin1String UNPACK_COMMAND_CMS_ENTRY("unpack-command-cms")
static const QLatin1String INSTALLPATH_PLACEHOLDER("%I")
boost::shared_ptr< Input > createInputFromPackCommand(GpgME::Protocol p, const QStringList &files) const
Definition: archivedefinition.cpp:316
Definition: archivedefinition.h:57
static std::vector< boost::shared_ptr< ArchiveDefinition > > getArchiveDefinitions()
Definition: archivedefinition.cpp:354
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.