diff --git a/mobile/library/cc/direct_response_testing.h b/mobile/library/cc/direct_response_testing.h index 510c0f2d862f..8c3b2e322669 100644 --- a/mobile/library/cc/direct_response_testing.h +++ b/mobile/library/cc/direct_response_testing.h @@ -9,7 +9,7 @@ namespace Envoy { namespace DirectResponseTesting { // The match operation to perform. -enum MatchMode { contains, exact, prefix, suffix }; +enum class MatchMode { Contains, Exact, Prefix, Suffix }; // A configuration for when a header should be matched. struct HeaderMatcher { diff --git a/mobile/library/cc/engine_builder.cc b/mobile/library/cc/engine_builder.cc index d87d2707a38a..e1cb75df7ddb 100644 --- a/mobile/library/cc/engine_builder.cc +++ b/mobile/library/cc/engine_builder.cc @@ -352,16 +352,16 @@ std::unique_ptr EngineBuilder::generate auto* direct_response_headers = direct_response_route_match->add_headers(); direct_response_headers->set_name(header.name); switch (header.mode) { - case DirectResponseTesting::contains: + case DirectResponseTesting::MatchMode::Contains: direct_response_headers->set_contains_match(header.value); break; - case DirectResponseTesting::exact: + case DirectResponseTesting::MatchMode::Exact: direct_response_headers->set_exact_match(header.value); break; - case DirectResponseTesting::prefix: + case DirectResponseTesting::MatchMode::Prefix: direct_response_headers->set_prefix_match(header.value); break; - case DirectResponseTesting::suffix: + case DirectResponseTesting::MatchMode::Suffix: direct_response_headers->set_suffix_match(header.value); break; } @@ -407,16 +407,16 @@ std::unique_ptr EngineBuilder::generate auto* direct_response_headers = direct_response_route_match->add_headers(); direct_response_headers->set_name(header.name); switch (header.mode) { - case DirectResponseTesting::contains: + case DirectResponseTesting::MatchMode::Contains: direct_response_headers->set_contains_match(header.value); break; - case DirectResponseTesting::exact: + case DirectResponseTesting::MatchMode::Exact: direct_response_headers->set_exact_match(header.value); break; - case DirectResponseTesting::prefix: + case DirectResponseTesting::MatchMode::Prefix: direct_response_headers->set_prefix_match(header.value); break; - case DirectResponseTesting::suffix: + case DirectResponseTesting::MatchMode::Suffix: direct_response_headers->set_suffix_match(header.value); break; } diff --git a/mobile/library/objective-c/EnvoyConfiguration.mm b/mobile/library/objective-c/EnvoyConfiguration.mm index c597baee8e98..f582bced7b76 100644 --- a/mobile/library/objective-c/EnvoyConfiguration.mm +++ b/mobile/library/objective-c/EnvoyConfiguration.mm @@ -18,16 +18,16 @@ @implementation EMOHeaderMatcher result.value = [self.value toCXXString]; switch (self.mode) { case EMOMatchModeContains: - result.mode = Envoy::DirectResponseTesting::contains; + result.mode = Envoy::DirectResponseTesting::MatchMode::Contains; break; case EMOMatchModeExact: - result.mode = Envoy::DirectResponseTesting::exact; + result.mode = Envoy::DirectResponseTesting::MatchMode::Exact; break; case EMOMatchModePrefix: - result.mode = Envoy::DirectResponseTesting::prefix; + result.mode = Envoy::DirectResponseTesting::MatchMode::Prefix; break; case EMOMatchModeSuffix: - result.mode = Envoy::DirectResponseTesting::suffix; + result.mode = Envoy::DirectResponseTesting::MatchMode::Suffix; break; } return result; diff --git a/mobile/library/swift/EnvoyCxxSwiftInterop/cxx_swift_interop.h b/mobile/library/swift/EnvoyCxxSwiftInterop/cxx_swift_interop.h index 6dadcd31c506..f83a3388e2f1 100644 --- a/mobile/library/swift/EnvoyCxxSwiftInterop/cxx_swift_interop.h +++ b/mobile/library/swift/EnvoyCxxSwiftInterop/cxx_swift_interop.h @@ -48,15 +48,6 @@ inline const LogLevel LogLevelError = LogLevel::err; inline const LogLevel LogLevelCritical = LogLevel::critical; inline const LogLevel LogLevelOff = LogLevel::off; -inline const DirectResponseTesting::MatchMode DirectResponseMatchModeContains = - DirectResponseTesting::contains; -inline const DirectResponseTesting::MatchMode DirectResponseMatchModeExact = - DirectResponseTesting::exact; -inline const DirectResponseTesting::MatchMode DirectResponseMatchModePrefix = - DirectResponseTesting::prefix; -inline const DirectResponseTesting::MatchMode DirectResponseMatchModeSuffix = - DirectResponseTesting::suffix; - // Smart pointers aren't currently supported by Swift / C++ interop, so we "erase" // it into a `BootstrapPtr` / `intptr_t`, which we can import from Swift. inline BootstrapPtr generateBootstrapPtr(Platform::EngineBuilder builder) {