Source: dvbManager.js

/**
 * STB object declaration and documentation.
 * JSDoc specification ({@link http://usejsdoc.org/}).
 * An introduction to JSDoc ({@link http://www.2ality.com/2011/08/jsdoc-intro.html}).
 *
 * @fileOverview Provides API to manage DVB-C/T/T2 subsystem for MAG270/MAG275 boards only.
 */

'use strict';

/* jshint unused:false */

//noinspection JSUnusedGlobalSymbols

/**
 * Main object to manage DVB-C/T/T2 subsystem for MAG270/MAG275 boards only.
 *
 * To start playback of DVB channel player should be started with the following URL: `dvb://<channel_id>`
 * where channel_id can be obtained from "`id`" field in the result of calling {@link dvbManager.GetChannelList} or {@link dvbManager.GetChannelInfo}.
 *
 * Current DVB type is set via dvb_type bootloader environment variable with the following values:
 *
 * - DVB-C
 * - DVB-T
 * - DVB-T2
 * - DVB-S2
 *
 * <br>
 *
 * Error codes table:
 *
 *  Value | Description
 * -------|-------------
 *  0     | operation successful
 *  1     | error
 *  2     | unsupported
 *  0x1c  | bad handle
 *
 * <br>
 *
 *
 * #### Possible events:
 *
 * ##### event 40 (0x28) "DVB progress"
 *
 * When any new channels is found, player will trigger `event 40 (0x28)` with the following  event data:
 *
 *	{"id": "C_4601_634000", "name": "channel_name", "frequency": 634000, "frontendIndex": 0, "polarization": "H", "symbolRate": 27500000}
 *
 * where
 *
 *  Name          | Description
 * ---------------|-------------
 *  id            | channel unique identifier
 *  name          | channel name
 *  frequency     | channel frequency (in kHz)
 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
 *  polarization  | satellite signal polarization ("`V`" - vertical, "`H`" - horizontal, "`CL`" - circular left, "`CR`" - circular right ) to tune to
 *  symbolRate    | satellite signal symbol rate (symbols per second)
 *
 * <br>
 *
 *
 * ##### event 41 (0x29) "DVB channel found"
 *
 * When scan starts to search new frequency, player will trigger `event 41 (0x29)` with the following  event data:
 *
 *	{"state": "searching", "channel": 23, "frequency": 650000, "progress": 33, "frontendIndex": 0, "polarization": "H", "symbolRate": 27500000}"
 *
 * where
 *
 *  Name          | Description
 * ---------------|-------------
 *  state         | scan state: "`searching`" or "`finished`"
 *  channel       | channel number in frequency grid
 *  frequency     | channel frequency (in kHz)
 *  progress      | scan progress in range [0..100]
 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
 *  polarization  | satellite signal polarization ("`V`" - vertical, "`H`" - horizontal, "`CL`" - circular left, "`CR`" - circular right ) to tune to
 *  symbolRate    | satellite signal symbol rate (symbols per second)
 *
 * <br>
 *
 *
 * ##### event 42 (0x2A)  "EPG updated"
 *
 * When new EPG is found, player will trigger `event 42 (0x2A)` with the following event data:
 *
 *	{"id": "C_4601_634000", "brief": false}
 *
 * where
 *
 *  Name  | Description
 * -------|-------------
 *  id    | channel unique identifier which EPG is updated
 *  brief | true - brief EPG is updated, false - schedule EPG is updated
 *
 * See {@link dvbManager.GetEPGBrief} and {@link dvbManager.GetEPGSchedule}.
 *
 * <br>
 *
 *
 * ##### event 43 (0x2B) "Power overload"
 *
 * When antenna power is enabled but antenna is not active then antenna power will be disabled
 * and `event 43 (0x2B)` will be triggered to notify JavaScript API user. Example:
 *
 * 	{"frontendIndex": 0}
 *
 * where
 *
 *  Name          | Description
 * ---------------|-------------
 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
 *
 * <br>
 *
 * @namespace
 */
