From 91dcc0bbbca459a831ab650ce99fed14b12f2ffc Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 5 Aug 2016 13:40:54 +0200 Subject: [PATCH] peer_base eliminated --- lib/EAPBase/include/Module.h | 34 +++------------------------------ lib/EAPBase_UI/include/Module.h | 25 ++++++++++++++++++++++-- lib/TTLS/include/Module.h | 5 +++++ lib/TTLS/src/Module.cpp | 6 ++++++ lib/TTLS_UI/include/Module.h | 5 +++++ lib/TTLS_UI/src/Module.cpp | 6 ++++++ 6 files changed, 48 insertions(+), 33 deletions(-) diff --git a/lib/EAPBase/include/Module.h b/lib/EAPBase/include/Module.h index a683c00..cad0291 100644 --- a/lib/EAPBase/include/Module.h +++ b/lib/EAPBase/include/Module.h @@ -27,13 +27,6 @@ namespace eap /// class module; - /// - /// EAP peer base class - /// - /// A group of methods all EAP peers must or should implement. - /// - template class peer_base; - /// /// EAP peer base class /// @@ -99,7 +92,7 @@ namespace eap void free_error_memory(_In_ EAP_ERROR *err); /// - /// Makes a new method config for the given method type + /// Makes a new method config /// virtual config_method* make_config_method(); @@ -660,7 +653,7 @@ namespace eap template - class peer_base : public module + class peer : public module { public: /// @@ -689,28 +682,7 @@ namespace eap /// /// \param[in] eap_method EAP method type ID /// - peer_base(_In_ winstd::eap_type_t eap_method) : module(eap_method) {} - - /// - /// Makes a new method config for the given method type - /// - virtual config_method* make_config_method() - { - return new config_method_type(this); - } - }; - - - template - class peer : public peer_base<_Tmeth, _Tcred, _Tint, _Tintres> - { - public: - /// - /// Constructs a EAP peer module for the given EAP type - /// - /// \param[in] eap_method EAP method type ID - /// - peer(_In_ winstd::eap_type_t eap_method) : peer_base<_Tmeth, _Tcred, _Tint, _Tintres>(eap_method) {} + peer(_In_ winstd::eap_type_t eap_method) : module(eap_method) {} /// /// Initializes an EAP peer method for EAPHost. diff --git a/lib/EAPBase_UI/include/Module.h b/lib/EAPBase_UI/include/Module.h index 9642258..2984c3c 100644 --- a/lib/EAPBase_UI/include/Module.h +++ b/lib/EAPBase_UI/include/Module.h @@ -36,15 +36,36 @@ namespace eap namespace eap { template - class peer_ui : public peer_base<_Tmeth, _Tcred, _Tint, _Tintres> + class peer_ui : public module { + public: + /// + /// Method configuration data type + /// + typedef _Tmeth config_method_type; + + /// + /// Credentials data type + /// + typedef _Tcred credentials_type; + + /// + /// Interactive request data type + /// + typedef _Tint interactive_request_type; + + /// + /// Interactive response data type + /// + typedef _Tintres interactive_response_type; + public: /// /// Constructs a EAP UI peer module for the given EAP type /// /// \param[in] eap_method EAP method type ID /// - peer_ui(_In_ winstd::eap_type_t eap_method) : peer_base<_Tmeth, _Tcred, _Tint, _Tintres>(eap_method) {} + peer_ui(_In_ winstd::eap_type_t eap_method) : module(eap_method) {} /// /// Raises the EAP method's specific connection configuration user interface dialog on the client. diff --git a/lib/TTLS/include/Module.h b/lib/TTLS/include/Module.h index c21693d..f2b05c6 100644 --- a/lib/TTLS/include/Module.h +++ b/lib/TTLS/include/Module.h @@ -43,6 +43,11 @@ namespace eap /// peer_ttls(); + /// + /// Makes a new method config + /// + virtual config_method* make_config_method(); + /// /// Initializes an EAP peer method for EAPHost. /// diff --git a/lib/TTLS/src/Module.cpp b/lib/TTLS/src/Module.cpp index f46bd04..fdeddde 100644 --- a/lib/TTLS/src/Module.cpp +++ b/lib/TTLS/src/Module.cpp @@ -33,6 +33,12 @@ eap::peer_ttls::peer_ttls() : peer