RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger Class

Definition

Represents a trigger that launches a background task when an RFCOMM inbound or outbound connections are established.

public : sealed class RfcommConnectionTrigger : IBackgroundTrigger, IRfcommConnectionTrigger
public sealed class RfcommConnectionTrigger : IBackgroundTrigger, IRfcommConnectionTrigger
Public NotInheritable Class RfcommConnectionTrigger Implements IBackgroundTrigger, IRfcommConnectionTrigger
var rfcommConnectionTrigger = new rfcommConnectionTrigger();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

RfcommConnectionTrigger() RfcommConnectionTrigger() RfcommConnectionTrigger() RfcommConnectionTrigger()

Initializes a new instance of the RfcommConnectionTrigger class.

public : RfcommConnectionTrigger()
public RfcommConnectionTrigger()
Public Sub New()
var rfcommConnectionTrigger = new rfcommConnectionTrigger();

Properties

AllowMultipleConnections AllowMultipleConnections AllowMultipleConnections AllowMultipleConnections

Gets or sets whether the app wants to handle multiple connections at a time.

public : Platform::Boolean AllowMultipleConnections { get; set; }
public bool AllowMultipleConnections { get; set; }
Public ReadWrite Property AllowMultipleConnections As bool
var bool = rfcommConnectionTrigger.allowMultipleConnections;
rfcommConnectionTrigger.allowMultipleConnections = bool;
Value
Platform::Boolean bool bool bool

True if the app wants to handle multiple connections at a time; Otherwise False. The default is False.

InboundConnection InboundConnection InboundConnection InboundConnection

Gets or sets the RfcommInboundConnectionInformation object that describes how the system will advertise and listen for inbound connections on behalf of the app.

public : RfcommInboundConnectionInformation InboundConnection { get; }
public RfcommInboundConnectionInformation InboundConnection { get; }
Public ReadOnly Property InboundConnection As RfcommInboundConnectionInformation
var rfcommInboundConnectionInformation = rfcommConnectionTrigger.inboundConnection;
Value
RfcommInboundConnectionInformation RfcommInboundConnectionInformation RfcommInboundConnectionInformation RfcommInboundConnectionInformation

The RfcommInboundConnectionInformation object that describes how the system will advertise and listen for inbound connections on behalf of the app. The default is null.

Remarks

If this property is null, the system will not listen for incoming connections.

At least one of the InboundConnection and OutboundConnection properties must be non-null.

OutboundConnection OutboundConnection OutboundConnection OutboundConnection

Gets or sets the RfcommOutboundConnectionInformation object that describes how the system will create outgoing connections on behalf of the app.

public : RfcommOutboundConnectionInformation OutboundConnection { get; }
public RfcommOutboundConnectionInformation OutboundConnection { get; }
Public ReadOnly Property OutboundConnection As RfcommOutboundConnectionInformation
var rfcommOutboundConnectionInformation = rfcommConnectionTrigger.outboundConnection;
Value
RfcommOutboundConnectionInformation RfcommOutboundConnectionInformation RfcommOutboundConnectionInformation RfcommOutboundConnectionInformation

The RfcommOutboundConnectionInformation object that describes how the system will create outgoing connections on behalf of the app. The default is null.

Remarks

If this property is null, the system will not create outgoing connections.

At least one of the InboundConnection and OutboundConnection properties must be non-null.

ProtectionLevel ProtectionLevel ProtectionLevel ProtectionLevel

Gets or sets the minimum protection level required for connections that are created or accepted on behalf of the app.

public : SocketProtectionLevel ProtectionLevel { get; set; }
public SocketProtectionLevel ProtectionLevel { get; set; }
Public ReadWrite Property ProtectionLevel As SocketProtectionLevel
var socketProtectionLevel = rfcommConnectionTrigger.protectionLevel;
rfcommConnectionTrigger.protectionLevel = socketProtectionLevel;
Value
SocketProtectionLevel SocketProtectionLevel SocketProtectionLevel SocketProtectionLevel

The minimum protection level required for connections that are created or accepted on behalf of the app. The default is BluetoothEncryptionWithAuthentication.

RemoteHostName RemoteHostName RemoteHostName RemoteHostName

Gets or sets specific remote Bluetooth device the system will connect to, or accept connections from, on behalf of the app.

public : HostName RemoteHostName { get; set; }
public HostName RemoteHostName { get; set; }
Public ReadWrite Property RemoteHostName As HostName
var hostName = rfcommConnectionTrigger.remoteHostName;
rfcommConnectionTrigger.remoteHostName = hostName;
Value
HostName HostName HostName HostName

Gets or sets specific remote Bluetooth device the system will connect to, or accept connections from, on behalf of the app. If this property is not set, the system will connect to and/or accept connections from any paired Bluetooth device that supports the relevant service.