Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| OSGi Service Platform Release 3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.osgi.service.upnp
Interface UPnPDevice

public interface UPnPDevice

Represents a UPnP device. For each UPnP root and embedded device, an object is registered with the framework under the `UPnPDevice` interface.

The relationship between a root device and its embedded devices can be deduced using the `UPnPDevice.CHILDREN_UDN` and `UPnPDevice.PARENT_UDN` service registration properties.

The values of the UPnP property names are defined by the UPnP Forum.

All values of the UPnP properties are obtained from the device using the device's default locale.

If an application wants to query for a set of localized property values, it has to use the method `UPnPDevice.getDescriptions(String locale)`.

Field Summary
`static java.lang.String` | `CHILDREN_UDN` The property key that must be set for all devices containing other embedded devices.
`static java.lang.String` | `DEVICE_CATEGORY` Constant for the value of the service property `DEVICE_CATEGORY` used for all UPnP devices.
`static java.lang.String` | `FRIENDLY_NAME` Mandatory property key for a short user friendly version of the device name.
`static java.lang.String` | `ID` Property key for the Unique Device ID property.
`static java.lang.String` | `MANUFACTURER` Mandatory property key for the device manufacturer's property.
`static java.lang.String` | `MANUFACTURER_URL` Optional property key for a URL to the device manufacturers Web site.
`static int` | `MATCH_GENERIC` Constant for the UPnP device match scale, indicating a generic match for the device.
`static int` | `MATCH_MANUFACTURER_MODEL` Constant for the UPnP device match scale, indicating a match with the device model.
`static int` | `MATCH_MANUFACTURER_MODEL_REVISION` Constant for the UPnP device match scale, indicating a match with the device revision.
`static int` | `MATCH_MANUFACTURER_MODEL_REVISION_SERIAL` Constant for the UPnP device match scale, indicating a match with the device revision and the serial number.
`static int` | `MATCH_TYPE` Constant for the UPnP device match scale, indicating a match with the device type.
`static java.lang.String` | `MODEL_DESCRIPTION` Optional (but recommended) property key for a `String` object with a long description of the device for the end user.
`static java.lang.String` | `MODEL_NAME` Mandatory property key for the device model name.
`static java.lang.String` | `MODEL_NUMBER` Optional (but recommended) property key for a `String` class typed property holding the model number of the device.
`static java.lang.String` | `MODEL_URL` Optional property key for a `String` typed property holding a string representing the URL to the Web site for this model.
`static java.lang.String` | `PARENT_UDN` The property key that must be set for all embedded devices.
`static java.lang.String` | `PRESENTATION_URL` Optional (but recommended) property key for a `String` typed property holding a string representing the URL to a device representation Web page.
`static java.lang.String` | `SERIAL_NUMBER` Optional (but recommended) property key for a `String` typed property holding the serial number of the device.
`static java.lang.String` | `TYPE` Property key for the UPnP Device Type property.
`static java.lang.String` | `UDN` Property key for the Unique Device Name (UDN) property.
`static java.lang.String` | `UPC` Optional property key for a `String` typed property holding the Universal Product Code (UPC) of the device.
`static java.lang.String` | `UPNP_EXPORT` The `UPnP.export` service property is a hint that marks a device to be picked up and exported by the UPnP Service.

Method Summary
`java.util.Dictionary` | `getDescriptions(java.lang.String locale)` Get a set of localized UPnP properties.
`UPnPIcon[]` | `getIcons(java.lang.String locale)` Lists all icons for this device in a given locale.
`UPnPService` | `getService(java.lang.String serviceId)` Locates a specific service by its service id.
`UPnPService[]` | `getServices()` Lists all services provided by this device.

Field Detail

### MATCH_GENERIC

    public static final int MATCH_GENERIC

  Constant for the UPnP device match scale, indicating a generic match for the device. Value is 1.

### MATCH_TYPE

    public static final int MATCH_TYPE

  Constant for the UPnP device match scale, indicating a match with the device type. Value is 3.

### MATCH_MANUFACTURER_MODEL

    public static final int MATCH_MANUFACTURER_MODEL

  Constant for the UPnP device match scale, indicating a match with the device model. Value is 7.

### MATCH_MANUFACTURER_MODEL_REVISION

    public static final int MATCH_MANUFACTURER_MODEL_REVISION

  Constant for the UPnP device match scale, indicating a match with the device revision. Value is 15.

### MATCH_MANUFACTURER_MODEL_REVISION_SERIAL

    public static final int MATCH_MANUFACTURER_MODEL_REVISION_SERIAL

  Constant for the UPnP device match scale, indicating a match with the device revision and the serial number. Value is 31.

### DEVICE_CATEGORY

    public static final java.lang.String DEVICE_CATEGORY

  Constant for the value of the service property `DEVICE_CATEGORY` used for all UPnP devices. Value is "UPnP".
  See Also:
    `Constants.DEVICE_CATEGORY`

### UPNP_EXPORT

    public static final java.lang.String UPNP_EXPORT

  The `UPnP.export` service property is a hint that marks a device to be picked up and exported by the UPnP Service. Imported devices do not have this property set. The registered property requires no value.

  The UPNP_EXPORT string is "UPnP.export".

### UDN

    public static final java.lang.String UDN

  Property key for the Unique Device Name (UDN) property. It is the unique identifier of an instance of a `UPnPDevice`. The value of the property is a `String` object of the Device UDN. Value of the key is "UPnP.device.UDN". This property must be set.

