Blame lang/cpp/src/editinteractor.h

Packit d7e8d0
/*
Packit d7e8d0
  editinteractor.h - Interface for edit interactors
Packit d7e8d0
  Copyright (C) 2007 Klarälvdalens Datakonsult AB
Packit d7e8d0
  2016 Bundesamt für Sicherheit in der Informationstechnik
Packit d7e8d0
  Software engineering by Intevation GmbH
Packit d7e8d0
Packit d7e8d0
  This file is part of GPGME++.
Packit d7e8d0
Packit d7e8d0
  GPGME++ is free software; you can redistribute it and/or
Packit d7e8d0
  modify it under the terms of the GNU Library General Public
Packit d7e8d0
  License as published by the Free Software Foundation; either
Packit d7e8d0
  version 2 of the License, or (at your option) any later version.
Packit d7e8d0
Packit d7e8d0
  GPGME++ is distributed in the hope that it will be useful,
Packit d7e8d0
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit d7e8d0
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit d7e8d0
  GNU Library General Public License for more details.
Packit d7e8d0
Packit d7e8d0
  You should have received a copy of the GNU Library General Public License
Packit d7e8d0
  along with GPGME++; see the file COPYING.LIB.  If not, write to the
Packit d7e8d0
  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit d7e8d0
  Boston, MA 02110-1301, USA.
Packit d7e8d0
*/
Packit d7e8d0
Packit d7e8d0
#ifndef __GPGMEPP_EDITINTERACTOR_H__
Packit d7e8d0
#define __GPGMEPP_EDITINTERACTOR_H__
Packit d7e8d0
Packit d7e8d0
#include "gpgmepp_export.h"
Packit d7e8d0
Packit d7e8d0
#include <cstdio>
Packit d7e8d0
Packit d7e8d0
namespace GpgME
Packit d7e8d0
{
Packit d7e8d0
Packit d7e8d0
class Error;
Packit d7e8d0
class Context;
Packit d7e8d0
class CallbackHelper;
Packit d7e8d0
Packit d7e8d0
class GPGMEPP_EXPORT EditInteractor
Packit d7e8d0
{
Packit d7e8d0
    friend class ::GpgME::Context;
Packit d7e8d0
    friend class ::GpgME::CallbackHelper;
Packit d7e8d0
    EditInteractor(const EditInteractor &);
Packit d7e8d0
    EditInteractor &operator=(const EditInteractor &);
Packit d7e8d0
public:
Packit d7e8d0
    EditInteractor();
Packit d7e8d0
    virtual ~EditInteractor();
Packit d7e8d0
Packit d7e8d0
    enum {
Packit d7e8d0
        StartState = 0,
Packit d7e8d0
        ErrorState = 0xFFFFFFFF
Packit d7e8d0
    };
Packit d7e8d0
Packit d7e8d0
    virtual const char *action(Error &err) const = 0;
Packit d7e8d0
    virtual unsigned int nextState(unsigned int statusCode, const char *args, Error &err) const = 0;
Packit d7e8d0
Packit d7e8d0
    unsigned int state() const;
Packit d7e8d0
    Error lastError() const;
Packit d7e8d0
    bool needsNoResponse(unsigned int statusCode) const;
Packit d7e8d0
Packit d7e8d0
    void setDebugChannel(std::FILE *file);
Packit d7e8d0
Packit d7e8d0
private:
Packit d7e8d0
    class Private;
Packit d7e8d0
    Private *const d;
Packit d7e8d0
};
Packit d7e8d0
Packit d7e8d0
} // namespace GpgME
Packit d7e8d0
Packit d7e8d0
#endif // __GPGMEPP_EDITINTERACTOR_H__