Dune HD STB - DUNE STORE MECHANISM



Overview

Dune Store mechanism is a function of the native Dune UI which allows the
user to conviniently browse the online catalog of available applications,
view application descriptions and install/uninstall applications from the
catalog.

Dune Store mechanism consists of two parts: the Dune Store application (a
special application which runs on the STB) and the Dune Store server (which
stores the catalog of available applications and other resources needed for
Dune Store functioning).

Each application in the Dune Store catalog is implemented as Dune plugin.
See here for more information about Dune plugins:
   http://files.dune-hd.com/sdk/doc/html/plugins.html

For each application, the Dune Store catalog contains a description and
meta-data (e.g. determining what languages are supported by the application
and in what countries it should be available).

All applications in the Dune Store catalog are grouped by categories. Each
application must belong to one and only one category. The list of available
categories and their descriptions are determined by the Dune Store catalog.

Additionally, the Dune Store catalog may contain skins (Dune UI skins)
grouped by one or several skin categories. Skins are handled slightly
differently from applications: Dune Store allows to install a selected
skin, and this skin becomes the current custom skin. When another skin is
installed by the user, it replaces the previously installed skin. See here
for more information about Dune UI skins:
   http://dune-hd.com/support/skins

Dune Store server

By default, the Dune Store catalog and all other related resources are
loaded by the STB from the standard Dune Store server (which is hosted by
Dune HD). Custom firmware may be configured to use other Dune Store
server(s) -- see "Using custom Dune Store server in custom firmware" for
more information.

The interaction between the STB and the Dune Store server is performed via
HTTP: the STB sends HTTP requests to the Dune Store server.

The Dune Store server handles the following HTTP requests from the STB:

1. Download Dune Store catalog in XML format.

   Dune Store catalog is downloaded by the Dune Store application when the
   user launches the Dune Store application.

   The standard firmware uses the following HTTP URL to download Dune Store
   catalog:
      http://online.dune-hd.com/dune_store/v1/catalog.xml

   For more information about Dune Store catalog XML format, see "Dune
   Store catalog format" section.

   Custom firmware may use another URL for downloading Dune Store catalog.

2. Download icon file.

   Icons are downloaded by the Dune Store application when the Dune Store
   application needs them.

   The URLs to the required icon files are determined based on the Dune
   Store catalog content, and based on an icon URL prefix.

   The standard firmware uses the following icon URL prefix:
      http://online.dune-hd.com/dune_store/v1/

   Example URL:
      http://online.dune-hd.com/dune_store/v1/plugins/plugin_name/logo.png

   Custom firmware may use another icon URL prefix.

3. Download plugin/skin file.

   Plugin/skin files are downloaded by the STB when the Dune Store
   application requests the STB to launch installation of a plugin/skin.

   The URLs to the required plugin/skin files are determined based on the
   Dune Store catalog content, and based on a download URL prefix.

   The standard firmware uses the following download URL prefix:
      http://online.dune-hd.com/dune_store/v1/

   Example URL for plugin file:
      http://online.dune-hd.com/dune_store/v1/plugins/plugin_name/1.tgz

   Example URL for skin file:
      http://online.dune-hd.com/dune_store/v1/skins/Black/dune_skin_black.zip

   Custom firmware may use another download URL prefix.

4. Download "update_info" plugin update specification in XML format.

   The "update_info" XML document is loaded by the STB when an already
   installed plugin is launched on the STB and the STB needs to check if
   an update for this plugin is available.

   NOTE: the plugins online update mechanism is not itself a part of the
   Dune Store mechanism, but is rather a part of the plugins mechanism. The
   Dune Store mechanism assumes that all plugins which can be installed via
   Dune Store are configured to use the plugins online update mechanism.

   The URL to the "update_info" XML document is determined based on the
   manifest file of the installed plugin.

   For more information about "update_info" XML document format (and about
   plugin update mechanism in general), see here:
      http://files.dune-hd.com/sdk/doc/html/plugins.html
      "Plugins online update mechanism"

Dune Store catalog format

The Dune Store catalog is described by an XML document which has the
hierarchy of XML elements described below.

See here the Dune Store catalog used by the standard firmware:
   http://online.dune-hd.com/dune_store/v1/catalog.xml

XML elements:

