ToiChannelService Interface Reference


Description

Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. The ToiChannelService is used to retrive information about available channels, for example services scanned through ToiScanner and friends.
Service:
This is a service and can be accessed through toi.channelService

import "ToiChannelService.idl";

List of all members.

Public Member Functions

ToiOperationManager getOperationManager ()
ToiChannelServicePropertyDefinition getPropertyDefinition (in TToiPropertyId propertyId) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void runQuery (in ToiOperationManager::TToiOperationId operationId, in TToiQueryConditionSequence queryConditions, in TToiPropertyIdSequence requestedProperties) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
TToiChannelInfoSequence getChannelsInfo (in TToiChannelIdSequence channels, in TToiPropertyIdSequence requestedProperties) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
TToiChannelInfoSequence getChannelInfoResult (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiNoDataException)
void addEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)
void removeEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)

Public Attributes

Events

const long ON_CHANNELS_ADDED = 4000
const long ON_CHANNELS_REMOVED = 4001
const long ON_CHANNELS_CHANGED = 4002
Operation results

The result types defined for channel service operations. See ToiOperationManager for generic result types.

const
ToiOperationManager::TToiOperationResult 
OP_RESULT_CHANNEL_INFO = 1
TToiPropertyType

const TToiPropertyType TYPE_BOOLEAN = 0
const TToiPropertyType TYPE_STRING = 1
const TToiPropertyType TYPE_INTEGER = 2
TToiConditionOperation

const TToiConditionOperation EQUALS = 0
const TToiConditionOperation NOT_EQUAL = 1

Property constants

Constants for standard and recommended channel property identifiers. Properties named system.* are set by the platform and can not be removed or changed by the application.



typedef sequence
< ToiChannelServiceProperty
TToiPropertySequence
typedef long TToiConditionOperation
const string PROPERTY_MODULATION_SYSTEM_TYPE = "system.modulationsystemtype"
const string PROPERTY_NETWORK_NAME = "system.networkname"
const string PROPERTY_NETWORK_ID = "system.networkid"
const string PROPERTY_SERVICE_TYPE = "system.servicetype"
const string PROPERTY_SERVICE_PROVIDER = "system.serviceprovider"
const string PROPERTY_SERVICE_ID = "system.serviceid"
const string PROPERTY_SERVICE_NAME = "system.servicename"
const string PROPERTY_LOGICAL_CHANNEL_NUMBER = "system.logicalchannelnumber"
const string PROPERTY_VISIBLE = "system.visible"
const string PROPERTY_FREE = "system.free"
const string PROPERTY_ORIGINAL_NETWORK_ID = "system.originalnetworkid"
const string PROPERTY_TRANSPORT_STREAM_ID = "system.transportstreamid"
const string PROPERTY_DELIVERY_SYSTEM_DESCRIPTOR = "system.deliverysystemdescriptor"
const string PROPERTY_URI = "system.uri"
const string PROPERTY_SOURCE_ID = "system.sourceid"
const string PROPERTY_FREQUENCY = "system.frequency"
const string PROPERTY_MODULATION_FORMAT = "system.modulationformat"

Public Types

typedef string TToiPropertyId
typedef sequence< TToiPropertyIdTToiPropertyIdSequence
typedef string TToiPropertyValue
typedef long TToiChannelId
typedef sequence< TToiChannelIdTToiChannelIdSequence
typedef long TToiPropertyType
typedef sequence
< ToiChannelServiceQueryCondition
TToiQueryConditionSequence
typedef sequence
< ToiChannelServiceChannelInfo
TToiChannelInfoSequence

Member Typedef Documentation

Type defined to identify a unique channel.

Sequence of channel ids.

Enumerarion of possible operations that can be used when creating a ToiChannelServiceQueryCondition.

Identifier for metadata properties.

Sequence of TToiPropertyId's.

Sequence of property tags.

Different kinds of property value types.

Value for a metadata property.

Sequence of query conditions.


Member Function Documentation

void ToiEventTarget::addEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException) [inherited]

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.

Parameters:
type The event type of the event to subscribe to.
listener The JavaScript function that will receive events.
Exceptions:
TInvalidArgumentException 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.
TToiChannelInfoSequence ToiChannelService::getChannelInfoResult ( in ToiOperationManager::TToiOperationId  operationId  )  raises (TToiInvalidArgumentException, TToiNoDataException)

