Make enums scoped

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-01-04 12:17:16 +01:00
parent 6db816cd60
commit 5a7827e85e
35 changed files with 254 additions and 254 deletions

View File

@@ -126,7 +126,7 @@ namespace eap
///
/// @copydoc eap::config_method::get_method_id()
/// \returns This implementation always returns `winstd::eap_type_tls`
/// \returns This implementation always returns `winstd::eap_type_t::tls`
///
virtual winstd::eap_type_t get_method_id() const;

View File

@@ -132,9 +132,9 @@ namespace eap
/// \param[in] pszTargetName The name in Windows Credential Manager to retrieve credentials from (optional, can be \c NULL)
///
/// \returns
/// - \c source_cache Credentials were obtained from EapHost cache
/// - \c source_config Credentials were set by method configuration
/// - \c source_storage Credentials were loaded from Windows Credential Manager
/// - \c source_t::cache Credentials were obtained from EapHost cache
/// - \c source_t::config Credentials were set by method configuration
/// - \c source_t::storage Credentials were loaded from Windows Credential Manager
///
virtual source_t combine(
_In_ DWORD dwFlags,

View File

@@ -256,7 +256,7 @@ void eap::config_method_tls::operator>>(_Inout_ cursor_in &cursor)
eap_type_t eap::config_method_tls::get_method_id() const
{
return eap_type_tls;
return eap_type_t::tls;
}

View File

@@ -310,16 +310,16 @@ eap::credentials::source_t eap::credentials_tls::combine(
if (cred_cached) {
// Using EAP service cached credentials.
*this = *dynamic_cast<const credentials_tls*>(cred_cached);
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_CACHED2, event_data((unsigned int)eap_type_tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_cache;
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_CACHED2, event_data((unsigned int)eap_type_t::tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_t::cache;
}
auto cfg_with_cred = dynamic_cast<const config_method_with_cred*>(&cfg);
if (cfg_with_cred && cfg_with_cred->m_use_cred) {
// Using configured credentials.
*this = *dynamic_cast<const credentials_tls*>(cfg_with_cred->m_cred.get());
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_CONFIG2, event_data((unsigned int)eap_type_tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_config;
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_CONFIG2, event_data((unsigned int)eap_type_t::tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_t::config;
}
if (pszTargetName) {
@@ -332,14 +332,14 @@ eap::credentials::source_t eap::credentials_tls::combine(
// Using stored credentials.
*this = std::move(cred_loaded);
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_STORED2, event_data((unsigned int)eap_type_tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_storage;
m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_STORED2, event_data((unsigned int)eap_type_t::tls), event_data(credentials_tls::get_name()), event_data(pszTargetName), event_data::blank);
return source_t::storage;
} catch (...) {
// Not actually an error.
}
}
return source_unknown;
return source_t::unknown;
}