Class CompanionDiscoveryResult
- Namespace
- AppleTvControlLibrary.Discovery.Companion
- Assembly
- AppleTvControlLibrary.Discovery.dll
Represents a discovered Companion Link service.
public sealed class CompanionDiscoveryResult
- Inheritance
-
CompanionDiscoveryResult
- Inherited Members
Remarks
Initializes a new instance of the CompanionDiscoveryResult class.
Constructors
CompanionDiscoveryResult(string, IPAddress?, int, string?, CompanionPairingRequirement, IReadOnlyDictionary<string, string>)
Represents a discovered Companion Link service.
public CompanionDiscoveryResult(string name, IPAddress? address, int port, string? uniqueId, CompanionPairingRequirement pairingRequirement, IReadOnlyDictionary<string, string> properties)
Parameters
namestringThe advertised service or device name.
addressIPAddressThe discovered IP address, if available.
portintThe advertised service port.
uniqueIdstringThe advertised unique device identifier, if available.
pairingRequirementCompanionPairingRequirementThe pairing requirement advertised by the service.
propertiesIReadOnlyDictionary<string, string>The DNS-SD TXT properties advertised by the service.
Remarks
Initializes a new instance of the CompanionDiscoveryResult class.
Properties
Address
Gets the resolved address of the device, if known.
public IPAddress? Address { get; }
Property Value
- IPAddress
The resolved address of the device, if known.
Name
Gets the mDNS service instance name (e.g. "Living Room").
public string Name { get; }
Property Value
- string
The mDNS service instance name (e.g. "Living Room").
PairingRequirement
Gets whether/how pairing is required for this device.
public CompanionPairingRequirement PairingRequirement { get; }
Property Value
- CompanionPairingRequirement
Whether/how pairing is required for this device.
Port
Gets the Companion Link port.
public int Port { get; }
Property Value
- int
The Companion Link port.
Properties
Gets the raw decoded TXT record properties.
public IReadOnlyDictionary<string, string> Properties { get; }
Property Value
- IReadOnlyDictionary<string, string>
The raw decoded TXT record properties.
UniqueId
Gets a stable unique identifier for the device (the "rpmrtid" TXT record), or null if not present.
public string? UniqueId { get; }
Property Value
- string
A stable unique identifier for the device (the "rpmrtid" TXT record), or null if not present.
Remarks
Only "rpmrtid" is safe to persist as an identifier. Do not key persisted credentials off other TXT records such as "rpHA", "rpHN", "rpAD", "rpHI", or "rpBA" - pyatv observes that those rotate as a privacy measure.