SimpleCertAndCrlPanel.h
Go to the documentation of this file.00001
00010 #ifndef __SimpleCertAndCrlPanel_H__
00011 #define __SimpleCertAndCrlPanel_H__
00012
00013 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && defined(PKIFRESOURCES_ALLOW_GCC_PRAGMA)
00014 #pragma interface "SimpleCertAndCrlPanel.cpp"
00015 #endif
00016
00017 #ifndef WX_PRECOMP
00018 #include "wx/wx.h"
00019 #endif
00020
00021 #include "PKIFResources_wdr.h"
00022 #include "PKIFResources.h"
00023 #include "pkif.h"
00024
00025
00026
00027
00028
00029
00030
00037 class PKIFRESOURCES_API CPKIFSimpleCertAndCrlPanel: public wxPanel
00038 {
00039 public:
00040
00041 CPKIFSimpleCertAndCrlPanel( wxWindow *parent, wxWindowID id = -1,
00042 const wxPoint& pos = wxDefaultPosition,
00043 const wxSize& size = wxDefaultSize,
00044 long style = wxTAB_TRAVERSAL | wxNO_BORDER );
00045 ~CPKIFSimpleCertAndCrlPanel();
00046
00047
00048 wxButton* GetButtonAddCrl() { return (wxButton*) FindWindow( ID_BUTTON_ADD_CRL ); }
00049 wxButton* GetButtonViewCrl() { return (wxButton*) FindWindow( ID_BUTTON_VIEW_CRL ); }
00050 wxButton* GetButtonRemoveCrl() { return (wxButton*) FindWindow( ID_BUTTON_REMOVE_CRL ); }
00051 wxButton* GetButtonAddCert() { return (wxButton*) FindWindow( ID_BUTTON_ADD_CERT ); }
00052 wxButton* GetButtonViewCert() { return (wxButton*) FindWindow( ID_BUTTON_VIEW_CERT ); }
00053 wxButton* GetButtonRemoveCert() { return (wxButton*) FindWindow( ID_BUTTON_REMOVE_CERT ); }
00054 wxButton* GetButtonRemoveTa() { return (wxButton*) FindWindow( ID_BUTTON_REMOVE_TA ); }
00055 wxButton* GetButtonViewTa() { return (wxButton*) FindWindow( ID_BUTTON_VIEW_TA ); }
00056 wxButton* GetButtonAddTa() { return (wxButton*) FindWindow( ID_BUTTON_ADD_TA ); }
00057 wxListBox* GetListboxCrls() { return (wxListBox*) FindWindow( ID_LISTBOX_CRLS ); }
00058 wxListBox* GetListboxCerts() { return (wxListBox*) FindWindow( ID_LISTBOX_CERTS ); }
00059 wxListBox* GetListboxTrustAnchors() { return (wxListBox*) FindWindow( ID_LISTBOX_TRUST_ANCHORS ); }
00060 virtual bool Validate();
00061
00062 void GetTrustAnchors(std::vector<CPKIFCertificatePtr>& v);
00063 void GetCertificates(std::vector<CPKIFCertificatePtr>& v);
00064 void GetCrls(std::vector<CPKIFCRLPtr>& v);
00065
00066 void SetInitialMediator(IPKIFMediatorPtr& m);
00067 void OnInitDialog(wxInitDialogEvent& event);
00068
00069 private:
00070 IPKIFMediatorPtr m_m;
00071 std::vector<CPKIFCertificatePtr> m_vCerts;
00072 std::vector<CPKIFCertificatePtr> m_vTrustAnchors;
00073 std::vector<CPKIFCRLPtr> m_vCrls;
00074
00075 void UpdateCerts();
00076 void UpdateCrls();
00077 void UpdateTrustAnchors();
00078
00079 #ifdef WIN32
00080 char m_tmpName[MAX_PATH];
00081 #endif
00082
00083
00084
00085 private:
00086
00087 void OnRemoveCert( wxCommandEvent &event );
00088 void OnViewCert( wxCommandEvent &event );
00089 void OnAddCert( wxCommandEvent &event );
00090 void OnRemoveCrl( wxCommandEvent &event );
00091 void OnViewCrl( wxCommandEvent &event );
00092 void OnAddCrl( wxCommandEvent &event );
00093 void OnRemoveTA( wxCommandEvent &event );
00094 void OnViewTA( wxCommandEvent &event );
00095 void OnAddTA( wxCommandEvent &event );
00096
00097 private:
00098 DECLARE_EVENT_TABLE()
00099 };
00100
00101
00102
00103
00104 #endif