Class naming update

This commit is contained in:
Simon Rozman 2016-07-20 10:37:12 +02:00
parent 512f46f014
commit 434e042f8b
16 changed files with 121 additions and 121 deletions

View File

@ -33,12 +33,12 @@ namespace eap
template <class _Tcred> class config_method; template <class _Tcred> class config_method;
/// ///
/// Provider configuration /// Single provider configuration
/// ///
template <class _Tmeth> class config_provider; template <class _Tmeth> class config_provider;
/// ///
/// Providers configuration /// List of providers configuration
/// ///
template <class _Tprov> class config_providers; template <class _Tprov> class config_providers;
} }

View File

@ -25,7 +25,7 @@ namespace eap
/// ///
/// PAP configuration /// PAP configuration
/// ///
class config_pap; class config_method_pap;
} }
namespace eapserial namespace eapserial
@ -36,7 +36,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[in] val Configuration to pack /// \param[in] val Configuration to pack
/// ///
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_pap &val); inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_pap &val);
/// ///
/// Returns packed size of a PAP based method configuration /// Returns packed size of a PAP based method configuration
@ -45,7 +45,7 @@ namespace eapserial
/// ///
/// \returns Size of data when packed (in bytes) /// \returns Size of data when packed (in bytes)
/// ///
inline size_t get_pk_size(const eap::config_pap &val); inline size_t get_pk_size(const eap::config_method_pap &val);
/// ///
/// Unpacks a PAP based method configuration /// Unpacks a PAP based method configuration
@ -53,7 +53,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[out] val Configuration to unpack to /// \param[out] val Configuration to unpack to
/// ///
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_pap &val); inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_pap &val);
} }
#pragma once #pragma once
@ -68,7 +68,7 @@ namespace eapserial
namespace eap namespace eap
{ {
class config_pap : public config_method<credentials_pap> class config_method_pap : public config_method<credentials_pap>
{ {
public: public:
/// ///
@ -76,21 +76,21 @@ namespace eap
/// ///
/// \param[in] mod Reference of the EAP module to use for global services /// \param[in] mod Reference of the EAP module to use for global services
/// ///
config_pap(_In_ module &mod); config_method_pap(_In_ module &mod);
/// ///
/// Copies configuration /// Copies configuration
/// ///
/// \param[in] other Configuration to copy from /// \param[in] other Configuration to copy from
/// ///
config_pap(_In_ const config_pap &other); config_method_pap(_In_ const config_method_pap &other);
/// ///
/// Moves configuration /// Moves configuration
/// ///
/// \param[in] other Configuration to move from /// \param[in] other Configuration to move from
/// ///
config_pap(_Inout_ config_pap &&other); config_method_pap(_Inout_ config_method_pap &&other);
/// ///
/// Copies configuration /// Copies configuration
@ -99,7 +99,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_pap& operator=(_In_ const config_pap &other); config_method_pap& operator=(_In_ const config_method_pap &other);
/// ///
/// Moves configuration /// Moves configuration
@ -108,7 +108,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_pap& operator=(_Inout_ config_pap &&other); config_method_pap& operator=(_Inout_ config_method_pap &&other);
/// ///
/// Clones configuration /// Clones configuration
@ -129,19 +129,19 @@ namespace eap
namespace eapserial namespace eapserial
{ {
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_pap &val) inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_pap &val)
{ {
pack(cursor, (const eap::config_method<eap::credentials_pap>&)val); pack(cursor, (const eap::config_method<eap::credentials_pap>&)val);
} }
inline size_t get_pk_size(const eap::config_pap &val) inline size_t get_pk_size(const eap::config_method_pap &val)
{ {
return get_pk_size((const eap::config_method<eap::credentials_pap>&)val); return get_pk_size((const eap::config_method<eap::credentials_pap>&)val);
} }
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_pap &val) inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_pap &val)
{ {
unpack(cursor, (eap::config_method<eap::credentials_pap>&)val); unpack(cursor, (eap::config_method<eap::credentials_pap>&)val);
} }

View File

@ -22,27 +22,27 @@
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// eap::config_pap // eap::config_method_pap
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::config_pap::config_pap(_In_ module &mod) : config_method<credentials_pap>(mod) eap::config_method_pap::config_method_pap(_In_ module &mod) : config_method<credentials_pap>(mod)
{ {
} }
eap::config_pap::config_pap(_In_ const config_pap &other) : eap::config_method_pap::config_method_pap(_In_ const config_method_pap &other) :
config_method<credentials_pap>(other) config_method<credentials_pap>(other)
{ {
} }
eap::config_pap::config_pap(_Inout_ config_pap &&other) : eap::config_method_pap::config_method_pap(_Inout_ config_method_pap &&other) :
config_method<credentials_pap>(std::move(other)) config_method<credentials_pap>(std::move(other))
{ {
} }
eap::config_pap& eap::config_pap::operator=(_In_ const config_pap &other) eap::config_method_pap& eap::config_method_pap::operator=(_In_ const config_method_pap &other)
{ {
if (this != &other) if (this != &other)
(config_method<credentials_pap>&)*this = other; (config_method<credentials_pap>&)*this = other;
@ -51,7 +51,7 @@ eap::config_pap& eap::config_pap::operator=(_In_ const config_pap &other)
} }
eap::config_pap& eap::config_pap::operator=(_Inout_ config_pap &&other) eap::config_method_pap& eap::config_method_pap::operator=(_Inout_ config_method_pap &&other)
{ {
if (this != &other) if (this != &other)
(config_method<credentials_pap>&&)*this = std::move(other); (config_method<credentials_pap>&&)*this = std::move(other);
@ -60,13 +60,13 @@ eap::config_pap& eap::config_pap::operator=(_Inout_ config_pap &&other)
} }
eap::config* eap::config_pap::clone() const eap::config* eap::config_method_pap::clone() const
{ {
return new config_pap(*this); return new config_method_pap(*this);
} }
eap::type_t eap::config_pap::get_method_id() const eap::type_t eap::config_method_pap::get_method_id() const
{ {
return eap::type_pap; return eap::type_pap;
} }

View File

@ -41,7 +41,7 @@ template <class _Tprov> class wxPAPConfigPanel;
template <class _Tprov> template <class _Tprov>
class wxPAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_pap, wxPasswordCredentialsPanel<_Tprov> > class wxPAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_pap, wxPasswordCredentialsPanel<_Tprov> >
{ {
public: public:
/// ///
@ -52,8 +52,8 @@ public:
/// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name.
/// \param[in] parent Parent window /// \param[in] parent Parent window
/// ///
wxPAPCredentialsConfigPanel(_Tprov &prov, eap::config_pap &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : wxPAPCredentialsConfigPanel(_Tprov &prov, eap::config_method_pap &cfg, LPCTSTR pszCredTarget, wxWindow *parent) :
wxEAPCredentialsConfigPanel<_Tprov, eap::config_pap, wxPasswordCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_pap, wxPasswordCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent)
{ {
} }
}; };
@ -66,7 +66,7 @@ public:
/// ///
/// Constructs a configuration panel /// Constructs a configuration panel
/// ///
wxPAPConfigPanel(_Tprov &prov, eap::config_pap &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) wxPAPConfigPanel(_Tprov &prov, eap::config_method_pap &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent)
{ {
wxBoxSizer* sb_content; wxBoxSizer* sb_content;
sb_content = new wxBoxSizer( wxVERTICAL ); sb_content = new wxBoxSizer( wxVERTICAL );

View File

@ -30,7 +30,7 @@ namespace eap
/// ///
/// TLS configuration /// TLS configuration
/// ///
class config_tls; class config_method_tls;
/// ///
/// Helper function to compile human-readable certificate name for UI display /// Helper function to compile human-readable certificate name for UI display
@ -46,7 +46,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[in] val Configuration to pack /// \param[in] val Configuration to pack
/// ///
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_tls &val); inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_tls &val);
/// ///
/// Returns packed size of a TLS method configuration /// Returns packed size of a TLS method configuration
@ -55,7 +55,7 @@ namespace eapserial
/// ///
/// \returns Size of data when packed (in bytes) /// \returns Size of data when packed (in bytes)
/// ///
inline size_t get_pk_size(const eap::config_tls &val); inline size_t get_pk_size(const eap::config_method_tls &val);
/// ///
/// Unpacks a TLS method configuration /// Unpacks a TLS method configuration
@ -63,7 +63,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[out] val Configuration to unpack to /// \param[out] val Configuration to unpack to
/// ///
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_tls &val); inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_tls &val);
} }
#pragma once #pragma once
@ -82,7 +82,7 @@ namespace eapserial
namespace eap namespace eap
{ {
class config_tls : public config_method<credentials_tls> class config_method_tls : public config_method<credentials_tls>
{ {
public: public:
/// ///
@ -90,21 +90,21 @@ namespace eap
/// ///
/// \param[in] mod Reference of the EAP module to use for global services /// \param[in] mod Reference of the EAP module to use for global services
/// ///
config_tls(_In_ module &mod); config_method_tls(_In_ module &mod);
/// ///
/// Copies configuration /// Copies configuration
/// ///
/// \param[in] other Configuration to copy from /// \param[in] other Configuration to copy from
/// ///
config_tls(_In_ const config_tls &other); config_method_tls(_In_ const config_method_tls &other);
/// ///
/// Moves configuration /// Moves configuration
/// ///
/// \param[in] other Configuration to move from /// \param[in] other Configuration to move from
/// ///
config_tls(_Inout_ config_tls &&other); config_method_tls(_Inout_ config_method_tls &&other);
/// ///
/// Copies configuration /// Copies configuration
@ -113,7 +113,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_tls& operator=(_In_ const config_tls &other); config_method_tls& operator=(_In_ const config_method_tls &other);
/// ///
/// Moves configuration /// Moves configuration
@ -122,7 +122,7 @@ namespace eap
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_tls& operator=(_Inout_ config_tls &&other); config_method_tls& operator=(_Inout_ config_method_tls &&other);
/// ///
/// Clones configuration /// Clones configuration
@ -184,7 +184,7 @@ namespace eap
namespace eapserial namespace eapserial
{ {
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_tls &val) inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_tls &val)
{ {
pack(cursor, (const eap::config_method<eap::credentials_tls>&)val); pack(cursor, (const eap::config_method<eap::credentials_tls>&)val);
pack(cursor, val.m_trusted_root_ca); pack(cursor, val.m_trusted_root_ca);
@ -192,7 +192,7 @@ namespace eapserial
} }
inline size_t get_pk_size(const eap::config_tls &val) inline size_t get_pk_size(const eap::config_method_tls &val)
{ {
return return
get_pk_size((const eap::config_method<eap::credentials_tls>&)val) + get_pk_size((const eap::config_method<eap::credentials_tls>&)val) +
@ -201,7 +201,7 @@ namespace eapserial
} }
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_tls &val) inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_tls &val)
{ {
unpack(cursor, (eap::config_method<eap::credentials_tls>&)val); unpack(cursor, (eap::config_method<eap::credentials_tls>&)val);
unpack(cursor, val.m_trusted_root_ca); unpack(cursor, val.m_trusted_root_ca);

View File

@ -63,15 +63,15 @@ tstring eap::get_cert_title(PCCERT_CONTEXT cert)
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// eap::config_tls // eap::config_method_tls
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::config_tls::config_tls(_In_ module &mod) : config_method<credentials_tls>(mod) eap::config_method_tls::config_method_tls(_In_ module &mod) : config_method<credentials_tls>(mod)
{ {
} }
eap::config_tls::config_tls(_In_ const config_tls &other) : eap::config_method_tls::config_method_tls(_In_ const config_method_tls &other) :
m_trusted_root_ca(other.m_trusted_root_ca), m_trusted_root_ca(other.m_trusted_root_ca),
m_server_names(other.m_server_names), m_server_names(other.m_server_names),
config_method<credentials_tls>(other) config_method<credentials_tls>(other)
@ -79,7 +79,7 @@ eap::config_tls::config_tls(_In_ const config_tls &other) :
} }
eap::config_tls::config_tls(_Inout_ config_tls &&other) : eap::config_method_tls::config_method_tls(_Inout_ config_method_tls &&other) :
m_trusted_root_ca(std::move(other.m_trusted_root_ca)), m_trusted_root_ca(std::move(other.m_trusted_root_ca)),
m_server_names(std::move(other.m_server_names)), m_server_names(std::move(other.m_server_names)),
config_method<credentials_tls>(std::move(other)) config_method<credentials_tls>(std::move(other))
@ -87,7 +87,7 @@ eap::config_tls::config_tls(_Inout_ config_tls &&other) :
} }
eap::config_tls& eap::config_tls::operator=(_In_ const eap::config_tls &other) eap::config_method_tls& eap::config_method_tls::operator=(_In_ const eap::config_method_tls &other)
{ {
if (this != &other) { if (this != &other) {
(config_method<credentials_tls>&)*this = other; (config_method<credentials_tls>&)*this = other;
@ -99,7 +99,7 @@ eap::config_tls& eap::config_tls::operator=(_In_ const eap::config_tls &other)
} }
eap::config_tls& eap::config_tls::operator=(_Inout_ eap::config_tls &&other) eap::config_method_tls& eap::config_method_tls::operator=(_Inout_ eap::config_method_tls &&other)
{ {
if (this != &other) { if (this != &other) {
(config_method<credentials_tls>&&)*this = std::move(other); (config_method<credentials_tls>&&)*this = std::move(other);
@ -111,13 +111,13 @@ eap::config_tls& eap::config_tls::operator=(_Inout_ eap::config_tls &&other)
} }
eap::config* eap::config_tls::clone() const eap::config* eap::config_method_tls::clone() const
{ {
return new config_tls(*this); return new config_method_tls(*this);
} }
bool eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const bool eap::config_method_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
{ {
assert(pDoc); assert(pDoc);
assert(pConfigRoot); assert(pConfigRoot);
@ -178,7 +178,7 @@ bool eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfig
} }
bool eap::config_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) bool eap::config_method_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
{ {
assert(pConfigRoot); assert(pConfigRoot);
@ -256,13 +256,13 @@ bool eap::config_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEa
} }
eap::type_t eap::config_tls::get_method_id() const eap::type_t eap::config_method_tls::get_method_id() const
{ {
return eap::type_tls; return eap::type_tls;
} }
bool eap::config_tls::add_trusted_ca(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded) bool eap::config_method_tls::add_trusted_ca(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded)
{ {
cert_context cert; cert_context cert;
if (!cert.create(dwCertEncodingType, pbCertEncoded, cbCertEncoded)) { if (!cert.create(dwCertEncodingType, pbCertEncoded, cbCertEncoded)) {

View File

@ -351,7 +351,7 @@ public:
/// ///
/// Constructs a configuration panel /// Constructs a configuration panel
/// ///
wxEAPTLSServerTrustPanel(_Tprov &prov, eap::config_tls &cfg, wxWindow* parent) : wxEAPTLSServerTrustPanel(_Tprov &prov, eap::config_method_tls &cfg, wxWindow* parent) :
m_prov(prov), m_prov(prov),
m_cfg(cfg), m_cfg(cfg),
wxEAPTLSServerTrustConfigPanelBase(parent) wxEAPTLSServerTrustConfigPanelBase(parent)
@ -520,7 +520,7 @@ protected:
protected: protected:
_Tprov &m_prov; ///< EAP provider _Tprov &m_prov; ///< EAP provider
eap::config_tls &m_cfg; ///< TLS configuration eap::config_method_tls &m_cfg; ///< TLS configuration
winstd::library m_certmgr; ///< certmgr.dll resource library reference winstd::library m_certmgr; ///< certmgr.dll resource library reference
wxIcon m_icon; ///< Panel icon wxIcon m_icon; ///< Panel icon
std::list<std::string> m_server_names_val; ///< Acceptable authenticating server names std::list<std::string> m_server_names_val; ///< Acceptable authenticating server names
@ -528,7 +528,7 @@ protected:
template <class _Tprov> template <class _Tprov>
class wxEAPTLSCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_tls, wxEAPTLSCredentialsPanel<_Tprov> > class wxEAPTLSCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_tls, wxEAPTLSCredentialsPanel<_Tprov> >
{ {
public: public:
/// ///
@ -539,8 +539,8 @@ public:
/// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name.
/// \param[in] parent Parent window /// \param[in] parent Parent window
/// ///
wxEAPTLSCredentialsConfigPanel(_Tprov &prov, eap::config_tls &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : wxEAPTLSCredentialsConfigPanel(_Tprov &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow *parent) :
wxEAPCredentialsConfigPanel<_Tprov, eap::config_tls, wxEAPTLSCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_tls, wxEAPTLSCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent)
{ {
} }
}; };
@ -553,7 +553,7 @@ public:
/// ///
/// Constructs a configuration panel /// Constructs a configuration panel
/// ///
wxEAPTLSConfigPanel(_Tprov &prov, eap::config_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) wxEAPTLSConfigPanel(_Tprov &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent)
{ {
wxBoxSizer* sb_content; wxBoxSizer* sb_content;
sb_content = new wxBoxSizer( wxVERTICAL ); sb_content = new wxBoxSizer( wxVERTICAL );

View File

@ -25,7 +25,7 @@ namespace eap
/// ///
/// TTLS configuration /// TTLS configuration
/// ///
class config_ttls; class config_method_ttls;
} }
namespace eapserial namespace eapserial
@ -36,7 +36,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[in] val Configuration to pack /// \param[in] val Configuration to pack
/// ///
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_ttls &val); inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_ttls &val);
/// ///
/// Returns packed size of a TTLS based method configuration /// Returns packed size of a TTLS based method configuration
@ -45,7 +45,7 @@ namespace eapserial
/// ///
/// \returns Size of data when packed (in bytes) /// \returns Size of data when packed (in bytes)
/// ///
inline size_t get_pk_size(const eap::config_ttls &val); inline size_t get_pk_size(const eap::config_method_ttls &val);
/// ///
/// Unpacks a TTLS based method configuration /// Unpacks a TTLS based method configuration
@ -53,7 +53,7 @@ namespace eapserial
/// \param[inout] cursor Memory cursor /// \param[inout] cursor Memory cursor
/// \param[out] val Configuration to unpack to /// \param[out] val Configuration to unpack to
/// ///
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_ttls &val); inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_ttls &val);
} }
#pragma once #pragma once
@ -66,7 +66,7 @@ namespace eapserial
namespace eap { namespace eap {
class config_ttls : public config_tls class config_method_ttls : public config_method_tls
{ {
public: public:
/// ///
@ -74,26 +74,26 @@ namespace eap {
/// ///
/// \param[in] mod Reference of the EAP module to use for global services /// \param[in] mod Reference of the EAP module to use for global services
/// ///
config_ttls(_In_ module &mod); config_method_ttls(_In_ module &mod);
/// ///
/// Copies configuration /// Copies configuration
/// ///
/// \param[in] other Configuration to copy from /// \param[in] other Configuration to copy from
/// ///
config_ttls(const _In_ config_ttls &other); config_method_ttls(const _In_ config_method_ttls &other);
/// ///
/// Moves configuration /// Moves configuration
/// ///
/// \param[in] other Configuration to move from /// \param[in] other Configuration to move from
/// ///
config_ttls(_Inout_ config_ttls &&other); config_method_ttls(_Inout_ config_method_ttls &&other);
/// ///
/// Destructs configuration /// Destructs configuration
/// ///
virtual ~config_ttls(); virtual ~config_method_ttls();
/// ///
/// Copies configuration /// Copies configuration
@ -102,7 +102,7 @@ namespace eap {
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_ttls& operator=(const _In_ config_ttls &other); config_method_ttls& operator=(const _In_ config_method_ttls &other);
/// ///
/// Moves configuration /// Moves configuration
@ -111,7 +111,7 @@ namespace eap {
/// ///
/// \returns Reference to this object /// \returns Reference to this object
/// ///
config_ttls& operator=(_Inout_ config_ttls &&other); config_method_ttls& operator=(_Inout_ config_method_ttls &&other);
/// ///
/// Clones configuration /// Clones configuration
@ -165,13 +165,13 @@ namespace eap {
namespace eapserial namespace eapserial
{ {
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_ttls &val) inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_ttls &val)
{ {
pack(cursor, (const eap::config_tls&)val); pack(cursor, (const eap::config_method_tls&)val);
if (val.m_inner) { if (val.m_inner) {
if (dynamic_cast<eap::config_pap*>(val.m_inner)) { if (dynamic_cast<eap::config_method_pap*>(val.m_inner)) {
pack(cursor, eap::type_pap); pack(cursor, eap::type_pap);
pack(cursor, (const eap::config_pap&)*val.m_inner); pack(cursor, (const eap::config_method_pap&)*val.m_inner);
} else { } else {
assert(0); // Unsupported inner authentication method type. assert(0); // Unsupported inner authentication method type.
pack(cursor, eap::type_undefined); pack(cursor, eap::type_undefined);
@ -181,14 +181,14 @@ namespace eapserial
} }
inline size_t get_pk_size(const eap::config_ttls &val) inline size_t get_pk_size(const eap::config_method_ttls &val)
{ {
size_t size_inner; size_t size_inner;
if (val.m_inner) { if (val.m_inner) {
if (dynamic_cast<eap::config_pap*>(val.m_inner)) { if (dynamic_cast<eap::config_method_pap*>(val.m_inner)) {
size_inner = size_inner =
get_pk_size(eap::type_pap) + get_pk_size(eap::type_pap) +
get_pk_size((const eap::config_pap&)*val.m_inner); get_pk_size((const eap::config_method_pap&)*val.m_inner);
} else { } else {
size_inner = get_pk_size(eap::type_undefined); size_inner = get_pk_size(eap::type_undefined);
assert(0); // Unsupported inner authentication method type. assert(0); // Unsupported inner authentication method type.
@ -197,14 +197,14 @@ namespace eapserial
size_inner = get_pk_size(eap::type_undefined); size_inner = get_pk_size(eap::type_undefined);
return return
get_pk_size((const eap::config_tls&)val) + get_pk_size((const eap::config_method_tls&)val) +
size_inner; size_inner;
} }
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_ttls &val) inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_ttls &val)
{ {
unpack(cursor, (eap::config_tls&)val); unpack(cursor, (eap::config_method_tls&)val);
if (val.m_inner) if (val.m_inner)
delete val.m_inner; delete val.m_inner;
@ -213,8 +213,8 @@ namespace eapserial
unpack(cursor, eap_type); unpack(cursor, eap_type);
switch (eap_type) { switch (eap_type) {
case eap::type_pap: case eap::type_pap:
val.m_inner = new eap::config_pap(val.m_module); val.m_inner = new eap::config_method_pap(val.m_module);
unpack(cursor, (eap::config_pap&)*val.m_inner); unpack(cursor, (eap::config_method_pap&)*val.m_inner);
break; break;
default: default:
val.m_inner = NULL; val.m_inner = NULL;

View File

@ -35,7 +35,7 @@ namespace eap
namespace eap namespace eap
{ {
class peer_ttls : public peer<config_ttls, credentials_ttls, bool, bool> class peer_ttls : public peer<config_method_ttls, credentials_ttls, bool, bool>
{ {
public: public:
/// ///

View File

@ -33,7 +33,7 @@ namespace eap
namespace eap namespace eap
{ {
class session_ttls : public session<config_ttls, credentials_ttls, bool, bool> class session_ttls : public session<config_method_ttls, credentials_ttls, bool, bool>
{ {
public: public:
/// ///

View File

@ -25,42 +25,42 @@ using namespace winstd;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// eap::config_ttls // eap::config_method_ttls
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::config_ttls::config_ttls(_In_ module &mod) : eap::config_method_ttls::config_method_ttls(_In_ module &mod) :
m_inner(NULL), m_inner(NULL),
config_tls(mod) config_method_tls(mod)
{ {
} }
eap::config_ttls::config_ttls(const _In_ config_ttls &other) : eap::config_method_ttls::config_method_ttls(const _In_ config_method_ttls &other) :
m_inner(other.m_inner ? (config_method*)other.m_inner->clone() : NULL), m_inner(other.m_inner ? (config_method*)other.m_inner->clone() : NULL),
config_tls(other) config_method_tls(other)
{ {
} }
eap::config_ttls::config_ttls(_Inout_ config_ttls &&other) : eap::config_method_ttls::config_method_ttls(_Inout_ config_method_ttls &&other) :
m_inner(other.m_inner), m_inner(other.m_inner),
config_tls(std::move(other)) config_method_tls(std::move(other))
{ {
other.m_inner = NULL; other.m_inner = NULL;
} }
eap::config_ttls::~config_ttls() eap::config_method_ttls::~config_method_ttls()
{ {
if (m_inner) if (m_inner)
delete m_inner; delete m_inner;
} }
eap::config_ttls& eap::config_ttls::operator=(const _In_ config_ttls &other) eap::config_method_ttls& eap::config_method_ttls::operator=(const _In_ config_method_ttls &other)
{ {
if (this != &other) { if (this != &other) {
(config_tls&)*this = other; (config_method_tls&)*this = other;
if (m_inner) delete m_inner; if (m_inner) delete m_inner;
m_inner = other.m_inner ? (config_method*)other.m_inner->clone() : NULL; m_inner = other.m_inner ? (config_method*)other.m_inner->clone() : NULL;
} }
@ -69,10 +69,10 @@ eap::config_ttls& eap::config_ttls::operator=(const _In_ config_ttls &other)
} }
eap::config_ttls& eap::config_ttls::operator=(_Inout_ config_ttls &&other) eap::config_method_ttls& eap::config_method_ttls::operator=(_Inout_ config_method_ttls &&other)
{ {
if (this != &other) { if (this != &other) {
(config_tls&&)*this = std::move(other); (config_method_tls&&)*this = std::move(other);
if (m_inner) delete m_inner; if (m_inner) delete m_inner;
m_inner = other.m_inner; m_inner = other.m_inner;
other.m_inner = NULL; other.m_inner = NULL;
@ -82,19 +82,19 @@ eap::config_ttls& eap::config_ttls::operator=(_Inout_ config_ttls &&other)
} }
eap::config* eap::config_ttls::clone() const eap::config* eap::config_method_ttls::clone() const
{ {
return new config_ttls(*this); return new config_method_ttls(*this);
} }
bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const bool eap::config_method_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
{ {
assert(pDoc); assert(pDoc);
assert(pConfigRoot); assert(pConfigRoot);
assert(ppEapError); assert(ppEapError);
if (!config_tls::save(pDoc, pConfigRoot, ppEapError)) if (!config_method_tls::save(pDoc, pConfigRoot, ppEapError))
return false; return false;
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata"); const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
@ -107,7 +107,7 @@ bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfi
return false; return false;
} }
if (dynamic_cast<const config_pap*>(m_inner)) { if (dynamic_cast<const config_method_pap*>(m_inner)) {
// <InnerAuthenticationMethod>/<NonEAPAuthMethod> // <InnerAuthenticationMethod>/<NonEAPAuthMethod>
if ((dwResult = eapxml::put_element_value(pDoc, pXmlElInnerAuthenticationMethod, bstr(L"NonEAPAuthMethod"), bstrNamespace, bstr(L"PAP"))) != ERROR_SUCCESS) { if ((dwResult = eapxml::put_element_value(pDoc, pXmlElInnerAuthenticationMethod, bstr(L"NonEAPAuthMethod"), bstrNamespace, bstr(L"PAP"))) != ERROR_SUCCESS) {
*ppEapError = m_module.make_error(dwResult, _T(__FUNCTION__) _T(" Error creating <NonEAPAuthMethod> element.")); *ppEapError = m_module.make_error(dwResult, _T(__FUNCTION__) _T(" Error creating <NonEAPAuthMethod> element."));
@ -126,13 +126,13 @@ bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfi
} }
bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) bool eap::config_method_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
{ {
assert(pConfigRoot); assert(pConfigRoot);
assert(ppEapError); assert(ppEapError);
DWORD dwResult; DWORD dwResult;
if (!config_tls::load(pConfigRoot, ppEapError)) if (!config_method_tls::load(pConfigRoot, ppEapError))
return false; return false;
std::wstring xpath(eapxml::get_xpath(pConfigRoot)); std::wstring xpath(eapxml::get_xpath(pConfigRoot));
@ -159,7 +159,7 @@ bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppE
// PAP // PAP
m_module.log_config((xpath + L"/NonEAPAuthMethod").c_str(), L"PAP"); m_module.log_config((xpath + L"/NonEAPAuthMethod").c_str(), L"PAP");
assert(!m_inner); assert(!m_inner);
m_inner = new eap::config_pap(m_module); m_inner = new eap::config_method_pap(m_module);
if (!m_inner->load(pXmlElInnerAuthenticationMethod, ppEapError)) if (!m_inner->load(pXmlElInnerAuthenticationMethod, ppEapError))
return false; return false;
} else { } else {
@ -171,7 +171,7 @@ bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppE
} }
eap::type_t eap::config_ttls::get_method_id() const eap::type_t eap::config_method_ttls::get_method_id() const
{ {
return eap::type_ttls; return eap::type_ttls;
} }

View File

@ -28,7 +28,7 @@ using namespace winstd;
// eap::peer_ttls // eap::peer_ttls
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::peer_ttls::peer_ttls() : peer<config_ttls, credentials_ttls, bool, bool>(type_ttls) eap::peer_ttls::peer_ttls() : peer<config_method_ttls, credentials_ttls, bool, bool>(type_ttls)
{ {
} }

View File

@ -28,19 +28,19 @@ using namespace winstd;
// eap::session_ttls // eap::session_ttls
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::session_ttls::session_ttls(_In_ module &mod) : session<config_ttls, credentials_ttls, bool, bool>(mod) eap::session_ttls::session_ttls(_In_ module &mod) : session<config_method_ttls, credentials_ttls, bool, bool>(mod)
{ {
} }
eap::session_ttls::session_ttls(_In_ const session_ttls &other) : eap::session_ttls::session_ttls(_In_ const session_ttls &other) :
session<config_ttls, credentials_ttls, bool, bool>(other) session<config_method_ttls, credentials_ttls, bool, bool>(other)
{ {
} }
eap::session_ttls::session_ttls(_Inout_ session_ttls &&other) : eap::session_ttls::session_ttls(_Inout_ session_ttls &&other) :
session<config_ttls, credentials_ttls, bool, bool>(std::move(other)) session<config_method_ttls, credentials_ttls, bool, bool>(std::move(other))
{ {
} }
@ -48,7 +48,7 @@ eap::session_ttls::session_ttls(_Inout_ session_ttls &&other) :
eap::session_ttls& eap::session_ttls::operator=(_In_ const session_ttls &other) eap::session_ttls& eap::session_ttls::operator=(_In_ const session_ttls &other)
{ {
if (this != &other) if (this != &other)
(session<config_ttls, credentials_ttls, bool, bool>&)*this = other; (session<config_method_ttls, credentials_ttls, bool, bool>&)*this = other;
return *this; return *this;
} }
@ -57,7 +57,7 @@ eap::session_ttls& eap::session_ttls::operator=(_In_ const session_ttls &other)
eap::session_ttls& eap::session_ttls::operator=(_Inout_ session_ttls &&other) eap::session_ttls& eap::session_ttls::operator=(_Inout_ session_ttls &&other)
{ {
if (this != &other) if (this != &other)
(session<config_ttls, credentials_ttls, bool, bool>&)*this = std::move(other); (session<config_method_ttls, credentials_ttls, bool, bool>&)*this = std::move(other);
return *this; return *this;
} }

View File

@ -35,7 +35,7 @@ namespace eap
namespace eap namespace eap
{ {
class peer_ttls_ui : public peer_ui<eap::config_ttls, eap::credentials_ttls, bool, bool> class peer_ttls_ui : public peer_ui<eap::config_method_ttls, eap::credentials_ttls, bool, bool>
{ {
public: public:
/// ///

View File

@ -53,7 +53,7 @@ public:
/// ///
/// Constructs a configuration panel /// Constructs a configuration panel
/// ///
wxEAPTTLSConfigPanel(_Tprov &prov, eap::config_ttls &cfg, wxWindow* parent) : wxEAPTTLSConfigPanel(_Tprov &prov, eap::config_method_ttls &cfg, wxWindow* parent) :
m_prov(prov), m_prov(prov),
m_cfg(cfg), m_cfg(cfg),
wxEAPTTLSConfigPanelBase(parent) wxEAPTTLSConfigPanelBase(parent)
@ -122,7 +122,7 @@ protected:
protected: protected:
_Tprov &m_prov; ///< EAP provider _Tprov &m_prov; ///< EAP provider
eap::config_ttls &m_cfg; ///< TTLS configuration eap::config_method_ttls &m_cfg; ///< TTLS configuration
winstd::library m_shell32; ///< shell32.dll resource library reference winstd::library m_shell32; ///< shell32.dll resource library reference
wxIcon m_icon; ///< Panel icon wxIcon m_icon; ///< Panel icon
}; };
@ -139,7 +139,7 @@ public:
/// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name.
/// \param[in] parent Parent window /// \param[in] parent Parent window
/// ///
wxEAPTTLSConfig(_Tprov &prov, eap::config_ttls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxEAPTTLSConfig(_Tprov &prov, eap::config_method_ttls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) :
m_prov(prov), m_prov(prov),
m_cfg(cfg), m_cfg(cfg),
m_cfg_pap(cfg.m_module), m_cfg_pap(cfg.m_module),
@ -213,7 +213,7 @@ protected:
m_inner_type->GetChoiceCtrl()->Enable(false); m_inner_type->GetChoiceCtrl()->Enable(false);
} }
eap::config_pap *cfg_pap = dynamic_cast<eap::config_pap*>(m_cfg.m_inner); eap::config_method_pap *cfg_pap = dynamic_cast<eap::config_method_pap*>(m_cfg.m_inner);
if (cfg_pap) { if (cfg_pap) {
m_cfg_pap = *cfg_pap; m_cfg_pap = *cfg_pap;
m_inner_type->SetSelection(0); // 0=PAP m_inner_type->SetSelection(0); // 0=PAP
@ -235,7 +235,7 @@ protected:
switch (m_inner_type->GetSelection()) { switch (m_inner_type->GetSelection()) {
case 0: // 0=PAP case 0: // 0=PAP
delete m_cfg.m_inner; delete m_cfg.m_inner;
m_cfg.m_inner = new eap::config_pap(m_cfg_pap); m_cfg.m_inner = new eap::config_method_pap(m_cfg_pap);
break; break;
default: default:
@ -263,12 +263,12 @@ protected:
protected: protected:
_Tprov &m_prov; ///< EAP provider _Tprov &m_prov; ///< EAP provider
eap::config_ttls &m_cfg; ///< TTLS configuration eap::config_method_ttls &m_cfg; ///< TTLS configuration
wxStaticText *m_outer_title; ///< Outer authentication title wxStaticText *m_outer_title; ///< Outer authentication title
wxEAPTTLSConfigPanel<_Tprov> *m_outer_identity; ///< Outer identity configuration panel wxEAPTTLSConfigPanel<_Tprov> *m_outer_identity; ///< Outer identity configuration panel
wxEAPTLSConfigPanel<_Tprov> *m_tls; ///< TLS configuration panel wxEAPTLSConfigPanel<_Tprov> *m_tls; ///< TLS configuration panel
wxStaticText *m_inner_title; ///< Inner authentication title wxStaticText *m_inner_title; ///< Inner authentication title
wxChoicebook *m_inner_type; ///< Inner authentication type wxChoicebook *m_inner_type; ///< Inner authentication type
eap::config_pap m_cfg_pap; ///< Temporary PAP configuration eap::config_method_pap m_cfg_pap; ///< Temporary PAP configuration
}; };

View File

@ -25,7 +25,7 @@
// eap::peer_ttls_ui // eap::peer_ttls_ui
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::peer_ttls_ui::peer_ttls_ui() : peer_ui<eap::config_ttls, eap::credentials_ttls, bool, bool>(type_ttls) eap::peer_ttls_ui::peer_ttls_ui() : peer_ui<eap::config_method_ttls, eap::credentials_ttls, bool, bool>(type_ttls)
{ {
} }
@ -50,7 +50,7 @@ bool eap::peer_ttls_ui::invoke_config_ui(
wxTopLevelWindows.Append(&parent); wxTopLevelWindows.Append(&parent);
// Create and launch configuration dialog. // Create and launch configuration dialog.
wxEAPConfigDialog<config_ttls, wxEAPTTLSConfig<provider_config_type> > dlg(cfg, &parent); wxEAPConfigDialog<config_method_ttls, wxEAPTTLSConfig<provider_config_type> > dlg(cfg, &parent);
result = dlg.ShowModal(); result = dlg.ShowModal();
wxTopLevelWindows.DeleteObject(&parent); wxTopLevelWindows.DeleteObject(&parent);