Skip to content

Commit e6a5d9b

Browse files
author
Juhi Shah
committed
Revert the changes and rename the API
1 parent a91ea8f commit e6a5d9b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

specs/WebRtcPortConfiguration.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ Usage steps:
2929
# Examples
3030
### C++ Configure UDP Port Range
3131
```cpp
32-
Microsoft::WRL::ComPtr<ICoreWebView2StagingEnvironmentOptions10> optionsStaging10;
33-
if (options.As(&optionsStaging10) == S_OK)
32+
Microsoft::WRL::ComPtr<ICoreWebView2EnvironmentOptions10> options10;
33+
if (options.As(&options10) == S_OK)
3434
{
3535
// Configure port ranges for UDP traffic to work within enterprise firewalls
3636
// Set UDP port range (example: 50000-55000 for enterprise environments)
3737
const INT32 udpMin = 50000, udpMax = 55000;
3838

39-
CHECK_FAILURE(optionsStaging10->SetAllowedPortRange(
39+
CHECK_FAILURE(options10->SetAllowedPortRange(
4040
COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT,
4141
COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, udpMin, udpMax));
4242

4343
// Get the configured port range
44-
CHECK_FAILURE(optionsStaging10->GetEffectiveAllowedPortRange(
44+
CHECK_FAILURE(options10->GetEffectiveAllowedPortRange(
4545
COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT,
4646
COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, &m_udpPortRange.minPort,
4747
&m_udpPortRange.maxPort));
@@ -57,19 +57,19 @@ HRESULT hr = CreateCoreWebView2EnvironmentWithOptions(
5757
### C# Configure UDP Port Range
5858
```csharp
5959
var options = CoreWebView2Environment.CreateCoreWebView2EnvironmentOptions();
60-
var optionsStaging10 = options as ICoreWebView2StagingEnvironmentOptions10;
61-
if (optionsStaging10 != null)
60+
var options10 = options as ICoreWebView2EnvironmentOptions10;
61+
if (options10 != null)
6262
{
6363
// Configure port ranges for UDP traffic to work within enterprise firewalls
6464
// Set UDP port range (example: 50000-55000 for enterprise environments)
6565
const int udpMin = 50000, udpMax = 55000;
6666

67-
optionsStaging10.SetAllowedPortRange(
67+
options10.SetAllowedPortRange(
6868
COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT,
6969
COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, udpMin, udpMax);
7070

7171
// Get the configured port range
72-
optionsStaging10.GetEffectiveAllowedPortRange(
72+
options10.GetEffectiveAllowedPortRange(
7373
COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT,
7474
COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, out m_udpPortRange.minPort,
7575
out m_udpPortRange.maxPort);
@@ -133,7 +133,7 @@ typedef enum COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND {
133133
134134
/// Additional options used to create WebView2 Environment to manage port range configuration.
135135
[uuid(2c0f597d-2958-5a94-82f9-c750cf86cb88), object, pointer_default(unique)]
136-
interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
136+
interface ICoreWebView2EnvironmentOptions10 : IUnknown {
137137
/// Sets the allowed port range restriction for the specified
138138
/// scope and transport protocol.
139139
///
@@ -227,9 +227,9 @@ namespace Microsoft.Web.WebView2.Core
227227

228228
runtimeclass CoreWebView2EnvironmentOptions
229229
{
230-
[interface_name("Microsoft.Web.WebView2.Core.ICoreWebView2StagingEnvironmentOptions10")]
230+
[interface_name("Microsoft.Web.WebView2.Core.ICoreWebView2EnvironmentOptions10")]
231231
{
232-
// ICoreWebView2StagingEnvironmentOptions10 members
232+
// ICoreWebView2EnvironmentOptions10 members
233233
void SetAllowedPortRange(CoreWebview2AllowedPortRangeScope scope, CoreWebView2TransportProtocolKind protocol, Int32 minPort, Int32 maxPort);
234234
void GetEffectiveAllowedPortRange(CoreWebview2AllowedPortRangeScope scope, CoreWebView2TransportProtocolKind protocol, out Int32 minPort, out Int32 maxPort);
235235
}

0 commit comments

Comments
 (0)