1/*
2 gpgadduserideditinteractor.h - Edit Interactor to add a new UID to an OpenPGP key
3 Copyright (C) 2008 Klarälvdalens Datakonsult AB
4
5 This file is part of GPGME++.
6
7 GPGME++ is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 GPGME++ is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with GPGME++; see the file COPYING.LIB. If not, write to the
19 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef __GPGMEPP_GPGADDUSERIDEDITINTERACTOR_H__
24#define __GPGMEPP_GPGADDUSERIDEDITINTERACTOR_H__
25
26#include <gpgme++/editinteractor.h>
27
28#include <string>
29
30namespace GpgME {
31
32 class GPGMEPP_EXPORT GpgAddUserIDEditInteractor : public EditInteractor {
33 public:
34 explicit GpgAddUserIDEditInteractor();
35 ~GpgAddUserIDEditInteractor();
36
37 void setNameUtf8( const std::string & name );
38 const std::string & nameUtf8() const {
39 return m_name;
40 }
41
42 void setEmailUtf8( const std::string & email );
43 const std::string & emailUtf8() const {
44 return m_email;
45 }
46
47 void setCommentUtf8( const std::string & comment );
48 const std::string & commentUtf8() const {
49 return m_comment;
50 }
51
52 private:
53 /* reimp */ const char * action( Error & err ) const;
54 /* reimp */ unsigned int nextState( unsigned int statusCode, const char * args, Error & err ) const;
55
56 private:
57 std::string m_name, m_email, m_comment;
58 };
59
60} // namespace GpgME
61
62#endif // __GPGMEPP_GPGADDUSERIDEDITINTERACTOR_H__
63