From 5dfcc5e7f93a1446eda6e0dd4467ffacf050d9fe Mon Sep 17 00:00:00 2001 From: Salvatore Iovene Date: Thu, 31 Jan 2013 13:11:22 +0200 Subject: [PATCH] (hoofbeats) Migrates to Tizen 2.0 'content' webapi. --- examples/hoofbeats/javascripts/library.js | 11 +++++------ examples/hoofbeats/tests/config.xml | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/hoofbeats/javascripts/library.js b/examples/hoofbeats/javascripts/library.js index 29b887c..494a0b5 100644 --- a/examples/hoofbeats/javascripts/library.js +++ b/examples/hoofbeats/javascripts/library.js @@ -24,7 +24,6 @@ $(function() { "UNION", [this.audioTypeFilter, this.videoTypeFilter]); this.sortMode = new tizen.SortMode("trackNumber", "ASC"); - this.mediaSource = tizen.mediacontent.getLocalMediaSource(); }; this.scan = function() { @@ -33,8 +32,8 @@ $(function() { this.mediaItems = []; this.fetchOffset = 0; - this.mediaSource.findItems( - this.findItemsCB.bind(this), + tizen.content.find( + this.findCB.bind(this), this.errorCB.bind(this), null, this.typeFilter, @@ -48,7 +47,7 @@ $(function() { throw new Error(error.name); }; - this.findItemsCB = function(items) { + this.findCB = function(items) { var self = this; items.forEach(function(item, index, items) { @@ -61,8 +60,8 @@ $(function() { if (items.length == this.fetchCount) { // There *might* be more items. this.fetchOffset += this.fetchCount; - this.mediaSource.findItems( - this.findItemsCB.bind(this), + tizen.content.find( + this.findCB.bind(this), this.errorCB.bind(this), null, this.typeFilter, diff --git a/examples/hoofbeats/tests/config.xml b/examples/hoofbeats/tests/config.xml index 3303221..e640120 100644 --- a/examples/hoofbeats/tests/config.xml +++ b/examples/hoofbeats/tests/config.xml @@ -1,5 +1,5 @@ - + Hoofbeats Unit Tests @@ -7,7 +7,7 @@ - + -- 2.7.4