Author: ygrego Date: 2015-06-11 15:35:59 +0000 (Thu, 11 Jun 2015) New Revision: 1705 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1705 Log: Refactor this class in an ES6 class. Modified: oipf/lib/configuration/ConfigDefaultProperties.js Modified: oipf/lib/configuration/ConfigDefaultProperties.js =================================================================== --- oipf/lib/configuration/ConfigDefaultProperties.js 2015-06-11 15:31:19 UTC (rev 1704) +++ oipf/lib/configuration/ConfigDefaultProperties.js 2015-06-11 15:35:59 UTC (rev 1705) @@ -1,18 +1,18 @@ -/* +/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ -var ConfigDefaultProperties = Class.extend({ - - init: function() { - +class ConfigDefaultProperties { + + constructor() { + this.restrictedPowerState = { 0: true, // OFF 6: true // FACTORY_RESET }, - + this.tvStandardsSupported = { 1: true, 2: true, @@ -20,13 +20,13 @@ 8: true, 16: true }, - + this.screenSize = { "1280x720": true, //HD 720 "1920x1080": true, //HD 1080 "640x480": true //VGA }, - + this.configuration = { preferredAudioLanguage: "fra", preferredSubtitleLanguage: "fra", @@ -36,16 +36,16 @@ pvrPolicy: configurationConstants.pvrPolicy.WATCHED_RECORDINGS, pvrSaveEpisodes: 5, pvrSaveDays: 15, - pvrStartPadding: 0, //Measured in (s) + pvrStartPadding: 0, //Measured in (s) pvrEndPadding: 0, //Measured in (s) preferredTimeShiftMode: videoBroadcastConstants.timeShiftMode.OFF }; - + this.startupInformation = { urlSource: null, url: null }; - + this.aVOutput = { name: null, type: null, @@ -63,15 +63,15 @@ supportedAspectRatios: null, current3DMode: null }; - + this.signalInfo = { strength: null, quality: null, - ber: null, + ber: null, snr: null, lock: null }; - + this.lNBInfo = { lnbType: null, lnbLowFreq: null, @@ -81,7 +81,7 @@ lnbStopFrequency: null, orbitalPosition: null }; - + this.tuner = { id: null, enableTuner: true, @@ -90,17 +90,17 @@ frontEndPosition: null, powerOnExternal: null }; - + var idTypes = new IntegerCollection(12, 11); var tunerTNT = new Tuner("TNT", idTypes, this.tuner); var tuners = new TunerCollection(tunerTNT); - - var masterAVOutput = + + var masterAVOutput = new AVOutput("master", "both", true, this.aVOutput); - - var networkInterface = + + var networkInterface = new NetworkInterface("192.168.99.191", "6D:FF:29:E1:AF:33", true, true); - + this.localSystem = { deviceID: undefined, systemReady: false, @@ -128,8 +128,8 @@ tvStandard: configurationConstants.tvStandard.SECAM, pvrSupport: 1, startupInformation: null - }; - + }; + } -}); +}
participants (1)
-
ygregoï¼ users.nuiton.org