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

Represents an SSDP service to be published.

Inheritance
System.Object
SsdpService
Inherited Members
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 SsdpService

Constructors

SsdpService()

Default constructor.

Declaration
public SsdpService()

SsdpService(String)

Deserialisation constructor.

Declaration
public SsdpService(string serviceDescriptionXml)
Parameters
Type Name Description
System.String serviceDescriptionXml

A UPnP service description XML document.

Remarks

Uses the provided XML string to set the properties of the object. The XML provided must be a valid UPnP service description document.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the serviceDescriptionXml argument is null.

System.ArgumentException

Thrown if the serviceDescriptionXml argument is empty.

Properties

ControlUrl

REQUIRED. URL for control (see section 3, “Control”). MUST be relative to the URL at which the device description is located in accordance with section 5 of RFC 3986. Specified by UPnP vendor. Single URL.

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

EventSubUrl

URL for eventing (see section 4, “Eventing”). MUST be relative to the URL at which the device description is located in accordance with section 5 of RFC 3986. MUST be unique within the device; any two services MUST NOT have the same URL for eventing. If the service has no evented variables, this element MUST be present but MUST be empty(i.e., .) Specified by UPnP vendor.Single URL.

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

FullServiceType

Returns the full service type string.

Declaration
public string FullServiceType { get; }
Property Value
Type Description
System.String
Remarks

The format used is urn:ServiceTypeNamespace:service:ServiceType:ServiceVersion

ScpdUrl

REQUIRED. URL for service description. (See section 2.5, “Service description” below.) MUST be relative to the URL at which the device description is located in accordance with section 5 of RFC 3986. Specified by UPnP vendor. Single URL.

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

ServiceId

Returns the full service type string.

Declaration
public string ServiceId { get; }
Property Value
Type Description
System.String
Remarks

The format used is urn:ServiceTypeNamespace:serviceid:ServiceType

ServiceType

Sets or returns the service type (not including namespace, version etc) of the exposed service. Required.

Declaration
public string ServiceType { get; set; }
Property Value
Type Description
System.String
See Also
ServiceTypeNamespace
ServiceVersion
FullServiceType

ServiceTypeNamespace

Sets or returns the namespace for the ServiceType of this service. Optional but defaults to the UPnP schema so should be changed if ServiceType is not an official UPnP service type.

Declaration
public string ServiceTypeNamespace { get; set; }
Property Value
Type Description
System.String
See Also
ServiceType
ServiceVersion
FullServiceType

ServiceVersion

Sets or returns the version of the service type. Optional, defaults to 1.

Declaration
public int ServiceVersion { get; set; }
Property Value
Type Description
System.Int32
Remarks

Defaults to a value of 1.

See Also
ServiceType
ServiceTypeNamespace
FullServiceType

Uuid

Sets or returns the universally unique identifier for this service (without the uuid: prefix). Required.

Declaration
public string Uuid { get; set; }
Property Value
Type Description
System.String
Remarks

Must be the same over time for a specific service instance (i.e. must survive reboots).

For UPnP 1.0 this can be any unique string. For UPnP 1.1 this should be a 128 bit number formatted in a specific way, preferably generated using the time and MAC based algorithm. See section 1.1.4 of http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf for details.

Technically this library implements UPnP 1.0, so any value is allowed, but we advise using UPnP 1.1 compatible values for good behaviour and forward compatibility with future versions.

Methods

WriteServiceDescriptionXml(XmlWriter)

Writes this service to the specified as a service node and it's content.

Declaration
public virtual void WriteServiceDescriptionXml(XmlWriter writer)
Parameters
Type Name Description
XmlWriter writer

The to output to.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the writer argument is null.

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