00001 /* 00002 pGina ldapAuth code - based upon skeleton code for pGina plugin development 00003 Copyright (C) 2002 Micah Cooper 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 00019 Email: coopermj@muohio.edu 00020 Snail Mail: 00021 Micah Cooper 00022 212A Kreger Hall 00023 Miami University 00024 Oxford OH 45056 00025 */ 00026 #pragma once 00027 00028 #include "Resource.h" 00029 00030 // CConfigLDAP dialog 00031 00032 class CConfigLDAP : public CDialog 00033 { 00034 DECLARE_DYNAMIC(CConfigLDAP) 00035 00036 public: 00037 CConfigLDAP(CWnd* pParent = NULL); // standard constructor 00038 virtual ~CConfigLDAP(); 00039 void loadListsFromReg(void); // load the lists from the registry 00040 void saveListsToReg(void); // save the lists to the registry 00041 00042 // Dialog Data 00043 enum { IDD = IDD_LDAP_TAB }; 00044 00045 protected: 00046 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00047 00048 DECLARE_MESSAGE_MAP() 00049 public: 00050 // Used to display the LDAPAuth Version 00051 CString m_server; 00052 CString m_ldapPrePend; 00053 CString m_ldapAppend; 00054 CString m_ldapAdminUsername; 00055 CString m_ldapAdminPassword; 00056 BOOL m_useSSL; 00057 CString m_port; 00058 CString m_ldapFilter; 00059 CString m_ldapGroupAttr; 00060 BOOL m_searchMode; 00061 BOOL m_multiMap; 00062 BOOL m_mapMode; 00063 CListBox m_ContextList; 00064 CString m_newContext; 00065 CString m_timeout; 00066 bool hasLoaded; 00067 00068 void swapItem(CListBox *,int, int); 00069 afx_msg BOOL OnInitDialog(); 00070 afx_msg void OnOK(); 00071 afx_msg void OnSave(); 00072 afx_msg void OnAddContext(); 00073 afx_msg void OnRemoveContext(); 00074 afx_msg void OnMoveContextUp(); 00075 afx_msg void OnMoveContextDown(); 00076 afx_msg void OnChangeSearch(); 00077 afx_msg void OnChangeMultimap(); 00078 afx_msg void OnChangeMapMode(); 00079 protected: 00080 // Control display of ldapPrePend field 00081 CEdit c_ldapPrePend; 00082 public: 00083 CEdit c_ldapAppend; 00084 CButton c_usessl; 00085 CEdit c_newcontext; 00086 CButton c_addcontext; 00087 CButton c_delcontext; 00088 CButton c_upcontext; 00089 CButton c_downcontext; 00090 afx_msg void OnEnChangeLdapfilter(); 00091 afx_msg void OnEnChangeTimeout(); 00092 };