Class SsdpService

Definition

Namespace:
Tizen.Network.Nsd
Assembly:
Tizen.Network.Nsd.dll
API Level:
4

This class is used for managing the local service registration and its properties using SSDP.

C#
Copy
public class SsdpService : INsdService, IDisposable
Inheritance
System.Object
SsdpService
Implements
System.IDisposable

Constructors

View Source

SsdpService(String)

The constructor to create the SsdpService instance that sets the target to a given value.

Declaration
C#
Copy
public SsdpService(string target)
Parameters
Type Name Description
System.String target

The SSDP local service's target. It may be a device type or a service type.

Exceptions
Type Condition
System.NotSupportedException

Thrown while setting this property when SSDP is not supported.

System.ArgumentException

Thrown when the target is set to null.

API Level: 4
Feature: http://tizen.org/feature/network.service_discovery.ssdp

Properties

View Source

Target

Target of the SSDP service.

Declaration
C#
Copy
public string Target { get; }
Property Value
Type Description
System.String
Remarks

It may be a device type or a service type specified in the UPnP forum (http://upnp.org). In case of an error, null will be returned.

API Level: 4
View Source

Url

URL of the SSDP service.

Declaration
C#
Copy
public string Url { get; set; }
Property Value
Type Description
System.String
Remarks

Set the URL for only an unregistered service created locally. If the service is already registered, the URL will not be set. In case of an error, null will be returned during get and exception will be thrown during set.

Exceptions
Type Condition
System.NotSupportedException

Thrown while setting this property when SSDP is not supported.

System.ArgumentException

Thrown when the URL value is set to null.

System.InvalidOperationException

Thrown while setting this property when any other error occurred.

API Level: 4
Feature: http://tizen.org/feature/network.service_discovery.ssdp
View Source

Usn

Unique Service Name of the SSDP service.

Declaration
C#
Copy
public string Usn { get; set; }
Property Value
Type Description
System.String
Remarks

Set the USN for only an unregistered service created locally. If the service is already registered, the USN will not be set. In case of an error, null will be returned during get and exception will be thrown during set.

Exceptions
Type Condition
System.NotSupportedException

Thrown while setting this property when SSDP is not supported.

System.ArgumentException

Thrown when USN value is set to null.

System.InvalidOperationException

Thrown while setting this property when any other error occurred.

API Level: 4
Feature: http://tizen.org/feature/network.service_discovery.ssdp

Methods

View Source

DeregisterService()

Deregisters the SSDP local service.

Declaration
C#
Copy
public void DeregisterService()
Remarks

A local service registered using RegisterService() must be passed.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when any other error occurred.

System.NotSupportedException

Thrown when the SSDP is not supported.

API Level: 4
Feature: http://tizen.org/feature/network.service_discovery.ssdp
View Source

Dispose()

Disposes the memory allocated to unmanaged resources.

Declaration
C#
Copy
public void Dispose()
API Level: 4
View Source

Finalize()

Destroys the SsdpService object.

Declaration
C#
Copy
protected void Finalize()
View Source

RegisterService()

Registers the SSDP local service for publishing.

Declaration
C#
Copy
public void RegisterService()
Remarks

A service created locally must be passed. URL and USN of the service must be set before the RegisterService is called.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when any other error occurred.

System.NotSupportedException

Thrown when the SSDP is not supported.

UnauthorizedAccessException

Thrown when the permission is denied.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Feature: http://tizen.org/feature/network.service_discovery.ssdp

Implements

System.IDisposable