Sandbox-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
February 2015
- 2 participants
- 143 discussions
Author: ygrego
Date: 2015-02-09 13:37:22 +0000 (Mon, 09 Feb 2015)
New Revision: 775
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/775
Log:
New approach defined(into class 'SearchResults') for a search based on call of javascript method 'Date.getTime()', addition of new javascript sources in file 'welcome.html', insertion of a console display in method 'onMetadataSearch()' when parameter 'state' takes value '3' or '4'.
Modified:
oipf/js/impl/model/SearchResults.js
oipf/js/test/test.js
oipf/view/welcome.html
Modified: oipf/js/impl/model/SearchResults.js
===================================================================
--- oipf/js/impl/model/SearchResults.js 2015-02-06 16:17:45 UTC (rev 774)
+++ oipf/js/impl/model/SearchResults.js 2015-02-09 13:37:22 UTC (rev 775)
@@ -77,34 +77,12 @@
currentChannelId = undefined,
channels = metadata.tv.channel,
displayName,
- item,
- index,
programs = metadata.tv.programme,
- startTime,
- tmpSSTime,
- currentTime = new Date(),
- currentStopTime,
- currentStartTime,
- /*
- * Usefull to retrieve severals programs when user want more than one programs information.
- */
- currentProgramIndex,
-
- /*
- * Used to found the current program : the smaller difference between current time and stop time of a program,
- * means that the program stopping a this stop time is the current program.
- */
- smallerDiff,
-
- /*
- * The difference calculated during the loop of current program searching.
- */
- currentDiff,
pattern = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\s\+(\d{2})/;
- var i;
+
//Found the associated id of current channel in metadata because channel is referenced by id in program information
- for (i = 0; i<channels.length; i++) {
+ for (var i = 0; i<channels.length; i++) {
item = channels[i];
displayName = item[displayNameStr];
@@ -120,63 +98,71 @@
return;
}
console.log("[INFO] Current channel id found.");
-
- //Another loop will run, just a reinitialization.
- startTime = this._currentQuery.startTime;
- var hStart, hStop,
- mStart, mStop,
- sStart, sStop;
-
- /*
- * The user searches information on the current program, broadcasted on the current channel.
- * In this case don't need start time of program, the search must be proceeded on current time.
- */
- if (startTime == null) {
+
+ var startTime = this._currentQuery.startTime;
- //Found programs of current channel only
- for (i = 0; i< programs.length; i++) {
- item = programs[i]
+ //Found programs of current channel only
+ for (var i = 0; i< programs.length; i++) {
+ var item = programs[i];
+
+ if (item[channelStr] == currentChannelId) { // && date
+
+ var tmpSSTime = item[startStr];
+ tmpSSTime = pattern.exec(tmpSSTime);
+ console.log(tmpSSTime);
+ var dateTmp = new Date();
- if (item[channelStr] == currentChannelId) {
-
- tmpSSTime = item[startStr];
- tmpSSTime = pattern.exec(tmpSSTime);
-
- console.log(tmpSSTime);
-
- hStart = parseInt(tmpSSTime[4])*3600;
- mStart = parseInt(tmpSSTime[5])*60;
- var startTInNbSec = hStart+mStart;
- console.log(hStart,mStart,startTInNbSec);
-
- tmpSSTime = item[stopStr];
- tmpSSTime = pattern.exec(tmpSSTime);
- console.log(tmpSSTime);
-
- hStop = parseInt(tmpSSTime[4])*3600;
- mStop = parseInt(tmpSSTime[5])*60;
- var stopTInNbSec = hStop+mStop;
- console.log(hStop,mStop,stopTInNbSec);
-
- var currentTimeInNbSec = (currentTime.getUTCHours()+1)*3600 + (currentTime.getUTCMinutes()*60)
- console.log(currentTimeInNbSec);
-
- if ( (currentTimeInNbSec >= startTInNbSec) && (currentTimeInNbSec <= stopTInNbSec) ) {
- console.log("[INFO] Program found.");
- index = i;
- break;
- } else {
- console.log("[INFO] Program not yet found.");
+ /*year = parseInt(tmpSSTime[1]);
+ month = parseInt(tmpSSTime[2]);
+ day = parseInt(tmpSSTime[3]);*/
+ var year = dateTmp.getFullYear();
+ var month = dateTmp.getUTCMonth();
+ var day = dateTmp.getUTCDate();
+ var hs = parseInt(tmpSSTime[4]);
+ var mins = parseInt(tmpSSTime[5]);
+ var secs = parseInt(tmpSSTime[6]);
+
+ var startDate = new Date(year, month, day, hs, mins, secs);
+
+ tmpSSTime = item[stopStr];
+ tmpSSTime = pattern.exec(tmpSSTime);
+ console.log(tmpSSTime);
+
+ year = dateTmp.getFullYear();
+ month = dateTmp.getUTCMonth();
+ day = dateTmp.getUTCDate();
+ hs = parseInt(tmpSSTime[4]);
+ mins = parseInt(tmpSSTime[5]);
+ secs = parseInt(tmpSSTime[6]);
+
+ var stopDate = new Date(year, month, day, hs, mins, secs);
+
+ var currentDate = new Date();
+
+ /*
+ * The user searches information on the current program, broadcasted on the current channel.
+ * In this case don't need start time of program, the search must be proceeded on current time.
+ */
+ if (startTime == null) {
+
+ if ( (currentDate.getTime() >= startDate.getTime()) && (currentDate.getTime() <= stopDate.getTime()) ) {
+ console.log("[INFO] Program found.");
+ var currentProgramIndex = i; // Usefull to retrieve severals programs when user want more than one programs information.
+ break;
+ }
+
+ } else { //The search use the start time like a filter to retrieve the required program information.
+
+ if (this._currentQuery.starTime == startDate.getTime()) {
+ var currentProgramIndex = i; // Usefull to retrieve severals programs when user want more than one programs information.
+ break;
}
-
}
- }
-
- } else { //The search use the start time like a filter to retrieve the required program information.
-
-
+ console.log("[INFO] Program not yet found.");
+ }
}
+
// document.dispatchEvent(new Event('MetadataSearch', {
// 'search': metaDataSearch,
// 'state': 0
@@ -186,11 +172,16 @@
setTimeout(function() {
console.log("<<<<<<<<<<<<<<", new Date(), ">>>>>>>>>>>>>>>>");
//When user want more than one result into his search.
- for (var i = 0; i < count; i++) {
- self.push(programs[index]);
- index++;
+ if (currentProgramIndex) {
+ for (var i = 0; i < count; i++) {
+ self.push(programs[currentProgramIndex]);
+ currentProgramIndex++;
+ }
+ self._search._searchManager.onMetadataSearch && self._search._searchManager.onMetadataSearch(self._search, 0);
+ } else {
+ self._search._searchManager.onMetadataSearch && self._search._searchManager.onMetadataSearch(self._search, 4);
}
- self._search._searchManager.onMetadataSearch && self._search._searchManager.onMetadataSearch(self._search, 0);
+
}, 0);
return false;
Modified: oipf/js/test/test.js
===================================================================
--- oipf/js/test/test.js 2015-02-06 16:17:45 UTC (rev 774)
+++ oipf/js/test/test.js 2015-02-09 13:37:22 UTC (rev 775)
@@ -88,18 +88,18 @@
case 3:
- var message = " MetadataSearch in Idle state because of either search abort or parameters have been modified \
- (query, constraints or search target)";
+ var message = "[INFO] MetadataSearch in Idle state because of either search abort or parameters have been modified (query, constraints or search target)";
+ console.log(message);
break;
case 4:
- message = " The search cannot be complete because of lack of ressources or any other reason.\
- (memory insufficient to cache all of the requested results.)";
+ message = "[INFO] The search cannot be complete because of lack of ressources or any other reason.";
+ console.log(message);
break;
default:
- console.log("Unknow state :(");
+ console.log("Unknow state");
}
}
Modified: oipf/view/welcome.html
===================================================================
--- oipf/view/welcome.html 2015-02-06 16:17:45 UTC (rev 774)
+++ oipf/view/welcome.html 2015-02-09 13:37:22 UTC (rev 775)
@@ -5,6 +5,10 @@
<script src="../js/lib/Class.js" type="text/javascript"></script>
<script src="../js/lib/Collection.js" type="text/javascript"></script>
<script src="../data/data.js" type="text/javascript"></script>
+ <script src="../js/impl/model/Query.js" type="text/javascript"></script>
+ <script src="../js/impl/model/Channel.js" type="text/javascript"></script>
+ <script src="../js/impl/model/MetadataSearch.js" type="text/javascript"></script>
+ <script src="../js/impl/model/SearchResults.js" type="text/javascript"></script>
<script src="../js/impl/OipfObjectFactory.js" type="text/javascript"></script>
<script src="../js/impl/ChannelConfig.js" type="text/javascript"></script>
<script src="../js/impl/VideoBroadcastObject.js" type="text/javascript"></script>
1
0
Author: ygrego
Date: 2015-02-06 16:17:45 +0000 (Fri, 06 Feb 2015)
New Revision: 774
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/774
Log:
Rename 'math.js'
Added:
oipf/js/utils/Math.js
Removed:
oipf/js/utils/math.js
Copied: oipf/js/utils/Math.js (from rev 773, oipf/js/utils/math.js)
===================================================================
--- oipf/js/utils/Math.js (rev 0)
+++ oipf/js/utils/Math.js 2015-02-06 16:17:45 UTC (rev 774)
@@ -0,0 +1,11 @@
+var math = Class.extend({
+
+ init: function() {
+ },
+
+ genId: function(boundary, adjustment){
+
+ return Math.floor((Math.random() * boundary) + adjustment);
+ }
+
+});
\ No newline at end of file
Deleted: oipf/js/utils/math.js
===================================================================
--- oipf/js/utils/math.js 2015-02-06 16:10:09 UTC (rev 773)
+++ oipf/js/utils/math.js 2015-02-06 16:17:45 UTC (rev 774)
@@ -1,11 +0,0 @@
-var math = Class.extend({
-
- init: function() {
- },
-
- genId: function(boundary, adjustment){
-
- return Math.floor((Math.random() * boundary) + adjustment);
- }
-
-});
\ No newline at end of file
1
0
Author: ygrego
Date: 2015-02-06 16:10:09 +0000 (Fri, 06 Feb 2015)
New Revision: 773
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/773
Log:
Addition of creation of a object query 'currentQuery' into object 'MetadaSearch'(into method findProgrammesFromStream), implementation of method 'getResults' only for current program, creation of current channel into 'OipfObjectFactory' constructor.
Modified:
oipf/js/impl/OipfObjectFactory.js
oipf/js/impl/SearchManagerObject.js
oipf/js/impl/model/MetadataSearch.js
oipf/js/impl/model/SearchResults.js
oipf/js/initObj/init.js
oipf/js/test/test.js
Modified: oipf/js/impl/OipfObjectFactory.js
===================================================================
--- oipf/js/impl/OipfObjectFactory.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/impl/OipfObjectFactory.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -29,6 +29,9 @@
//this.applicationManagerObject = new ApplicationManagerObject();
//this.capabilitiesObject = new CapabilitiesObject();
//this.codManagerObject = new CodManagerObject();
+ var currentChannelType = "TYPE_TV";
+ var currentChannelName = "ARTE";
+ var currentChannel = new Channel(currentChannelName, currentChannelType);
this.channelConfig = new ChannelConfig(null, currentChannel);
//this.imsObject = new IMSObecjet();
//this.mdtfObject = new MDTFObject();
Modified: oipf/js/impl/SearchManagerObject.js
===================================================================
--- oipf/js/impl/SearchManagerObject.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/impl/SearchManagerObject.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -109,7 +109,7 @@
*/
createSearch: function(searchTarget) {
- return new MetadataSearch(searchTarget);
+ return new MetadataSearch(searchTarget, this);
},
/*
Modified: oipf/js/impl/model/MetadataSearch.js
===================================================================
--- oipf/js/impl/model/MetadataSearch.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/impl/model/MetadataSearch.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -95,7 +95,8 @@
* of search results determined by the getResults() parameters, or take an alternative approach not described here.
*/
var MetadataSearch = Class.extend({
-
+
+ _searchManager: null,
/*
* Description:
* The subset of search results that has been requested by the application.
@@ -121,10 +122,9 @@
*/
searchTarget: null,
- init: function(searchTarget) {
-
+ init: function(searchTarget, searchManager) {
this.searchTarget = searchTarget;
- this.result = new SearchResults();
+ this._searchManager = searchManager;
},
/*
@@ -156,7 +156,9 @@
*/
findProgrammesFromStream: function(channel, startTime, count) {
console.log("[INFO]: findProgrammesFromStream [IN]");
- currentQuery = new Query(channel, startTime, count);
+ var currentQuery = new Query(channel, startTime, count);
+ this.result = new SearchResults(currentQuery);
+ this.result._search = this;
console.log("[INFO]: findProgrammesFromStream [Out]");
},
Modified: oipf/js/impl/model/SearchResults.js
===================================================================
--- oipf/js/impl/model/SearchResults.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/impl/model/SearchResults.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -14,7 +14,7 @@
* In addition to the properties and methods defined below a SearchResults object SHALL support the array notation to
* access the results in this collection.
*/
-var SearchResults = Class.extend({
+var SearchResults = Array.extend({
/*
* Description:
@@ -45,7 +45,11 @@
*/
totalSize: null,
- init: function() {
+ _search: null,
+ _currentQuery: null,
+
+ init: function(currentQuery) {
+ this._currentQuery = currentQuery;
this.lentgh = 0;
this.totalSize = 0;
},
@@ -71,11 +75,11 @@
stopStr = "-stop",
startStr = "-start",
currentChannelId = undefined,
- channels = data.tv.channel,
+ channels = metadata.tv.channel,
displayName,
item,
index,
- programs = data.tv.programme,
+ programs = metadata.tv.programme,
startTime,
tmpSSTime,
currentTime = new Date(),
@@ -96,7 +100,7 @@
* The difference calculated during the loop of current program searching.
*/
currentDiff,
- pattern = /\d{4}\d{2}\d{2}(\d{2})(\d{2})(\d{2})\s\+(\d{2})/;
+ pattern = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\s\+(\d{2})/;
var i;
//Found the associated id of current channel in metadata because channel is referenced by id in program information
@@ -105,7 +109,7 @@
item = channels[i];
displayName = item[displayNameStr];
- if (displayName == currentChannel.name) {
+ if (displayName == this._currentQuery.channel.name) {
currentChannelId = item[idStr]
break;
}
@@ -118,7 +122,7 @@
console.log("[INFO] Current channel id found.");
//Another loop will run, just a reinitialization.
- startTime = currentQuery.startTime;
+ startTime = this._currentQuery.startTime;
var hStart, hStop,
mStart, mStop,
sStart, sStop;
@@ -137,32 +141,34 @@
tmpSSTime = item[startStr];
tmpSSTime = pattern.exec(tmpSSTime);
+
console.log(tmpSSTime);
- hStart = parseInt(tmpSSTime[0]) +1;
- mStart = parseInt(tmpSSTime[1]);
- sStart = parseInt(tmpSSTime[2]);
+ hStart = parseInt(tmpSSTime[4])*3600;
+ mStart = parseInt(tmpSSTime[5])*60;
+ var startTInNbSec = hStart+mStart;
+ console.log(hStart,mStart,startTInNbSec);
tmpSSTime = item[stopStr];
tmpSSTime = pattern.exec(tmpSSTime);
console.log(tmpSSTime);
- hStop = parseInt(tmpSSTime[0]) +1;
- mStop = parseInt(tmpSSTime[1]);
- sStop = parseInt(tmpSSTime[2]);
+ hStop = parseInt(tmpSSTime[4])*3600;
+ mStop = parseInt(tmpSSTime[5])*60;
+ var stopTInNbSec = hStop+mStop;
+ console.log(hStop,mStop,stopTInNbSec);
- if (currentTime.getUTCHours() >= hStart && currentTime.getUTCHours() >= mStart && currentTime.getUTCHours()>=sStart &&
- currentTime.getUTCHours() >= hStop && currentTime.getUTCHours() >= mStop && currentTime.getUTCHours()>=sStop
- ) {
-
- console.log("[INFO] Program found.")
+ var currentTimeInNbSec = (currentTime.getUTCHours()+1)*3600 + (currentTime.getUTCMinutes()*60)
+ console.log(currentTimeInNbSec);
+
+ if ( (currentTimeInNbSec >= startTInNbSec) && (currentTimeInNbSec <= stopTInNbSec) ) {
+ console.log("[INFO] Program found.");
index = i;
break;
} else {
-
- console.log("[INFO] Program not yet found.")
+ console.log("[INFO] Program not yet found.");
}
-
+
}
}
@@ -171,18 +177,22 @@
}
- //When user want more than one result into his search.
- for (i = 0; i < count; i++) {
-
- this.[i] = programs[index];
- index++;
- }
+// document.dispatchEvent(new Event('MetadataSearch', {
+// 'search': metaDataSearch,
+// 'state': 0
+// }));
+// console.log(this._search);
+ var self = this;
+ setTimeout(function() {
+ console.log("<<<<<<<<<<<<<<", new Date(), ">>>>>>>>>>>>>>>>");
+ //When user want more than one result into his search.
+ for (var i = 0; i < count; i++) {
+ self.push(programs[index]);
+ index++;
+ }
+ self._search._searchManager.onMetadataSearch && self._search._searchManager.onMetadataSearch(self._search, 0);
+ }, 0);
- this.dispatchEvent(new Event('MetadataSearch', {
- 'search': metaDataSearch,
- 'state': 0
- });
-
return false;
},
@@ -211,7 +221,7 @@
*
*/
item: function(index) {
-
+ return this[index];
}
});
\ No newline at end of file
Modified: oipf/js/initObj/init.js
===================================================================
--- oipf/js/initObj/init.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/initObj/init.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -6,9 +6,5 @@
extends: "object"
});
-var currentQuery;
-var currentChannelType = "TYPE_TV";
-var currentChannelName = "ARTE";
-var currentChannel = new Channel(currentChannelName, currentChannelType);
var oipfObjectFactory = new OipfObjectFactory();
var metadata = data;
Modified: oipf/js/test/test.js
===================================================================
--- oipf/js/test/test.js 2015-02-05 15:13:26 UTC (rev 772)
+++ oipf/js/test/test.js 2015-02-06 16:10:09 UTC (rev 773)
@@ -73,18 +73,11 @@
function testGetCurrentProgram(searchTarget, channel, startTime, offset, count){
- searchManagerObject = oipfObjectFactory.createSearchManagerObject();
- channelConfig = oipfObjectFactory.createChannelConfig();
- metaDataSearch = searchManagerObject.createSearch(searchTarget);
- metaDataSearch.findProgrammesFromStream(channelConfig.currentChannel, null);
- metaDataSearch.result.getResults(offset,count);
-
+ var searchManagerObject = oipfObjectFactory.createSearchManagerObject();
searchManagerObject.onMetadataSearch = function(search, state) {
- console.log("[INFO]: onMetadataSearch called", search);
+ console.log("[INFO]: onMetadataSearch called");
- var message = "";
-
switch(state) {
case 0:
@@ -95,7 +88,7 @@
case 3:
- message = " MetadataSearch in Idle state because of either search abort or parameters have been modified \
+ var message = " MetadataSearch in Idle state because of either search abort or parameters have been modified \
(query, constraints or search target)";
break;
@@ -110,4 +103,10 @@
}
}
+ var channelConfig = oipfObjectFactory.createChannelConfig();
+ var metaDataSearch = searchManagerObject.createSearch(searchTarget);
+ console.log(metaDataSearch);
+ metaDataSearch.findProgrammesFromStream(channelConfig.currentChannel, null);
+ metaDataSearch.result.getResults(offset, count);
+ console.log(">>>>>>>>>>>>>>>>>>>>>><<", metaDataSearch.result[0], ">>>>");
}
\ No newline at end of file
1
0
Author: ygrego
Date: 2015-02-05 15:13:26 +0000 (Thu, 05 Feb 2015)
New Revision: 772
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/772
Log:
Addition of classes : 'Configuration', 'Tuner', 'TunerCollection', 'LocalSystem', 'Query', 'Channel', 'MetadatSearch' and 'SearchResults' into directory 'model'.
Added:
oipf/js/impl/model/Channel.js
oipf/js/impl/model/Configuration.js
oipf/js/impl/model/LocalSystem.js
oipf/js/impl/model/MetadataSearch.js
oipf/js/impl/model/Query.js
oipf/js/impl/model/SearchResults.js
oipf/js/impl/model/Tuner.js
oipf/js/impl/model/TunerCollection.js
Added: oipf/js/impl/model/Channel.js
===================================================================
--- oipf/js/impl/model/Channel.js (rev 0)
+++ oipf/js/impl/model/Channel.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,53 @@
+/*
+* Description:
+* The Channel object represents a broadcast stream or service.
+* Channel objects typically represent channels stored in the channel list (see section 7.13.10). Channel objects may also
+* represent locally defined channels created by an application using the createChannelObject() methods on the
+* video/broadcast embedded object or the ChannelConfig class or the createChannelList() method on the
+* ChannelConfig class. Accessing the channel property of a ScheduledRecording object or Recording object
+* which is scheduled on a locally defined channel SHALL return a Channel object representing that locally defined
+* channel.
+* Except for the hidden property, writing to the writable properties on a Channel object SHALL have no effect for
+* Channel objects representing channels stored in the channel list. Applications SHOULD only change these writable
+* properties of a locally defined channel before the Channel object is referenced by another object or passed to an API
+* call as an input parameter. The effects of writing to these properties at any other time is implementation dependent.
+* The LocalSystem object allows hardware settings related to the local device to be read and modified.
+*
+* Note: The standbyState property has been removed from this class.
+*/
+var Channel = Class.extend({
+
+ /*
+ * Description:
+ * The type of channel. The value MAY be indicated by one of the TYPE_* constants defined above. If the
+ * type of the channel is unknown then the value SHALL be “ undefined ”.
+ * NOTE: Values of this type between 256 and 511 are reserved for use by related specifications on request by
+ * liaison.
+ *
+ * Visibility Type: readonly Integer
+ */
+ channelType: null,
+
+ /*
+ * Description:
+ * The name of the channel. Can be used for linking analog channels without CNI. Typically, it will contain the
+ * call sign of the station (e.g. 'HBO').
+ *
+ * Type: String
+ */
+ name: null,
+
+ /*
+ * Description:
+ * Optional unique identifier of the tuner within the scope of the OITF that is able to receive the given channel.
+ *
+ * Visibility Type: readonly String
+ */
+ tunerID: null,
+
+ init: function(name , channelType) {
+ this.name = name;
+ this.channelType = CHANNEL_CONSTANT[channelType];
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/Configuration.js
===================================================================
--- oipf/js/impl/model/Configuration.js (rev 0)
+++ oipf/js/impl/model/Configuration.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,168 @@
+var Configuration = Class.extend({
+
+ /*
+ * Description:
+ * A comma-separated set of languages to be used for audio playback, in order of preference. Each language SHALL be indicated by its ISO 639-2 language code as * defined in [ISO 639-2].
+ *
+ * Type: String
+ */
+ preferredAudioLanguage: null,
+
+ /*
+ * Description:
+ * A comma-separated set of languages to be used for subtitle playback, in order of preference. The subtitle
+ * component (see section 7.16.5.5) that matches the highest ordered language SHALL be activated
+ * (equivelant to the selectComponent method) and all other subtitle components SHALL be deactivated
+ * (equivelant to the unselectComponent method).
+ * Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2] or as a
+ * wildcard specifier " *** ".
+ * If the wildcard is included it SHALL be the last item in the set. If no subtitle component in the content
+ * matches a language in this property and the wildcard is included then the first (lowest) subtitle component
+ * SHALL be selected.
+ *
+ * Type: String
+ */
+ preferredSubtitleLanguage: null,
+
+ /*
+ * Description:
+ * A comma-separated set of languages to be used for the user interface of a service, in order of preference.
+ * Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2].
+ * If present, the HTTP Accept-language header shall contain the same languages as the
+ * preferredUILanguage property with the same order of preference. NOTE: The order of preference in the
+ * Accept-language header is indicated using the quality factor.
+ *
+ * Type: String
+ */
+ preferredUILanguage: null,
+
+ /*
+ * Description:
+ * An ISO-3166 three character country code identifying the country in which the receiver is deployed.
+ *
+ * Type: String
+ */
+ countryId: null,
+
+ /*
+ * Description:
+ * An integer indicating the time zone within a country in which the receiver is deployed. A value of 0 SHALL
+ * represent the eastern-most time zone in the country, a value of 1 SHALL represent the next time zone to
+ * the west, and so on. Valid values are in the range 0 – 60.
+ *
+ * Type: Integer
+ */
+ regionId: null,
+
+ /*
+ * Description:
+ * The policy dictates what mechanism the system should use when storage space is exceeded.
+ * Valid values are shown in the table below.
+ * ------------------------------------------------------------------------------------------------
+ * Value | Description
+ * ------ -----------------------------------------------------------------------------------------
+ * 0 | Indicates a recording management policy where no recordings are to be deleted.
+ * ------ -----------------------------------------------------------------------------------------
+ * 1 | Indicates a recording management policy where only watched recordings MAY be deleted.
+ * ------ -----------------------------------------------------------------------------------------
+ * 2 | Indicates a recording management policy where only recordings older than the specified
+ * | threshold (given by the pvrSaveDays and pvrSaveEpisodes properties) MAY be deleted.
+ * ------------------------------------------------------------------------------------------------
+ *
+ * Type: Integer
+ */
+ pvrPolicy: null,
+
+
+ /*
+ * Description:
+ * When the pvrPolicy property is set to the value 2, this property indicates the minimum number of
+ * episodes that SHALL be saved for series-link recordings.
+ *
+ * Type: Integer
+ */
+ pvrSaveEpisodes: null,
+
+
+ /*
+ * Description:
+ * When the pvrPolicy property is set to the value 2, this property indicates the minimum save time (in
+ * days) for individual recordings. Only recordings older than the save time MAY be deleted.
+ *
+ * Type: Integer
+ */
+ pvrSaveDays: null,
+
+
+ /*
+ * Description:
+ * The default padding (measured in seconds) to be added at the start of a recording.
+ *
+ * Type: Integer
+ */
+ pvrStartPadding: null,
+
+ /*
+ * Description:
+ * The default padding (measured in seconds) to be added at the end of a recording.
+ *
+ * Type: Integer
+ */
+ pvrEndPadding: null,
+
+
+ /*
+ * Description:
+ * The time shift mode indicates the preferred mode of operation for support of timeshift playback in the
+ * video/broadcast object. Valid values are defined in the timeShiftMode property in section 7.13.2.2. The
+ * default value is 0, timeshift is turned off.
+ *
+ * Type: Integer
+ */
+ preferredTimeShiftMode: null,
+
+ init: function() {
+
+ },
+
+ /*
+ * Description:
+ * Get the system text string that has been set for the specified key.
+ *
+ * Argument:
+ * -key: A key identifying the system text string to be retrieved.
+ *
+ * Return: String
+ */
+ getText: function(key) {
+
+
+ },
+
+ /*
+ * Description:
+ * Set the system text string that has been set for the specified key. System text strings are
+ * used for automatically-generated messages in certain cases, e.g. parental control messages.
+ *
+ * Arguments:
+ * -key: The key for the text string to be set. Valid keys are:
+ * -----------------------------------------------------------------------------------------------------------------------------------------------------
+ * Key | Description
+ * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
+ * no_title | Text string used as the title for programmes and channels where no guide information is available. Defaults to “No information”
+ * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
+ * no_synopsis | Text string used as the synopsis for programmes where no guide information is available. Defaults to “No further information
+ | available”
+ * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
+ * manual_recording | Text string used to identify a manual recording. Defaults to “Manual Recording”
+ * -----------------------------------------------------------------------------------------------------------------------------------------------------
+ *
+ * -value: The new value for the system text string.
+ *
+ */
+ setText: function(key, value) {
+
+
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/LocalSystem.js
===================================================================
--- oipf/js/impl/model/LocalSystem.js (rev 0)
+++ oipf/js/impl/model/LocalSystem.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,37 @@
+/*
+* Description:
+* The LocalSystem object allows hardware settings related to the local device to be read and modified.
+*
+* Note: The standbyState property has been removed from this class.
+*/
+var LocalSystem = Class.extend({
+
+ /*
+ * Description:
+ * Get or set the overall system volume. Valid values for this property are in the range 0 - 100. The OITF SHALL store this setting persistently.
+ *
+ * Type: Integer
+ */
+ volume: null,
+
+ /*
+ * Description:
+ * Get or set the mute status of the default audio output(s). A value of true indicates that the default output(s) are currently muted.
+ *
+ * Type: Boolean
+ */
+ mute: null,
+
+ /*
+ * Description:
+ * A collection of Tuner objects representing the physical tuners available in the OITF.
+ *
+ * Visibility Type: readonly TunerCollection
+ */
+ tuners: null,
+
+ init: function() {
+
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/MetadataSearch.js
===================================================================
--- oipf/js/impl/model/MetadataSearch.js (rev 0)
+++ oipf/js/impl/model/MetadataSearch.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,163 @@
+/*
+* Description:
+* A MetadataSearch object represents a query of the metadata about available programmes. Applications can create
+* MetadataSearch objects using the createSearch() method on the application/oipfSearchManager
+* object. When metadata queries are performed on a remote server, the protocol used is defined in section 4.1.2.2 of
+* [OIPF_META2].
+*
+* Each search consists of three steps:
+* 1. Definition of the query. The application creates a MetadataSearch object, and either creates its associated
+* Query object, or sets a query using the findProgrammesFromStream() method, and sets any applicable
+* constraints and result ordering.
+*
+* 2. Acquisition of results. The OITF acquires some or all of the items that match the specified query and constraints, and
+* caches the requested subset of the results. This is typically triggered by a call to getResults().
+*
+* 3. Retrieval. The application accesses the results via the SearchResults class.
+* The MetadataSearch and SearchResults classes work together to manage an individual search. For every search,
+* the MetadataSearch object and its corresponding SearchResults object SHALL be in one of three states as
+* described in table below:
+*
+* ---------------------------------------------------------------------------------------------------------------------------------------------------------------
+* State | Description
+* ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------
+* Idle | The search is idle; no results are available. This is the initial state of the search. In this
+* | state, the application can set or modify the query, constraints or ordering rules that are
+* | applied to the search.
+* | No search results are available in this state – any calls to SearchResults.item()
+* | SHALL return undefined and the values of the length and totalSize properties on the
+* | SearchResults object SHALL return zero. Any search results that have been cached by
+* | the terminal SHALL be discarded when the Idle state is entered.
+* | Calling the SearchResults.getResults() method SHALL cause a state transition to
+* | the Searching state.
+* ---------- ---------------------------------------------------------------------------------------------------------------------------------------------------
+* Searching | Results are being retrieved and are not yet available to applications.
+* |
+* | If the terminal has not previously cached the full set of search results, the terminal
+* | performs the search to gather the requested results.
+* |
+* | If a new version of the metadata is detected (e.g. due to an EIT update) while the search
+* | is in this state, results SHALL be retrieved from either the new or original version of the
+* | metadata but SHALL NOT be retrieved from a combination of the two versions.
+* |
+* | Calls to SearchResults.item() SHALL return undefined.
+* |
+* | Any modification of the search parameters (e.g. changing the query or adding/removing
+* | constraints, or calling findProgrammesFromStream() ) by the application SHALL stop
+* | the current search and cause a transition to the Idle state. The terminal SHALL dispatch a
+* | MetadataSearch event with state =3.
+* |
+* | When all requested results have been found, the terminal SHALL dispatch a
+* | MetadataSearch event with state =0 and a state transition to the Found state SHALL
+* | occur.
+* |
+* | If the search cannot be completed due to a lack of resources or any other reason, the
+* | terminal SHALL dispatch a MetadataSearch event with state =4 and a state transition to
+* | the Idle state SHALL occur.
+* |
+* | Calls to the SearchResults.getResults() method SHALL abort the retrieval of search
+* | results and attempt to retrieve the newly-requested set of results instead.
+* |
+* | NOTE: Calling getResults() when in the searching state may be used to fetch a group
+* | of items starting at a different offset or with a different count.
+* ---------- -------------------------------------------------------------------------------------------------------------------------------------------------------
+* Found | Search results are available and can be retrieved by applications. The data exposed via
+* | the SearchResults.item() method is static and never changes as a result of any
+* | updates to the underlying metadata database until SearchResults.getResults() is
+* | next called.
+* |
+* | If a new version of the metadata is detected (e.g. due to an EIT update), a
+* | MetadataUpdate event is dispatched with action =1. Subsequent calls to
+* | SearchResult.getResults() SHALL return results based on the updated metadata.
+* |
+* | Calls to SearchResults.getResults() SHALL cause a state transition to the
+* | Searching state.
+* |
+* | Any modification of the search parameters (e.g. changing the query or adding/removing
+* | constraints, or calling findProgrammesFromStream() ) by the application SHALL cause
+* | the current set of results to be discarded and SHALL cause a transition to the Idle state.
+* | The terminal SHALL dispatch a MetadataSearch event with state =3.
+* -------------------------------------------------------------------------------------------------------------------------------------------------------------------
+*
+* The findProgrammesFromStream() method acts as a shortcut for setting a query and a set of constraints on the
+* MetadataSearch object . Regardless of whether the query and constraints are set explicitly by the application or via
+* findProgrammesFromStream() , results are retrieved using the getResults() method.
+*
+* Changes to the search parameters (e.g. changing the query or adding/removing constraints or modifying the search target,
+* or calling findProgrammesFromStream() ) SHALL be applied when the getResults() method on the
+* corresponding SearchResults object is called. Due to the nature of metadata queries, searches are asynchronous and
+* events are used to notify the application that results are available. MetadataSearch events SHALL be targeted at the
+* application/oipfSearchManager object.
+*
+* The present document is intentionally silent about the implementation of the search mechanism and the algorithm for
+* retrieving and caching search results except where described in Table 7 above. When performing a search, the receiver
+* MAY gather all search results and cache them (or cache a set of pointers into the full database), or gather only the subset
+* of search results determined by the getResults() parameters, or take an alternative approach not described here.
+*/
+var MetadataSearch = Class.extend({
+
+ /*
+ * Description:
+ * The subset of search results that has been requested by the application.
+ *
+ * Visibility Type: readonly SearchResults
+ */
+ result: null,
+
+ /*
+ * Description :
+ * The target(s) of the search. Valid values are:
+ *
+ * -----------------------------------------------------------------
+ * Value | Description
+ * ------ ----------------------------------------------------------
+ * 1 | Metadata relating to scheduled content SHALL be searched.
+ * 2 | Metadata relating to on-demand content SHALL be searched.
+ *
+ * These values SHALL be treated as a bitfield, allowing searches to be carried out across multiple search
+ * targets.
+ *
+ * Visibility: readonly
+ */
+ searchTarget: null,
+
+ init: function(searchTarget) {
+
+ this.searchTarget = searchTarget;
+ this.result = new SearchResults();
+ },
+
+ /*
+ * Description:
+ * Set a query and constraints for retrieving metadata for programmes from a given channel
+ * and given start time from metadata contained in the stream as defined in section 4.1.3 of
+ * [OIPF_META2]. Setting the search parameters using this method will implicitly remove any
+ * existing constraints, ordering or queries created by prior calls to methods on this object.
+ * This method does not cause the search to be performed; applications must call
+ * getResults() to retrieve the results.
+ *
+ * Arguments:
+ * - channel: The channel for which programme information should be found.
+ *
+ * - startTime: The start of the time period for which results should be returned measured in
+ * seconds since midnight (GMT) on 1/1/1970. The start time is inclusive; any
+ * programmes starting at the start time, or which are showing at the start time,
+ * will be included in the search results. If null , the search will start from the
+ * current time.
+ *
+ * -count: Optional argument giving the maximum number of programmes for which
+ * information should be fetched. This places an upper bound on the number of
+ * results that will be present in the result set – for instance, specifying a value of
+ * 2 for this argument will result in at most two results being returned by calls to
+ * getResults() even if a call to getResults() requests more results.
+ * If this argument is not specified, no restrictions are imposed on the number of
+ * results which may be returned by calls to getResults().
+ *
+ */
+ findProgrammesFromStream: function(channel, startTime, count) {
+ console.log("[INFO]: findProgrammesFromStream [IN]");
+ currentQuery = new Query(channel, startTime, count);
+ console.log("[INFO]: findProgrammesFromStream [Out]");
+ },
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/Query.js
===================================================================
--- oipf/js/impl/model/Query.js (rev 0)
+++ oipf/js/impl/model/Query.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,15 @@
+var Query = Class.extend({
+
+ channel: null,
+
+ startTime: null,
+
+ count: null,
+
+ init: function(channel, startTime, count) {
+ this.channel= channel;
+ this.startTime= startTime;
+ this.count= count;
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/SearchResults.js
===================================================================
--- oipf/js/impl/model/SearchResults.js (rev 0)
+++ oipf/js/impl/model/SearchResults.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,217 @@
+/*
+* Description:
+* The SearchResults class represents the results of a metadata search. Since the result set may contain a large number
+* of items, applications request a ‘window’ on to the result set, similar to the functionality provided by the OFFSET and
+* LIMIT clauses in SQL.
+*
+* Applications MAY request the contents of the result in groups of an arbitrary size, based on an offset from the beginning
+* of the result set. The data SHALL be fetched from the appropriate source, and the application SHALL be notified when
+* the data is available.
+* The set of results SHALL only be valid if a call to getResults() has been made and a MetadataSearch event notifying
+* the application that results are available has been dispatched. If this event has not been dispatched, the set of results
+* SHALL be empty (i.e. the value of the totalSize property SHALL be 0 and calls to item() SHALL return
+* undefined ).
+* In addition to the properties and methods defined below a SearchResults object SHALL support the array notation to
+* access the results in this collection.
+*/
+var SearchResults = Class.extend({
+
+ /*
+ * Description:
+ * The number of items in the current window within the overall result set. The value of this property SHALL be
+ * zero until getResults() has been called and a MetadataSearch event notifying the application that results
+ * are available has been dispatched. If the current window onto the result set is in fact the whole result set then
+ * length will be the same as totalSize. Otherwise length will be less than totalSize.
+ *
+ * Visibility: readonly
+ */
+ lentgh: null,
+
+ /*
+ * Description :
+ * The current offset into the total result set.
+ *
+ * Visibility Type: readonly Integer
+ */
+ offset: null,
+
+ /*
+ * Description:
+ * The total number of items in the result set.
+ * The value of this property SHALL be zero until getResults() has been called and a MetadataSearch
+ * event notifying the application that results are available has been dispatched.
+ *
+ * Visibility: readonly
+ */
+ totalSize: null,
+
+ init: function() {
+ this.lentgh = 0;
+ this.totalSize = 0;
+ },
+
+ /*
+ * Description:
+ * Perform the search and retrieve the specified subset of the items that match the query.
+ * Results SHALL be returned asynchronously. A MetadataSearch event with state=0
+ * SHALL be dispatched when results are available.
+ * This method SHALL always return false.
+ *
+ * Arguments:
+ * - offset: The number of items at the start of the result set to be skipped before data is retrieved.
+ *
+ * - count: The number of results to retrieve.
+ *
+ */
+ getResults: function(offset, count) {
+ this.offset = offset;
+ var idStr = "-id",
+ displayNameStr = "display-name",
+ channelStr = "-channel",
+ stopStr = "-stop",
+ startStr = "-start",
+ currentChannelId = undefined,
+ channels = data.tv.channel,
+ displayName,
+ item,
+ index,
+ programs = data.tv.programme,
+ startTime,
+ tmpSSTime,
+ currentTime = new Date(),
+ currentStopTime,
+ currentStartTime,
+ /*
+ * Usefull to retrieve severals programs when user want more than one programs information.
+ */
+ currentProgramIndex,
+
+ /*
+ * Used to found the current program : the smaller difference between current time and stop time of a program,
+ * means that the program stopping a this stop time is the current program.
+ */
+ smallerDiff,
+
+ /*
+ * The difference calculated during the loop of current program searching.
+ */
+ currentDiff,
+ pattern = /\d{4}\d{2}\d{2}(\d{2})(\d{2})(\d{2})\s\+(\d{2})/;
+
+ var i;
+ //Found the associated id of current channel in metadata because channel is referenced by id in program information
+ for (i = 0; i<channels.length; i++) {
+
+ item = channels[i];
+ displayName = item[displayNameStr];
+
+ if (displayName == currentChannel.name) {
+ currentChannelId = item[idStr]
+ break;
+ }
+ }
+
+ if (!currentChannelId) {
+ console.log("[INFO] This channel don't have id, this search have to abort.");
+ return;
+ }
+ console.log("[INFO] Current channel id found.");
+
+ //Another loop will run, just a reinitialization.
+ startTime = currentQuery.startTime;
+ var hStart, hStop,
+ mStart, mStop,
+ sStart, sStop;
+
+ /*
+ * The user searches information on the current program, broadcasted on the current channel.
+ * In this case don't need start time of program, the search must be proceeded on current time.
+ */
+ if (startTime == null) {
+
+ //Found programs of current channel only
+ for (i = 0; i< programs.length; i++) {
+ item = programs[i]
+
+ if (item[channelStr] == currentChannelId) {
+
+ tmpSSTime = item[startStr];
+ tmpSSTime = pattern.exec(tmpSSTime);
+ console.log(tmpSSTime);
+
+ hStart = parseInt(tmpSSTime[0]) +1;
+ mStart = parseInt(tmpSSTime[1]);
+ sStart = parseInt(tmpSSTime[2]);
+
+ tmpSSTime = item[stopStr];
+ tmpSSTime = pattern.exec(tmpSSTime);
+ console.log(tmpSSTime);
+
+ hStop = parseInt(tmpSSTime[0]) +1;
+ mStop = parseInt(tmpSSTime[1]);
+ sStop = parseInt(tmpSSTime[2]);
+
+ if (currentTime.getUTCHours() >= hStart && currentTime.getUTCHours() >= mStart && currentTime.getUTCHours()>=sStart &&
+ currentTime.getUTCHours() >= hStop && currentTime.getUTCHours() >= mStop && currentTime.getUTCHours()>=sStop
+ ) {
+
+ console.log("[INFO] Program found.")
+ index = i;
+ break;
+ } else {
+
+ console.log("[INFO] Program not yet found.")
+ }
+
+ }
+ }
+
+ } else { //The search use the start time like a filter to retrieve the required program information.
+
+
+ }
+
+ //When user want more than one result into his search.
+ for (i = 0; i < count; i++) {
+
+ this.[i] = programs[index];
+ index++;
+ }
+
+ this.dispatchEvent(new Event('MetadataSearch', {
+ 'search': metaDataSearch,
+ 'state': 0
+ });
+
+ return false;
+ },
+
+ /*
+ * Description:
+ * Abort any outstanding request for results and remove any query, constraints or ordering
+ * rules set on the MetadataSearch object that is associated with this SearchResults
+ * object. Regardless of whether or not there is an outstanding request for results, items
+ * currently in the collection SHALL be removed (i.e. the value of the length property SHALL
+ * be 0 and any calls to item() SHALL return undefined ). All cached search results SHALL
+ * be discarded.
+ *
+ */
+ abort: function() {
+
+ },
+
+ /*
+ * Description:
+ * Return the item at position index in the collection of currently available results, or
+ * undefined if no item is present at that position. This function SHALL only return objects
+ * that are instances of Programme , CODAsset , CODFolder , or CODService .
+ *
+ * Arguments:
+ * - index: The index into the result set.
+ *
+ */
+ item: function(index) {
+
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/Tuner.js
===================================================================
--- oipf/js/impl/model/Tuner.js (rev 0)
+++ oipf/js/impl/model/Tuner.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,95 @@
+/*
+* Description:
+* A Tuner object represents the source of broadcast content provided through a physical tuner in the OITF. Each Tuner
+* object is represented by a <video_broadcast> element in the capability description as defined in section 9.3.1.
+* A Tuner object that is capable of tuning at the same time to multiple transponders SHALL have the nrstreams attribute
+* of the <video_broadcast> element set to a value equal to the number of transponders.
+* A Tuner object that is capable of tuning to transponders of different types SHALL include all those types in the types
+* attribute of the <video_broadcast> element.
+* NOTE: An OITF may contain a physical tuner that has its capabilities split into multiple Tuner objects to fit the
+* restrictions on the <video_broadcast> element outlined above and in section 9.3.1.
+*
+* Note: The standbyState property has been removed from this class.
+*/
+var Tuner = Class.extend({
+
+ /*
+ * Description: A unique identifier of the tuner.
+ *
+ * Visibility Type: readonly Integer
+ */
+ id: null,
+
+ /*
+ * Description: The name of the tuner as designated in OITF.
+ *
+ * Visibility Type: readonly String
+ */
+ name: null,
+
+ /*
+ * Description: Returns a collection of the types supported by the tuner. The types are according to the ID types in section 7.13.11.1 under Channel object.
+ *
+ * Visibility Type: readonly IntegerCollection
+ */
+ idTypes: null,
+
+ /*
+ * Description:
+ * The property enables ( true ) and disables ( false ) the tuner. Reading the property provides the current
+ * state, enabled or disabled. Attempting to disable the tuner while the resource is in use has no effect and the tuner SHALL continue to be enabled.
+ * While disabled:
+ * • any external power feed (if applicable) SHALL be turned off;
+ * • the value of the signalInfo property is not defined;
+ * • the value of the lnbInfo property is not defined;
+ * • the tuner SHALL NOT be available for use by any JavaScript object (e.g. the video/broadcast object) or by the underlying OITF system (e.g. to perform a * scheduled recording). Note the property enableTuner is available in order to re-enable the tuner and get access to the tuner again.
+ *
+ * The set value of the property SHALL persist after OITF restarts.
+ *
+ * Type: Boolean
+ */
+ enableTuner: null,
+
+ /*
+ * Description: The property returns a SignalInfo object with signal information for example signal strength.
+ *
+ * Visibility Type: readonly SignalInfo
+ */
+ signalInfo: null,
+
+ /*
+ * Description: The property returns a LNBInfo object with information regarding the LNB associated with the tuner.
+ *
+ * Visibility Type: readonly LNBInfo
+ */
+ lnbInfo: null,
+
+ /*
+ * Description: Indicates the physical interface associated with the tuner.
+ *
+ * Visibility Type: readonly Integer
+ */
+ frontEndPosition: null,
+
+ /*
+ * Description:
+ * The property turns on (true) and off (false) the power applied to the external interface of the tuner unless the
+ * tuner is disabled. Reading the property provides the current value, on or off. Attempting to modify the
+ * property while the resource is in use has no effect. The value of the property SHALL persist after OITF
+ * restarts.
+ * For DVB-S/S2 power is supplied to the LNB(s) and if present the DiSEqC switch.
+ * For DVB-T/T2 a supply +5V is supplied to the antenna with built in amplifier. Note that applying power may
+ * have adverse effects to the external equipment if it has its own power supply. It is a strong recommendation
+ * to indicate to the end user a possible adverse effect before using this method.
+ * For DVB-C/C2 there is no effect.
+ * Reading the property provides the current value.
+ *
+ * Type: Boolean
+ */
+ powerOnExternal: null,
+
+ init: function() {
+
+ }
+
+});
\ No newline at end of file
Added: oipf/js/impl/model/TunerCollection.js
===================================================================
--- oipf/js/impl/model/TunerCollection.js (rev 0)
+++ oipf/js/impl/model/TunerCollection.js 2015-02-05 15:13:26 UTC (rev 772)
@@ -0,0 +1,13 @@
+/*
+* Description:
+* The TunerCollection class represents a collection of Tuner objects. See Annex K for the definition of the collection template.
+*
+*/
+var TunerCollection = Collection.extend({
+
+ init : function(elements) {
+
+ this.super.init(elements);
+ }
+
+});
\ No newline at end of file
1
0
Author: ygrego
Date: 2015-02-05 15:10:38 +0000 (Thu, 05 Feb 2015)
New Revision: 771
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/771
Log:
Implementation of 'SearchManagerObject.getResults', moving of each class 'Configuration', 'Tuner', 'TunerCollection', 'LocalSystem', 'Query', 'Channel', 'MetadatSearch' and 'SearchResults' to their respective file, adding of 'onMetadatasearch' into 'testGetCurrentProgram' and a directory 'js/impl/model', call of method 'testGetCurrentProgram' into 'welcome.html'.
Added:
oipf/js/impl/model/
Modified:
oipf/js/impl/OipfObjectFactory.js
oipf/js/impl/SearchManagerObject.js
oipf/js/initObj/init.js
oipf/js/test/test.js
oipf/view/welcome.html
Modified: oipf/js/impl/OipfObjectFactory.js
===================================================================
--- oipf/js/impl/OipfObjectFactory.js 2015-02-04 13:39:59 UTC (rev 770)
+++ oipf/js/impl/OipfObjectFactory.js 2015-02-05 15:10:38 UTC (rev 771)
@@ -29,7 +29,7 @@
//this.applicationManagerObject = new ApplicationManagerObject();
//this.capabilitiesObject = new CapabilitiesObject();
//this.codManagerObject = new CodManagerObject();
- this.channelConfig = new ChannelConfig(null, currentchannel);
+ this.channelConfig = new ChannelConfig(null, currentChannel);
//this.imsObject = new IMSObecjet();
//this.mdtfObject = new MDTFObject();
//this.notifSocketObject = new NotifSocket();
Modified: oipf/js/impl/SearchManagerObject.js
===================================================================
--- oipf/js/impl/SearchManagerObject.js 2015-02-04 13:39:59 UTC (rev 770)
+++ oipf/js/impl/SearchManagerObject.js 2015-02-05 15:10:38 UTC (rev 771)
@@ -1,14 +1,3 @@
-var metadataSearchEvent = new Event('MetadataSearch'); //Could be change to put data into event
-var metadataUpdateEvent = new Event('MetadataUpdate'); //Could be change to put data into event
-/*// Listen for the event.
-elem.addEventListener('build', function (e) { ... }, false);
-
-// Dispatch the event.
-elem.dispatchEvent(event);
-*/
-
-var currentQuery;
-
/*
* Description: OITFs SHALL implement the application/oipfSearchManager embedded object. This object provides a
* mechanism for applications to create and manage metadata searches.
@@ -68,9 +57,7 @@
* • 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.
*/
- onMetadataUpdate: function(action, info, object) {channels, for instance.
-
- },
+ onMetadataUpdate: null,
/*
* Description:
@@ -95,35 +82,7 @@
* | results).
* ------ --------------------------------------------------------------------------------------------------------------------------------------------------------
*/
- onMetadataSearch: function(search, state) {
- console.log("[INFO]: onMetadataSearch called", search);
-
- var message = "";
-
- switch(state) {
-
- case 0:
-
- console.log("RESULT FOUND :-) :-) :-) X-D");
- console.log(getCurrentChannelProgramName(search.result[0]));
- break;
-
- case 3:
-
- message = " MetadataSearch in Idle state because of either search abort or parameters have been modified \
- (query, constraints or search target)";
- break;
-
- case 4:
-
- message = " The search cannot be complete because of lack of ressources or any other reason.\
- (memory insufficient to cache all of the requested results.)";
- break;
-
- default:
- console.log("Unknow state :(");
- }
- },
+ onMetadataSearch: null,
init: function() {
@@ -169,284 +128,3 @@
}
});
-
-/*
-* Description:
-* A MetadataSearch object represents a query of the metadata about available programmes. Applications can create
-* MetadataSearch objects using the createSearch() method on the application/oipfSearchManager
-* object. When metadata queries are performed on a remote server, the protocol used is defined in section 4.1.2.2 of
-* [OIPF_META2].
-*
-* Each search consists of three steps:
-* 1. Definition of the query. The application creates a MetadataSearch object, and either creates its associated
-* Query object, or sets a query using the findProgrammesFromStream() method, and sets any applicable
-* constraints and result ordering.
-*
-* 2. Acquisition of results. The OITF acquires some or all of the items that match the specified query and constraints, and
-* caches the requested subset of the results. This is typically triggered by a call to getResults().
-*
-* 3. Retrieval. The application accesses the results via the SearchResults class.
-* The MetadataSearch and SearchResults classes work together to manage an individual search. For every search,
-* the MetadataSearch object and its corresponding SearchResults object SHALL be in one of three states as
-* described in table below:
-*
-* ---------------------------------------------------------------------------------------------------------------------------------------------------------------
-* State | Description
-* ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------
-* Idle | The search is idle; no results are available. This is the initial state of the search. In this
-* | state, the application can set or modify the query, constraints or ordering rules that are
-* | applied to the search.
-* | No search results are available in this state – any calls to SearchResults.item()
-* | SHALL return undefined and the values of the length and totalSize properties on the
-* | SearchResults object SHALL return zero. Any search results that have been cached by
-* | the terminal SHALL be discarded when the Idle state is entered.
-* | Calling the SearchResults.getResults() method SHALL cause a state transition to
-* | the Searching state.
-* ---------- ---------------------------------------------------------------------------------------------------------------------------------------------------
-* Searching | Results are being retrieved and are not yet available to applications.
-* |
-* | If the terminal has not previously cached the full set of search results, the terminal
-* | performs the search to gather the requested results.
-* |
-* | If a new version of the metadata is detected (e.g. due to an EIT update) while the search
-* | is in this state, results SHALL be retrieved from either the new or original version of the
-* | metadata but SHALL NOT be retrieved from a combination of the two versions.
-* |
-* | Calls to SearchResults.item() SHALL return undefined.
-* |
-* | Any modification of the search parameters (e.g. changing the query or adding/removing
-* | constraints, or calling findProgrammesFromStream() ) by the application SHALL stop
-* | the current search and cause a transition to the Idle state. The terminal SHALL dispatch a
-* | MetadataSearch event with state =3.
-* |
-* | When all requested results have been found, the terminal SHALL dispatch a
-* | MetadataSearch event with state =0 and a state transition to the Found state SHALL
-* | occur.
-* |
-* | If the search cannot be completed due to a lack of resources or any other reason, the
-* | terminal SHALL dispatch a MetadataSearch event with state =4 and a state transition to
-* | the Idle state SHALL occur.
-* |
-* | Calls to the SearchResults.getResults() method SHALL abort the retrieval of search
-* | results and attempt to retrieve the newly-requested set of results instead.
-* |
-* | NOTE: Calling getResults() when in the searching state may be used to fetch a group
-* | of items starting at a different offset or with a different count.
-* ---------- -------------------------------------------------------------------------------------------------------------------------------------------------------
-* Found | Search results are available and can be retrieved by applications. The data exposed via
-* | the SearchResults.item() method is static and never changes as a result of any
-* | updates to the underlying metadata database until SearchResults.getResults() is
-* | next called.
-* |
-* | If a new version of the metadata is detected (e.g. due to an EIT update), a
-* | MetadataUpdate event is dispatched with action =1. Subsequent calls to
-* | SearchResult.getResults() SHALL return results based on the updated metadata.
-* |
-* | Calls to SearchResults.getResults() SHALL cause a state transition to the
-* | Searching state.
-* |
-* | Any modification of the search parameters (e.g. changing the query or adding/removing
-* | constraints, or calling findProgrammesFromStream() ) by the application SHALL cause
-* | the current set of results to be discarded and SHALL cause a transition to the Idle state.
-* | The terminal SHALL dispatch a MetadataSearch event with state =3.
-* -------------------------------------------------------------------------------------------------------------------------------------------------------------------
-*
-* The findProgrammesFromStream() method acts as a shortcut for setting a query and a set of constraints on the
-* MetadataSearch object . Regardless of whether the query and constraints are set explicitly by the application or via
-* findProgrammesFromStream() , results are retrieved using the getResults() method.
-*
-* Changes to the search parameters (e.g. changing the query or adding/removing constraints or modifying the search target,
-* or calling findProgrammesFromStream() ) SHALL be applied when the getResults() method on the
-* corresponding SearchResults object is called. Due to the nature of metadata queries, searches are asynchronous and
-* events are used to notify the application that results are available. MetadataSearch events SHALL be targeted at the
-* application/oipfSearchManager object.
-*
-* The present document is intentionally silent about the implementation of the search mechanism and the algorithm for
-* retrieving and caching search results except where described in Table 7 above. When performing a search, the receiver
-* MAY gather all search results and cache them (or cache a set of pointers into the full database), or gather only the subset
-* of search results determined by the getResults() parameters, or take an alternative approach not described here.
-*/
-var MetadataSearch = Class.extend({
-
- /*
- * Description:
- * The subset of search results that has been requested by the application.
- *
- * Visibility Type: readonly SearchResults
- */
- result: null,
-
- /*
- * Description :
- * The target(s) of the search. Valid values are:
- *
- * -----------------------------------------------------------------
- * Value | Description
- * ------ ----------------------------------------------------------
- * 1 | Metadata relating to scheduled content SHALL be searched.
- * 2 | Metadata relating to on-demand content SHALL be searched.
- *
- * These values SHALL be treated as a bitfield, allowing searches to be carried out across multiple search
- * targets.
- *
- * Visibility: readonly
- */
- searchTarget: null,
-
- init: function(searchTarget) {
-
- this.searchTarget= searchTarget;
- },
-
- /*
- * Description:
- * Set a query and constraints for retrieving metadata for programmes from a given channel
- * and given start time from metadata contained in the stream as defined in section 4.1.3 of
- * [OIPF_META2]. Setting the search parameters using this method will implicitly remove any
- * existing constraints, ordering or queries created by prior calls to methods on this object.
- * This method does not cause the search to be performed; applications must call
- * getResults() to retrieve the results.
- *
- * Arguments:
- * - channel: The channel for which programme information should be found.
- *
- * - startTime: The start of the time period for which results should be returned measured in
- * seconds since midnight (GMT) on 1/1/1970. The start time is inclusive; any
- * programmes starting at the start time, or which are showing at the start time,
- * will be included in the search results. If null , the search will start from the
- * current time.
- *
- * -count: Optional argument giving the maximum number of programmes for which
- * information should be fetched. This places an upper bound on the number of
- * results that will be present in the result set – for instance, specifying a value of
- * 2 for this argument will result in at most two results being returned by calls to
- * getResults() even if a call to getResults() requests more results.
- * If this argument is not specified, no restrictions are imposed on the number of
- * results which may be returned by calls to getResults().
- *
- */
- findProgrammesFromStream: function(channel, startTime, count) {
- console.log("[INFO]: findProgrammesFromStream [IN]");
- currentQuery = new Query(channel, startTime, count);
- console.log("[INFO]: findProgrammesFromStream [Out]");
- },
-
-});
-
-/*
-* Description:
-* The SearchResults class represents the results of a metadata search. Since the result set may contain a large number
-* of items, applications request a ‘window’ on to the result set, similar to the functionality provided by the OFFSET and
-* LIMIT clauses in SQL.
-*
-* Applications MAY request the contents of the result in groups of an arbitrary size, based on an offset from the beginning
-* of the result set. The data SHALL be fetched from the appropriate source, and the application SHALL be notified when
-* the data is available.
-* The set of results SHALL only be valid if a call to getResults() has been made and a MetadataSearch event notifying
-* the application that results are available has been dispatched. If this event has not been dispatched, the set of results
-* SHALL be empty (i.e. the value of the totalSize property SHALL be 0 and calls to item() SHALL return
-* undefined ).
-* In addition to the properties and methods defined below a SearchResults object SHALL support the array notation to
-* access the results in this collection.
-*/
-var SearchResults = Class.extend({
-
- /*
- * Description :
- * The number of items in the current window within the overall result set. The value of this property SHALL be
- * zero until getResults() has been called and a MetadataSearch event notifying the application that results
- * are available has been dispatched. If the current window onto the result set is in fact the whole result set then
- * length will be the same as totalSize. Otherwise length will be less than totalSize.
- *
- * Visibility: readonly
- */
- lentgh: null,
-
- /*
- * Description :
- * The number of items in the current window within the overall result set. The value of this property SHALL be
- * zero until getResults() has been called and a MetadataSearch event notifying the application that results
- * are available has been dispatched. If the current window onto the result set is in fact the whole result set then
- * length will be the same as totalSize. Otherwise length will be less than totalSize.
- *
- * Visibility Type: readonly Integer
- */
- offset: null,
-
- /*
- * Description :
- * The total number of items in the result set.
- * The value of this property SHALL be zero until getResults() has been called and a MetadataSearch
- * event notifying the application that results are available has been dispatched.
- *
- * Visibility: readonly
- */
- totalSize: null,
-
- init: function() {
-
- },
-
- /*
- * Description:
- * Perform the search and retrieve the specified subset of the items that match the query.
- * Results SHALL be returned asynchronously. A MetadataSearch event with state=0
- * SHALL be dispatched when results are available.
- * This method SHALL always return false.
- *
- * Arguments:
- * - offset: The number of items at the start of the result set to be skipped before data is retrieved.
- *
- * - count: The number of results to retrieve.
- *
- */
- getResults: function(offset, count) {
-
- },
-
- /*
- * Description:
- * Abort any outstanding request for results and remove any query, constraints or ordering
- * rules set on the MetadataSearch object that is associated with this SearchResults
- * object. Regardless of whether or not there is an outstanding request for results, items
- * currently in the collection SHALL be removed (i.e. the value of the length property SHALL
- * be 0 and any calls to item() SHALL return undefined ). All cached search results SHALL
- * be discarded.
- *
- */
- abort: function() {
-
- },
-
- /*
- * Description:
- * Return the item at position index in the collection of currently available results, or
- * undefined if no item is present at that position. This function SHALL only return objects
- * that are instances of Programme , CODAsset , CODFolder , or CODService .
- *
- * Arguments:
- * - index: The index into the result set.
- *
- */
- item: function(index) {
-
- }
-
-});
-
-
-var Query = Class.extend({
-
- channel: null,
-
- startTime: null,
-
- count: null,
-
- init: function(channel, startTime, count) {
- this.channel= channel;
- this.startTime= startTime;
- this.count= count;
- }
-
-});
\ No newline at end of file
Modified: oipf/js/initObj/init.js
===================================================================
--- oipf/js/initObj/init.js 2015-02-04 13:39:59 UTC (rev 770)
+++ oipf/js/initObj/init.js 2015-02-05 15:10:38 UTC (rev 771)
@@ -6,380 +6,9 @@
extends: "object"
});
-/*
-* Description:
-* The TunerCollection class represents a collection of Tuner objects. See Annex K for the definition of the collection template.
-*
-*/
-var TunerCollection = Collection.extend({
-
- init : function(elements) {
-
- this.super.init(elements);
- }
-
-});
-
-/*
-* Description:
-* The LocalSystem object allows hardware settings related to the local device to be read and modified.
-*
-* Note: The standbyState property has been removed from this class.
-*/
-var LocalSystem = Class.extend({
-
- /*
- * Description:
- * Get or set the overall system volume. Valid values for this property are in the range 0 - 100. The OITF SHALL store this setting persistently.
- *
- * Type: Integer
- */
- volume: null,
-
- /*
- * Description:
- * Get or set the mute status of the default audio output(s). A value of true indicates that the default output(s) are currently muted.
- *
- * Type: Boolean
- */
- mute: null,
-
- /*
- * Description:
- * A collection of Tuner objects representing the physical tuners available in the OITF.
- *
- * Visibility Type: readonly TunerCollection
- */
- tuners: null,
-
- init: function() {
-
- }
-
-});
-
-/*
-* Description:
-* The Channel object represents a broadcast stream or service.
-* Channel objects typically represent channels stored in the channel list (see section 7.13.10). Channel objects may also
-* represent locally defined channels created by an application using the createChannelObject() methods on the
-* video/broadcast embedded object or the ChannelConfig class or the createChannelList() method on the
-* ChannelConfig class. Accessing the channel property of a ScheduledRecording object or Recording object
-* which is scheduled on a locally defined channel SHALL return a Channel object representing that locally defined
-* channel.
-* Except for the hidden property, writing to the writable properties on a Channel object SHALL have no effect for
-* Channel objects representing channels stored in the channel list. Applications SHOULD only change these writable
-* properties of a locally defined channel before the Channel object is referenced by another object or passed to an API
-* call as an input parameter. The effects of writing to these properties at any other time is implementation dependent.
-* The LocalSystem object allows hardware settings related to the local device to be read and modified.
-*
-* Note: The standbyState property has been removed from this class.
-*/
-var Channel = Class.extend({
-
- /*
- * Description:
- * The type of channel. The value MAY be indicated by one of the TYPE_* constants defined above. If the
- * type of the channel is unknown then the value SHALL be “ undefined ”.
- * NOTE: Values of this type between 256 and 511 are reserved for use by related specifications on request by
- * liaison.
- *
- * Visibility Type: readonly Integer
- */
- channelType: null,
-
- /*
- * Description:
- * The name of the channel. Can be used for linking analog channels without CNI. Typically, it will contain the
- * call sign of the station (e.g. 'HBO').
- *
- * Type: String
- */
- name: null,
-
- /*
- * Description:
- * Optional unique identifier of the tuner within the scope of the OITF that is able to receive the given channel.
- *
- * Visibility Type: readonly String
- */
- tunerID: null,
-
- init: function(name , channelType) {
- this.name = name;
- this.channelType = CHANNEL_CONSTANT[channelType];
- }
-
-});
-
-/*
-* Description:
-* A Tuner object represents the source of broadcast content provided through a physical tuner in the OITF. Each Tuner
-* object is represented by a <video_broadcast> element in the capability description as defined in section 9.3.1.
-* A Tuner object that is capable of tuning at the same time to multiple transponders SHALL have the nrstreams attribute
-* of the <video_broadcast> element set to a value equal to the number of transponders.
-* A Tuner object that is capable of tuning to transponders of different types SHALL include all those types in the types
-* attribute of the <video_broadcast> element.
-* NOTE: An OITF may contain a physical tuner that has its capabilities split into multiple Tuner objects to fit the
-* restrictions on the <video_broadcast> element outlined above and in section 9.3.1.
-*
-* Note: The standbyState property has been removed from this class.
-*/
-var Tuner = Class.extend({
-
- /*
- * Description: A unique identifier of the tuner.
- *
- * Visibility Type: readonly Integer
- */
- id: null,
-
- /*
- * Description: The name of the tuner as designated in OITF.
- *
- * Visibility Type: readonly String
- */
- name: null,
-
- /*
- * Description: Returns a collection of the types supported by the tuner. The types are according to the ID types in section 7.13.11.1 under Channel object.
- *
- * Visibility Type: readonly IntegerCollection
- */
- idTypes: null,
-
- /*
- * Description:
- * The property enables ( true ) and disables ( false ) the tuner. Reading the property provides the current
- * state, enabled or disabled. Attempting to disable the tuner while the resource is in use has no effect and the tuner SHALL continue to be enabled.
- * While disabled:
- * • any external power feed (if applicable) SHALL be turned off;
- * • the value of the signalInfo property is not defined;
- * • the value of the lnbInfo property is not defined;
- * • the tuner SHALL NOT be available for use by any JavaScript object (e.g. the video/broadcast object) or by the underlying OITF system (e.g. to perform a * scheduled recording). Note the property enableTuner is available in order to re-enable the tuner and get access to the tuner again.
- *
- * The set value of the property SHALL persist after OITF restarts.
- *
- * Type: Boolean
- */
- enableTuner: null,
-
- /*
- * Description: The property returns a SignalInfo object with signal information for example signal strength.
- *
- * Visibility Type: readonly SignalInfo
- */
- signalInfo: null,
-
- /*
- * Description: The property returns a LNBInfo object with information regarding the LNB associated with the tuner.
- *
- * Visibility Type: readonly LNBInfo
- */
- lnbInfo: null,
-
- /*
- * Description: Indicates the physical interface associated with the tuner.
- *
- * Visibility Type: readonly Integer
- */
- frontEndPosition: null,
-
- /*
- * Description:
- * The property turns on (true) and off (false) the power applied to the external interface of the tuner unless the
- * tuner is disabled. Reading the property provides the current value, on or off. Attempting to modify the
- * property while the resource is in use has no effect. The value of the property SHALL persist after OITF
- * restarts.
- * For DVB-S/S2 power is supplied to the LNB(s) and if present the DiSEqC switch.
- * For DVB-T/T2 a supply +5V is supplied to the antenna with built in amplifier. Note that applying power may
- * have adverse effects to the external equipment if it has its own power supply. It is a strong recommendation
- * to indicate to the end user a possible adverse effect before using this method.
- * For DVB-C/C2 there is no effect.
- * Reading the property provides the current value.
- *
- * Type: Boolean
- */
- powerOnExternal: null,
-
- init: function() {
-
- }
-
-});
-
-var Configuration = Class.extend({
-
- /*
- * Description:
- * A comma-separated set of languages to be used for audio playback, in order of preference. Each language SHALL be indicated by its ISO 639-2 language code as * defined in [ISO 639-2].
- *
- * Type: String
- */
- preferredAudioLanguage: null,
-
- /*
- * Description:
- * A comma-separated set of languages to be used for subtitle playback, in order of preference. The subtitle
- * component (see section 7.16.5.5) that matches the highest ordered language SHALL be activated
- * (equivelant to the selectComponent method) and all other subtitle components SHALL be deactivated
- * (equivelant to the unselectComponent method).
- * Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2] or as a
- * wildcard specifier " *** ".
- * If the wildcard is included it SHALL be the last item in the set. If no subtitle component in the content
- * matches a language in this property and the wildcard is included then the first (lowest) subtitle component
- * SHALL be selected.
- *
- * Type: String
- */
- preferredSubtitleLanguage: null,
-
- /*
- * Description:
- * A comma-separated set of languages to be used for the user interface of a service, in order of preference.
- * Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2].
- * If present, the HTTP Accept-language header shall contain the same languages as the
- * preferredUILanguage property with the same order of preference. NOTE: The order of preference in the
- * Accept-language header is indicated using the quality factor.
- *
- * Type: String
- */
- preferredUILanguage: null,
-
- /*
- * Description:
- * An ISO-3166 three character country code identifying the country in which the receiver is deployed.
- *
- * Type: String
- */
- countryId: null,
-
- /*
- * Description:
- * An integer indicating the time zone within a country in which the receiver is deployed. A value of 0 SHALL
- * represent the eastern-most time zone in the country, a value of 1 SHALL represent the next time zone to
- * the west, and so on. Valid values are in the range 0 – 60.
- *
- * Type: Integer
- */
- regionId: null,
-
- /*
- * Description:
- * The policy dictates what mechanism the system should use when storage space is exceeded.
- * Valid values are shown in the table below.
- * ------------------------------------------------------------------------------------------------
- * Value | Description
- * ------ -----------------------------------------------------------------------------------------
- * 0 | Indicates a recording management policy where no recordings are to be deleted.
- * ------ -----------------------------------------------------------------------------------------
- * 1 | Indicates a recording management policy where only watched recordings MAY be deleted.
- * ------ -----------------------------------------------------------------------------------------
- * 2 | Indicates a recording management policy where only recordings older than the specified
- * | threshold (given by the pvrSaveDays and pvrSaveEpisodes properties) MAY be deleted.
- * ------------------------------------------------------------------------------------------------
- *
- * Type: Integer
- */
- pvrPolicy: null,
-
-
- /*
- * Description:
- * When the pvrPolicy property is set to the value 2, this property indicates the minimum number of
- * episodes that SHALL be saved for series-link recordings.
- *
- * Type: Integer
- */
- pvrSaveEpisodes: null,
-
-
- /*
- * Description:
- * When the pvrPolicy property is set to the value 2, this property indicates the minimum save time (in
- * days) for individual recordings. Only recordings older than the save time MAY be deleted.
- *
- * Type: Integer
- */
- pvrSaveDays: null,
-
-
- /*
- * Description:
- * The default padding (measured in seconds) to be added at the start of a recording.
- *
- * Type: Integer
- */
- pvrStartPadding: null,
-
- /*
- * Description:
- * The default padding (measured in seconds) to be added at the end of a recording.
- *
- * Type: Integer
- */
- pvrEndPadding: null,
-
-
- /*
- * Description:
- * The time shift mode indicates the preferred mode of operation for support of timeshift playback in the
- * video/broadcast object. Valid values are defined in the timeShiftMode property in section 7.13.2.2. The
- * default value is 0, timeshift is turned off.
- *
- * Type: Integer
- */
- preferredTimeShiftMode: null,
-
- init: function() {
-
- },
-
- /*
- * Description:
- * Get the system text string that has been set for the specified key.
- *
- * Argument:
- * -key: A key identifying the system text string to be retrieved.
- *
- * Return: String
- */
- getText: function(key) {
-
-
- },
-
- /*
- * Description:
- * Set the system text string that has been set for the specified key. System text strings are
- * used for automatically-generated messages in certain cases, e.g. parental control messages.
- *
- * Arguments:
- * -key: The key for the text string to be set. Valid keys are:
- * -----------------------------------------------------------------------------------------------------------------------------------------------------
- * Key | Description
- * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
- * no_title | Text string used as the title for programmes and channels where no guide information is available. Defaults to “No information”
- * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
- * no_synopsis | Text string used as the synopsis for programmes where no guide information is available. Defaults to “No further information
- | available”
- * ------------------ ----------------------------------------------------------------------------------------------------------------------------------
- * manual_recording | Text string used to identify a manual recording. Defaults to “Manual Recording”
- * -----------------------------------------------------------------------------------------------------------------------------------------------------
- *
- * -value: The new value for the system text string.
- *
- */
- setText: function(key, value) {
-
-
- }
-
-
-});
-
+var currentQuery;
var currentChannelType = "TYPE_TV";
var currentChannelName = "ARTE";
-var currentchannel = new Channel(currentChannelName, currentChannelType);
+var currentChannel = new Channel(currentChannelName, currentChannelType);
var oipfObjectFactory = new OipfObjectFactory();
var metadata = data;
Modified: oipf/js/test/test.js
===================================================================
--- oipf/js/test/test.js 2015-02-04 13:39:59 UTC (rev 770)
+++ oipf/js/test/test.js 2015-02-05 15:10:38 UTC (rev 771)
@@ -75,7 +75,39 @@
searchManagerObject = oipfObjectFactory.createSearchManagerObject();
channelConfig = oipfObjectFactory.createChannelConfig();
- metaDataSearch= searchManagerObject.createSearch(searchTarget);
+ metaDataSearch = searchManagerObject.createSearch(searchTarget);
metaDataSearch.findProgrammesFromStream(channelConfig.currentChannel, null);
metaDataSearch.result.getResults(offset,count);
+
+ searchManagerObject.onMetadataSearch = function(search, state) {
+
+ console.log("[INFO]: onMetadataSearch called", search);
+
+ var message = "";
+
+ switch(state) {
+
+ case 0:
+
+ console.log("[INFO] Result found.");
+ console.log(search.result[0]);
+ break;
+
+ case 3:
+
+ message = " MetadataSearch in Idle state because of either search abort or parameters have been modified \
+ (query, constraints or search target)";
+ break;
+
+ case 4:
+
+ message = " The search cannot be complete because of lack of ressources or any other reason.\
+ (memory insufficient to cache all of the requested results.)";
+ break;
+
+ default:
+ console.log("Unknow state :(");
+
+ }
+ }
}
\ No newline at end of file
Modified: oipf/view/welcome.html
===================================================================
--- oipf/view/welcome.html 2015-02-04 13:39:59 UTC (rev 770)
+++ oipf/view/welcome.html 2015-02-05 15:10:38 UTC (rev 771)
@@ -13,6 +13,8 @@
<script src="../js/test/test.js" type="text/javascript"></script>
<script>
testCreatingVidBroadObj();
+ //console.log(data.tv.channel);
+ testGetCurrentProgram(1,null,null,0,1);
//document.body.innerHTML ="<object is='video-broadcast'></object>"
//testCreatingSearchManagerObj();<x-foo-with-markup><x-foo-with-markup/>
//testCreatingChannelConfigObj();
1
0
Author: ygrego
Date: 2015-02-04 13:39:59 +0000 (Wed, 04 Feb 2015)
New Revision: 770
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/770
Log:
Adding of documentations for properties and classes of 'SearchManagerObject'.
Modified:
oipf/js/impl/SearchManagerObject.js
Modified: oipf/js/impl/SearchManagerObject.js
===================================================================
--- oipf/js/impl/SearchManagerObject.js 2015-02-04 10:29:19 UTC (rev 769)
+++ oipf/js/impl/SearchManagerObject.js 2015-02-04 13:39:59 UTC (rev 770)
@@ -16,17 +16,84 @@
var SearchManagerObject = Class.extend({
/*
- *\param Integer
- *\param Integer
- *\param Object
+ * Description:
+ * 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.
*/
- onMetadataUpdate: function(action, info, object) {
+ onMetadataUpdate: function(action, info, object) {channels, for instance.
},
/*
- *\param MetadataSearch
- *\param Integer
+ * Description:
+ * 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).
+ * ------ --------------------------------------------------------------------------------------------------------------------------------------------------------
*/
onMetadataSearch: function(search, state) {
console.log("[INFO]: onMetadataSearch called", search);
@@ -63,28 +130,149 @@
},
/*
- * \param Integer
- * \return MetadataSearch
+ * Description :
+ * Create a MetadataSearch object that can be used to search the metadata.
+ *
+ * Argument:
+ * -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 on-demand content SHALL be searched.
+ * -----------------------------------------------------------------
+ *
+ * These values are treated as a bitfield, allowing searches to be carried out across multiple search targets.
+ *
+ * Return MetadataSearch
*/
createSearch: function(searchTarget) {
- return new MetadataSearch();
+ return new MetadataSearch(searchTarget);
},
/*
- *\return ChannelConfig
+ * Description :
+ * Create a MetadataSearch object that can be used to search the metadata.
+ * 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.
+ *
+ * Return MetadataSearch
*/
getChannelConfig: function() {
-
+ return oipfObjectFactory.createChannelConfig();
}
});
+/*
+* Description:
+* A MetadataSearch object represents a query of the metadata about available programmes. Applications can create
+* MetadataSearch objects using the createSearch() method on the application/oipfSearchManager
+* object. When metadata queries are performed on a remote server, the protocol used is defined in section 4.1.2.2 of
+* [OIPF_META2].
+*
+* Each search consists of three steps:
+* 1. Definition of the query. The application creates a MetadataSearch object, and either creates its associated
+* Query object, or sets a query using the findProgrammesFromStream() method, and sets any applicable
+* constraints and result ordering.
+*
+* 2. Acquisition of results. The OITF acquires some or all of the items that match the specified query and constraints, and
+* caches the requested subset of the results. This is typically triggered by a call to getResults().
+*
+* 3. Retrieval. The application accesses the results via the SearchResults class.
+* The MetadataSearch and SearchResults classes work together to manage an individual search. For every search,
+* the MetadataSearch object and its corresponding SearchResults object SHALL be in one of three states as
+* described in table below:
+*
+* ---------------------------------------------------------------------------------------------------------------------------------------------------------------
+* State | Description
+* ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------
+* Idle | The search is idle; no results are available. This is the initial state of the search. In this
+* | state, the application can set or modify the query, constraints or ordering rules that are
+* | applied to the search.
+* | No search results are available in this state – any calls to SearchResults.item()
+* | SHALL return undefined and the values of the length and totalSize properties on the
+* | SearchResults object SHALL return zero. Any search results that have been cached by
+* | the terminal SHALL be discarded when the Idle state is entered.
+* | Calling the SearchResults.getResults() method SHALL cause a state transition to
+* | the Searching state.
+* ---------- ---------------------------------------------------------------------------------------------------------------------------------------------------
+* Searching | Results are being retrieved and are not yet available to applications.
+* |
+* | If the terminal has not previously cached the full set of search results, the terminal
+* | performs the search to gather the requested results.
+* |
+* | If a new version of the metadata is detected (e.g. due to an EIT update) while the search
+* | is in this state, results SHALL be retrieved from either the new or original version of the
+* | metadata but SHALL NOT be retrieved from a combination of the two versions.
+* |
+* | Calls to SearchResults.item() SHALL return undefined.
+* |
+* | Any modification of the search parameters (e.g. changing the query or adding/removing
+* | constraints, or calling findProgrammesFromStream() ) by the application SHALL stop
+* | the current search and cause a transition to the Idle state. The terminal SHALL dispatch a
+* | MetadataSearch event with state =3.
+* |
+* | When all requested results have been found, the terminal SHALL dispatch a
+* | MetadataSearch event with state =0 and a state transition to the Found state SHALL
+* | occur.
+* |
+* | If the search cannot be completed due to a lack of resources or any other reason, the
+* | terminal SHALL dispatch a MetadataSearch event with state =4 and a state transition to
+* | the Idle state SHALL occur.
+* |
+* | Calls to the SearchResults.getResults() method SHALL abort the retrieval of search
+* | results and attempt to retrieve the newly-requested set of results instead.
+* |
+* | NOTE: Calling getResults() when in the searching state may be used to fetch a group
+* | of items starting at a different offset or with a different count.
+* ---------- -------------------------------------------------------------------------------------------------------------------------------------------------------
+* Found | Search results are available and can be retrieved by applications. The data exposed via
+* | the SearchResults.item() method is static and never changes as a result of any
+* | updates to the underlying metadata database until SearchResults.getResults() is
+* | next called.
+* |
+* | If a new version of the metadata is detected (e.g. due to an EIT update), a
+* | MetadataUpdate event is dispatched with action =1. Subsequent calls to
+* | SearchResult.getResults() SHALL return results based on the updated metadata.
+* |
+* | Calls to SearchResults.getResults() SHALL cause a state transition to the
+* | Searching state.
+* |
+* | Any modification of the search parameters (e.g. changing the query or adding/removing
+* | constraints, or calling findProgrammesFromStream() ) by the application SHALL cause
+* | the current set of results to be discarded and SHALL cause a transition to the Idle state.
+* | The terminal SHALL dispatch a MetadataSearch event with state =3.
+* -------------------------------------------------------------------------------------------------------------------------------------------------------------------
+*
+* The findProgrammesFromStream() method acts as a shortcut for setting a query and a set of constraints on the
+* MetadataSearch object . Regardless of whether the query and constraints are set explicitly by the application or via
+* findProgrammesFromStream() , results are retrieved using the getResults() method.
+*
+* Changes to the search parameters (e.g. changing the query or adding/removing constraints or modifying the search target,
+* or calling findProgrammesFromStream() ) SHALL be applied when the getResults() method on the
+* corresponding SearchResults object is called. Due to the nature of metadata queries, searches are asynchronous and
+* events are used to notify the application that results are available. MetadataSearch events SHALL be targeted at the
+* application/oipfSearchManager object.
+*
+* The present document is intentionally silent about the implementation of the search mechanism and the algorithm for
+* retrieving and caching search results except where described in Table 7 above. When performing a search, the receiver
+* MAY gather all search results and cache them (or cache a set of pointers into the full database), or gather only the subset
+* of search results determined by the getResults() parameters, or take an alternative approach not described here.
+*/
var MetadataSearch = Class.extend({
/*
+ * Description:
+ * The subset of search results that has been requested by the application.
*
- *\type SearchResults
+ * Visibility Type: readonly SearchResults
*/
result: null,
@@ -92,6 +280,7 @@
* Description :
* The target(s) of the search. Valid values are:
*
+ * -----------------------------------------------------------------
* Value | Description
* ------ ----------------------------------------------------------
* 1 | Metadata relating to scheduled content SHALL be searched.
@@ -99,9 +288,8 @@
*
* These values SHALL be treated as a bitfield, allowing searches to be carried out across multiple search
* targets.
- *
- * Type Integer
- *
+ *
+ * Visibility: readonly
*/
searchTarget: null,
@@ -145,13 +333,54 @@
});
+/*
+* Description:
+* The SearchResults class represents the results of a metadata search. Since the result set may contain a large number
+* of items, applications request a ‘window’ on to the result set, similar to the functionality provided by the OFFSET and
+* LIMIT clauses in SQL.
+*
+* Applications MAY request the contents of the result in groups of an arbitrary size, based on an offset from the beginning
+* of the result set. The data SHALL be fetched from the appropriate source, and the application SHALL be notified when
+* the data is available.
+* The set of results SHALL only be valid if a call to getResults() has been made and a MetadataSearch event notifying
+* the application that results are available has been dispatched. If this event has not been dispatched, the set of results
+* SHALL be empty (i.e. the value of the totalSize property SHALL be 0 and calls to item() SHALL return
+* undefined ).
+* In addition to the properties and methods defined below a SearchResults object SHALL support the array notation to
+* access the results in this collection.
+*/
var SearchResults = Class.extend({
- //Integer
+ /*
+ * Description :
+ * The number of items in the current window within the overall result set. The value of this property SHALL be
+ * zero until getResults() has been called and a MetadataSearch event notifying the application that results
+ * are available has been dispatched. If the current window onto the result set is in fact the whole result set then
+ * length will be the same as totalSize. Otherwise length will be less than totalSize.
+ *
+ * Visibility: readonly
+ */
lentgh: null,
+ /*
+ * Description :
+ * The number of items in the current window within the overall result set. The value of this property SHALL be
+ * zero until getResults() has been called and a MetadataSearch event notifying the application that results
+ * are available has been dispatched. If the current window onto the result set is in fact the whole result set then
+ * length will be the same as totalSize. Otherwise length will be less than totalSize.
+ *
+ * Visibility Type: readonly Integer
+ */
offset: null,
+ /*
+ * Description :
+ * The total number of items in the result set.
+ * The value of this property SHALL be zero until getResults() has been called and a MetadataSearch
+ * event notifying the application that results are available has been dispatched.
+ *
+ * Visibility: readonly
+ */
totalSize: null,
init: function() {
@@ -159,26 +388,45 @@
},
/*
+ * Description:
+ * Perform the search and retrieve the specified subset of the items that match the query.
+ * Results SHALL be returned asynchronously. A MetadataSearch event with state=0
+ * SHALL be dispatched when results are available.
+ * This method SHALL always return false.
+ *
+ * Arguments:
+ * - offset: The number of items at the start of the result set to be skipped before data is retrieved.
*
- *\param Integer
- *\param Interger
- *
- *\return Boolean always to false
+ * - count: The number of results to retrieve.
+ *
*/
getResults: function(offset, count) {
-
},
+ /*
+ * Description:
+ * Abort any outstanding request for results and remove any query, constraints or ordering
+ * rules set on the MetadataSearch object that is associated with this SearchResults
+ * object. Regardless of whether or not there is an outstanding request for results, items
+ * currently in the collection SHALL be removed (i.e. the value of the length property SHALL
+ * be 0 and any calls to item() SHALL return undefined ). All cached search results SHALL
+ * be discarded.
+ *
+ */
abort: function() {
},
/*
- *
- *\param Integer
- *
- *\return Object Instance of Programme, CODAsset, CODFolder , or CODService
+ * Description:
+ * Return the item at position index in the collection of currently available results, or
+ * undefined if no item is present at that position. This function SHALL only return objects
+ * that are instances of Programme , CODAsset , CODFolder , or CODService .
+ *
+ * Arguments:
+ * - index: The index into the result set.
+ *
*/
item: function(index) {
1
0
Author: ygrego
Date: 2015-02-04 10:29:19 +0000 (Wed, 04 Feb 2015)
New Revision: 769
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/769
Log:
Setting a current channel into 'init.js', uncomment instanciation of 'SearchManagerOject' and 'ChannelConfig'.
Modified:
oipf/js/impl/OipfObjectFactory.js
oipf/js/initObj/init.js
oipf/js/test/test.js
Modified: oipf/js/impl/OipfObjectFactory.js
===================================================================
--- oipf/js/impl/OipfObjectFactory.js 2015-02-04 10:19:16 UTC (rev 768)
+++ oipf/js/impl/OipfObjectFactory.js 2015-02-04 10:29:19 UTC (rev 769)
@@ -29,13 +29,13 @@
//this.applicationManagerObject = new ApplicationManagerObject();
//this.capabilitiesObject = new CapabilitiesObject();
//this.codManagerObject = new CodManagerObject();
- //this.channelConfig = new ChannelConfig();
+ this.channelConfig = new ChannelConfig(null, currentchannel);
//this.imsObject = new IMSObecjet();
//this.mdtfObject = new MDTFObject();
//this.notifSocketObject = new NotifSocket();
//this.parentalControlManagerObject = new ParentalControlManagerObject();
//this.recordingSchedulerObject = new RecordingSchedulerObject();
- //this.searchManagerObject = new SearchManagerObject();
+ this.searchManagerObject = new SearchManagerObject();
//this.configurationObject = new ConfigurationObject();
//this.downloadManagerObject= new DownloadManagerObject();
//this.downloadTriggerObject= new DownloadTriggerObject();
Modified: oipf/js/initObj/init.js
===================================================================
--- oipf/js/initObj/init.js 2015-02-04 10:19:16 UTC (rev 768)
+++ oipf/js/initObj/init.js 2015-02-04 10:29:19 UTC (rev 769)
@@ -378,5 +378,8 @@
});
+var currentChannelType = "TYPE_TV";
+var currentChannelName = "ARTE";
+var currentchannel = new Channel(currentChannelName, currentChannelType);
var oipfObjectFactory = new OipfObjectFactory();
-var metadata = data;
\ No newline at end of file
+var metadata = data;
Modified: oipf/js/test/test.js
===================================================================
--- oipf/js/test/test.js 2015-02-04 10:19:16 UTC (rev 768)
+++ oipf/js/test/test.js 2015-02-04 10:29:19 UTC (rev 769)
@@ -75,8 +75,7 @@
searchManagerObject = oipfObjectFactory.createSearchManagerObject();
channelConfig = oipfObjectFactory.createChannelConfig();
- metaDataSearch= channel.createSearch(searchTarget);
+ metaDataSearch= searchManagerObject.createSearch(searchTarget);
metaDataSearch.findProgrammesFromStream(channelConfig.currentChannel, null);
metaDataSearch.result.getResults(offset,count);
-
}
\ No newline at end of file
1
0
Author: ygrego
Date: 2015-02-04 10:19:16 +0000 (Wed, 04 Feb 2015)
New Revision: 768
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/768
Log:
Reorganizing of current file.
Modified:
oipf/js/initObj/init.js
Modified: oipf/js/initObj/init.js
===================================================================
--- oipf/js/initObj/init.js 2015-02-04 09:45:28 UTC (rev 767)
+++ oipf/js/initObj/init.js 2015-02-04 10:19:16 UTC (rev 768)
@@ -103,15 +103,13 @@
*
* Visibility Type: readonly String
*/
- tunerID: null,
-
+ tunerID: null,
init: function(name , channelType) {
this.name = name;
this.channelType = CHANNEL_CONSTANT[channelType];
}
-
});
/*
1
0
Author: ygrego
Date: 2015-02-04 09:45:28 +0000 (Wed, 04 Feb 2015)
New Revision: 767
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/767
Log:
Adding of property 'tunerId' in 'Channel class'.
Modified:
oipf/js/initObj/init.js
Modified: oipf/js/initObj/init.js
===================================================================
--- oipf/js/initObj/init.js 2015-02-04 09:34:26 UTC (rev 766)
+++ oipf/js/initObj/init.js 2015-02-04 09:45:28 UTC (rev 767)
@@ -95,10 +95,16 @@
*
* Type: String
*/
- name: null,init: function() {
-
- },
+ name: null,
+ /*
+ * Description:
+ * Optional unique identifier of the tuner within the scope of the OITF that is able to receive the given channel.
+ *
+ * Visibility Type: readonly String
+ */
+ tunerID: null,
+
init: function(name , channelType) {
this.name = name;
1
0
Author: ygrego
Date: 2015-02-04 09:34:26 +0000 (Wed, 04 Feb 2015)
New Revision: 766
Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/766
Log:
Implementation of constructor.
Modified:
oipf/js/impl/ChannelConfig.js
Modified: oipf/js/impl/ChannelConfig.js
===================================================================
--- oipf/js/impl/ChannelConfig.js 2015-02-04 09:23:05 UTC (rev 765)
+++ oipf/js/impl/ChannelConfig.js 2015-02-04 09:34:26 UTC (rev 766)
@@ -92,7 +92,9 @@
},
- init: function() {
+ init: function(channelList, currentChannel) {
+ this.channelList = channelList;
+ this.currentChannel = currentChannel;
},
/*
1
0