LdapAndOcspPanel.h
Go to the documentation of this file.00001
00010 #ifndef __LdapAndOcspPanel_H__
00011 #define __LdapAndOcspPanel_H__
00012
00013 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && defined(PKIFRESOURCES_ALLOW_GCC_PRAGMA)
00014 #pragma interface "LdapAndOcspPanel.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 <string>
00024 #include <vector>
00025 #include "pkif.h"
00026
00027 struct ServerInformation
00028 {
00029 std::string m_hostOrIPAddress;
00030 int m_port;
00031 CPKIFGeneralSubtreeList m_namespaces;
00032 };
00033
00034 DECLARE_SMART_POINTERS(ServerInformation);
00035
00036
00037
00038
00039
00040
00041
00048 class PKIFRESOURCES_API CPKIFLdapAndOcspPanel: public wxPanel
00049 {
00050 public:
00051
00052 CPKIFLdapAndOcspPanel( wxWindow *parent, wxWindowID id = -1,
00053 const wxPoint& pos = wxDefaultPosition,
00054 const wxSize& size = wxDefaultSize,
00055 long style = wxTAB_TRAVERSAL | wxNO_BORDER,
00056 bool enableBlacklists = true);
00057 ~CPKIFLdapAndOcspPanel();
00058
00059
00060 wxListBox* GetListboxLdapBlacklist() { return (wxListBox*) FindWindow( ID_LISTBOX_LDAP_BLACKLIST ); }
00061 wxListBox* GetListboHttpBlacklist() { return (wxListBox*) FindWindow( ID_LISTBOX_HTTP_BLACKLIST ); }
00062 wxListBox* GetListboxOcsp() { return (wxListBox*) FindWindow( ID_LISTBOX_OCSP ); }
00063 wxListBox* GetListboxLdap() { return (wxListBox*) FindWindow( ID_LISTBOX_LDAP ); }
00064 wxButton* GetBlacklistAdd() { return (wxButton*) FindWindow( ID_BUTTON_ADD_DIR_BL ); }
00065 wxButton* GetBlacklistRemove() { return (wxButton*) FindWindow( ID_BUTTON_REMOVE_DIR_BL ); }
00066 wxButton* GetBlacklistClear() { return (wxButton*) FindWindow( ID_BUTTON_CLEAR_DIR_BL ); }
00067 wxButton* GetHttpBlacklistAdd() { return (wxButton*) FindWindow( ID_BUTTON_ADD_DIR_HTTP_BL ); }
00068 wxButton* GetHttpBlacklistRemove() { return (wxButton*) FindWindow( ID_BUTTON_REMOVE_DIR_HTTP_BL ); }
00069 wxButton* GetHttpBlacklistClear() { return (wxButton*) FindWindow( ID_BUTTON_CLEAR_DIR_HTTP_BL ); }
00070
00071 void GetDirectories(std::vector<CPKIFLDAPRepositoryPtr>& d) const;
00072 void GetResponders(std::vector<CPKIFOCSPCheckerPtr>& r) const;
00073 void GetBlacklist(std::vector<std::string> & l) const;
00074 void GetHttpBlacklist(std::vector<std::string> & l) const;
00075
00076 virtual bool Validate();
00077
00078 void SetInitialMediator(IPKIFMediatorPtr& m);
00079 void OnInitDialog(wxInitDialogEvent& event);
00080
00081 private:
00082 IPKIFMediatorPtr m_m;
00083
00084
00085
00086 private:
00087
00088 void OnBlacklistClear( wxCommandEvent &event );
00089 void OnBlacklistRemove( wxCommandEvent &event );
00090 void OnBlacklistAdd( wxCommandEvent &event );
00091 void OnHttpBlacklistClear( wxCommandEvent &event );
00092 void OnHttpBlacklistRemove( wxCommandEvent &event );
00093 void OnHttpBlacklistAdd( wxCommandEvent &event );
00094 void OnAddOcsp( wxCommandEvent &event );
00095 void OnEditOcsp( wxCommandEvent &event );
00096 void OnRemoveOcsp( wxCommandEvent &event );
00097 void OnRemoveLdap( wxCommandEvent &event );
00098 void OnEditLdap( wxCommandEvent &event );
00099 void OnAddLdap( wxCommandEvent &event );
00100
00101 std::vector<ServerInformationPtr> m_vLdap;
00102 std::vector<CPKIFOCSPCheckerPtr> m_vOcsp;
00103 std::vector<std::string> m_blacklist;
00104 std::vector<std::string> m_httpBlackList;
00105
00106 void UpdateLdap();
00107 void UpdateOcsp();
00108 void UpdateBlacklist();
00109 void UpdateHttpBlacklist();
00110 private:
00111 DECLARE_EVENT_TABLE()
00112 };
00113
00114 #endif