catalog/categories/category

   name
      Category name. This is an internal category identifier, which is
      never shown to the user. It is recommended that category name
      contains only the following characters: a-z, A-Z, 0-9, '_', '-', '.'.

   caption (lang=)
      Category caption. This a user-visible category caption shown in Dune
      Store. Supports multiple languages via optional "lang" attribute.

   type
      Possible values:
         plugins
         skins

   icon_path
      Specifies the category icon to be shown in Dune Store. The value is a
      path relative to icon_url_prefix. Based on the specified path and the
      icon_url_prefix, an HTTP URL is constructed. The URL must point to a
      PNG file. It is recommended that the URL ends with ".png" file
      extension.

   badge_icon_url
      Specifies the badge icon to use for rendering the category icon in UI
      skins which use badge icons. The value is a "gui_skin://" or
      "http://" URL. Typically "gui_skin://" URL is used to point to one of
      predefined badge icons available in UI skin with badge icons support.
      The URL must point to a PNG file. It is recommended that the URL ends
      with ".png" file extension.

   plugins (/plugin)
      Only for categories of type "plugins". Specifies the list of plugins
      which belong to this application category. Each "plugin" element must
      contain the name of a plugin belonging to Dune Store.

   skins (/skin)
      Only for categories of type "skins". Specifies the list of skins
      which belong to this application category. Each "skin" element must
      contain the name of a skin belonging to Dune Store.

