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;
///
/// 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

View File

@ -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
};
}

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));
}
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);

View File

@ -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)

View File

@ -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
};

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
};

View File

@ -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)

View File

@ -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.");

View File

@ -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.");