Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions src/NetworkExtension/NEHotspotConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,58 @@ namespace NetworkExtension {

public partial class NEHotspotConfiguration {

/// <param name="ssid">To be added.</param>
/// <summary>To be added.</summary>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NEHotspotConfiguration" /> with the specified SSID.</summary>
/// <param name="ssid">The SSID the new <see cref="NEHotspotConfiguration" /> applies to.</param>
public NEHotspotConfiguration (string ssid)
: base (NSObjectFlag.Empty)
{
InitializeHandle (initWithSsid (ssid));
InitializeHandle (_InitWithSsid (ssid), "initWithSSID:");
}

/// <param name="ssid">To be added.</param>
/// <param name="passphrase">To be added.</param>
/// <param name="isWep">To be added.</param>
/// <summary>To be added.</summary>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NEHotspotConfiguration" /> with the specified SSID.</summary>
/// <param name="ssid">The SSID the new <see cref="NEHotspotConfiguration" /> applies to.</param>
/// <param name="passphrase">The passphrase for the network specified by <paramref name="ssid" />.</param>
/// <param name="isWep">Whether the network is a WEP network (otherwise a WPA or WPA2 network).</param>
public NEHotspotConfiguration (string ssid, string passphrase, bool isWep)
: base (NSObjectFlag.Empty)
{
InitializeHandle (initWithSsid (ssid, passphrase, isWep));
InitializeHandle (_InitWithSsidAndPassprase (ssid, passphrase, isWep), "initWithSSID:passphrase:isWEP:");
}

#if NET
/// <summary>Create a new <see cref="NEHotspotConfiguration" /> with the specified SSID.</summary>
/// <param name="ssid">The SSID the new <see cref="NEHotspotConfiguration" /> applies to.</param>
/// <param name="ssidIsPrefix">Whether <paramref name="ssid" /> specifies the prefix of an SSID, or a complete SSID.</param>
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[iOS (13, 0)]
#endif
public NEHotspotConfiguration (string ssid, bool ssidIsPrefix)
: base (NSObjectFlag.Empty)
{
var h = ssidIsPrefix ? initWithSsidPrefix (ssid) : initWithSsid (ssid);
InitializeHandle (h);
if (ssidIsPrefix) {
InitializeHandle (_InitWithSsidPrefix (ssid), "initWithSSIDPrefix:");
} else {
InitializeHandle (_InitWithSsid (ssid), "initWithSSID:");
}
}

#if NET
/// <summary>Create a new <see cref="NEHotspotConfiguration" /> with the specified SSID.</summary>
/// <param name="ssid">The SSID the new <see cref="NEHotspotConfiguration" /> applies to.</param>
/// <param name="passphrase">The passphrase for the network specified by <paramref name="ssid" />.</param>
/// <param name="isWep">Whether the network is a WEP network (otherwise a WPA or WPA2 network).</param>
/// <param name="ssidIsPrefix">Whether <paramref name="ssid" /> specifies the prefix of an SSID, or a complete SSID.</param>
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[iOS (13, 0)]
#endif
public NEHotspotConfiguration (string ssid, string passphrase, bool isWep, bool ssidIsPrefix)
: base (NSObjectFlag.Empty)
{
var h = ssidIsPrefix ? initWithSsidPrefix (ssid, passphrase, isWep) : initWithSsid (ssid, passphrase, isWep);
InitializeHandle (h);
if (ssidIsPrefix) {
InitializeHandle (_InitWithSsidPrefixAndPassphrase (ssid, passphrase, isWep), "initWithSSIDPrefix:passphrase:isWEP:");
} else {
InitializeHandle (_InitWithSsidAndPassprase (ssid, passphrase, isWep), "initWithSSID:passphrase:isWEP:");
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/networkextension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4299,11 +4299,11 @@ interface NEHotspotConfiguration : NSCopying, NSSecureCoding {

[Internal]
[Export ("initWithSSID:")]
IntPtr initWithSsid (string ssid);
IntPtr _InitWithSsid (string ssid);

[Internal]
[Export ("initWithSSID:passphrase:isWEP:")]
IntPtr initWithSsid (string ssid, string passphrase, bool isWep);
IntPtr _InitWithSsidAndPassprase (string ssid, string passphrase, bool isWep);

/// <param name="ssid">To be added.</param>
/// <param name="eapSettings">To be added.</param>
Expand All @@ -4323,13 +4323,13 @@ interface NEHotspotConfiguration : NSCopying, NSSecureCoding {
[iOS (13, 0)]
[MacCatalyst (13, 1)]
[Export ("initWithSSIDPrefix:")]
IntPtr initWithSsidPrefix (string ssidPrefix);
IntPtr _InitWithSsidPrefix (string ssidPrefix);

[Internal]
[iOS (13, 0)]
[MacCatalyst (13, 1)]
[Export ("initWithSSIDPrefix:passphrase:isWEP:")]
IntPtr initWithSsidPrefix (string ssidPrefix, string passphrase, bool isWep);
IntPtr _InitWithSsidPrefixAndPassphrase (string ssidPrefix, string passphrase, bool isWep);

[iOS (13, 0)]
[MacCatalyst (13, 1)]
Expand Down
4 changes: 0 additions & 4 deletions tests/cecil-tests/ConstructorTest.KnownFailures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ public partial class ConstructorTest {
"ModelIO.MDLMesh::.ctor(System.Numerics.Vector3,CoreGraphics.NVector3i,System.Boolean,ModelIO.MDLGeometryType,ModelIO.IMDLMeshBufferAllocator)",
"ModelIO.MDLMesh::.ctor(System.Numerics.Vector3,System.Boolean,ModelIO.MDLGeometryType,ModelIO.IMDLMeshBufferAllocator)",
"ModelIO.MDLNoiseTexture::.ctor(System.Single,System.String,CoreGraphics.NVector2i,ModelIO.MDLTextureChannelEncoding,ModelIO.MDLNoiseTextureType)",
"NetworkExtension.NEHotspotConfiguration::.ctor(System.String,System.Boolean)",
"NetworkExtension.NEHotspotConfiguration::.ctor(System.String,System.String,System.Boolean,System.Boolean)",
"NetworkExtension.NEHotspotConfiguration::.ctor(System.String,System.String,System.Boolean)",
"NetworkExtension.NEHotspotConfiguration::.ctor(System.String)",
"SpriteKit.SKUniform::.ctor(System.String,System.Numerics.Vector2)",
"SpriteKit.SKUniform::.ctor(System.String,System.Numerics.Vector3)",
"SpriteKit.SKUniform::.ctor(System.String,System.Numerics.Vector4)",
Expand Down
2 changes: 0 additions & 2 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14299,8 +14299,6 @@ M:NetworkExtension.NEFilterPacketProvider.DelayCurrentPacket(NetworkExtension.NE
M:NetworkExtension.NEFilterProvider.HandleReport(NetworkExtension.NEFilterReport)
M:NetworkExtension.NEFilterRule.#ctor(NetworkExtension.NENetworkRule,NetworkExtension.NEFilterAction)
M:NetworkExtension.NEFilterSettings.#ctor(NetworkExtension.NEFilterRule[],NetworkExtension.NEFilterAction)
M:NetworkExtension.NEHotspotConfiguration.#ctor(System.String,System.Boolean)
M:NetworkExtension.NEHotspotConfiguration.#ctor(System.String,System.String,System.Boolean,System.Boolean)
M:NetworkExtension.NEHotspotConfigurationManager.JoinAccessoryHotspot(AccessorySetupKit.ASAccessory,System.String,NetworkExtension.NEHotspotConfigurationManagerJoinHotspotCallback)
M:NetworkExtension.NEHotspotConfigurationManager.JoinAccessoryHotspotAsync(AccessorySetupKit.ASAccessory,System.String)
M:NetworkExtension.NEHotspotConfigurationManager.JoinAccessoryHotspotWithoutSecurit(AccessorySetupKit.ASAccessory,NetworkExtension.NEHotspotConfigurationManagerJoinHotspotCallback)
Expand Down
5 changes: 0 additions & 5 deletions tests/introspection/ApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1354,11 +1354,6 @@ protected virtual bool SkipInit (string selector, MethodBase m)
case "initWithUUID:identifier:":
case "initWithUUID:major:identifier:":
case "initWithUUID:major:minor:identifier:":
// NEHotspotConfiguration
case "initWithSSID:":
case "initWithSSID:passphrase:isWEP:":
case "initWithSSIDPrefix:":
case "initWithSSIDPrefix:passphrase:isWEP:":
var mi = m as MethodInfo;
return mi is not null && !mi.IsPublic && (mi.ReturnType.Name == "IntPtr" || mi.ReturnType.Name == "NativeHandle");
// NSAppleEventDescriptor
Expand Down