• API Documentation
Show / Hide Table of Contents
  • Rssdp
    • AggregateSsdpDeviceLocator
    • CustomHttpHeader
    • CustomHttpHeadersCollection
    • DeviceAvailableEventArgs
    • DeviceEventArgs
    • DeviceNetworkType
    • DeviceNetworkTypeExtensions
    • DeviceUnavailableEventArgs
    • DiscoveredSsdpDevice
    • ExceptionExtensions
    • ISsdpLogger
    • NullLogger
    • ServiceEventArgs
    • SocketClosedException
    • SocketFactory
    • SsdpDevice
    • SsdpDeviceExtensions
    • SsdpDeviceIcon
    • SsdpDeviceLocator
    • SsdpDevicePropertiesCollection
    • SsdpDeviceProperty
    • SsdpDevicePublisher
    • SsdpEmbeddedDevice
    • SsdpRootDevice
    • SsdpService
    • SsdpStandardsMode
    • SsdpTraceLogger
  • Rssdp.Infrastructure
    • DisposableManagedObjectBase
    • HttpParserBase<T>
    • HttpRequestParser
    • HttpResponseParser
    • ISocketFactory
    • ISsdpCommunicationsServer
    • ISsdpDeviceLocator
    • ISsdpDevicePublisher
    • IUdpSocket
    • IUpnpDeviceValidator
    • ReceivedUdpData
    • RequestReceivedEventArgs
    • ResponseReceivedEventArgs
    • SsdpCommunicationsServer
    • SsdpConstants
    • SsdpDeviceLocatorBase
    • SsdpDevicePublisherBase
    • UdpEndPoint
    • Upnp10DeviceValidator

Class SsdpRootDevice

Represents a 'root' device, a device that has no parent. Used for publishing devices and for the root device in a tree of discovered devices.

Inheritance
System.Object
SsdpDevice
SsdpRootDevice
Inherited Members
SsdpDevice.DeviceAdded
SsdpDevice.DeviceRemoved
SsdpDevice.ServiceAdded
SsdpDevice.ServiceRemoved
SsdpDevice.DeviceType
SsdpDevice.DeviceTypeNamespace
SsdpDevice.DeviceVersion
SsdpDevice.FullDeviceType
SsdpDevice.Uuid
SsdpDevice.Udn
SsdpDevice.FriendlyName
SsdpDevice.Manufacturer
SsdpDevice.ManufacturerUrl
SsdpDevice.ModelDescription
SsdpDevice.ModelName
SsdpDevice.ModelNumber
SsdpDevice.ModelUrl
SsdpDevice.SerialNumber
SsdpDevice.Upc
SsdpDevice.PresentationUrl
SsdpDevice.Icons
SsdpDevice.Devices
SsdpDevice.CustomProperties
SsdpDevice.CustomResponseHeaders
SsdpDevice.Services
SsdpDevice.SanitizeXmlString(String)
SsdpDevice.AddDevice(SsdpEmbeddedDevice)
SsdpDevice.RemoveDevice(SsdpEmbeddedDevice)
SsdpDevice.OnDeviceAdded(SsdpEmbeddedDevice)
SsdpDevice.OnDeviceRemoved(SsdpEmbeddedDevice)
SsdpDevice.AddService(SsdpService)
SsdpDevice.RemoveService(SsdpService)
SsdpDevice.OnServiceAdded(SsdpService)
SsdpDevice.OnServiceRemoved(SsdpService)
SsdpDevice.WriteDeviceDescriptionXml(XmlWriter, SsdpDevice)
SsdpDevice.StringToUri(String)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Rssdp
Assembly: cs.temp.dll.dll
Syntax
public class SsdpRootDevice : SsdpDevice
Remarks

Child (embedded) devices are represented by the SsdpDevice in the Devices property.

Root devices contain some information that applies to the whole device tree and is therefore not present on child devices, such as CacheLifetime and Location.

Constructors

SsdpRootDevice()

Default constructor.

Declaration
public SsdpRootDevice()

SsdpRootDevice(Uri, TimeSpan, String)

Partial deserialisation constructor.

Declaration
public SsdpRootDevice(Uri location, TimeSpan cacheLifetime, string deviceDescriptionXml)
Parameters
Type Name Description
System.Uri location

The url from which the device description document was retrieved.

System.TimeSpan cacheLifetime

A System.TimeSpan representing the time maximum period of time the device description can be cached for.

System.String deviceDescriptionXml

The device description XML as a string.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the deviceDescriptionXml or location arguments are null.

System.ArgumentException

Thrown if the deviceDescriptionXml argument is empty.

SsdpRootDevice(Uri, TimeSpan, String, Nullable<XmlReaderSettings>)

Full deserialisation constructor.

Declaration
public SsdpRootDevice(Uri location, TimeSpan cacheLifetime, string deviceDescriptionXml, XmlReaderSettings? xmlReaderSettings)
Parameters
Type Name Description
System.Uri location

The url from which the device description document was retrieved.

System.TimeSpan cacheLifetime

A System.TimeSpan representing the time maximum period of time the device description can be cached for.

System.String deviceDescriptionXml

The device description XML as a string.

System.Nullable<XmlReaderSettings> xmlReaderSettings

A providing options for how to read and process the XML in deviceDescriptionXml. If null, default settings are used.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the deviceDescriptionXml or location arguments are null.

System.ArgumentException

Thrown if the deviceDescriptionXml argument is empty.

Properties

CacheLifetime

Specifies how long clients can cache this device's details for. Optional but defaults to System.TimeSpan.Zero which means no-caching. Recommended value is half an hour.

Declaration
public TimeSpan CacheLifetime { get; set; }
Property Value
Type Description
System.TimeSpan
Remarks

Specifiy System.TimeSpan.Zero to indicate no caching allowed.

Also used to specify how often to rebroadcast alive notifications.

The UPnP/SSDP specifications indicate this should not be less than 1800 seconds (half an hour), but this is not enforced by this library.

Location

Gets or sets the URL used to retrieve the description document for this device/tree. Required.

Declaration
public Uri Location { get; set; }
Property Value
Type Description
System.Uri

UrlBase

The base URL to use for all relative url's provided in other propertise (and those of child devices). Optional.

Declaration
public Uri UrlBase { get; set; }
Property Value
Type Description
System.Uri
Remarks

Defines the base URL. Used to construct fully-qualified URLs. All relative URLs that appear elsewhere in the description are combined with this base URL. If URLBase is empty or not given, the base URL is the URL from which the device description was retrieved (which is the preferred implementation; use of URLBase is no longer recommended). Specified by UPnP vendor. Single URL.

Methods

ToDescriptionDocument()

Saves the property values of this device object to an a string in the full UPnP device description XML format, including child devices and outer root node and XML document declaration.

Declaration
public virtual string ToDescriptionDocument()
Returns
Type Description
System.String

A string containing XML in the UPnP device description format

In This Article
Back to top Copyright (c) 2015 Troy Willmot