From d1c24efcf025cc562f204d8bd64f5ebae5cfbe04 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 24 Aug 2016 11:38:58 +0200 Subject: [PATCH] config_method_with_cred renamed to config_connection to describe it better --- lib/EAPBase/include/Config.h | 18 +++++++++--------- lib/EAPBase/include/Method.h | 10 +++++----- lib/EAPBase/src/Config.cpp | 26 +++++++++++++------------- lib/EAPBase/src/Method.cpp | 2 +- lib/EAPBase_UI/include/EAP_UI.h | 6 +++--- lib/TLS/include/Method.h | 4 ++-- lib/TLS/src/Method.cpp | 2 +- lib/TTLS/include/Method.h | 6 +++--- lib/TTLS/include/Module.h | 2 +- lib/TTLS/src/Method.cpp | 2 +- lib/TTLS/src/Module.cpp | 2 +- lib/TTLS_UI/src/Module.cpp | 8 ++++---- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/EAPBase/include/Config.h b/lib/EAPBase/include/Config.h index f753567..93081fc 100644 --- a/lib/EAPBase/include/Config.h +++ b/lib/EAPBase/include/Config.h @@ -40,14 +40,14 @@ namespace eap class config_method_with_cred; /// - /// Base class for single provider configuration storage + /// Provider configuration storage /// class config_provider; /// - /// Base class for the list of providers configuration storage + /// Connection configuration storage /// - class config_provider_list; + class config_connection; } /// @@ -454,7 +454,7 @@ namespace eap }; - class config_provider_list : public config + class config_connection : public config { public: /// @@ -462,21 +462,21 @@ namespace eap /// /// \param[in] mod EAP module to use for global services /// - config_provider_list(_In_ module &mod); + config_connection(_In_ module &mod); /// /// Copies configuration /// /// \param[in] other Configuration to copy from /// - config_provider_list(_In_ const config_provider_list &other); + config_connection(_In_ const config_connection &other); /// /// Moves configuration /// /// \param[in] other Configuration to move from /// - config_provider_list(_Inout_ config_provider_list &&other); + config_connection(_Inout_ config_connection &&other); /// /// Copies configuration @@ -485,7 +485,7 @@ namespace eap /// /// \returns Reference to this object /// - config_provider_list& operator=(_In_ const config_provider_list &other); + config_connection& operator=(_In_ const config_connection &other); /// /// Moves configuration @@ -494,7 +494,7 @@ namespace eap /// /// \returns Reference to this object /// - config_provider_list& operator=(_Inout_ config_provider_list &&other); + config_connection& operator=(_Inout_ config_connection &&other); /// /// Clones configuration diff --git a/lib/EAPBase/include/Method.h b/lib/EAPBase/include/Method.h index 17fc9ae..efcc451 100644 --- a/lib/EAPBase/include/Method.h +++ b/lib/EAPBase/include/Method.h @@ -51,10 +51,10 @@ namespace eap /// Constructs an EAP method /// /// \param[in] mod EAP module to use for global services - /// \param[in] cfg Providers configuration + /// \param[in] cfg Connection configuration /// \param[in] cred User credentials /// - method(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials &cred); + method(_In_ module &module, _In_ config_connection &cfg, _In_ credentials &cred); /// @@ -130,8 +130,8 @@ namespace eap method& operator=(_In_ const method &other); public: - module &m_module; ///< EAP module - config_provider_list &m_cfg; ///< Providers configuration - credentials &m_cred; ///< User credentials + module &m_module; ///< EAP module + config_connection &m_cfg; ///< Connection configuration + credentials &m_cred; ///< User credentials }; } diff --git a/lib/EAPBase/src/Config.cpp b/lib/EAPBase/src/Config.cpp index 6ec145b..c9ddbbf 100644 --- a/lib/EAPBase/src/Config.cpp +++ b/lib/EAPBase/src/Config.cpp @@ -609,16 +609,16 @@ void eap::config_provider::operator>>(_Inout_ cursor_in &cursor) ////////////////////////////////////////////////////////////////////// -// eap::config_provider_list +// eap::config_connection ////////////////////////////////////////////////////////////////////// -eap::config_provider_list::config_provider_list(_In_ module &mod) : config(mod) +eap::config_connection::config_connection(_In_ module &mod) : config(mod) { memset(&m_connection_id, 0, sizeof(m_connection_id)); } -eap::config_provider_list::config_provider_list(_In_ const config_provider_list &other) : +eap::config_connection::config_connection(_In_ const config_connection &other) : m_connection_id(other.m_connection_id), m_providers(other.m_providers), config(other) @@ -626,7 +626,7 @@ eap::config_provider_list::config_provider_list(_In_ const config_provider_list } -eap::config_provider_list::config_provider_list(_Inout_ config_provider_list &&other) : +eap::config_connection::config_connection(_Inout_ config_connection &&other) : m_connection_id(std::move(other.m_connection_id)), m_providers(std::move(other.m_providers)), config(std::move(other)) @@ -634,7 +634,7 @@ eap::config_provider_list::config_provider_list(_Inout_ config_provider_list &&o } -eap::config_provider_list& eap::config_provider_list::operator=(_In_ const config_provider_list &other) +eap::config_connection& eap::config_connection::operator=(_In_ const config_connection &other) { if (this != &other) { (config&)*this = other; @@ -646,7 +646,7 @@ eap::config_provider_list& eap::config_provider_list::operator=(_In_ const confi } -eap::config_provider_list& eap::config_provider_list::operator=(_Inout_ config_provider_list &&other) +eap::config_connection& eap::config_connection::operator=(_Inout_ config_connection &&other) { if (this != &other) { (config&&)*this = std::move(other); @@ -658,13 +658,13 @@ eap::config_provider_list& eap::config_provider_list::operator=(_Inout_ config_p } -eap::config* eap::config_provider_list::clone() const +eap::config* eap::config_connection::clone() const { - return new config_provider_list(*this); + return new config_connection(*this); } -void eap::config_provider_list::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const +void eap::config_connection::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const { config::save(pDoc, pConfigRoot); @@ -691,7 +691,7 @@ void eap::config_provider_list::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNod } -void eap::config_provider_list::load(_In_ IXMLDOMNode *pConfigRoot) +void eap::config_connection::load(_In_ IXMLDOMNode *pConfigRoot) { assert(pConfigRoot); HRESULT hr; @@ -722,7 +722,7 @@ void eap::config_provider_list::load(_In_ IXMLDOMNode *pConfigRoot) } -void eap::config_provider_list::operator<<(_Inout_ cursor_out &cursor) const +void eap::config_connection::operator<<(_Inout_ cursor_out &cursor) const { config::operator<<(cursor); cursor << m_connection_id; @@ -730,7 +730,7 @@ void eap::config_provider_list::operator<<(_Inout_ cursor_out &cursor) const } -size_t eap::config_provider_list::get_pk_size() const +size_t eap::config_connection::get_pk_size() const { return config::get_pk_size() + @@ -739,7 +739,7 @@ size_t eap::config_provider_list::get_pk_size() const } -void eap::config_provider_list::operator>>(_Inout_ cursor_in &cursor) +void eap::config_connection::operator>>(_Inout_ cursor_in &cursor) { config::operator>>(cursor); diff --git a/lib/EAPBase/src/Method.cpp b/lib/EAPBase/src/Method.cpp index 0bf8c4d..6b84417 100644 --- a/lib/EAPBase/src/Method.cpp +++ b/lib/EAPBase/src/Method.cpp @@ -28,7 +28,7 @@ using namespace winstd; // eap::method ////////////////////////////////////////////////////////////////////// -eap::method::method(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials &cred) : +eap::method::method(_In_ module &module, _In_ config_connection &cfg, _In_ credentials &cred) : m_module(module), m_cfg(cfg), m_cred(cred) diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index a15a8ed..595728e 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -142,10 +142,10 @@ public: /// /// Constructs a configuration dialog /// - /// \param[inout] cfg Providers configuration data + /// \param[inout] cfg Connection configuration /// \param[in] parent Parent window /// - wxEAPConfigDialog(eap::config_provider_list &cfg, wxWindow* parent) : + wxEAPConfigDialog(eap::config_connection &cfg, wxWindow* parent) : m_cfg(cfg), wxEAPConfigDialogBase(parent) { @@ -207,7 +207,7 @@ protected: protected: - eap::config_provider_list &m_cfg; ///< EAP providers configuration + eap::config_connection &m_cfg; ///< Connection configuration }; diff --git a/lib/TLS/include/Method.h b/lib/TLS/include/Method.h index dd20087..887d5bd 100644 --- a/lib/TLS/include/Method.h +++ b/lib/TLS/include/Method.h @@ -146,10 +146,10 @@ namespace eap /// Constructs an EAP method /// /// \param[in] mod EAP module to use for global services - /// \param[in] cfg Providers configuration + /// \param[in] cfg Connection configuration /// \param[in] cred User credentials /// - method_tls(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials_tls &cred); + method_tls(_In_ module &module, _In_ config_connection &cfg, _In_ credentials_tls &cred); /// /// Moves an EAP method diff --git a/lib/TLS/src/Method.cpp b/lib/TLS/src/Method.cpp index 15dabf1..c63f32e 100644 --- a/lib/TLS/src/Method.cpp +++ b/lib/TLS/src/Method.cpp @@ -125,7 +125,7 @@ void eap::method_tls::packet::clear() // eap::method_tls ////////////////////////////////////////////////////////////////////// -eap::method_tls::method_tls(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials_tls &cred) : +eap::method_tls::method_tls(_In_ module &module, _In_ config_connection &cfg, _In_ credentials_tls &cred) : m_cred(cred), m_user_ctx(NULL), #if EAP_TLS < EAP_TLS_SCHANNEL diff --git a/lib/TTLS/include/Method.h b/lib/TTLS/include/Method.h index 99eed27..8b09aed 100644 --- a/lib/TTLS/include/Method.h +++ b/lib/TTLS/include/Method.h @@ -57,11 +57,11 @@ namespace eap /// /// Constructs an EAP method /// - /// \param[in] mod EAP module to use for global services - /// \param[in] cfg Providers configuration + /// \param[in] mod EAP module to use for global services + /// \param[in] cfg Connection configuration /// \param[in] cred User credentials /// - method_ttls(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials_ttls &cred); + method_ttls(_In_ module &module, _In_ config_connection &cfg, _In_ credentials_ttls &cred); /// /// Moves an EAP method diff --git a/lib/TTLS/include/Module.h b/lib/TTLS/include/Module.h index 7d6c373..e32712d 100644 --- a/lib/TTLS/include/Module.h +++ b/lib/TTLS/include/Module.h @@ -221,7 +221,7 @@ namespace eap {} public: - config_provider_list m_cfg; ///< Providers configuration + config_connection m_cfg; ///< Connection configuration credentials_ttls m_cred; ///< User credentials method_ttls m_method; ///< EAP-TTLS method }; diff --git a/lib/TTLS/src/Method.cpp b/lib/TTLS/src/Method.cpp index ac022c0..4799b4f 100644 --- a/lib/TTLS/src/Method.cpp +++ b/lib/TTLS/src/Method.cpp @@ -28,7 +28,7 @@ using namespace winstd; // eap::method_ttls ////////////////////////////////////////////////////////////////////// -eap::method_ttls::method_ttls(_In_ module &module, _In_ config_provider_list &cfg, _In_ credentials_ttls &cred) : +eap::method_ttls::method_ttls(_In_ module &module, _In_ config_connection &cfg, _In_ credentials_ttls &cred) : m_cred(cred), m_version(version_0), method_tls(module, cfg, cred) diff --git a/lib/TTLS/src/Module.cpp b/lib/TTLS/src/Module.cpp index 9c6ca30..7240dcc 100644 --- a/lib/TTLS/src/Module.cpp +++ b/lib/TTLS/src/Module.cpp @@ -74,7 +74,7 @@ void eap::peer_ttls::get_identity( assert(ppwszIdentity); // Unpack configuration. - config_provider_list cfg(*this); + config_connection cfg(*this); unpack(cfg, pConnectionData, dwConnectionDataSize); if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods."); diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index a5942c6..891d535 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -48,7 +48,7 @@ void eap::peer_ttls_ui::config_xml2blob( UNREFERENCED_PARAMETER(dwFlags); // Load configuration from XML. - config_provider_list cfg(*this); + config_connection cfg(*this); cfg.load(pConfigRoot); // Pack configuration. @@ -66,7 +66,7 @@ void eap::peer_ttls_ui::config_blob2xml( UNREFERENCED_PARAMETER(dwFlags); // Unpack configuration. - config_provider_list cfg(*this); + config_connection cfg(*this); unpack(cfg, pConnectionData, dwConnectionDataSize); // Save configuration to XML. @@ -82,7 +82,7 @@ void eap::peer_ttls_ui::invoke_config_ui( _Inout_ DWORD *pdwConnectionDataOutSize) { // Unpack configuration. - config_provider_list cfg(*this); + config_connection cfg(*this); if (dwConnectionDataInSize) { // Load existing configuration. unpack(cfg, pConnectionDataIn, dwConnectionDataInSize); @@ -149,7 +149,7 @@ void eap::peer_ttls_ui::invoke_identity_ui( assert(ppwszIdentity); // Unpack configuration. - config_provider_list cfg(*this); + config_connection cfg(*this); unpack(cfg, pConnectionData, dwConnectionDataSize); if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods.");