Blame lang/cpp/src/decryptionresult.h

Packit Service 672cf4
/*
Packit Service 672cf4
  decryptionresult.h - wraps a gpgme keygen result
Packit Service 672cf4
  Copyright (C) 2004 Klarälvdalens Datakonsult AB
Packit Service 672cf4
  2016 Bundesamt für Sicherheit in der Informationstechnik
Packit Service 672cf4
  Software engineering by Intevation GmbH
Packit Service 672cf4
Packit Service 672cf4
  This file is part of GPGME++.
Packit Service 672cf4
Packit Service 672cf4
  GPGME++ is free software; you can redistribute it and/or
Packit Service 672cf4
  modify it under the terms of the GNU Library General Public
Packit Service 672cf4
  License as published by the Free Software Foundation; either
Packit Service 672cf4
  version 2 of the License, or (at your option) any later version.
Packit Service 672cf4
Packit Service 672cf4
  GPGME++ is distributed in the hope that it will be useful,
Packit Service 672cf4
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 672cf4
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 672cf4
  GNU Library General Public License for more details.
Packit Service 672cf4
Packit Service 672cf4
  You should have received a copy of the GNU Library General Public License
Packit Service 672cf4
  along with GPGME++; see the file COPYING.LIB.  If not, write to the
Packit Service 672cf4
  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit Service 672cf4
  Boston, MA 02110-1301, USA.
Packit Service 672cf4
*/
Packit Service 672cf4
Packit Service 672cf4
#ifndef __GPGMEPP_DECRYPTIONRESULT_H__
Packit Service 672cf4
#define __GPGMEPP_DECRYPTIONRESULT_H__
Packit Service 672cf4
Packit Service 672cf4
#include "gpgmefw.h"
Packit Service 672cf4
#include "result.h"
Packit Service 672cf4
#include "gpgmepp_export.h"
Packit Service 672cf4
Packit Service 672cf4
#include <vector>
Packit Service 672cf4
#include <algorithm>
Packit Service 672cf4
#include <iosfwd>
Packit Service 672cf4
#include <memory>
Packit Service 672cf4
Packit Service 672cf4
namespace GpgME
Packit Service 672cf4
{
Packit Service 672cf4
Packit Service 672cf4
class Error;
Packit Service 672cf4
Packit Service 672cf4
class GPGMEPP_EXPORT DecryptionResult : public Result
Packit Service 672cf4
{
Packit Service 672cf4
public:
Packit Service 672cf4
    DecryptionResult();
Packit Service 672cf4
    DecryptionResult(gpgme_ctx_t ctx, int error);
Packit Service 672cf4
    DecryptionResult(gpgme_ctx_t ctx, const Error &err;;
Packit Service 672cf4
    explicit DecryptionResult(const Error &err;;
Packit Service 672cf4
Packit Service 672cf4
    const DecryptionResult &operator=(DecryptionResult other)
Packit Service 672cf4
    {
Packit Service 672cf4
        swap(other);
Packit Service 672cf4
        return *this;
Packit Service 672cf4
    }
Packit Service 672cf4
Packit Service 672cf4
    void swap(DecryptionResult &other)
Packit Service 672cf4
    {
Packit Service 672cf4
        Result::swap(other);
Packit Service 672cf4
        using std::swap;
Packit Service 672cf4
        swap(this->d, other.d);
Packit Service 672cf4
    }
Packit Service 672cf4
Packit Service 672cf4
    bool isNull() const;
Packit Service 672cf4
Packit Service 672cf4
    GPGMEPP_DEPRECATED const char *unsupportedAlgortihm() const
Packit Service 672cf4
    {
Packit Service 672cf4
        return unsupportedAlgorithm();
Packit Service 672cf4
    }
Packit Service 672cf4
    const char *unsupportedAlgorithm() const;
Packit Service 672cf4
Packit Service 672cf4
    GPGMEPP_DEPRECATED bool wrongKeyUsage() const
Packit Service 672cf4
    {
Packit Service 672cf4
        return isWrongKeyUsage();
Packit Service 672cf4
    }
Packit Service 672cf4
    bool isWrongKeyUsage() const;
Packit Service 672cf4
    bool isDeVs() const;
Packit Service 672cf4
Packit Service 672cf4
    const char *fileName() const;
Packit Service 672cf4
Packit Service 672cf4
    class Recipient;
Packit Service 672cf4
Packit Service 672cf4
    unsigned int numRecipients() const;
Packit Service 672cf4
    Recipient recipient(unsigned int idx) const;
Packit Service 672cf4
    std::vector<Recipient> recipients() const;
Packit Service 672cf4
Packit Service 672cf4
private:
Packit Service 672cf4
    class Private;
Packit Service 672cf4
    void init(gpgme_ctx_t ctx);
Packit Service 672cf4
    std::shared_ptr<Private> d;
Packit Service 672cf4
};
Packit Service 672cf4
Packit Service 672cf4
GPGMEPP_EXPORT std::ostream &operator<<(std::ostream &os, const DecryptionResult &result);
Packit Service 672cf4
Packit Service 672cf4
class GPGMEPP_EXPORT DecryptionResult::Recipient
Packit Service 672cf4
{
Packit Service 672cf4
public:
Packit Service 672cf4
    Recipient();
Packit Service 672cf4
    explicit Recipient(gpgme_recipient_t reci);
Packit Service 672cf4
Packit Service 672cf4
    const Recipient &operator=(Recipient other)
Packit Service 672cf4
    {
Packit Service 672cf4
        swap(other);
Packit Service 672cf4
        return *this;
Packit Service 672cf4
    }
Packit Service 672cf4
Packit Service 672cf4
    void swap(Recipient &other)
Packit Service 672cf4
    {
Packit Service 672cf4
        using std::swap;
Packit Service 672cf4
        swap(this->d, other.d);
Packit Service 672cf4
    }
Packit Service 672cf4
Packit Service 672cf4
    bool isNull() const;
Packit Service 672cf4
Packit Service 672cf4
    const char *keyID() const;
Packit Service 672cf4
    const char *shortKeyID() const;
Packit Service 672cf4
Packit Service 672cf4
    unsigned int publicKeyAlgorithm() const;
Packit Service 672cf4
    const char *publicKeyAlgorithmAsString() const;
Packit Service 672cf4
Packit Service 672cf4
    Error status() const;
Packit Service 672cf4
Packit Service 672cf4
private:
Packit Service 672cf4
    class Private;
Packit Service 672cf4
    std::shared_ptr<Private> d;
Packit Service 672cf4
};
Packit Service 672cf4
Packit Service 672cf4
GPGMEPP_EXPORT std::ostream &operator<<(std::ostream &os, const DecryptionResult::Recipient &reci;;
Packit Service 672cf4
Packit Service 672cf4
}
Packit Service 672cf4
Packit Service 672cf4
GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION(DecryptionResult)
Packit Service 672cf4
Packit Service 672cf4
#endif // __GPGMEPP_DECRYPTIONRESULT_H__