config_method_with_cred renamed to config_connection to describe it better

This commit is contained in:
Simon Rozman 2016-08-24 11:38:58 +02:00
parent 1cb6ca5adb
commit d1c24efcf0
12 changed files with 44 additions and 44 deletions

View File

@ -40,14 +40,14 @@ namespace eap
class config_method_with_cred; class config_method_with_cred;
/// ///
/// Base class for single provider configuration storage /// Provider configuration storage
/// ///
class config_provider; 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: public:
/// ///
@ -462,21 +462,21 @@ namespace eap
/// ///
/// \param[in] mod EAP module to use for global services /// \param[in] mod EAP module to use for global services
/// ///
config_provider_list(_In_ module &mod); config_connection(_In_ module &mod);
/// ///
/// Copies configuration /// Copies configuration
/// ///
/// \param[in] other Configuration to copy from /// \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 /// Moves configuration
/// ///
/// \param[in] other Configuration to move from /// \param[in] other Configuration to move from
/// ///
config_provider_list(_Inout_ config_provider_list &&other); config_connection(_Inout_ config_connection &&other);
/// ///
/// Copies configuration /// Copies configuration
@ -485,7 +485,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \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 /// Moves configuration
@ -494,7 +494,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_provider_list& operator=(_Inout_ config_provider_list &&other); config_connection& operator=(_Inout_ config_connection &&other);
/// ///
/// Clones configuration /// Clones configuration

View File

@ -51,10 +51,10 @@ namespace eap
/// Constructs an EAP method /// Constructs an EAP method
/// ///
/// \param[in] mod EAP module to use for global services /// \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 /// \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); method& operator=(_In_ const method &other);
public: public:
module &m_module; ///< EAP module module &m_module; ///< EAP module
config_provider_list &m_cfg; ///< Providers configuration config_connection &m_cfg; ///< Connection configuration
credentials &m_cred; ///< User credentials credentials &m_cred; ///< User credentials
}; };
} }

View File

@ -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)); 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_connection_id(other.m_connection_id),
m_providers(other.m_providers), m_providers(other.m_providers),
config(other) 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_connection_id(std::move(other.m_connection_id)),
m_providers(std::move(other.m_providers)), m_providers(std::move(other.m_providers)),
config(std::move(other)) 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) { if (this != &other) {
(config&)*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) { if (this != &other) {
(config&&)*this = std::move(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); 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); assert(pConfigRoot);
HRESULT hr; 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); config::operator<<(cursor);
cursor << m_connection_id; 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 return
config::get_pk_size() + 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); config::operator>>(cursor);

View File

@ -28,7 +28,7 @@ using namespace winstd;
// eap::method // 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_module(module),
m_cfg(cfg), m_cfg(cfg),
m_cred(cred) m_cred(cred)

View File

@ -142,10 +142,10 @@ public:
/// ///
/// Constructs a configuration dialog /// Constructs a configuration dialog
/// ///
/// \param[inout] cfg Providers configuration data /// \param[inout] cfg Connection configuration
/// \param[in] parent Parent window /// \param[in] parent Parent window
/// ///
wxEAPConfigDialog(eap::config_provider_list &cfg, wxWindow* parent) : wxEAPConfigDialog(eap::config_connection &cfg, wxWindow* parent) :
m_cfg(cfg), m_cfg(cfg),
wxEAPConfigDialogBase(parent) wxEAPConfigDialogBase(parent)
{ {
@ -207,7 +207,7 @@ protected:
protected: protected:
eap::config_provider_list &m_cfg; ///< EAP providers configuration eap::config_connection &m_cfg; ///< Connection configuration
}; };

View File

@ -146,10 +146,10 @@ namespace eap
/// Constructs an EAP method /// Constructs an EAP method
/// ///
/// \param[in] mod EAP module to use for global services /// \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 /// \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 /// Moves an EAP method

View File

@ -125,7 +125,7 @@ void eap::method_tls::packet::clear()
// eap::method_tls // 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_cred(cred),
m_user_ctx(NULL), m_user_ctx(NULL),
#if EAP_TLS < EAP_TLS_SCHANNEL #if EAP_TLS < EAP_TLS_SCHANNEL

View File

@ -57,11 +57,11 @@ namespace eap
/// ///
/// Constructs an EAP method /// Constructs an EAP method
/// ///
/// \param[in] mod EAP module to use for global services /// \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 /// \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 /// Moves an EAP method

View File

@ -221,7 +221,7 @@ namespace eap
{} {}
public: public:
config_provider_list m_cfg; ///< Providers configuration config_connection m_cfg; ///< Connection configuration
credentials_ttls m_cred; ///< User credentials credentials_ttls m_cred; ///< User credentials
method_ttls m_method; ///< EAP-TTLS method method_ttls m_method; ///< EAP-TTLS method
}; };

View File

@ -28,7 +28,7 @@ using namespace winstd;
// eap::method_ttls // 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_cred(cred),
m_version(version_0), m_version(version_0),
method_tls(module, cfg, cred) method_tls(module, cfg, cred)

View File

@ -74,7 +74,7 @@ void eap::peer_ttls::get_identity(
assert(ppwszIdentity); assert(ppwszIdentity);
// Unpack configuration. // Unpack configuration.
config_provider_list cfg(*this); config_connection cfg(*this);
unpack(cfg, pConnectionData, dwConnectionDataSize); unpack(cfg, pConnectionData, dwConnectionDataSize);
if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty())
throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods."); throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods.");

View File

@ -48,7 +48,7 @@ void eap::peer_ttls_ui::config_xml2blob(
UNREFERENCED_PARAMETER(dwFlags); UNREFERENCED_PARAMETER(dwFlags);
// Load configuration from XML. // Load configuration from XML.
config_provider_list cfg(*this); config_connection cfg(*this);
cfg.load(pConfigRoot); cfg.load(pConfigRoot);
// Pack configuration. // Pack configuration.
@ -66,7 +66,7 @@ void eap::peer_ttls_ui::config_blob2xml(
UNREFERENCED_PARAMETER(dwFlags); UNREFERENCED_PARAMETER(dwFlags);
// Unpack configuration. // Unpack configuration.
config_provider_list cfg(*this); config_connection cfg(*this);
unpack(cfg, pConnectionData, dwConnectionDataSize); unpack(cfg, pConnectionData, dwConnectionDataSize);
// Save configuration to XML. // Save configuration to XML.
@ -82,7 +82,7 @@ void eap::peer_ttls_ui::invoke_config_ui(
_Inout_ DWORD *pdwConnectionDataOutSize) _Inout_ DWORD *pdwConnectionDataOutSize)
{ {
// Unpack configuration. // Unpack configuration.
config_provider_list cfg(*this); config_connection cfg(*this);
if (dwConnectionDataInSize) { if (dwConnectionDataInSize) {
// Load existing configuration. // Load existing configuration.
unpack(cfg, pConnectionDataIn, dwConnectionDataInSize); unpack(cfg, pConnectionDataIn, dwConnectionDataInSize);
@ -149,7 +149,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
assert(ppwszIdentity); assert(ppwszIdentity);
// Unpack configuration. // Unpack configuration.
config_provider_list cfg(*this); config_connection cfg(*this);
unpack(cfg, pConnectionData, dwConnectionDataSize); unpack(cfg, pConnectionData, dwConnectionDataSize);
if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty())
throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods."); throw invalid_argument(__FUNCTION__ " Configuration has no providers and/or methods.");