### ID

    public static final java.lang.String ID

  Property key for the Unique Device ID property. This property is an alias to `UPnPDevice.UDN`. It is merely provided for reasons of symmetry with the `UPnPService.ID` property. The value of the property is a `String` object of the Device UDN. The value of the key is "UPnP.device.UDN".

### TYPE

    public static final java.lang.String TYPE

  Property key for the UPnP Device Type property. Some standard property values are defined by the Universal Plug and Play Forum. The type string also includes a version number as defined in the UPnP specification. This property must be set.

  For standard devices defined by a UPnP Forum working committee, this must consist of the following components in the given order separated by colons:

  - `urn`
  - schemas-upnp-org
  - `device`
  - a device type suffix
  - an integer device version
  For non-standard devices specified by UPnP vendors following components must be specified in the given order separated by colons:
  - `urn`
  - an ICANN domain name owned by the vendor
  - `device`
  - a device type suffix
  - an integer device version

  To allow for backward compatibility the UPnP driver must automatically generate additional Device Type property entries for smaller versions than the current one. If for example a device announces its type as version 3, then properties for versions 2 and 1 must be automatically generated.

  In the case of exporting a UPnPDevice, the highest available version must be announced on the network.

  Syntax Example: `urn:schemas-upnp-org:device:deviceType:v`

  The value is "UPnP.device.type".

### MANUFACTURER

    public static final java.lang.String MANUFACTURER

  Mandatory property key for the device manufacturer's property. The property value holds a String representation of the device manufacturer's name. Value is "UPnP.device.manufacturer".

### MODEL_NAME

    public static final java.lang.String MODEL_NAME

  Mandatory property key for the device model name. The property value holds a `String` object giving more information about the device model. Value is "UPnP.device.modelName".

### FRIENDLY_NAME

    public static final java.lang.String FRIENDLY_NAME

  Mandatory property key for a short user friendly version of the device name. The property value holds a `String` object with the user friendly name of the device. Value is "UPnP.device.friendlyName".

### MANUFACTURER_URL

    public static final java.lang.String MANUFACTURER_URL

  Optional property key for a URL to the device manufacturers Web site. The value of the property is a `String` object representing the URL. Value is "UPnP.device.manufacturerURL".

### MODEL_DESCRIPTION

    public static final java.lang.String MODEL_DESCRIPTION

  Optional (but recommended) property key for a `String` object with a long description of the device for the end user. The value is "UPnP.device.modelDescription".

### MODEL_NUMBER

    public static final java.lang.String MODEL_NUMBER

  Optional (but recommended) property key for a `String` class typed property holding the model number of the device. Value is "UPnP.device.modelNumber".

### MODEL_URL

    public static final java.lang.String MODEL_URL

  Optional property key for a `String` typed property holding a string representing the URL to the Web site for this model. Value is "UPnP.device.modelURL".

### SERIAL_NUMBER

    public static final java.lang.String SERIAL_NUMBER

  Optional (but recommended) property key for a `String` typed property holding the serial number of the device. Value is "UPnP.device.serialNumber".

### UPC

    public static final java.lang.String UPC

  Optional property key for a `String` typed property holding the Universal Product Code (UPC) of the device. Value is "UPnP.device.UPC".

### PRESENTATION_URL

    public static final java.lang.String PRESENTATION_URL

  Optional (but recommended) property key for a `String` typed property holding a string representing the URL to a device representation Web page. Value is "UPnP.presentationURL".

### PARENT_UDN

    public static final java.lang.String PARENT_UDN

  The property key that must be set for all embedded devices. It contains the UDN of the parent device. The property is not set for root devices. The value is "UPnP.device.parentUDN".

### CHILDREN_UDN

    public static final java.lang.String CHILDREN_UDN

  The property key that must be set for all devices containing other embedded devices.

  The value is an array of UDNs for each of the device's children (`String[]`). The array contains UDNs for the immediate descendants only.

  If an embedded device in turn contains embedded devices, the latter are not included in the array.

  The UPnP Specification does not encourage more than two levels of nesting.

  The property is not set if the device does not contain embedded devices.

  The property is of type `String[]`. Value is "UPnP.device.childrenUDN"

Method Detail

### getService

    public UPnPService getService(java.lang.String serviceId)

  Locates a specific service by its service id.
  Parameters:
    `serviceId` - The service id
  Returns:
    The requested service or null if not found.

### getServices

    public UPnPService[] getServices()

  Lists all services provided by this device.
  Returns:
    Array of services or `null` if no services are available.

### getIcons

    public UPnPIcon[] getIcons(java.lang.String locale)

  Lists all icons for this device in a given locale. The UPnP specification allows a device to present different icons based on the client's locale.
  Parameters:
    `locale` - A language tag as defined by RFC 1766 and maintained by ISO 639. Examples include "`de`", "`en`" or "`en-US`". The default locale of the device is specified by passing a `null` argument.
  Returns:
    Array of icons or null if no icons are available.

### getDescriptions

    public java.util.Dictionary getDescriptions(java.lang.String locale)

  Get a set of localized UPnP properties. The UPnP specification allows a device to present different device properties based on the client's locale. The properties used to register the UPnPDevice service in the OSGi registry are based on the device's default locale. To obtain a localized set of the properties, an application can use this method.

  Not all properties might be available in all locales. This method does not substitute missing properties with their default locale versions.

  Parameters:
    `locale` - A language tag as defined by RFC 1766 and maintained by ISO 639. Examples include "`de`", "`en`" or "`en-US`". The default locale of the device is specified by passing a `null` argument.
  Returns:
    Dictionary mapping property name Strings to property value Strings

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| OSGi Service Platform Release 3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) OSGi Alliance (2000, 2003). All Rights Reserved.