X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fdownload_certificate_panel.h;h=0e7b2ab713198f6ffa5049027156874b24d94221;hb=2fd641547b5fb795fc17e98e47f489fa82e8ff42;hp=252474c59802e357151b36a076f047eb6610ec5e;hpb=6a69f5ba3ce43094493785bb449c91001557b80d;p=dcpomatic.git diff --git a/src/wx/download_certificate_panel.h b/src/wx/download_certificate_panel.h index 252474c59..0e7b2ab71 100644 --- a/src/wx/download_certificate_panel.h +++ b/src/wx/download_certificate_panel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,37 +18,47 @@ */ + #ifndef DCPOMATIC_DOWNLOAD_CERTIFICATE_PANEL_H #define DCPOMATIC_DOWNLOAD_CERTIFICATE_PANEL_H + +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include + class DownloadCertificateDialog; + class DownloadCertificatePanel : public wxPanel { public: - DownloadCertificatePanel (wxWindow* parent, wxStaticText* message, DownloadCertificateDialog* dialog); + DownloadCertificatePanel (DownloadCertificateDialog* dialog); - virtual void do_download (std::string serial) = 0; + virtual void do_download () = 0; virtual wxString name () const = 0; + virtual bool ready_to_download () const; - bool ready_to_download () const; void download (); - void load (boost::filesystem::path); + boost::optional load_certificate (boost::filesystem::path, std::string url); + boost::optional load_certificate_from_chain (boost::filesystem::path, std::string url); boost::optional certificate () const; + boost::optional url () const; protected: DownloadCertificateDialog* _dialog; wxFlexGridSizer* _table; - wxStaticText* _message; + wxTextCtrl* _serial; + wxSizer* _overall_sizer; private: - wxSizer* _overall_sizer; boost::optional _certificate; - wxTextCtrl* _serial; + boost::optional _url; }; + #endif