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 may 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 RTSC target modules by associating
    61         *  them with device name and family regular expressions. This
    62         *  information may be leveraged by tools to derive the RTSC target
    63         *  given a device name and family. Devices implement the
    64         *  {@link xdc.platform.ICpuDataSheet} interface. Devices may be
    65         *  grouped in a family and delivered as a package.
    66         *
    67         *  For example, the device module  TMS320DA830 in the package 
    68         *  `ti.catalog.C6000` may be associated  with a RTSC target 
    69         *  `ti.targets.C674` by setting  `deviceNamePattern` to `TMS320DA8*`,
    70         *  `deviceFamilyPattern` to `C6*`, `packageName` to 
    71         *  `ti.targets` and `baseTargetName` to `C674`. 
    72         *
    73         *  @field(deviceNamePattern)   A regular expression for device names
    74         *  @field(deviceFamilyPattern) A regular expression for device families
    75         *  @field(packageName)         The name of a package containing a
    76         *                              target module that  can be used with
    77         *                              the  devices that match the
    78         *                              device name and family patterns
    79         *  @field(baseTargetName)      The name of the module 
    80         *                              (without the package prefix) in 
    81         *                              the package named by `packageName`.
    82         */
    83        struct Target {
    84            String deviceNamePattern;   /*! Device name regex eg. MSP430*  */
    85            String deviceFamilyPattern; /*! Device family regex eg. C6* */
    86            String packageName;         /*! Package containing RTSC target  */
    87            String baseTargetName;      /*! Name of RTSC target module */
    88        };
    89    
    90        /*!
    91         *  ======== UrlDescriptor ========
    92         *  URL Descriptor structure
    93         *
    94         *  @field(url)  Uniform Resource Locator(URL)
    95         *  @field(text) Summary text for the URL
    96         */
    97        struct UrlDescriptor {
    98            String url;     /*! Uniform Resource Locator(URL) */
    99            String text;    /*! Summary text for the URL */
   100        };
   101    
   102        /*!
   103         *  ======== name ========
   104         *  Product name
   105         *
   106         *  String containing product name eg. System BIOS
   107         */
   108        config String name;
   109    
   110        /*!
   111         *  ======== id ========
   112         *  A unique product id 
   113         *
   114         *  For example, product developers may choose to  follow namespace
   115         *  conventions for Java packages or Eclipse plugins to specify a
   116         *  unique id like `org.eclipse.rtsc.xdctools.product`.
   117         *
   118         */
   119        config String id;
   120    
   121    
   122        /*!
   123         *  ======== version ========
   124         *  Product version
   125         *
   126         *  The product version should follow the format 
   127         *  -`major.minor.service.qualifier`  where 
   128         *  `major`,`minor` and `service` are integers and 
   129         *  `qualifier` is a string. Example - 3.16.02.31-eng. 
   130         *
   131         *  Products may  specify their own guidelines for
   132         *  updating `major`,`minor`,`service` and `qualifier` portions of the
   133         *  version number as long as they are unique for the product.
   134         *  Products may also choose to follow popular versioning conventions
   135         *  like those followed for versioning Eclipse plugins.
   136         */
   137        config String version;
   138    
   139        /*!
   140         *  ======== featureId ========
   141         *  A unique feature id
   142         *
   143         *  A feature maybe used by a system to install product upgrades.
   144         *  Typically a system will look at various versions of a
   145         *  feature available in the system and allow the user to upgrade
   146         *  to the latest version. The product developer can use the `featureId`
   147         *  to manage the granularity of product upgrades in a system. For 
   148         *  example the version `3.20.0.00` for product 
   149         *  `org.eclipse.rtsc.xdctools.product` may have the `featureId`
   150         *  `org.eclipse.rtsc.xdctools.product_3.20`.
   151         *  The product developer may allow the upgrade system to pick up
   152         *  patch releases to `3.20.0.00` release by specifying different
   153         *  versions of the product (eg. 3.20.0.01) with `featureId` 
   154         *  `org.eclipse.rtsc.xdctools.product_3.20`
   155         */
   156        config String featureId;
   157    
   158    
   159        /*!
   160         *  ======== updateSite ========
   161         *  Update site for product
   162         *
   163         *  @field(url) the `url` field should contain the URL containing
   164         *  product upgrades.
   165         *
   166         *  @field(text) the `text` field should contain summary description of
   167         *  the update site
   168         */
   169        config  UrlDescriptor updateSite;
   170    
   171    
   172        /*!
   173         *  ======== companyName ========
   174         *  Name of company releasing product
   175         *
   176         *  Example : "Texas Instruments"
   177         */
   178        config String companyName;
   179    
   180        /*!
   181         *  ======== productDescriptor ========
   182         *  Product description
   183         *
   184         *  @field(url) the `url` field should contain the URL of the organization
   185         *  releasing the product.
   186         *
   187         *  @field(text) the `text` field should contain summary description of
   188         *  the product
   189         */
   190        config UrlDescriptor productDescriptor;
   191    
   192        /*!
   193         *  ======== licenseDescriptor ========
   194         *  License information for product
   195         *
   196         *  @field(url) field should contain the URL containing the 
   197         *  license text.
   198         *
   199         *  @field(text) field should contain a summary description of the license
   200         */
   201        config UrlDescriptor licenseDescriptor;
   202    
   203        /*!
   204         *  ======== copyRightNotice ========
   205         *  Copyright notice for product
   206         *
   207         */
   208        config String copyRightNotice;
   209        
   210        /*!
   211         *  ======== repositoryArr ========
   212         *  Repositories contained in product
   213         *
   214         *  Repositories are specified relative to the product installation
   215         *  directory.
   216         */
   217        config String repositoryArr[];
   218    
   219        /*!
   220         *  ======== docsLoc ========
   221         *  Directories containing documents in the product
   222         *
   223         *  Directories are specified relative to the product installation
   224         *  directory.
   225         */
   226        config String docsLocArr[];
   227    
   228        /*!
   229         *  ======== templateModule ========
   230         *  Name of module implementing {@link xdc.tools.product.IProductTemplate}
   231         *
   232         *  Template module should be delivered
   233         *  in the repositories defined in {@link #repositoryArr}
   234         */
   235        config String templateModule;
   236        
   237        /*!
   238         *  ======== productViewModule ========
   239         *  Name of module implementing {@link xdc.tools.product.IProductView}
   240         *
   241         *  Product view module should be delivered
   242         *  in the repositories defined in {@link #repositoryArr}
   243         */
   244        config String productViewModule;
   245    
   246        /*!
   247         *  ======== bundleName ========
   248         *  Product bundle name
   249         *  
   250         *  Product bundle name is embedded in the top level folder name of
   251         *  the product. Example: The top level folder for XDCtools version 
   252         *  3.16.02.31-eng is `xdctools_3_16_02_31-eng`. In this case the 
   253         *  bundle name is `xdctools`.
   254         *  The bundle name maybe used by tools to discover the product 
   255         *  installed on a filesystem.
   256         */
   257        config String bundleName;
   258    
   259        /*!
   260         *  ======== targetArr ========
   261         *  RTSC target modules contained in product
   262         *
   263         *  The RTSC target modules should be delivered
   264         *  in the repositories defined in {@link #repositoryArr}
   265         *
   266         */
   267        config Target targetArr[];
   268    
   269        
   270        /*!
   271         *  ======== helpTocArr ========
   272         *  Array of table of contents elements in product
   273         * 
   274         *  Tools generating table of contents are required
   275         *  to preserve the order of elements specified in this array
   276         */ 
   277        config HelpToc helpTocArr[];
   278    
   279    
   280        /*!
   281         *  ======== tocIndexFile ========
   282         *  Top level index file referred in table of contents
   283         */
   284        config String tocIndexFile;
   285    
   286    
   287        /*!
   288         *  ======== exclusive ========
   289         *  Indicates whether product allows existence of multiple 
   290         *  versions in a system
   291         *
   292         *  When flag is set to `true` it indicates that only one 
   293         *  version of the product can be active in the system. Otherwise
   294         *  the system can handle multiple versions of the same product. 
   295         */
   296        config Bool exclusive = false;
   297    
   298        /*!
   299         *  ======== otherFiles ========
   300         *  Array of paths to files that describe the product
   301         *
   302         *  A product may wish to supply files that describing certain aspects 
   303         *  of itself. For example a product may provide text, images and video
   304         *  files that provide branding information for the product. 
   305         *  These files may then be consumed by tools like IDE's via 
   306         *  hooks defined in the IDE framework.
   307         *  The file path is defined relative to the directory containing the
   308         *  implementation  of this interface
   309         *
   310         */
   311        config String otherFiles[];
   312    
   313    }
   314    /*
   315     *  @(#) xdc.tools.product; 1, 0, 0,38; 8-17-2010 16:39:21; /db/ztree/library/trees/xdctools/xdctools-d43x/src/
   316     */
   317