Used to get the query results once the applications receive ToiOperationOperationResultEvent and the result parameter is equal to ToiChannelService::OP_RESULT_CHANNEL_INFO.

Parameters:
operationId The operation identifier used when calling ToiChannelService::runQuery().
Return values:
results The resulting channel information.
Exceptions:
TToiInvalidArgumentException Raised if the operation identifier is invalid
TToiNoDataException Raised if no result is available.
TToiChannelInfoSequence ToiChannelService::getChannelsInfo ( in TToiChannelIdSequence  channels,
in TToiPropertyIdSequence  requestedProperties 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Returns information for all requested channels.

Parameters:
channels A sequence of channels ids. Using an empty sequence will return all stored channels.
requestedProperties The requested properties that will be included in the result. Using an empty sequence will return all properties. If some requested property does not exist, this property will not be in the channel info.
Return values:
channelsInfo The information of all requested channels.
Exceptions:
TToiInvalidArgumentException Raised if any channel id is invalid, or raised if the number of channels exceed the maximum supported number.
TToiNotEnoughResourcesException Raised if there were not enough system resources to perform the query.
ToiOperationManager ToiChannelService::getOperationManager (  ) 

Returns the operation manager that handles asynchronous operations for all services derived from the Frontend service. The procedure of executing asynchronous operations is generic and looks like this:

  • Get a handle to the operation manager.
  • Register an observer to get operation events from the operation manager.
  • Create an operation in order to get an operation identifier.
  • Call a asynchronous operation using the operation identifier.
  • Receive progress events for the asynchronous operation.
  • When the operation is completed, get result data (if any).
  • Release the operation or reuse the identifier for another asynchronous call.
Return values:
IToiOperationManager 
address The address to the ToiOperationManager.
ToiChannelServicePropertyDefinition ToiChannelService::getPropertyDefinition ( in TToiPropertyId  propertyId  )  raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Returns the property definition for a given property identifier.

Parameters:
propertyId The property identifier.
Return values:
definition The property definition.
Exceptions:
TToiInvalidArgumentException Raised if the property identifier is invalid.
TToiNotEnoughResourcesException Raised if there were not enough system resources to perform the operation.
void ToiEventTarget::removeEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException) [inherited]

This method removes an event listener for a specific event.

