<commit_before>/*
    protocol.h

    This file is part of qgpgme, the Qt API binding for gpgme
    Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB
    Copyright (c) 2016 Intevation GmbH

    QGpgME is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    QGpgME is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    In addition, as a special exception, the copyright holders give
    permission to link the code of this program with any edition of
    the Qt library by Trolltech AS, Norway (or with modified versions
    of Qt that use the same license as Qt), and distribute linked
    combinations including the two.  You must obey the GNU General
    Public License in all respects for all of the code used other than
    Qt.  If you modify this file, you may extend this exception to
    your version of the file, but you are not obligated to do so.  If
    you do not wish to do so, delete this exception statement from
    your version.
*/
#ifndef __QGPGME_PROTOCOL_H__
#define __QGPGME_PROTOCOL_H__

#include <QString>
#include <QVariant>

#include "qgpgme_export.h"

namespace QGpgME {
class CryptoConfig;
class KeyListJob;
class ListAllKeysJob;
class KeyGenerationJob;
class ImportJob;
class ImportFromKeyserverJob;
class ExportJob;
class DownloadJob;
class DeleteJob;
class EncryptJob;
class DecryptJob;
class SignJob;
class SignKeyJob;
class VerifyDetachedJob;
class VerifyOpaqueJob;
class SignEncryptJob;
class DecryptVerifyJob;
class RefreshKeysJob;
class ChangeExpiryJob;
class ChangeOwnerTrustJob;
class ChangePasswdJob;
class AddUserIDJob;
class SpecialJob;

class QGPGME_EXPORT Protocol
{
public:<commit_msg>Qt: Add some general Protocol documentation<commit_after>/*
    protocol.h

    This file is part of qgpgme, the Qt API binding for gpgme
    Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB
    Copyright (c) 2016 Intevation GmbH

    QGpgME is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    QGpgME is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    In addition, as a special exception, the copyright holders give
    permission to link the code of this program with any edition of
    the Qt library by Trolltech AS, Norway (or with modified versions
    of Qt that use the same license as Qt), and distribute linked
    combinations including the two.  You must obey the GNU General
    Public License in all respects for all of the code used other than
    Qt.  If you modify this file, you may extend this exception to
    your version of the file, but you are not obligated to do so.  If
    you do not wish to do so, delete this exception statement from
    your version.
*/
#ifndef __QGPGME_PROTOCOL_H__
#define __QGPGME_PROTOCOL_H__

#include <QString>
#include <QVariant>

#include "qgpgme_export.h"

namespace QGpgME {
class CryptoConfig;
class KeyListJob;
class ListAllKeysJob;
class KeyGenerationJob;
class ImportJob;
class ImportFromKeyserverJob;
class ExportJob;
class DownloadJob;
class DeleteJob;
class EncryptJob;
class DecryptJob;
class SignJob;
class SignKeyJob;
class VerifyDetachedJob;
class VerifyOpaqueJob;
class SignEncryptJob;
class DecryptVerifyJob;
class RefreshKeysJob;
class ChangeExpiryJob;
class ChangeOwnerTrustJob;
class ChangePasswdJob;
class AddUserIDJob;
class SpecialJob;

/** The main entry point for QGpgME Comes in OpenPGP and SMIME(CMS) flavors.
 *
 * Use the proctocol class to obtain an instance of a job. Jobs
 * provide async API for GnuPG that can be connected to signals / slots.
 *
 * A job is usually started with start() and emits a result signal.
 * The parameters of the result signal depend on the job but the last
 * two are always a QString for the auditlog and an GpgME::Error for
 * an eventual error.
 *
 * In case async API is used and the result signal is emited a
 * job schedules its own deletion.
 *
 * Most jobs also provide a synchronous call exec in which case
 * you have to explicitly delete the job if you don't need it anymore.
 *
 * \code
 * // Async example:
 * KeyListJob *job = openpgp()->keyListJob();
 * connect(job, &KeyListJob::result, job, [this, job](KeyListResult, std::vector<Key> keys, QString, Error)
 * {
 *    // keys and resuls can now be used.
 * });
 * \endcode
 *
 * \code
 * // Sync eaxmple:
 * KeyListJob *job = openpgp()->keyListJob(false, false, false);
 * std::vector<GpgME::Key> keys;
 * GpgME::KeyListResult result = job->exec(QStringList() <<
 *                                         QStringLiteral("<EMAIL>"),
 *                                         false, keys);
 * delete job;
 * \endcode
 */
class QGPGME_EXPORT Protocol
{
public:
{'fraction_non_alphanumeric': 0.053462940461725394, 'fraction_numerical': 0.008331886825203957, 'mean_word_length': 3.699836867862969, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5794194', 'n_tokens_mistral': 1654, 'n_tokens_neox': 1590, 'n_words': 776}