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
namestringaddressIPAddressportintuniqueIdstringpairingRequirementCompanionPairingRequirementpropertiesIReadOnlyDictionary<string, string>
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
Name
Gets the mDNS service instance name (e.g. "Living Room").
public string Name { get; }
Property Value
PairingRequirement
Gets whether/how pairing is required for this device.
public CompanionPairingRequirement PairingRequirement { get; }
Property Value
Port
Gets the Companion Link port.
public int Port { get; }
Property Value
Properties
Gets the raw decoded TXT record properties.
public IReadOnlyDictionary<string, string> Properties { get; }
Property Value
UniqueId
Gets a stable unique identifier for the device (the "rpmrtid" TXT record), or null if not present.
public string? UniqueId { get; }
Property Value
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.