catalog/plugins/plugin

   name
      Plugin name. This is an internal plugin identifier, which is not
      shown to the user in Dune Store. Must be exactly the same as plugin
      name specified in plugin manifest file dune_plugin.xml.

   caption (lang=)
      Plugin caption. This is a user-visible plugin caption shown in Dune
      Store. Supports multiple languages via optional "lang" attribute.
      Must be exactly the same as plugin caption specified in plugin
      manifest file dune_plugin.xml. If multiple languages are used, plugin
      caption in the same languages must be specified in dune_plugin.xml.

   short_description (lang=)
      Short description of the plugin to be shown in Dune Store. Is shown
      in the right panel of the application list screen, and on the
      application description screen. Must be a short sentence (just a few
      words) briefly describing the application. It is recommended that the
      sentence ends with "." character. Supports multiple languages via
      optional "lang" attribute.

   long_description (lang=)
      Long description of the plugin to be shown in Dune Store. Is shown on
      the application description screen. Should be one or several
      sentences providing more detailed description for the application. It
      is recommended that each sentence ends with "." and sentences are
      separates with a whitespace. Newline characters must not be used in
      the description. It is recommended that the description fits the
      application description screen w/o scrolling. Supports multiple
      languages via optional "lang" attribute.

   icon_path
      Specifies the plugin icon to be shown in Dune Store. The value is a
      path relative to icon_url_prefix. Based on the specified path and the
      icon_url_prefix, an HTTP URL is constructed. The URL must point to a
      PNG file. It is recommended that the URL ends with ".png" file
      extension. If the plugin has entry points, it is recommended that
      this icon is the same as the icon of the main entry point of the
      plugin specified in plugin manifest file dune_plugin.xml.

   badge_icon_url
      Specifies the badge icon to use for rendering the plugin icon in UI
      skins which use badge icons. The value is a "gui_skin://" or
      "http://" URL. Typically "gui_skin://" URL is used to point to one of
      predefined badge icons available in UI skin with badge icons support.
      The URL must point to a PNG file. It is recommended that the URL ends
      with ".png" file extension. If the plugin has entry points, it is
      recommended that this icon is the same as the icon of the main entry
      point of the plugin specified in plugin manifest file
      dune_plugin.xml.

   poster_path
      Specifies the poster image to be shown in Dune Store on the
      application description screen. Is handled in the same way and must
      match the same requirements as icon_path. Can be the same as
      icon_path.

   interface_language
      Specifies the languages of the application to be shown in Dune Store.
      Is not used for any other purposes. Each language listed must match
      the following requirement: if the user knows this language, the
      application is very likely to be potentially useful for the user, and
      vice versa (if the user does know this language, the application is
      very likely to be not useful for the user). The value is a list of
      language captions, separated by comma and whitespace. A special value
      "international" means "all languages" (i.e. the application is
      potentially useful for all users not depending on what languages they
      know). Language captions must be specified in English. Examples of
      language captions:
         English
         German
         French
         Spanish
         Italian
         Polish
         Russian
         Ukrainian
         Arabic
         Chinese
         Japanese

   language
      Specifies the languages of the applications to be used for filtering
      applications in Dune Store. The filtering is performed based on
      "Interface language" setting in Dune Setup UI (Setup / General). The
      value is a list of language identifiers, separated by comma. A
      special value "any" means all languages (i.e. no filtering by
      language is performed). Language identifiers must be the same as used
      in Dune language files (and used internally by Dune to identify
      interface languages). The exact list of supported language
      identifiers for a particular firmare version can be found in the
      firmware in /firmare/translations/languages.properties file. The list
      of language identifiers supported in the firmware version
      130515_2104_b6:
         english
         french
         german
         dutch
         spanish
         italian
         russian
         ukrainian
         romanian
         hungarian
         polish
         greek
         danish
         czech
         swedish
         estonian
         slovak
         turkish
         bulgarian
         hebrew
         chinese_simplified
         chinese_traditional
         japanese
         arabic

   country
      Specifies the countries in which the application can be used and
      should be listed in Dune Store. In other countries, the application
      is not listed. The country is determined by GeoIP. The value is a
      list of country identifiers, separated by comma. A special value
      "any" means all countries (i.e. no filtering by GeoIP is performed).
      Country identifiers are country names as provided by MaxMind GeoIP
      database (see here: http://www.maxmind.com/en/country). Examples of
      country identifiers:
         United States
         Canada
         United Kingdom
         Germany
         France
         Russian Federation
         Ukraine
         Belarus
         Azerbaijan
         Armenia
         Kazakhstan
         Kyrgyzstan
         Moldova
         Tajikistan
         Turkmenistan
         Uzbekistan
         Georgia
         Lithuania
         Latvia
         Estonia

   strict_country
      The same as "country", but with the following addition: the system
      performs more strict checking for GeoIP restrictions. Should be used
      when it is very important to ensure that the application is available
      only in certain countries and that the application is never listed in
      Dune Store if there is no good guarantee that the country is allowed
      for the application.

   product
      Specifies the restrictions for Dune HD STB models on which the
      application can work and should be listed in Dune Store. The value is
      a list of product specifications, separated by comma. Product
      specification could be Dune HD product identifier (the one shown in
      "Setup / Information" menu) or Dune HD platform identifier. Example
      of Dune HD product identifiers: hdlite_53d, hdsmart_d1, hdmax,
      hdtv_101, hdtv_102p, tv102, tv303d, base3d. Dune HD platform
      identifier can be one of the following: 8644, 8654, 8670, 8672, 8674.
      For applications which require WebKit HTML browser, the list should
      be "8670". For applications which require Opera HTML browser, the
      list should be "8672,8674". For applications which require WebKit or
      Opera HTML browser, the list should be "8670,8672,8674".

   version_index
      Specifies the current version index of the plugin in Dune Store. Is
      used by Dune Store to check if the currently installed plugin version
      is older than the one available in Dune Store (i.e. that application
      update is available). Must be exactly the same as version_index
      specified in plugin manifest file dune_plugin.xml. 

   version
      Specifies the current application version (i.e. the version of the
      plugin in Dune Store) to be shown in Dune Store. Must be exactly the
      same as version specified in plugin manifest file dune_plugin.xml.

   archive_path
      Specifies the path to the plugin archive. The value is a path
      relative to download_url_prefix. Based on the specified path and the
      download_url_prefix, an HTTP URL is constructed. The URL must point
      to a plugin archive file in .tar.gz format. The content of this
      plugin archive is the same as the content of the regular plugin
      installer archive (i.e. dune_plugin*.zip). The information in plugin
      manifest dune_plugin.xml file in the plugin archive must be
      consistent with data in Dune Store catalog. The dune_plugin.xml file
      must contain plugin update specification (i.e. the check_update
      element).

   space_needed
      Specifies the storage space (in bytes) occupied by the plugin after
      it is installed into the flash memory of the STB. Can be computed
      using the following algorithm: "du -sk /path/to/folder" * 1024.

catalog/skins/skin

   name
      Skin name. This is an internal skin identifier, which is not shown to
      the user in Dune Store. Must be exactly the same as skin name
      specified in dune_skin.properties in skin archive file. When the skin
      is installed, its name is shown in "Setup / Appearance / Skin" field.

   caption (lang=)
      Skin caption. This is a user-visible skin caption shown in Dune
      Store. Supports multiple languages via optional "lang" attribute.

   short_description (lang=)
      Short description of the skin to be shown in Dune Store. Is shown in
      the right panel of the skin list screen. Must be a short sentence
      (just a few words) briefly describing the skin. It is recommended
      that the sentence ends with "." character. Supports multiple
      languages via optional "lang" attribute.

   icon_path
      Specifies the skin icon to be shown in Dune Store. The value is a
      path relative to icon_url_prefix. Based on the specified path and the
      icon_url_prefix, an HTTP URL is constructed. The URL must point to a
      PNG file. It is recommended that the URL ends with ".png" file
      extension. The icon must provide a visual representation of the skin
      (e.g. it could be based on the skin background).

   archive_path
      Specifies the path to the skin archive. The value is a path
      relative to download_url_prefix. Based on the specified path and the
      download_url_prefix, an HTTP URL is constructed. The URL must point
      to a skin archive file in the standard skin installer (.zip) format.
      The skin archive must contain dune_skin.properites file, containing
      "name" property; the value of this property must be the same as skin
      name specified in Dune Store catalog.

   space_needed
      Specifies the storage space (in bytes) occupied by the skin after
      it is installed into the flash memory of the STB. Can be computed
      using the following algorithm: "du -sk /path/to/folder" * 1024.

Categories in Dune Store vs sections in main menu

The main menu of standard Dune firmware versions includes menu sections
corresponding to all categories of the standard Dune Store catalog.
However, the list of Dune menu sections is determined not by the Dune Store
catalog, but rather by firmware configuration (in the
/firmware/config/menu_config.xml file). Each application in the Dune Store
catalog independently determines two aspects: in which category of the Dune
Store catalog it resides (by means of catalog.xml file), and in which
section of the main menu it will appear when it is installed (by means of
'parent_media_url' element of plugin manifest file dune_plugin.xml).

So, if the list of categories in the Dune Store catalog is changed, this
does not change the list of sections in the main menu. Changing the list of
categories in the main menu would require to issue a firmware with the
modified configuration of the main menu.

The standard Dune firmware versions are specially configured to have
exactly the same list of categories in the main menu and the list of
categories in the standard Dune Store catalog.

A custom firmware which uses custom Dune Store server may contain whatever
list of main menu sections, and whatever list of categories in the Dune
Store catalog, given the following requirement is met: the firmware
configuration should include all main menu sections, which are referenced
by all applications available in the Dune Store catalog.

If some entry point of an application in the Dune Store catalog references
a main menu section which is not specified in the firmware configuration
(/firmware/config/menu_config.xml file), then, when this application is
installed, this entry point will not be visible and accessible at all.

Dune Store configuration file

When the file /firmware/config/dsconfig.xml or /config/dsconfig.xml exists,
the content of this file is used by the Dune Store application as the Dune
Store configuration file.

The Dune Store configuration file allows to define a custom list of so
called "application sources".

Application source is a configuration which determines where to download
the Dune Store catalog and the related resources from.

By default (in the standard firmware), the list of application sources
contains just the so called "standard application source", which
corresponds to the standard Dune Store server.

The custom list of application sources can contain or not contain the
standard source, and can contain one or several custom application sources.

Example content of the Dune Store configuration file:
   <dsconfig>
     <sources>
       <standard_source/>
       <source>
         <catalog_url>http://www.company.com/dune_store/v1/catalog.xml</catalog_url>
         <icon_url_prefix>http://www.company.com/dune_store/v1/</icon_url_prefix>
         <download_url_prefix>http://www.company.com/dune_store/v1/</download_url_prefix>
       </source>
     </sources>
   </dsconfig>

Here, for each non-standard source, the following parameters should be
specified: "catalog URL", "download URL prefix", "icon URL prefix". See
"Dune Store server" section for more information about these parameters. If
"download URL prefix" or "icon URL prefix" parameters are not specified,
they are automatically deduced based on the value of "catalog URL"
parameter (by stripping the filename part from the catalog URL). 

If the custom list of application sources contain several sources (e.g. one
standard source and one custom source), and these sources provide
descriptions for the intersecting sets of resources (applications, skins,
application categories, skins categories), the order of the application
sources in the list determines their priority: if the same resource is
found in several sources, the description of the resource from the first
source is used.

NOTE: Dune Store configuration file is supported starting with firmware
versions 130716_b6+.

Customizing list of plugins in dunestore

The following specifications available in dsconfig.xml, allowing
to restrict the list of plugins, shown in the Dune Store application:
    - enabled_plugins: comma-separated list of plugin names. The plugin is
      not shown if not found in this list;
    - disabled_plugins: comma-separated list of plugin names. The plugin is
      not shown if found in this list;
    - enabled_plugins_url: http URL to plugin list file. The file is
      download each time Dune Store application is entered. If download
      failes, then Dune Store always shows the empty list of plugins. The
      loaded file should contain comma-separated list of plugin names. The
      plugin is not shown if not found in this list;
    - disabled_plugins_url: http URL to plugin list file. The file is download
      each time Dune Store application is entered. If download failes, then
      Dune Store always shows the empty list of plugins. The loaded file
      should contain comma-separated list of plugin names. The plugin is
      not shown if found in this list;
NOTE: not more than one of these speficiations should present in
dsconfig.xml. If several speficications occur, only one of them will be
used, the others will be ignored.

Usage notes:
    Use of 'enabled_plugins_url' and 'disable_plugins_url' allows easy
    change of Dune Store plugins list on-the-fly; however these files must
    be located on the reliable server because Dune Store becomes
    unaccessible when these files cannot be loaded.

    Use of 'enabled_plugins' and 'disabled_plugins' does not imply
    additional http requests. However, they cannot be easily updated if,
    for example, new plugin appeared in Dune Store.

    Use 'enabled_plugins' or 'enabled_plugins_url' to specify full list of plugins to be
    shown.
    Use 'disabled_plugins' to specify "black list" of plugins.

Example:
  <dsconfig>
    <sources>
      <!-- ... -->
    </sources>
    <enabled_plugins>plugin1,plugin2,pluginN</enabled_plugins>
    <disabled_plugins>plugin1,plugin2,pluginN</disabled_plugins>
    <enabled_plugins_url>http://xxx.yyy.com/dune_store/v1/enabled_plugins.txt</enabled_plugins_url>
    <disabled_plugins_url>http://yyy.zzz.com/dune_store/v1/disabled_plugins.txt</disabled_plugins_url>
  </dsconfig>

Using custom Dune Store server in custom firmware

Custom firmware may be configured to use custom Dune Store server(s)
instead or in additional to the the standard Dune Store server.

Using a custom Dune Store server in custom firmware allows to reach the
following goals:
   - Limit the set of applications/skins available via Dune Store.
   - Modify the set of application/skin categories in Dune Store.
   - Add custom skins to Dune Store.

To apply a custom Dune Store configuration, custom firmware needs to
include a custom Dune Store configuration file. See "Dune Store
configuration file" section for more information. Also see the description
of "/firmware/config/dsconfig.xml" here:
   http://files.dune-hd.com/sdk/doc/html/dune_custom_firmware.html

See "Dune Store customization example" section for a typical Dune Store
customization example.

NOTE: Adding custom applications to a custom Dune Store catalog (or
modifying the standard applications) is also potentially possible, with the
following restriction: these custom applications will not be signed (since
currently only applications issued and maintained by Dune HD can be
signed).

NOTE: Creating a full clone of standard Dune Store server (including
cloning plugin files and plugin update specifications) is not currently
supported and is not currently recommended (unless specially agreed with
Dune HD). This can potentially be done, but is not trivial (requires deep
understanding of the Dune Store mechanism and the plugins online update
mechanism).

Dune Store customization example

A custom firmware may use a custom Dune Store catalog with only a certain
subset of applications/skins instead of the standard Dune Store catalog. At
the same time, all the related resources (icons, plugin/skin files, plugin
update specifications) can still be downloaded from the standard Dune Store
server.

In this case, the custom Dune Store server stores only a custom Dune Store
catalog, but all other files are automatically downloaded from the standard
Dune Store server, and, therefore, application/skin updates which are
provided on the standard Dune Store server will become automatically
available in the custom firmware as well.

To implement this, perform the following steps:
   - Download the standard Dune Store catalog XML file (catalog.xml) from
     the standard Dune Store catalog URL:  
      http://online.dune-hd.com/dune_store/v1/catalog.xml
   - Edit the Dune Store catalog XML file as needed (keep only the required
     set of applications/skins).
   - Deploy the edited Dune Store catalog XML file on a custom server, e.g.
     under the following URL:
      http://www.company.com/dune_store/v1/catalog.xml   
   - Include into the custom firmware the custom Dune Store configuration
     file (/firmware/config/dsconfig.xml) with the following content:
      <dsconfig>
        <sources>
          <source>
            <catalog_url>http://www.company.com/dune_store/v1/catalog.xml</catalog_url>
            <icon_url_prefix>http://online.dune-hd.com/dune_store/v1/</download_url_prefix>
            <download_url_prefix>http://online.dune-hd.com/dune_store/v1/</download_url_prefix>
          </source>
        </sources>
      </dsconfig>

It is also potentially possible to add 3-party plugins to the custom Dune
Store catalog XML file. When firmware security is required and only signed
plugins should be used, these 3-party plugins should be signed using a
custom plugin signing key, and the custom firmware should be configured to
allow this key. For more information on this, please see "Using custom
signing keys" section here:
   http://files.dune-hd.com/sdk/doc/html/plugins.html