diff options
Diffstat (limited to 'net-ftp/filezilla/files/filezilla-3.13.0-fzputtygen_interface.h')
-rw-r--r-- | net-ftp/filezilla/files/filezilla-3.13.0-fzputtygen_interface.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net-ftp/filezilla/files/filezilla-3.13.0-fzputtygen_interface.h b/net-ftp/filezilla/files/filezilla-3.13.0-fzputtygen_interface.h new file mode 100644 index 000000000000..b72d47005f01 --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.13.0-fzputtygen_interface.h @@ -0,0 +1,40 @@ +#ifndef FILEZILLA_FZPUTTYGEN_INTERFACE_HEADER +#define FILEZILLA_FZPUTTYGEN_INTERFACE_HEADER + +#include <wx/process.h> + +class CFZPuttyGenInterface +{ +public: + CFZPuttyGenInterface(wxWindow* parent); + virtual ~CFZPuttyGenInterface(); + bool LoadKeyFile(wxString& keyFile, bool silent, wxString& comment, wxString& data); + + void EndProcess(); + void DeleteProcess(); + bool IsProcessCreated(); + bool IsProcessStarted(); + +protected: + // return -1 on error + int NeedsConversion(wxString keyFile, bool silent); + + // return -1 on error + int IsKeyFileEncrypted(wxString keyFile, bool silent); + + wxProcess* m_pProcess{}; + bool m_initialized{}; + wxWindow* m_parent; + + enum ReplyCode { + success, + error, + failure + }; + + bool LoadProcess(bool silent); + bool Send(const wxString& cmd); + ReplyCode GetReply(wxString& reply); +}; + +#endif /* FILEZILLA_FZPUTTYGEN_INTERFACE_HEADER */ |