NetworkOperatorTetheringManager
NetworkOperatorTetheringManager
NetworkOperatorTetheringManager
NetworkOperatorTetheringManager
Class
Definition
This interface exposes the methods and properties used to control and configure tethering capabilities for a specific network account.
public : sealed class NetworkOperatorTetheringManager : INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManagerpublic sealed class NetworkOperatorTetheringManager : INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManagerPublic NotInheritable Class NetworkOperatorTetheringManager Implements INetworkOperatorTetheringClientManager, INetworkOperatorTetheringManager// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
ClientCount ClientCount ClientCount ClientCount
Gets the current number of connected clients on the tethering network.
public : unsigned int ClientCount { get; }public uint ClientCount { get; }Public ReadOnly Property ClientCount As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The current number of clients.
MaxClientCount MaxClientCount MaxClientCount MaxClientCount
Gets the maximum number of client connections over a tethered network.
public : unsigned int MaxClientCount { get; }public uint MaxClientCount { get; }Public ReadOnly Property MaxClientCount As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The maximum number of client connections
TetheringOperationalState TetheringOperationalState TetheringOperationalState TetheringOperationalState
Gets the current operational state of the tethering feature. Possible values are defined by TetheringOperationalState
public : TetheringOperationalState TetheringOperationalState { get; }public TetheringOperationalState TetheringOperationalState { get; }Public ReadOnly Property TetheringOperationalState As TetheringOperationalState// You can use this property in JavaScript.
- Value
- TetheringOperationalState TetheringOperationalState TetheringOperationalState TetheringOperationalState
The current operational state.
Methods
ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration) ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration)
Use this method to provide tethering network configuration details for the tethering network.
public : IAsyncAction ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration configuration)public IAsyncAction ConfigureAccessPointAsync(NetworkOperatorTetheringAccessPointConfiguration configuration)Public Function ConfigureAccessPointAsync(configuration As NetworkOperatorTetheringAccessPointConfiguration) As IAsyncAction// You can use this method in JavaScript.
- configuration
- NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration NetworkOperatorTetheringAccessPointConfiguration
Provides a network account ID (SSID) and specifies the passphrase used for authentication when establishing a tethered network connection.
The asynchronous action.
CreateFromConnectionProfile(ConnectionProfile) CreateFromConnectionProfile(ConnectionProfile) CreateFromConnectionProfile(ConnectionProfile) CreateFromConnectionProfile(ConnectionProfile)
Creates a NetworkOperatorTetheringManager using the given profile as the public interface and Wi-Fi as the private interface.
public : static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile)public static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile)Public Static Function CreateFromConnectionProfile(profile As ConnectionProfile) As NetworkOperatorTetheringManager// You can use this method in JavaScript.
Connection profile to be used.
The resulting manager object.
Remarks
In previous releases, only privileged apps from network operators could create a NetworkOperatorTetheringManager object and use it to control tethering. In this release, any app can create the object by calling CreateFromConnectionProfile. In order for the call to succeed, however, the app must have the appropriate Wi-Fi control device capability declared in its manifest. The following example shows part of a manifest with the necessary DeviceCapability tag, with the wiFiControl attribute.
<Capabilities>
<DeviceCapability Name="wiFiControl"/>
</Capabilities>
If the wiFiControl device capability is not set in the manifest, then calls to CreateFromConnectionProfile fail by throwing an exception.
Your code can determine whether the capability is set at runtime by calling GetTetheringCapabilityFromConnectionProfile. If DisabledBySystemCapability is returned, then the manifest does not set the required device capability. Note that even if Enabled is returned, your code should be written to handle errors and exceptions, since tethering capability can change at any time, outside your app's control or notice.
- See Also
CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter) CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter) CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter) CreateFromConnectionProfile(ConnectionProfile, NetworkAdapter)
Creates a NetworkOperatorTetheringManager using the given profile as the public interface, and on the given NetworkAdapter as the private interface.
public : static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile, NetworkAdapter adapter)public static NetworkOperatorTetheringManager CreateFromConnectionProfile(ConnectionProfile profile, NetworkAdapter adapter)Public Static Function CreateFromConnectionProfile(profile As ConnectionProfile, adapter As NetworkAdapter) As NetworkOperatorTetheringManager// You can use this method in JavaScript.
Connection profile to be used.
The network adapter where the connection is shared. The shared connection will be controlled by the NetworkOperatorTetheringManager.
The resulting manager object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Remarks
In previous releases, only privileged apps from network operators could create a NetworkOperatorTetheringManager object and use it to control tethering. In this release, any app can create the object by calling CreateFromConnectionProfile. In order for the call to succeed, however, the app must have the appropriate Wi-Fi control device capability declared in its manifest. The following example shows part of a manifest with the necessary DeviceCapability tag, with the wiFiControl attribute.
<Capabilities>
<DeviceCapability Name="wiFiControl"/>
</Capabilities>
If the wiFiControl device capability is not set in the manifest, then calls to CreateFromConnectionProfile fail by throwing an exception.
Your code can determine whether the capability is set at runtime by calling GetTetheringCapabilityFromConnectionProfile. If DisabledBySystemCapability is returned, then the manifest does not set the required device capability. Note that even if Enabled is returned, your code should be written to handle errors and exceptions, since tethering capability can change at any time, outside your app's control or notice.
- See Also
CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String)
Creates an instance of NetworkOperatorTetheringManager for a specific network account using the provided network account ID for the mobile broadband device.
public : static NetworkOperatorTetheringManager CreateFromNetworkAccountId(PlatForm::String networkAccountId)public static NetworkOperatorTetheringManager CreateFromNetworkAccountId(String networkAccountId)Public Static Function CreateFromNetworkAccountId(networkAccountId As String) As NetworkOperatorTetheringManager// You can use this method in JavaScript.
- networkAccountId
- PlatForm::String String String String
The network account ID.
A NetworkOperatorTetheringManager object.
Remarks
Always call GetTetheringCapability prior to the creation of the tethering network using CreateFromNetworkAccountId to first confirm that the system is capable of creating a tethering network.
GetCurrentAccessPointConfiguration() GetCurrentAccessPointConfiguration() GetCurrentAccessPointConfiguration() GetCurrentAccessPointConfiguration()
Gets the current access point configuration for a network account as defined by a NetworkOperatorTetheringAccessPointConfiguration object.
public : NetworkOperatorTetheringAccessPointConfiguration GetCurrentAccessPointConfiguration()public NetworkOperatorTetheringAccessPointConfiguration GetCurrentAccessPointConfiguration()Public Function GetCurrentAccessPointConfiguration() As NetworkOperatorTetheringAccessPointConfiguration// You can use this method in JavaScript.
Indicates the network account id and specifies the pass-phrase used for authentication when establishing a connection over the tethering network.
GetTetheringCapability(String) GetTetheringCapability(String) GetTetheringCapability(String) GetTetheringCapability(String)
Indicates if a device is capable of creating a tethering network. Possible values are defined by TetheringCapability.
public : static TetheringCapability GetTetheringCapability(PlatForm::String networkAccountId)public static TetheringCapability GetTetheringCapability(String networkAccountId)Public Static Function GetTetheringCapability(networkAccountId As String) As TetheringCapability// You can use this method in JavaScript.
- networkAccountId
- PlatForm::String String String String
The network account ID.
The tethering capabilities of a network account.
Remarks
Always call GetTetheringCapability prior to the creation of the tethering network using CreateFromNetworkAccountId to first confirm that the system is capable of creating a tethering network.
GetTetheringCapabilityFromConnectionProfile(ConnectionProfile) GetTetheringCapabilityFromConnectionProfile(ConnectionProfile) GetTetheringCapabilityFromConnectionProfile(ConnectionProfile) GetTetheringCapabilityFromConnectionProfile(ConnectionProfile)
Gets tethering capabilities, based on the given connection profile.
public : static TetheringCapability GetTetheringCapabilityFromConnectionProfile(ConnectionProfile profile)public static TetheringCapability GetTetheringCapabilityFromConnectionProfile(ConnectionProfile profile)Public Static Function GetTetheringCapabilityFromConnectionProfile(profile As ConnectionProfile) As TetheringCapability// You can use this method in JavaScript.
Connection profile to be checked.
Tethering capabilities of the connection profile.
GetTetheringClients() GetTetheringClients() GetTetheringClients() GetTetheringClients()
Retrieves a list of tethering clients for this NetworkOperatorTetheringManager.
public : IVectorView<NetworkOperatorTetheringClient> GetTetheringClients()public IReadOnlyList<NetworkOperatorTetheringClient> GetTetheringClients()Public Function GetTetheringClients() As IReadOnlyList( Of NetworkOperatorTetheringClient )// You can use this method in JavaScript.
A list of clients.
StartTetheringAsync() StartTetheringAsync() StartTetheringAsync() StartTetheringAsync()
Establishes the tethering network.
public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()public IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync()Public Function StartTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )// You can use this method in JavaScript.
StopTetheringAsync() StopTetheringAsync() StopTetheringAsync() StopTetheringAsync()
Shuts down the tethering network.
public : IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()public IAsyncOperation<NetworkOperatorTetheringOperationResult> StopTetheringAsync()Public Function StopTetheringAsync() As IAsyncOperation( Of NetworkOperatorTetheringOperationResult )// You can use this method in JavaScript.