Interface IConnection

Describes the properties of a physical connection that was established between the system and a Jabra device.

interface IConnection {
    hidChannel: IHidChannel;
    id: IConnectionId;
    onDisconnect: Observable<void>;
    parentConnectionId?: IConnectionId;
    type: ConnectionType;
    getChannel<T extends ChannelType>(type: T): ChannelLookup<T>;
    hasChannel(type: ChannelType): boolean;
    tryGetChannel<T extends ChannelType>(type: T): undefined | ChannelLookup<T>;
}

Hierarchy (View Summary)

Methods

  • Retrieve a channel of a specified type from the collection.

    Type Parameters

    Parameters

    • type: T

      The type of the desired channel

    Returns ChannelLookup<T>

    The channel of the the specified type, if it exists. If it does not exist, an error is thrown.

  • Determine whether the collection contains a channel of the requested type.

    Parameters

    Returns boolean

    true, if the collection contains a channel of the specified type. Otherwise false.

  • Try to retrieve a channel of a specified type from the collection.

    Type Parameters

    Parameters

    • type: T

      The type of the desired channel

    Returns undefined | ChannelLookup<T>

    The channel of the the specified type, if it exists. If it does not exist, undefined is returned.

Properties

hidChannel: IHidChannel

The IHidChannel object that should be used to communicate with the device when using ths connection.

The unique ID of the connection.

onDisconnect: Observable<void>

Emits when this connection or its parent connection (if one exists) gets disconnected.

parentConnectionId?: IConnectionId

Optional parameter pointing at a parent connection (if the current connection is established through such a parent connection), e.g. a wireless connection through a Jabra dongle device.

Specifies the how the connection was established, e.g. USB or Bluetooth.