Namespace hcap.carousel

hcap.carousel

Namespace Summary
Constructor Attributes Constructor Name and Description
 

Method Summary

Namespace Detail

hcap.carousel

Method Detail

  • <static> hcap.carousel.clearCarouselDataCache(param)
    Clear the cache storage for the carousel data. All carousel cache will be deleted.
    hcap.carousel.clearCarouselDataCache({
         "onSuccess" : function() {
             console.log("onSuccess");
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    Parameters:
    {Object} param
    • {Function} param.onSuccess [Optional] - success callback function.
        param.onSuccess = function() {
            // No Parameter.
        }
    • {Function} param.onFailure [Optional] - failure callback function.
        param.onFailure = function (param) {
            // {String} param.errorMessage - in case of failure, this message provides the details.
        }
    Since:
    1.3.1
    See:
    hcap.carousel.requestCacheCarouselData()
    hcap.carousel.isCarouselDataCached()
    {Event} carousel_data_cached
  • <static> hcap.carousel.isCarouselDataCached(param)
    Checks if the carousel data is cached or not.
    hcap.carousel.isCarouselDataCached({
         "url" : "hcap://1.1.1/xait.xml",
         "onSuccess" : function(s) {
             console.log("onSuccess : cachePath = " + s.cachePath);
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    Parameters:
    {Object} param
    • {String} param.url [Required] - carousel data url to check.
    • {Function} param.onSuccess [Optional] - success callback function.
        param.onSuccess = function (param) {
            // {String} param.cachePath - cached url path if carousel data is cached. Empty string ("") if not.
        }
    • {Function} param.onFailure [Optional] - failure callback function.
        param.onFailure = function (param) {
            // {String} param.errorMessage - in case of failure, this message provides the details.
        }
    Since:
    1.3.1
    See:
    hcap.carousel.requestCacheCarouselData()
    hcap.carousel.clearCarouselDataCache()
    {Event} carousel_data_cached
  • <static> hcap.carousel.requestCacheCarouselData(param)
    Requests to cache the carousel data file for the given url. The carousel data will be cached internally.
    When the carousel data is cached, application will received the {Event} carousel_data_cached.

    The carousel data can be broadcasted in two ways.
    One is through RF channel and the other is through IP multicast channel.
    // Request to cache xait.xml from data channel (frequency : 1 for both RF and IP multicast) with program number 1 and component tag 1.
    hcap.carousel.requestCacheCarouselData({
         "url" : "hcap://1.1.1/xait.xml",
         "onSuccess" : function() {
             console.log("onSuccess");
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    // Request to cache xait.xml from the channel (frequency : 513MHz) with program number 1 and component tag 1.
    hcap.carousel.requestCacheCarouselData({
         "url" : "hcap://513000000.1.1/xait.xml",
         "onSuccess" : function() {
             console.log("onSuccess");
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    Parameters:
    {Object} param
    • {String} param.url [Required] - carousel data url.
      The format should be "hcap://[frequency (Hz, and MHz for satellite)].[program number].[component tag]/[path]/[content name]".
      frequency 1 means Pro:Centric server same as data channel of RF frequency or IP multicast address.
    • {Function} param.onSuccess [Optional] - success callback function.
        param.onSuccess = function() {
            // No Parameter.
        }
    • {Function} param.onFailure [Optional] - failure callback function.
        param.onFailure = function (param) {
            // {String} param.errorMessage - in case of failure, this message provides the details.
        }
    Since:
    1.3.1
    See:
    hcap.carousel.isCarouselDataCached()
    hcap.carousel.clearCarouselDataCache()
    {Event} carousel_data_cached