Blame lang/cpp/src/gpggencardkeyinteractor.h

Packit Service 672cf4
/*
Packit Service 672cf4
  gpggencardkeyinteractor.h - Edit Interactor to generate a key on a card
Packit Service 672cf4
  Copyright (C) 2017 by 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_GPGGENCARDKEYEDITINTERACTOR_H__
Packit Service 672cf4
#define __GPGMEPP_GPGGENCARDKEYEDITINTERACTOR_H__
Packit Service 672cf4
Packit Service 672cf4
#include <editinteractor.h>
Packit Service 672cf4
Packit Service 672cf4
#include <string>
Packit Service 672cf4
#include <memory>
Packit Service 672cf4
Packit Service 672cf4
namespace GpgME
Packit Service 672cf4
{
Packit Service 672cf4
Packit Service 672cf4
class GPGMEPP_EXPORT GpgGenCardKeyInteractor: public EditInteractor
Packit Service 672cf4
{
Packit Service 672cf4
public:
Packit Service 672cf4
    /** Edit interactor to generate a key on a smartcard.
Packit Service 672cf4
     *
Packit Service 672cf4
     * The \a serialnumber argument is intended to safeguard
Packit Service 672cf4
     * against accidentally working on the wrong smartcard.
Packit Service 672cf4
     *
Packit Service 672cf4
     * The edit interactor will fail if the card did not match.
Packit Service 672cf4
     *
Packit Service 672cf4
     * @param serialnumber: Serialnumber of the intended card.
Packit Service 672cf4
     **/
Packit Service 672cf4
    explicit GpgGenCardKeyInteractor(const std::string &serialnumber);
Packit Service 672cf4
    ~GpgGenCardKeyInteractor();
Packit Service 672cf4
Packit Service 672cf4
    /** Set the key sizes for the subkeys (default 2048) */
Packit Service 672cf4
    void setKeySize(int size);
Packit Service 672cf4
Packit Service 672cf4
    void setNameUtf8(const std::string &name);
Packit Service 672cf4
    void setEmailUtf8(const std::string &email);
Packit Service 672cf4
Packit Service 672cf4
    void setDoBackup(bool value);
Packit Service 672cf4
    void setExpiry(const std::string &timeString);
Packit Service 672cf4
Packit Service 672cf4
    std::string backupFileName() const;
Packit Service 672cf4
Packit Service 672cf4
private:
Packit Service 6c01f9
    /* reimp */ const char *action(Error &err) const;
Packit Service 6c01f9
    /* reimp */ unsigned int nextState(unsigned int statusCode, const char *args, Error &err) 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
} // namespace GpgME
Packit Service 672cf4
Packit Service 672cf4
#endif // __GPGMEPP_GPGGENCARDKEYEDITINTERACTOR_H__