"type", "EXACTLY", "VIDEO");
this.typeFilter = new tizen.CompositeFilter(
"UNION", [this.audioTypeFilter, this.videoTypeFilter]);
-
- this.sortMode = new tizen.SortMode("trackNumber", "ASC");
};
this.scan = function() {
+ this.deferred = new $.Deferred();
this.initialize()
this.mediaItems = [];
this.errorCB.bind(this),
null,
this.typeFilter,
- this.sortMode,
+ null,
this.fetchCount,
this.fetchOffset);
+
+ return this.deferred.promise();
};
this.errorCB = function(error) {
console.log("Error: " + error.name);
+ this.deferred.reject();
throw new Error(error.name);
};
this.errorCB.bind(this),
null,
this.typeFilter,
- this.sortMode,
+ null,
this.fetchCount,
this.fetchOffset);
+ } else {
+ self.deferred.resolve();
}
};
};