Commit 482c95f9 authored by ocaptst_build's avatar ocaptst_build

Tagging HN Stubs for the 1.1.5 REL-A release

parent d8a68572
/*
* Created on 07-Oct-2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.ocap.hn;
import org.ocap.hn.content.ContentContainer;
import org.ocap.hn.content.navigation.ContentList;
/**
* Event which will be sent to registered ContentServerListeners when
* ContentEntrys have been added, changed or removed.
*/
public class ContentServerEvent extends java.util.EventObject{
/**
* Event ID indicating that content got added to a ContentServerNetModule.
* This event SHALL NOT guarantee that any content items or
* associated metadata have been communicated to the local device.
* Applications should utilize the content browsing and searching
* APIs to retrieve any added content items.
*
* @see org.ocap.hn.ContentServerNetModule
*/
public static final int CONTENT_ADDED = 0;
/**
* Event ID indicating that content got removed from a ContentServerNetModule
*/
public static final int CONTENT_REMOVED = 1;
/**
* Event ID indicating that metadata associated with content has
* been updated. This event SHALL NOT guarantee that and changes
* to content items or associated metadata have been communicated
* to the local device. Applications should utilize the content
* browsing and searching APIs to retrieve any updated metadata.
*
* @see org.ocap.hn.ContentServerNetModule
*/
public static final int CONTENT_CHANGED = 2;
/**
* Creates a new ContentServerEvent with the given source object, the ContentItem involved and
* an event ID indicating whether the content got added or removed.
* @param source The source of this event. This must be a ContentServerNetModule.
* @param content the IDs of the ContentEntrys involved.
* @param evt the Event ID, either CONTENT_ADDED,CONTENT_REMOVED or CONTENT_CHANGED.
*/
public ContentServerEvent(Object source, String content[],int evt){
super(source);
}
/**
* Returns the IDs associated with the ContentEntrys involved in this event.
* @return the string IDs of the entries involved.
*/
public String[] getContent(){
return null;
}
/**
* Returns the ContentServerNetModule. This is the source object of the event.
*
* @return the ContentServerNetModule containing the ContentItem that was
* added/removed/changed
*/
public ContentServerNetModule getContentServerNetModule(){
return null;
}
/**
* Gets the event ID for this event. Valid values are
* CONTENT_ADDED, CONTENT_CHANGED and CONTENT_REMOVED
*
* @return the ID for this event
*/
public int getEventID()
{
return 0;
}
}
package org.ocap.hn;
import java.util.EventListener;
import org.ocap.hn.content.ContentContainer;
import org.ocap.hn.content.ContentEntry;
/**
* Listener interface for classes which are interested in changes to a ContentServerNetModule.
*/
public interface ContentServerListener extends EventListener{
/**
* Called when a {@link ContentEntry} has been added, changed or removed
* from the {@link org.ocap.hn.ContentServerNetModule}
* @param evt the {@link ContentServerEvent}
*/
public void contentUpdated(ContentServerEvent evt);
}
/*
* Created on 05-Jan-2005 by
* Dr. Immo Benjes <immo.benjes@philips.com>, Philips Digital Systems Labs, Redhill, UK
*
*/
package org.ocap.hn;
import org.ocap.hn.content.ContentContainer;
import org.ocap.hn.content.navigation.ContentList;
import org.ocap.hn.content.ContentEntry;
/**
* <p>
* Class representing a NetModule which serves content.
* </p>
* <p>
* NetModules which implement this interface SHALL have a NetModule.PROP_NETMODULE_TYPE
* property value of NetModule.CONTENT_SERVER.
* </p>
*/
public interface ContentServerNetModule extends NetModule
{
/**
* returns the root ContentContainer for this ContentServerNetModule.
*
* This is an asynchronous method. The caller gets informed via
* {@link NetActionHandler#notify(NetActionEvent)} of the process.
* On success, an {@link NetActionEvent} is created where the
* {@link NetActionEvent#getResponse()} method will return a
* ContentContainer object representing the root container for
* this ContentServerNetModule.
*
* @param handler NetActionHandler which gets informed once this asynchronous
* request completes
*
* @return NetActionRequest See {@link NetActionRequest}
*
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentlisting")
*/
public NetActionRequest requestRootContainer(NetActionHandler handler);
/**
* Returns the list of property keys which applications can search against
* on this ContentServer using the
* {@link #requestSearchEntries} method.
*
* This is an asynchronous method. The caller gets informed via
* {@link NetActionHandler#notify(NetActionEvent)} of the process.
* On success an {@link NetActionEvent} is created where the
* {@link NetActionEvent#getResponse()} method will return an
* array of String objects containing the valid property keys.
* A return of an array with zero length indicates that this server supports
* no searching functionality. A return containing "*" indicates that any key
* associated with any content entry on this server may be used.
*
* @param handler NetActionHandler which gets informed once this asynchronous
* request completes
*
* @return NetActionRequest See {@link NetActionRequest}
*/
public NetActionRequest requestSearchCapabilities(NetActionHandler handler);
/**
* Requests a browse of this ContentServer which results in the
* creation of a <code>ContentList</code>.
* <p>
* <code>ContentEntry</code> objects hosted on the remote server
* will be browsed starting at the ContentEntry specified.
*
* The propertFilter parameter of this method SHALL contain a comma separated
* list of properties indicating which metadata fields should be
* returned in the ContentEntry objects contained in the resulting
* ContentList. A filter value of "*" indicates all available metadata
* be returned.
*
* The sortCriteria parameter of this method is a string containing
* the properties and sort modifiers to be used to sort the resulting
* ContentList. The format of the string containing the sort criteria
* shall follow the format defined in UPnP Content Directory Service
* 3.0 specification section 2.3.16: A_ARG_TYPE_SortCriteria.
*
* </p>
* <p>
* This is an asynchronous method. The caller gets informed via
* {@link NetActionHandler#notify(NetActionEvent)} of the process.
* On success an {@link NetActionEvent} is created where the
* {@link NetActionEvent#getResponse()} method will return a
* {@link ContentList} containing the search results. If no matches
* are found, this value SHALL be a ContentList with zero entries.
*
* A return from {@link NetActionEvent#getActionStatus()} of
* {@link NetActionEvent#ACTION_COMPLETED} SHALL indicate that
* a valid {@link ContentList} will be returned from
* {@link NetActionEvent#getResponse()}.
*
* <p/>
*
* @param startingEntryID the ID of the ContentEntry on the server to start the browse
* from. A value of "0" SHALL indicate the root container on this server.
*
* @param propertyFilter the set of property values to return from this browse operation
*
* @param browseChildren if set to true, this operation will browse all of the
* direct children of the startingEntryID parameter. If false, this operation
* will return a content list containing the entry identified by startingEntryID
* only.
*
* @param startingIndex starting zero-based offset to enumerate children
* under the container specified by <code>parent</code>.
*
* @param requestedCount requested number of entries under the <code>ContentContainer</code>
* specified by <code>parent</code>. Setting this parameter
* to <code>0</code> indicates request all entries.
*
* @param sortCriteria properties and sort modifiers to be used to sort the resulting
* ContentList
*
* @param handler NetActionHandler which gets informed once the
* results <code>ContentList</code> is created or an error occurs.
* calling <code>getResponse()</code> on handler will return a
* <code>ContentList</code> containing the requested entries, or
* if the call was unsuccessful will return an error message
* supplied by the server.
*
* @return NetActionRequest See {@link NetActionRequest}.
*
* @throws IllegalArgumentException if the startingEntryID is not
* available on this ContentServerNetModule, or if the handler parameter
* is null.
*
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentlisting")
*
*/
public abstract NetActionRequest requestBrowseEntries(
String startingEntryID,
String propertyFilter,
boolean browseChildren,
int startingIndex,
int requestedCount,
String sortCriteria,
NetActionHandler handler);
/**
* Requests a search of this ContentServer which results in the
* creation of a <code>ContentList</code>.
* <p>
* <code>ContentEntry</code> objects hosted on the remote server
* will be searched for using the specified search criteria. The
* format of the string containing the search criteria SHALL follow
* the format defined by the UPnP Content Directory Service
* 3.0 specification section 2.3.13.1: Search Criteria String Syntax.
*
* The propertFilter parameter of this method SHALL contain a comma separated
* list of properties indicating which metadata fields should be
* returned in the ContentEntry objects contained in the resulting
* ContentList. A filter value of "*" indicates all available metadata
* be returned.
*
* The sortCriteria parameter of this method is a string containing
* the properties and sort modifiers to be used to sort the resulting
* ContentList. The format of the string containing the sort criteria
* shall follow the format defined in UPnP Content Directory Service
* 3.0 specification section 2.3.16: A_ARG_TYPE_SortCriteria.
*
* </p>
* <p>
* This is an asynchronous method. The caller gets informed via
* {@link NetActionHandler#notify(NetActionEvent)} of the process.
* On success an {@link NetActionEvent} is created where the
* {@link NetActionEvent#getResponse()} method will return a
* {@link ContentList} containing the search results. If no matches
* are found, this value SHALL be a ContentList with zero entries.
*
* A return from {@link NetActionEvent#getActionStatus()} of
* {@link NetActionEvent#ACTION_COMPLETED} SHALL indicate that
* a valid {@link ContentList} will be returned from
* {@link NetActionEvent#getResponse()}.
*
* <p/>
*
* @param parentID the ID of the ContentContainer on the server to start the search
* from. A value of "0" SHALL indicate the root container on this server.
*
* @param propertyFilter the set of property values to return from this browse operation
*
* @param startingIndex starting zero-based offset to enumerate children
* under the container specified by <code>parent</code>.
*
* @param requestedCount requested number of entries under the <code>ContentContainer</code>
* specified by <code>parent</code>. Setting this parameter
* to <code>0</code> indicates request all entries.
*
* @param searchCriteria contains the criteria string to search for.
* If this parameter is null, the implementation SHALL consider
* all entries in the parent container as matching the search
* criteria.
*
* @param sortCriteria properties and sort modifiers to be used to sort the resulting
* ContentList
*
* @param handler NetActionHandler which gets informed once the
* results <code>ContentList</code> is created or an error occurs.
* calling <code>getResponse()</code> on handler will return a
* <code>ContentList</code> containing the requested entries, or
* if the call was unsuccessful will return an error message
* supplied by the server.
*
* @return NetActionRequest See {@link NetActionRequest}.
*
* @throws IllegalArgumentException if the startingEntryID is not
* available on this ContentServerNetModule, or if the handler parameter
* is null.
*
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentlisting")
*
*/
public abstract NetActionRequest requestSearchEntries(
String parentID,
String propertyFilter,
int startingIndex,
int requestedCount,
String searchCriteria,
String sortCriteria,
NetActionHandler handler);
/**
* Adds a ContentServerListener to this ContentContainer. This
* ContentServerListener will be notified of additions, removals,
* or changes to any objects contained within this server
*
* @param listener the Listener that will receive ContentServerEvents.
*/
public void addContentServerListener(ContentServerListener listener);
/**
* Removes the specified ContentServerListener.
*
* @param listener the Listener to remove
*/
public void removeContentServerListener(ContentServerListener listener);
}
package org.ocap.hn;
import java.net.InetAddress;
/**
* The <code>Device</code> interface represents a Homenetwork device that
* supports homenetwork NetModules. A Device is a hierarchical structure with
* root device being the physical appliance, such as an OCAP_Terminal or an
* OCAP_HOST. The valid device types for an OCAP root device are OCAP_HOST
* and OCAP_Terminal.
*
* A root device may contain a number of sub-devices, such as a MediaServer
* or a MediaRenderer. Each sub-device may support one or more NetModule(s)
* whereas each NetModule only represents one sub-device. A NetModule is some
* functional unit in the device and examples of NetModules are ContentList,
* ContentManager, etc.
*
* A device may also have certain capabilities and properties associated with it.
* An application can retrieve these capabilities and properties by using
* property filters
* <p>
*
*
*/
public interface Device {
/*
* Define Device Capabilities
*/
/**
* A constant indicating streaming capability of the device.
*/
public final static String CAP_STREAMING_SUPPORTED = "StreamingSupported";
/**
* A constant indicating if the device has a tuner.
*/
public final static String CAP_TUNER_SUPPORTED = "TunerSupported";
/**
* A constant indicating remote storage capability.
*/
public final static String CAP_REMOTE_STORAGE_SUPPORTED = "RemoteStorageSupported";
/**
* A constant indicating MSO content recording capability.
*/
public final static String CAP_RECORDING_SUPPORTED = "RecordingSupported";
/*
* Define Device Properties
*/
/**
* A constant for a friendly name of the device.
*/
public final static String PROP_FRIENDLY_NAME = "friendlyName";
/**
* A constant indicating the manufacturer of this device.
*/
public final static String PROP_MANUFACTURER = "manufacturer";
/**
* A constant providing URL to the manufacturer's web site.
*/
public final static String PROP_MANUFACTURER_URL = "manufacturerURL";
/**
* A constant providing description of the device.
*/
public final static String PROP_MODEL_DESCRIPTION = "modelDescription";
/**
* A constant indicates device property: model name.
*/
public final static String PROP_MODEL_NAME = "modelName";
/**
* A constant indicates device property: model number.
*/
public final static String PROP_MODEL_NUMBER = "modelNumber";
/**
* A constant indicates device property: model URL.
*/
public final static String PROP_MODEL_URL = "modelURL";
/**
* A constant indicates device property: serial number.
*/
public final static String PROP_SERIAL_NUMBER = "serialNumber";
/**
* A constant indicates device property: unique device name.
*/
public final static String PROP_UDN = "UDN";
/**
* A constant indicates device property: universal product code.
*/
public final static String PROP_UPC = "UPC";
/**
* A constant indicates device property: presentation URL.
*/
public final static String PROP_PRESENTATION_URL = "presentationURL";
/**
* A constant indicates device property: location of the device.
*/
public final static String PROP_LOCATION = "location";
/**
* A constant indicates device property: middleware profile.
*/
public final static String PROP_MIDDLEWARE_PROFILE = "middlewareProfile";
/**
* A constant indicates device property: middleware version.
*/
public final static String PROP_MIDDLEWARE_VERSION = "middlewareVersion";
/**
* A constant indicates device property: device type
*/
public final static String PROP_DEVICE_TYPE = "deviceType";
/**
* A constant representing a device version number
*/
public final static String PROP_DEVICE_VERSION = "deviceVersion";
/*
* Define device types
*/
/**
* A constant indicates device type: Heater-Vent-Air Conditioning System.
*/
public final static String TYPE_HVAC_SYSTEM = "HVAC_System";
/**
* A constant indicates device type: Heater-Vent-Air Conditioning Thermostat.
*/
public final static String TYPE_HVAC_ZONE_THERMOSTAT = "HVAC_ZoneThermostat";
/**
* A constant indicates device type: Internet gateway device.
*/
public final static String TYPE_INTERNET_GATEWAY_DEVICE = "InternetGatewayDevice";
/**
* A constant indicates device type: LAN device.
*/
public final static String TYPE_LAN_DEVICE = "LANDevice";
/**
* A constant indicates device type: WAN connection device.
*/
public final static String TYPE_WAN_CONNECTION_DEVICE = "WANConnectionDevice";
/**
* A constant indicates device type: WAN device.
*/
public final static String TYPE_WAN_DEVICE = "WANDevice";
/**
* A constant indicates device type: Binary Light (on/off).
*/
public final static String TYPE_BINARY_LIGHT = "BinaryLight";
/**
* A constant indicates device type: Dimmable Light (light intensity control).
*/
public final static String TYPE_DIMMABLE_LIGHT = "DimmableLight";
/**
* A constant indicates device type: Media Server.
*/
public final static String TYPE_MEDIA_SERVER = "MediaServer";
/**
* A constant indicates device type: Media Renderer.
*/
public final static String TYPE_MEDIA_RENDERER = "MediaRenderer";
/**
* A constant indicates device type: Printer.
*/
public final static String TYPE_PRINTER = "printer";
/**
* A constant indicates device type: Remote UI Client Device,
* Allows for basic operations on a Remote UI client including:
* user interface connection management, optionally user interface
* availability management and optionally basic user interaction.
*/
public final static String TYPE_REMOTE_UI_CLIENT_DEVICE = "RemoteUIClientDevice";
/**
* A constant indicates device type: Remote UI Server Device.
* @see #TYPE_REMOTE_UI_CLIENT_DEVICE
*/
public final static String TYPE_REMOTE_UI_SERVER_DEVICE = "RemoteUIServerDevice";
/**
* A constant indicates device type: Scanner.
*/
public final static String TYPE_SCANNER = "Scanner";
/**
* A constant indicates device type: WAN access point device.
*/
public final static String TYPE_WLAN_ACCESS_POINT_DEVICE = "WLANAccessPointDevice";
/**
* A constant indicates device type: OCAP Host.
*/
public final static String TYPE_OCAP_HOST = "OCAP_Host";
/**
* A constant indicates device type: OCAP terminal.
*/
public final static String TYPE_OCAP_TERMINAL = "OCAP_Terminal";
/**
* Returns capabilities of this device in <code>Enumeration</code>.
* Capabilities are defined in <code>Device</code>.
*
* @return An enumeration of String objects representing capabilities
* of this device.
*/
public java.util.Enumeration getCapabilities();
/**
* Returns the name of this device. The naming rule is proprietary.
* For example,"LivingRoom:OCAP_HOST1".
*
* @return name of this device
*/
public String getName();
/**
* Returns property of this device specified by a key. Minimum supported keys
* are defined in <code>Device</code>, like PROP_MANUFACTURER,
* PROP_MODEL_NUMBER, etc.
*
* @param key
* key of the property
* @return property value specified by the key
*/
public String getProperty(String key);
/**
* Returns all property keys supported by this device in
* <code>Enumeration</code>. Keys returned may include standardized
* keys (as documented with constants in this interface), as well
* as additional keys supported by this device.
*
* @return An enumeration of String objects representing all
* property keys supported by this device
*/
public java.util.Enumeration getKeys();
/**
* Returns Locator for this device.
*
* @return Locator for this device
*/
//public javax.tv.locator.Locator getLocator();
/**
* Returns the list of NetModules supported by this device.