Parameters:
type The event type of the event to remove the listener from.
listener The JavaScript function that was previously added as an event listener.
Exceptions:
TInvalidArgumentException 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 had not previously been added.
void ToiChannelService::runQuery ( in ToiOperationManager::TToiOperationId  operationId,
in TToiQueryConditionSequence  queryConditions,
in TToiPropertyIdSequence  requestedProperties 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Returns information of all channels that match the given query conditions. This is an asynchronous operation. When the application receives a ToiOperationOperationResultEvent call with the operation result ToiChannelService::OP_RESULT_CHANNEL_INFO, then the application may get the results by calling the ToiChannelService::getChannelInfoResult() function. The resulting ToiChannelServiceChannelInfo will only include property values for the requested properties.

Parameters:
operationId The operation identifier created by ToiOperationManager.
queryConditions This sequence specifies the search criteria for which channels to search for. Using an empty sequence will return all stored channels.
requestedProperties The requested properties that will be included in the result. Using an empty sequence will return all properties. If some requested property does not exist, this property will not be in the channel info.
Exceptions:
TToiInvalidArgumentException Raised if any of the conditions are invalid, or raised if the operation identifier is illegal.
TToiNotEnoughResourcesException Raised if there were not enough system resources to perform the query.

Member Data Documentation

Equal operation, ==.

This constant can also be accessed from toi.consts.ToiChannelService.EQUALS.

Not equal operation, !=.

This constant can also be accessed from toi.consts.ToiChannelService.NOT_EQUAL.

This is an Event identifier for ToiChannelChannelsAddedEvent.

This constant can also be accessed from toi.consts.ToiChannelService.ON_CHANNELS_ADDED.

This is an Event identifier for ToiChannelChannelsChangedEvent.

This constant can also be accessed from toi.consts.ToiChannelService.ON_CHANNELS_CHANGED.

This is an Event identifier for ToiChannelChannelsRemovedEvent.

This constant can also be accessed from toi.consts.ToiChannelService.ON_CHANNELS_REMOVED.

The asynchronous operation has channel info as a result. See ToiChannelService::getChannelInfoResult().

This constant can also be accessed from toi.consts.ToiChannelService.OP_RESULT_CHANNEL_INFO.

const string ToiChannelService::PROPERTY_DELIVERY_SYSTEM_DESCRIPTOR = "system.deliverysystemdescriptor"

The delivery system descriptor, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_DELIVERY_SYSTEM_DESCRIPTOR.

const string ToiChannelService::PROPERTY_FREE = "system.free"

Defines whether the channel is available for free or not. "true" means that it is free, "false" that it is not.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_FREE.

const string ToiChannelService::PROPERTY_FREQUENCY = "system.frequency"

The frequency this channel is sent on, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_FREQUENCY.

const string ToiChannelService::PROPERTY_LOGICAL_CHANNEL_NUMBER = "system.logicalchannelnumber"

The logical channel number for this channel, used in a broadcast setting. For DVB, see Nordig.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_LOGICAL_CHANNEL_NUMBER.

const string ToiChannelService::PROPERTY_MODULATION_FORMAT = "system.modulationformat"

The modulation format this channel is sent on, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_MODULATION_FORMAT.

const string ToiChannelService::PROPERTY_MODULATION_SYSTEM_TYPE = "system.modulationsystemtype"

Specifies which modulation system the channel uses. See ToiFrontendService::TToiModulationSystem

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_MODULATION_SYSTEM_TYPE.

const string ToiChannelService::PROPERTY_NETWORK_ID = "system.networkid"

The id of the network the channel is sent on.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_NETWORK_ID.

const string ToiChannelService::PROPERTY_NETWORK_NAME = "system.networkname"

The name of the network the channel is sent on.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_NETWORK_NAME.

const string ToiChannelService::PROPERTY_ORIGINAL_NETWORK_ID = "system.originalnetworkid"

The original network id this channel is sent on, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_ORIGINAL_NETWORK_ID.

const string ToiChannelService::PROPERTY_SERVICE_ID = "system.serviceid"

The service id for this channel, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_SERVICE_ID.

const string ToiChannelService::PROPERTY_SERVICE_NAME = "system.servicename"

The service name for this channel, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_SERVICE_NAME.

const string ToiChannelService::PROPERTY_SERVICE_PROVIDER = "system.serviceprovider"

The provider of the service.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_SERVICE_PROVIDER.

const string ToiChannelService::PROPERTY_SERVICE_TYPE = "system.servicetype"

The type of service this channel offers.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_SERVICE_TYPE.

const string ToiChannelService::PROPERTY_SOURCE_ID = "system.sourceid"
Note:
The following properties are specific to ATSC. The source id for this channel, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_SOURCE_ID.

const string ToiChannelService::PROPERTY_TRANSPORT_STREAM_ID = "system.transportstreamid"

The transport strem id this channel is sent on, used in a broadcast setting.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_TRANSPORT_STREAM_ID.

const string ToiChannelService::PROPERTY_URI = "system.uri"

The uri can be directly used by the media service to open a stream. The format of the URI depends on the delivery system. DVB: it can be DVB.deliverySystemDescriptor.serviceId. IP: it can be IP.multicast ip address. ATSC: For ATSC the URI will have the following format: atsc://fr(frequency).(modulation-format).(program-number)1 It is also possible to add optional parameters to the URL which will be of the form <parameter=value>. For example- atsc://fr(fr).(mf).(pn)[|<parameter=value>[&<parameter=value]*]

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_URI.

const string ToiChannelService::PROPERTY_VISIBLE = "system.visible"

Defines whether the channel is visible or not. "true" means visible, "false" invisible. For DVB, see Nordig.

This constant can also be accessed from toi.consts.ToiChannelService.PROPERTY_VISIBLE.

Value of true/false.

This constant can also be accessed from toi.consts.ToiChannelService.TYPE_BOOLEAN.

A signed integer value.

This constant can also be accessed from toi.consts.ToiChannelService.TYPE_INTEGER.

Any string value.

This constant can also be accessed from toi.consts.ToiChannelService.TYPE_STRING.