org.apache.felix.upnp.basedriver.importer.core.upnp
Class UPnPDeviceImpl

java.lang.Object
  extended by org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPDeviceImpl
All Implemented Interfaces:
UPnPDevice

public class UPnPDeviceImpl
extends Object
implements UPnPDevice


Field Summary
 
Fields inherited from interface org.osgi.service.upnp.UPnPDevice
CHILDREN_UDN, DEVICE_CATEGORY, FRIENDLY_NAME, ID, MANUFACTURER, MANUFACTURER_URL, MATCH_GENERIC, MATCH_MANUFACTURER_MODEL, MATCH_MANUFACTURER_MODEL_REVISION, MATCH_MANUFACTURER_MODEL_REVISION_SERIAL, MATCH_TYPE, MODEL_DESCRIPTION, MODEL_NAME, MODEL_NUMBER, MODEL_URL, PARENT_UDN, PRESENTATION_URL, SERIAL_NUMBER, TYPE, UDN, UPC, UPNP_EXPORT
 
Constructor Summary
UPnPDeviceImpl(org.cybergarage.upnp.Device dev, BundleContext context)
           
 
Method Summary
 boolean existServiceType(String serviceType)
           
 Dictionary getDescriptions(String locale)
          Get a set of localized UPnP properties.
 UPnPIcon[] getIcons(String locale)
          Lists all icons for this device in a given locale.
 UPnPService getService(String serviceId)
          Locates a specific service by its service id.
 UPnPService[] getServices()
          Lists all services provided by this device.
 void setProperty(String property, Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UPnPDeviceImpl

public UPnPDeviceImpl(org.cybergarage.upnp.Device dev,
                      BundleContext context)
Parameters:
dev - Device the cyberLink Device used to rappresent the real UPnP Device
Method Detail

getService

public UPnPService getService(String serviceId)
Description copied from interface: UPnPDevice
Locates a specific service by its service id.

Specified by:
getService in interface UPnPDevice
Parameters:
serviceId - The service id
Returns:
The requested service or null if not found.

getServices

public UPnPService[] getServices()
Description copied from interface: UPnPDevice
Lists all services provided by this device.

Specified by:
getServices in interface UPnPDevice
Returns:
Array of services or null if no services are available.

getIcons

public UPnPIcon[] getIcons(String locale)
Description copied from interface: UPnPDevice
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.

Specified by:
getIcons in interface UPnPDevice
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 Dictionary getDescriptions(String locale)
Description copied from interface: UPnPDevice
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.

Specified by:
getDescriptions in interface UPnPDevice
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

existServiceType

public boolean existServiceType(String serviceType)
Parameters:
serviceType -
Returns:
true if device contains the serviceType

setProperty

public void setProperty(String property,
                        Object obj)
Parameters:
property -
obj -


Copyright © 2011 Apache Software Foundation. All Rights Reserved.