var dvbManager = {

	/**
	 * DVB signal type.
	 *
	 *  Value | Description
	 * -------|-------------
	 *  1     | DVB-C signal
	 *  2     | DVB-T signal
	 *  3     | DVB-T2 signal (not available for MAG270)
	 *  4     | DVB-S2 signal
	 *
	 * @typedef {number} dvbManager.SignalType
	 */


	/**
	 * Brief EPG (present and following program) for specified channel in **JSON** format.
	 *
	 * See {@link dvbManager.EpgInfoList}.
	 *
	 * @typedef {string} dvbManager.EpgInfo
	 *
	 * @property {number} start event start time in UTC seconds
	 * @property {number} duration event duration in seconds
	 * @property {string} name event name
	 * @property {string} info event info
	 * @property {string} details detailed event info
	 *
	 * @example
	 * // parsed JSON data
	 * {
	 *     start: 1377846480,
	 *     duration: 3300,
	 *     name: "Program1_name",
	 *     info: "program1_info",
	 *     details: "program1_details"
	 * }
	 */


	/**
	 * List of brief EPG (present and following program) in **JSON** format.
	 *
	 * See {@link dvbManager.EpgInfo}.
	 *
	 * @typedef {string} dvbManager.EpgInfoList
	 *
	 * @property {Array.<dvbManager.EpgInfo>} events EPG data
	 *
	 * @example
	 * // parsed JSON data
	 * {
	 *     events: [
	 *         {
	 *             start: 1377846480,
	 *             duration: 3300,
	 *             name:"Program1_name",
	 *             info:"program1_info",
	 *             details:"program1_details"
	 *         },
	 *         {
	 *             start: 1377846480,
	 *             duration: 3300,
	 *             name:"Program1_name",
	 *             info:"program1_info",
	 *             details:"program1_details"
	 *         }
	 *     ]
	 * }
	 */


	/**
	 * Information about a channel in **JSON** format.
	 *
	 * See {@link dvbManager.ChannelInfoList}.
	 *
	 * @typedef {string} dvbManager.ChannelInfo
	 *
	 * @property {number} frequency channel frequency (in kHz)
	 * @property {number} frontendIndex index of satellite frontend (tuner) to be used [0..n]
	 * @property {string} polarization satellite signal polarization ("`V`" - vertical, "`H`" - horizontal, "`CL`" - circular left, "`CR`" - circular right ) to tune to
	 * @property {number} symbolRate satellite signal symbol rate (symbols per second)
	 * @property {string} id unique channel identifier
	 * @property {boolean} scrambled scrambled channel indication
	 * @property {string} name channel name
	 * @property {string} provider service provider name
	 * @property {boolean} isRadio radio channel indicator
	 * @property {number} channel_number logical channel number in network (0 means that logical channel number is not found)
	 *
	 *
	 *
	 * @example
	 * // parsed JSON data
	 * {
	 *     frequency: 634000,
	 *     frontendIndex: 0,
	 *     polarization: "H",
	 *     symbolRate: 27500000,
	 *     id: "C_4601_634000",
	 *     scrambled: "false",
	 *     name: "ServiceName",
	 *     provider: "testProvider",
	 *     isRadio: "false",
	 *     channel_number: 23
	 * }
	 */


	/**
	 * List of DVB channels data in **JSON** format.
	 *
	 * See {@link dvbManager.ChannelInfo}.
	 *
	 * @typedef {string} dvbManager.ChannelInfoList
	 *
	 * @property {Array.<dvbManager.ChannelInfo>} channels individual channels data
	 *
	 * @example
	 * // parsed JSON data
	 * {
	 *     channels: [{
	 *         frequency: 634000,
	 *         frontendIndex: 0,
	 *         polarization: "H",
	 *         symbolRate: 27500000,
	 *         id: "C_4601_634000",
	 *         scrambled: "false",
	 *         name: "ServiceName",
	 *         provider: "testProvider",
	 *         isRadio: "false",
	 *         channel_number: 23
	 *     }]
	 * }
	 */


	/**
	 * Get whether antenna power from STB is enabled.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.SetAntennaPower}.
	 *
	 * @function
	 * @name dvbManager.GetAntennaPower
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | power is enabled
	 *  false | power is disabled
	 */

	/**
	 * Get whether antenna power from STB is enabled.
	 *
	 * See {@link dvbManager.SetAntennaPower}.
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | power is enabled
	 *  false | power is disabled
	 */
	GetAntennaPower:
		function () { return true; },


	/**
	 * Get Bit Error Rate.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.GetBitErrorRate
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} (Bit Error Rate) * 10^7
	 */

	/**
	 * Get Bit Error Rate.
	 *
	 * @return {number} (Bit Error Rate) * 10^7
	 */
	GetBitErrorRate:
		function () { return 0; },


	/**
	 * Get full list of DVB channels in **JSON** format.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.ChannelInfo}, {@link dvbManager.ChannelInfoList}.
	 *
	 * @function
	 * @name dvbManager.GetChannelList
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {dvbManager.ChannelInfoList} list of channels descriptions in **JSON** format
	 */

	/**
	 * Get full list of DVB channels in **JSON** format.
	 *
	 * See {@link dvbManager.ChannelInfo}, {@link dvbManager.ChannelInfoList}.
	 *
	 * @return {dvbManager.ChannelInfoList} list of channels descriptions in **JSON** format
	 */
	GetChannelList:
		function () { return ''; },


	/**
	 * Get information about specified channel in **JSON** format.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.ChannelInfo}.
	 *
	 * @function
	 * @name dvbManager.GetChannelInfo
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  id            | channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {dvbManager.ChannelInfo} channel description in **JSON** format
	 */

	/**
	 * Get information about specified channel in **JSON** format.
	 *
	 * See {@link dvbManager.ChannelInfo}.
	 *
	 * @param {string} id channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {dvbManager.ChannelInfo} channel description in **JSON** format
	 */
	GetChannelInfo:
		function ( id ) { return ''; },


	/**
	 * Clear DVB channel list.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.ClearChannelList
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Clear DVB channel list.
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	ClearChannelList:
		function () { return 0; },


	/**
	 * Remove specified DVB channel.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.RemoveChannel
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  id            | channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Remove specified DVB channel.
	 *
	 * @param {string} id channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	RemoveChannel:
		function ( id ) { return 0; },


	/**
	 * Start channel scanning.
	 *
	 * During scan player can trigger 2 events.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager}.
	 *
	 * @function
	 * @name dvbManager.StartChannelScan
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  signalType    | dvb signal type (see {@link dvbManager.SignalType})
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Start channel scanning.
	 *
	 * During scan player can trigger 2 events.
	 *
	 * See {@link dvbManager}.
	 *
	 * @param {dvbManager.SignalType} signalType dvb signal type
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	StartChannelScan:
		function ( signalType ) { return 0; },


	/**
	 * Start manual channel scanning.
	 *
	 * During scan player can trigger 2 events.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager}, {@link dvbManager.SignalType}.
	 *
	 * @function
	 * @name dvbManager.StartChannelScanManual
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  signalType    | dvb signal type (see {@link dvbManager.SignalType})
	 *  from          | scan range start frequency (in kHz)
	 *  to            | scan range end frequency (in kHz)
	 *  bandwidth     | channel bandwidth in MHz. e.i. 6, 7, 8
	 *  step          | frequency step (in kHz)
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Start manual channel scanning.
	 *
	 * During scan player can trigger 2 events.
	 *
	 * See {@link dvbManager}, {@link dvbManager.SignalType}.
	 *
	 * @param {number} from scan range start frequency (in kHz)
	 * @param {number} to scan range end frequency (in kHz)
	 * @param {dvbManager.SignalType} signalType dvb signal type
	 * @param {number} bandwidth channel bandwidth in MHz. e.i. 6, 7, 8
	 * @param {number} step frequency step (in kHz)
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	StartChannelScanManual:
		function( from, to, signalType, bandwidth, step ) { return 0; },


	/**
	 * Stop channel scan.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.StopChannelScan
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Stop channel scan.
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	StopChannelScan:
		function () { return 0; },


	/**
	 * Tune receiver to specified frequency.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @function
	 * @name dvbManager.TuneChannel
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  id            | channel unique identifier from {@link dvbManager.GetChannelList}
	 *  signalType    | dvb signal type (see {@link dvbManager.SignalType})
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Tune receiver to specified frequency.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @param {number} frequency frequency (in kHz)
	 * @param {dvbManager.SignalType} signalType dvb signal type
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	TuneChannel:
		function ( frequency, signalType ) { return 0; },


	/**
	 * Get signal level.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.GetSignalLevel
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} signal level [0..100]
	 */

	/**
	 * Get signal level.
	 *
	 * @return {number} signal level [0..100]
	 */
	GetSignalLevel:
		function () { return 0; },


	/**
	 * Get signal quality.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.GetSignalQuality
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} signal quality [0..100]
	 */

	/**
	 * Get signal quality.
	 *
	 * @return {number} signal quality [0..100]
	 */
	GetSignalQuality:
		function () { return 0; },


	/**
	 * Untune receiver from frequency.
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.UnTuneChannel
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Untune receiver from frequency.
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	UnTuneChannel:
		function () { return 0; },


	/**
	 * Get brief EPG (present and following program) for specified channel.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.EpgInfoList}.
	 *
	 * @function
	 * @name dvbManager.GetEPGBrief
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  id            | channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {dvbManager.EpgInfoList} EPG brief in **JSON** format
	 */

	/**
	 * Get brief EPG (present and following program) for specified channel.
	 *
	 * See {@link dvbManager.EpgInfoList}.
	 *
	 * @param {string} id channel unique identifier from {@link dvbManager.GetChannelList}
	 *
	 * @return {dvbManager.EpgInfoList} EPG brief in **JSON** format
	 */
	GetEPGBrief:
		function ( id ) { return ''; },


	/**
	 * Get schedule EPG (for long period) for specified channel.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.EpgInfoList}.
	 *
	 * @function
	 * @name dvbManager.GetEPGSchedule
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  id            | channel unique identifier from {@link dvbManager.GetChannelList}
	 *  day           | number of days from current day which should be available in result (-1 means full schedule EPG)
	 *
	 * @return {dvbManager.EpgInfoList} schedule EPG in **JSON** format
	 */

	/**
	 * Get schedule EPG (for long period) for specified channel.
	 *
	 * See {@link dvbManager.EpgInfoList}.
	 *
	 * @param {string} id channel unique identifier from {@link dvbManager.GetChannelList}
	 * @param {number} [day=-1] number of days from current day which should be available in result
	 *
	 * (-1 means full schedule EPG)
	 *
	 * @return {dvbManager.EpgInfoList} schedule EPG in **JSON** format
	 */
	GetEPGSchedule:
		function ( id, day ) { return ''; },


	/**
	 * Enable or disable antenna power from STB.
	 *
	 * Used for DVB-T/T2/S2 to supply power to active antenna.
	 *
	 * In case when connected antenna is not active an `event 33 (0x2B)` will be triggered
	 * and antenna power will be disabled.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager}.
	 *
	 * @function
	 * @name dvbManager.SetAntennaPower
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  on            | state
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */

	/**
	 * Enable or disable antenna power from STB.
	 *
	 * Used for DVB-T/T2 to supply power to active antenna.
	 *
	 * In case when connected antenna is not active an `event 33 (0x2B)` will be triggered
	 * and antenna power will be disabled.
	 *
	 * See {@link dvbManager}.
	 *
	 * @param {boolean} on
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	SetAntennaPower:
		function ( on ) { return 0; },


	/**
	 * Set params for DVB channel scan.
	 *
	 * Modulation values list:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | AUTO
	 *  1     | 16QAM
	 *  2     | 32QAM
	 *  3     | 64QAM
	 *  4     | 128QAM
	 *  5     | 256QAM
	 *
	 * Supports DVB-S2.
	 *
	 * @param {string} params configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  type          | dvb signal type (see {@link dvbManager.SignalType})
	 *  symRate       | symbolRate in Kb/sec
	 *  modulation    | see modulation values list
	 *  scanMode      | 0 - network, 1 - full, 2 - fast (use NIT)
	 *  frequency     | frequency for fast scan in KHz
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  networkId     | network ID (0 - auto)
	 *
	 * @example
	 * dvbManager.SetScanParams(JSON.stringify({
	 *     type: 1,
	 *     symRate: 6875,
	 *     modulation: 4,
	 *     scanMode: 1,
	 *     frequency: 506000,
	 *     networkId: 3333
	 * }));
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 */
	SetScanParams:
		function ( params ) { return 0; },


	/**
	 * Get supported scan types for this STB.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @function
	 * @name dvbManager.GetSupportedScanTypes
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {string} scan types list in **JSON** format
	 *
	 * @example
	 * // raw data
	 * dvbManager.GetSupportedScanTypes(JSON.stringify({frontendIndex:1}));
	 * // execution result
	 * '[{"type":1,"name":"DVB-C"},{"type":2,"name":"DVB-T"},{"type":3,"name":"DVB-T2"},{"type":4,"name":"DVB-S2"}]'
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(dvbManager.GetSupportedScanTypes(JSON.stringify({frontendIndex:1})));
	 * // execution result
	 * [
	 *     {type: 1, name: "DVB-C"},
	 *     {type: 2, name: "DVB-T"},
	 *     {type: 3, name: "DVB-T2"}
	 *     {type: 4, name: "DVB-S2"}
	 * ]
	 */

	/**
	 * Get supported scan types for this STB.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @return {string} scan types list in **JSON** format
	 *
	 * @example
	 * // raw data
	 * dvbManager.GetSupportedScanTypes();
	 * // execution result
	 * '[{"type":1,"name":"DVB-C"},{"type":2,"name":"DVB-T"},{"type":3,"name":"DVB-T2"}]'
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(dvbManager.GetSupportedScanTypes());
	 * // execution result
	 * [
	 *     {type: 1, name: "DVB-C"},
	 *     {type: 2, name: "DVB-T"},
	 *     {type: 3, name: "DVB-T2"}
	 * ]
	 */
	GetSupportedScanTypes:
		function () { return ''; },


	/**
	 * Set preferred language for DVB subsystem (EPG etc.).
	 *
	 * Supports DVB-S2.
	 *
	 * @function
	 * @name dvbManager.SetPreferredLang
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *  lang1         | preferred language in ISO 639-2 format (Alpha-3 code)
	 *  lang2         | preferred language in ISO 639-1 format (Alpha-2 code)
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 *
	 * @example
	 * dvbManager.SetPreferredLang(JSON.stringify({frontendIndex:1, lang1: 'eng', lang2: 'en'}));
	 */

	/**
	 * Set preferred language for DVB subsystem (EPG etc.).
	 *
	 * @param {string} lang1 preferred language in ISO 639-2 format (Alpha-3 code)
	 * @param {string} lang2 preferred language in ISO 639-1 format (Alpha-2 code)
	 *
	 * @return {number} operation status
	 *
	 * (see error codes table)
	 *
	 * @example
	 * dvbManager.SetPreferredLang('eng', 'en');
	 */
	SetPreferredLang:
		function ( lang1, lang2 ) { return 0; },


	/**
	 * Get currently supported scan types for this STB.
	 *
	 * The difference with {@link dvbManager.GetSupportedScanTypes} is:
	 * result of {@link dvbManager.GetCurrentScanTypes} depends on current DVB Type
	 * e.i. for MAG275 it can be either DVB-C or DVB-T and DVB-T2, for MAG356 it can be DVB-S2.
	 *
	 * Supports DVB-S2.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @function
	 * @name dvbManager.GetCurrentScanTypes
	 *
	 * @param {string} config configuration object in **JSON** format
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frontendIndex | index of satellite frontend (tuner) to be used [0..n]
	 *
	 * @return {string} scan types list in **JSON** format
	 *
	 * @example
	 * // raw data
	 * dvbManager.GetCurrentScanTypes(JSON.stringify({frontendIndex:1}));
	 * // execution result
	 * '[{"type":1,"name":"DVB-C"},{"type":2,"name":"DVB-T"},{"type":3,"name":"DVB-T2"}, {"type":4,"name":"DVB-S2"}]'
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(dvbManager.GetCurrentScanTypes(JSON.stringify({frontendIndex:1})));
	 * // execution result
	 * [
	 *     {type: 1, name: "DVB-C"},
	 *     {type: 2, name: "DVB-T"},
	 *     {type: 3, name: "DVB-T2"},
	 *     {type: 4, name: "DVB-S2"}
	 * ]
	 */

	/**
	 * Get currently supported scan types for this STB.
	 *
	 * The difference with {@link dvbManager.GetSupportedScanTypes} is:
	 * result of {@link dvbManager.GetCurrentScanTypes} depends on current DVB Type
	 * e.i. for MAG275 it can be either DVB-C or DVB-T and DVB-T2, for MAG356 it can be DVB-S2.
	 *
	 * See {@link dvbManager.SignalType}.
	 *
	 * @return {string} scan types list in **JSON** format
	 *
	 * @example
	 * // raw data
	 * dvbManager.GetCurrentScanTypes();
	 * // execution result
	 * '[{"type":1,"name":"DVB-C"},{"type":2,"name":"DVB-T"},{"type":3,"name":"DVB-T2"}]'
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(dvbManager.GetCurrentScanTypes());
	 * // execution result
	 * [
	 *     {type: 1, name: "DVB-C"},
	 *     {type: 2, name: "DVB-T"},
	 *     {type: 3, name: "DVB-T2"}
	 * ]
	 */
	GetCurrentScanTypes:
		function () { return ''; }

};