RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger Class

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

Syntax

Declaration

public sealed class RfcommConnectionTriggerpublic sealed class RfcommConnectionTriggerPublic NotInheritable Class RfcommConnectionTriggerpublic sealed class RfcommConnectionTrigger

Constructors summary

Initializes a new instance of the RfcommConnectionTrigger class.

Properties summary

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

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

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

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

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

Constructors

  • RfcommConnectionTrigger()
    RfcommConnectionTrigger()
    RfcommConnectionTrigger()
    RfcommConnectionTrigger()

    Initializes a new instance of the RfcommConnectionTrigger class.

    public RfcommConnectionTrigger()public New()Public Sub New()public RfcommConnectionTrigger()

Properties

  • AllowMultipleConnections
    AllowMultipleConnections
    AllowMultipleConnections
    AllowMultipleConnections

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

    public bool AllowMultipleConnections { get; set; }public bool AllowMultipleConnections { get; set; }Public ReadWrite Property AllowMultipleConnections As boolpublic bool AllowMultipleConnections { get; set; }

    Property Value

    • bool
      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 RfcommInboundConnectionInformationpublic RfcommInboundConnectionInformation InboundConnection { get; }

    Property Value

    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 RfcommOutboundConnectionInformationpublic RfcommOutboundConnectionInformation OutboundConnection { get; }

    Property Value

    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 SocketProtectionLevelpublic SocketProtectionLevel ProtectionLevel { get; set; }

    Property Value

  • 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 HostNamepublic HostName RemoteHostName { get; set; }

    Property Value

    • 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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.ApplicationModel.Background.dll