The application/oipfSearchManager embedded object

Support in HbbTV

Available since: HbbTV 1.5 (ETSI TS 102 796 V1.2.1, OIPF DAE V1.2)

The guideDaysAvailable and onMetadataUpdate properties are not included.

For the createSearch method, only the value ‘1’ of the searchTarget parameter is included.

Comment

Broadcast-related

OITFs SHALL implement the “application/oipfSearchManager” embedded object. This object provides a mechanism for applications to create and manage metadata searches.

Properties

readonly Integer guideDaysAvailable
The number of days for which guide data is available. A value of -1 means that the amount of guide data available is unknown.

function onMetadataUpdate( Integer action, Integer info, Object object )

This function is the DOM 0 event handler for events indicating changes in metadata. This SHALL be raised under the following circumstances:

1) When a new version of the metadata is discovered. Note that new versions of metadata can be made available without any of the individual items of metadata changing. It is an application’s responsibility to determine what, if anything, has changed.

2) When the values of the blocked or locked properties on a content item change due to changes in the parental control subsystem (e.g. parental control being enabled or disabled, or a content item being unlocked with a PIN).

The specified function is called with the arguments action, info and object. These arguments are defined as follows:

· Integer action – the type of update that has taken place. This field will take one of the following values:

Value

Description

1

A new version of metadata is available (see section 4.1.2.1.2 of [OIPF_META2]) and applications SHOULD discard all references to Programme objects immediately and re-acquire them.

2

A change to the parental control flags for a content item has occurred (e.g. the user has unlocked the parental control features of the receiver, allowing a blocked item to be played).

3

A flag affecting the filtering criteria of a channel has changed. Applications MAY listen for events with this action code to update lists of favourite channels, for instance.

· Integer info – extended information about the type of update that has taken place. If the action argument is set to the value 3, the value of this field SHALL be one or more of the following:

Value

Description

1

The list of blocked channels has changed.

2

A list of favourite channels has changed.

4

The list of hidden channels has changed.

If the action argument is set to the value 2, the value of this field SHALL be one or more of:

Value

Description

1

The block status of a content item has changed.

2

The lock status of a content item has changed.

This field is treated as a bitfield, so values MAY be combined to allow multiple reasons to be passed.

· Object object – the affected channel, programme, or CoD asset prior to the change. If more than one is affected, then this argument SHALL take the value null.

function onMetadataSearch( MetadataSearch search, Integer state )

This function is the DOM 0 event handler for events relating to metadata searches. The specified function is called with the arguments search and state. These arguments are defined as follows:

· MetadataSearch search – the affected search

· Integer state – the new state of the search

Value

Description

0

Search has finished. This event SHALL be generated when a search has completed.

1

This value is not used.

2

This value is not used.

3

The MetadataSearch object has returned to the idle state, either because of a call to SearchResults.abort() or because the parameters for the search have been modified (e.g. the query, constraints or search target).

4

The search cannot be completed due to a lack of resources or any other reason (e.g. insufficient memory is available to cache all of the requested results).

Events

For the intrinsic events listed in the table below, a corresponding DOM event SHALL be generated in the following manner:

Intrinsic eventCorresponding DOM eventDOM Event properties
onMetadataSearchMetadataSearchBubbles: No Cancellable: No Context Info: search, state
onMetadataUpdateMetadataUpdateBubbles: No Cancellable: No Context Info: action, info, object

Note: these DOM events are directly dispatched to the event target, and will not bubble nor capture. Applications SHOULD NOT rely on receiving these events during the bubbling or the capturing phase. Applications that use DOM event handlers SHALL call the addEventListener() method on the application/oipfSearchManager object itself. The third parameter of addEventListener, i.e. “useCapture”, will be ignored.

Methods

MetadataSearch createSearch( Integer searchTarget )

Description

Create a MetadataSearch object that can be used to search the metadata.

Arguments

searchTarget

The metadata that should be searched.

Valid values of the searchTarget parameter are:

Value

Description

1

Metadata relating to scheduled content shall be searched.

2

Metadata relating to content on demand shall be searched.

These values are treated as a bitfield, allowing searches to be carried out across multiple search targets.

ChannelConfig getChannelConfig()

Description

Returns the channel line-up of the tuner in the form of a ChannelConfig object as defined in section 7.13.9. This includes the favourite lists.

The ChannelConfig object returned from this function SHALL be identical to the ChannelConfig object returned from the getChannelConfig() method on the video/broadcast object as defined in section 7.13.1.3.