1    /* 
     2     *  Copyright (c) 2009 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * */
    12    
    13    /*! 
    14     *  ======== IProduct ========
    15     *  Interface specifying product details. 
    16     *
    17     *  This interface allows products describe themselves for the benefit
    18     *  of development tools such as IDE's.  For example, a tool
    19     *  can read the information provided by a product that implements this
    20     *  interface and generate an eclipse plugin that leverages the product's
    21     *  "resources".
    22     *
    23     *  By expressing the product's information in this interface, a product
    24     *  can be delivered into multiple development tools without explicit
    25     *  knowledge of these tools.  For example, an online "product repository"
    26     *  can extract sufficient information from this interface to enable it
    27     *  to provide a searchable catalog of interesting products.
    28     *
    29     *  This is an experimental interface and is subject to change
    30     */
    31    metaonly interface IProduct
    32    {
    33        /*!
    34         *  ======== HelpToc ========    
    35         *  Help table of contents (TOC) element
    36         *
    37         *  A help element is a file inside the product that can be referenced 
    38         *  from a global table of contents.
    39         *
    40         *  @field(label)    Summary description of help element
    41         *  @field(filePath) Path to help documentation relative to  
    42         *                   directory specified in {@link #docsLoc} 
    43         *  @field(tocFile)  Flag indicates whether the element is a 
    44         *                   table of content(TOC) file. Tools may
    45         *                   process TOC files in a special way. For
    46         *                   example a tool to generate eclipse plugins may
    47         *                   want to copy the TOC file in the plugin folder
    48         *                   for integrating with eclipse help.
    49         */
    50        struct HelpToc {
    51            String label;       /*! Help element description */   
    52            String filePath;    /*! Path to help doc */
    53            Bool   tocFile;     /*! Indicates whether element is a TOC file  */
    54        };
    55         
    56        /*!
    57         *  ========= Target ==============
    58         *  Structure containing information on RTSC targets
    59         *
    60         *  Products may specify the mapping between device names and/or device
    61         *  family names and a RTSC target module.
    62         *  
    63         *  This information is leveraged by tools to derive an appropriate
    64         *  RTSC target when given a device name, device family, endiness, and
    65         *  OMF selection (COFF verses ELF).  In particular, if the device name
    66         *  and family name match `deviceNamePattern` and
    67         *  `deviceFamilyPattern`, the target name generated will be:
    68         *  @p(code)
    69         *      <packageName>[.elf].<baseTargetName>[_big_endian]
    70         *  @p
    71         *  where `<packageName>` and `<baseTargetName>` are the strings specified
    72         *  by the corespondingly named fields of this structure, and the strings
    73         *  `".elf"` and `"_big_endian"` are added as necessary.
    74         *
    75         *  Suppose, for example, a product specifies the following target mapping:
    76         *  @p(code)
    77         *  {
    78         *      deviceNamePattern:   "MSP430F5.*",
    79         *      deviceFamilyPattern: "MSP430.*",
    80         *      packageName:         "ti.targets.msp430",
    81         *      baseTargetName:      "MSP430X"
    82         *  }
    83         *  @p
    84         *  If the device specified is "`MSP430F5529`", the family is "`MSP430`",
    85         *  and the OMF is COFF, the generated target will be:
    86         *  @p(code)
    87         *      ti.targets.msp430.MSP430X
    88         *  @p
    89         *  On the other hand, if the OMF is ELF the target will be:
    90         *  @p(code)
    91         *      ti.targets.msp430.elf.MSP430X
    92         *  @p
    93         *
    94         *  @field(deviceNamePattern)   A regular expression for device names
    95         *  @field(deviceFamilyPattern) A regular expression for device families
    96         *  @field(packageName)         The name of a package containing a
    97         *                              target module that  can be used with
    98         *                              the  devices that match the
    99         *                              device name and family patterns
   100         *  @field(baseTargetName)      The name of the module 
   101         *                              (without the package prefix) in 
   102         *                              the package named by `packageName`.
   103         */
   104        struct Target {
   105            String deviceNamePattern;   /*! Device name regex eg. MSP430*  */
   106            String deviceFamilyPattern; /*! Device family regex eg. C6* */
   107            String compilerOptsPattern; /*! Compiler opts regx; e.g. .*-me .* */
   108            String packageName;         /*! Package containing RTSC target  */
   109            String baseTargetName;      /*! Name of RTSC target module */
   110        };
   111    
   112        /*!
   113         *  ======== UrlDescriptor ========
   114         *  URL Descriptor structure
   115         *
   116         *  @field(url)         Uniform Resource Locator(URL)
   117         *  @field(text)        Summary text for the URL
   118         *  @field(targetText)  Optional summary text for any target content
   119         *                      portion 
   120         */
   121        struct UrlDescriptor {
   122            String url;         /*! Uniform Resource Locator(URL) */
   123            String text;        /*! Summary text for the URL */
   124            String targetText;  /*! (optional) Summary for target portion */
   125        };
   126    
   127        /*!
   128         *  ======== PluginDescriptor ========
   129         *  Plugin Descriptor structure
   130         *
   131         *  @field(id)      Plugin id
   132         *  @field(version) Plugin version
   133         *  @field(path)    Path to plugin relative to `IProduct` implementation
   134         */
   135        struct PluginDescriptor {
   136            String id;          /*! Plugin id */
   137            String version;     /*! Plugin version */
   138            String path;        /*! Plugin path */
   139        };
   140    
   141        /*!
   142         *  ======== MacroDescriptor ========
   143         *  Macro Descriptor structure
   144         */
   145        struct MacroDescriptor {
   146            String name;     /*! Macro name */
   147            String desc;     /*! Macro description */
   148        };
   149        
   150        /*!
   151         *  ======== name ========
   152         *  Product name
   153         *
   154         *  String containing product name eg. System BIOS
   155         */
   156        config String name;
   157    
   158        /*!
   159         *  ======== id ========
   160         *  A unique product id 
   161         *
   162         *  For example, product developers may choose to  follow namespace
   163         *  conventions for Java packages or Eclipse plugins to specify a
   164         *  unique id like `org.eclipse.rtsc.xdctools.product`.
   165         */
   166        config String id;
   167    
   168        /*!
   169         *  ======== version ========
   170         *  Product version
   171         *
   172         *  The product version should follow the format 
   173         *  -`major.minor.service.qualifier`  where 
   174         *  `major`,`minor` and `service` are integers and 
   175         *  `qualifier` is a string. Example - 3.16.02.31-eng. 
   176         *
   177         *  Products may  specify their own guidelines for
   178         *  updating `major`,`minor`,`service` and `qualifier` portions of the
   179         *  version number as long as they are unique for the product.
   180         *  Products may also choose to follow popular versioning conventions
   181         *  like those followed for versioning Eclipse plugins.
   182         */
   183        config String version;
   184    
   185        /*!
   186         *  ======== featureId ========
   187         *  A unique feature id
   188         *
   189         *  @_nodoc - Deprecated
   190         *
   191         *  Feature ids are used by a system to install product upgrades.
   192         *  Typically a system will look at various versions of a
   193         *  feature available in the system and allow the user to upgrade
   194         *  to the latest version. The product developer can use the `featureId`
   195         *  to manage the granularity of product upgrades in a system. For 
   196         *  example the version `3.20.0.00` for product 
   197         *  `org.eclipse.rtsc.xdctools.product` may have the `featureId`
   198         *  `org.eclipse.rtsc.xdctools.product_3.20`.
   199         *  The product developer may allow the upgrade system to pick up
   200         *  patch releases to `3.20.0.00` release by specifying different
   201         *  versions of the product (eg. 3.20.0.01) with `featureId` 
   202         *  `org.eclipse.rtsc.xdctools.product_3.20`
   203         */
   204        config String featureId;
   205    
   206        /*!
   207         *  ======== updateSite ========
   208         *  Update site for product
   209         *
   210         *  @field(url) the `url` field should contain the URL containing
   211         *  product upgrades.
   212         *
   213         *  @field(text) the `text` field should contain summary description of
   214         *  the update site
   215         */
   216        config  UrlDescriptor updateSite;
   217    
   218        /*!
   219         *  ======== companyName ========
   220         *  Name of company releasing product
   221         *
   222         *  Example : "Texas Instruments"
   223         */
   224        config String companyName;
   225    
   226        /*!
   227         *  ======== productDescriptor ========
   228         *  Product description
   229         *
   230         *  @field(url) the `url` field should contain the URL of the organization
   231         *  releasing the product.
   232         *
   233         *  @field(text) the `text` field should contain summary description of
   234         *  the target content portion of the product.  Alternate text for the
   235         *  UI portion can be specified via {@link #productUIDescription}`.
   236         */
   237        config UrlDescriptor productDescriptor;
   238    
   239        /*!
   240         *  ======== licenseDescriptor ========
   241         *  License information for product
   242         *
   243         *  @field(url) field should contain the URL containing the 
   244         *  license text.
   245         *
   246         *  @field(text) field should contain a summary description of the license
   247         */
   248        config UrlDescriptor licenseDescriptor;
   249    
   250        /*!
   251         *  ======== copyRightNotice ========
   252         *  Copyright notice for product
   253         */
   254        config String copyRightNotice;
   255        
   256        /*!
   257         *  ======== repositoryArr ========
   258         *  Repositories contained in product
   259         *
   260         *  Repositories are specified relative to the product installation
   261         *  directory.
   262         */
   263        config String repositoryArr[];
   264    
   265        /*!
   266         *  ======== docsLoc ========
   267         *  Directories containing documents in the product
   268         *
   269         *  Directories are specified relative to the product installation
   270         *  directory.  These directories are searched when resolving URI links
   271         *  to specific pages within the docs.
   272         */
   273        config String docsLocArr[];
   274    
   275        /*!
   276         *  ======== templateModule ========
   277         *  Name of module implementing {@link xdc.tools.product.IProductTemplate}
   278         *
   279         *  Products that deliver examples provide a module that implements the
   280         *  {@link xdc.tools.product.IProductTemplate} interface.  This module
   281         *  must be delivered in one of the repositories defined in
   282         *  {@link #repositoryArr}.
   283         */
   284        config String templateModule;
   285        
   286        /*!
   287         *  ======== productViewModule ========
   288         *  Name of module implementing {@link xdc.tools.product.IProductView}
   289         *
   290         *  Products must provide a module that implements the
   291         *  {@link xdc.tools.product.IProductView} interface.  This 
   292         *  module defines the "top-level" modules that are visible to the user
   293         *  and must be delivered in the repositories defined in
   294         *  {@link #repositoryArr}.
   295         */
   296        config String productViewModule;
   297    
   298        /*!
   299         *  ======== bundleName ========
   300         *  Product bundle name
   301         *  
   302         *  Product bundle name is embedded in the top level folder name of
   303         *  the product. Example: The top level folder for XDCtools version 
   304         *  3.16.02.31-eng is `xdctools_3_16_02_31-eng`. In this case the 
   305         *  bundle name is `xdctools`.
   306         *  The bundle name is used by tools to discover the product 
   307         *  installed on a filesystem.
   308         */
   309        config String bundleName;
   310    
   311        /*!
   312         *  ======== targetArr ========
   313         *  RTSC target modules contained in product
   314         *
   315         *  The RTSC target modules should be delivered
   316         *  in the repositories defined in {@link #repositoryArr}
   317         */
   318        config Target targetArr[];
   319        
   320        /*!
   321         *  ======== helpTocArr ========
   322         *  Array of table of contents elements in product
   323         * 
   324         *  Tools generating table of contents are required
   325         *  to preserve the order of elements specified in this array
   326         */ 
   327        config HelpToc helpTocArr[];
   328    
   329        /*!
   330         *  ======== tocIndexFile ========
   331         *  Top level index file referred in table of contents
   332         */
   333        config String tocIndexFile;
   334    
   335        /*!
   336         *  ======== exclusive ========
   337         *  This product is a singlton
   338         *
   339         *  This flag indicates whether multiple versions of this product are
   340         *  accessable within the IDE or whether only the latest version is
   341         *  available.
   342         *
   343         *  When flag is set to `true` it indicates that only one 
   344         *  version of the product can be active in the system. Otherwise
   345         *  the system can handle multiple versions of the same product. 
   346         */
   347        config Bool exclusive = false;
   348    
   349        /*!
   350         *  ======== otherFiles ========
   351         *  Array of paths to files that describe the product
   352         *
   353         *  A product may wish to supply files that describing certain aspects 
   354         *  of itself. For example a product may provide text, images and video
   355         *  files that provide branding information for the product. 
   356         *  These files may then be consumed by tools like IDE's via 
   357         *  hooks defined in the IDE framework.
   358         *
   359         *  The source file path is defined relative to the directory containing
   360         *  the implementation  of `IProduct`.  All files are copied to the base
   361         *  directory of the plugin; e.g., "../branding/about.ini" is copied to
   362         *  "about.ini" at the top of the plugin.
   363         *
   364         *  File names that begin with the prefix "tc:" are copied into "target
   365         *  content" plugin whereas file names with any other prefix (such as
   366         *  "ui:" or no prefix) are copied into the "IDE plugin".
   367         */
   368        config String otherFiles[];
   369    
   370        /*!
   371         *  ======== macro ========
   372         *  Macro associated with the product 
   373         *
   374         *  Product macros are often used in IDEs for providing
   375         *  portable build environments. A unique macro name should
   376         *  be selected for the product. 
   377         */
   378        config MacroDescriptor macro;
   379    
   380        /*!
   381         *  ======== externalPlugins ========
   382         *  External plugins delivered with the product
   383         */
   384        config PluginDescriptor externalPlugins[];
   385    
   386        /*!
   387         *  ======== externalRequirements ========
   388         *  External plugins required by this product
   389         */
   390        config String externalRequirements[];
   391    }
   392    /*
   393     *  @(#) xdc.tools.product; 1, 0, 0,68; 4-26-2012 18:41:05; /db/ztree/library/trees/xdctools/xdctools-f10x/src/
   394     */
   395