• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiContentSource

Class Summary

Extends:
  • ToiEventTarget

This interface is used to access information about a content source and subscribe to notifications of newly available content if supported by the source.

  • Methods
  • Members
  • Events

Method Summary

getInfo ( )  → info

Returns source information.

releaseInstance ( )

This method shall be called when the source instance will no longer be used. Any subscribers to notifications from this source will be unsubscribed.

Inherited Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Events

  • ON_CONTENT_ADDED
  • ON_CONTENT_CHANGED
  • ON_CONTENT_REMOVED

Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Inherited From:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

The JavaScript function that will receive events.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.

getInfo ( )  → info

Returns source information.

Returns:

the detailed information about the source.

Type: ToiContentService.ToiSourceInfo
releaseInstance ( )

This method shall be called when the source instance will no longer be used. Any subscribers to notifications from this source will be unsubscribed.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

The JavaScript function that was previously added as an event listener.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.

Members

ON_CONTENT_ADDED (Type: ToiContentSourceContentAddedEvent) (value = 2900) (static, constant)

This is an Event identifier for ToiContentSourceContentAddedEvent.

This notification is triggered when content have been added.

This constant can also be accessed from toi.consts.ToiContentSource.ON_CONTENT_ADDED.
ON_CONTENT_CHANGED (Type: ToiContentSourceContentChangedEvent) (value = 2902) (static, constant)

This is an Event identifier for ToiContentSourceContentChangedEvent.

This notification is triggered when content have been changed.

This constant can also be accessed from toi.consts.ToiContentSource.ON_CONTENT_CHANGED.
ON_CONTENT_REMOVED (Type: ToiContentSourceContentRemovedEvent) (value = 2901) (static, constant)

This is an Event identifier for ToiContentSourceContentRemovedEvent.

This notification is triggered when content have been removed.

This constant can also be accessed from toi.consts.ToiContentSource.ON_CONTENT_REMOVED.

Events

ON_CONTENT_ADDED ( )

This is an Event identifier for ToiContentSourceContentAddedEvent.

Value: 2900

ON_CONTENT_CHANGED ( )

This is an Event identifier for ToiContentSourceContentChangedEvent.

Value: 2902

ON_CONTENT_REMOVED ( )

This is an Event identifier for ToiContentSourceContentRemovedEvent.

Value: 2901

5.1.1.p8

Copyright (c) 2018 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.