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 RTSC target modules by associating
    61         *  them with device name and family regular expressions. This
    62         *  information is 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 can 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` is 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         *  @field(targetText)  Optional summary text for any target content
    97         *                      portion 
    98         */
    99        struct UrlDescriptor {
   100            String url;         /*! Uniform Resource Locator(URL) */
   101            String text;        /*! Summary text for the URL */
   102            String targetText;  /*! (optional) Summary for target portion */
   103        };
   104    
   105        /*!
   106         *  ======== PluginDescriptor ========
   107         *  Plugin Descriptor structure
   108         *
   109         *  @field(id)      Plugin id
   110         *  @field(version) Plugin version
   111         *  @field(path)    Path to plugin relative to `IProduct` implementation
   112         */
   113        struct PluginDescriptor {
   114            String id;          /*! Plugin id */
   115            String version;     /*! Plugin version */
   116            String path;        /*! Plugin path */
   117        };
   118    
   119        /*!
   120         *  ======== MacroDescriptor ========
   121         *  Macro Descriptor structure
   122         */
   123        struct MacroDescriptor {
   124            String name;     /*! Macro name */
   125            String desc;     /*! Macro description */
   126        };
   127        
   128        /*!
   129         *  ======== name ========
   130         *  Product name
   131         *
   132         *  String containing product name eg. System BIOS
   133         */
   134        config String name;
   135    
   136        /*!
   137         *  ======== id ========
   138         *  A unique product id 
   139         *
   140         *  For example, product developers may choose to  follow namespace
   141         *  conventions for Java packages or Eclipse plugins to specify a
   142         *  unique id like `org.eclipse.rtsc.xdctools.product`.
   143         */
   144        config String id;
   145    
   146        /*!
   147         *  ======== version ========
   148         *  Product version
   149         *
   150         *  The product version should follow the format 
   151         *  -`major.minor.service.qualifier`  where 
   152         *  `major`,`minor` and `service` are integers and 
   153         *  `qualifier` is a string. Example - 3.16.02.31-eng. 
   154         *
   155         *  Products may  specify their own guidelines for
   156         *  updating `major`,`minor`,`service` and `qualifier` portions of the
   157         *  version number as long as they are unique for the product.
   158         *  Products may also choose to follow popular versioning conventions
   159         *  like those followed for versioning Eclipse plugins.
   160         */
   161        config String version;
   162    
   163        /*!
   164         *  ======== featureId ========
   165         *  A unique feature id
   166         *
   167         *  @_nodoc - Deprecated
   168         *
   169         *  Feature ids are used by a system to install product upgrades.
   170         *  Typically a system will look at various versions of a
   171         *  feature available in the system and allow the user to upgrade
   172         *  to the latest version. The product developer can use the `featureId`
   173         *  to manage the granularity of product upgrades in a system. For 
   174         *  example the version `3.20.0.00` for product 
   175         *  `org.eclipse.rtsc.xdctools.product` may have the `featureId`
   176         *  `org.eclipse.rtsc.xdctools.product_3.20`.
   177         *  The product developer may allow the upgrade system to pick up
   178         *  patch releases to `3.20.0.00` release by specifying different
   179         *  versions of the product (eg. 3.20.0.01) with `featureId` 
   180         *  `org.eclipse.rtsc.xdctools.product_3.20`
   181         */
   182        config String featureId;
   183    
   184        /*!
   185         *  ======== updateSite ========
   186         *  Update site for product
   187         *
   188         *  @field(url) the `url` field should contain the URL containing
   189         *  product upgrades.
   190         *
   191         *  @field(text) the `text` field should contain summary description of
   192         *  the update site
   193         */
   194        config  UrlDescriptor updateSite;
   195    
   196        /*!
   197         *  ======== companyName ========
   198         *  Name of company releasing product
   199         *
   200         *  Example : "Texas Instruments"
   201         */
   202        config String companyName;
   203    
   204        /*!
   205         *  ======== productDescriptor ========
   206         *  Product description
   207         *
   208         *  @field(url) the `url` field should contain the URL of the organization
   209         *  releasing the product.
   210         *
   211         *  @field(text) the `text` field should contain summary description of
   212         *  the target content portion of the product.  Alternate text for the
   213         *  UI portion can be specified via {@link #productUIDescription}`.
   214         */
   215        config UrlDescriptor productDescriptor;
   216    
   217        /*!
   218         *  ======== licenseDescriptor ========
   219         *  License information for product
   220         *
   221         *  @field(url) field should contain the URL containing the 
   222         *  license text.
   223         *
   224         *  @field(text) field should contain a summary description of the license
   225         */
   226        config UrlDescriptor licenseDescriptor;
   227    
   228        /*!
   229         *  ======== copyRightNotice ========
   230         *  Copyright notice for product
   231         */
   232        config String copyRightNotice;
   233        
   234        /*!
   235         *  ======== repositoryArr ========
   236         *  Repositories contained in product
   237         *
   238         *  Repositories are specified relative to the product installation
   239         *  directory.
   240         */
   241        config String repositoryArr[];
   242    
   243        /*!
   244         *  ======== docsLoc ========
   245         *  Directories containing documents in the product
   246         *
   247         *  Directories are specified relative to the product installation
   248         *  directory.  These directories are searched when resolving URI links
   249         *  to specific pages within the docs.
   250         */
   251        config String docsLocArr[];
   252    
   253        /*!
   254         *  ======== templateModule ========
   255         *  Name of module implementing {@link xdc.tools.product.IProductTemplate}
   256         *
   257         *  Products that deliver examples provide a module that implements the
   258         *  {@link xdc.tools.product.IProductTemplate} interface.  This module
   259         *  must be delivered in one of the repositories defined in
   260         *  {@link #repositoryArr}.
   261         */
   262        config String templateModule;
   263        
   264        /*!
   265         *  ======== productViewModule ========
   266         *  Name of module implementing {@link xdc.tools.product.IProductView}
   267         *
   268         *  Products must provide a module that implements the
   269         *  {@link xdc.tools.product.IProductView} interface.  This 
   270         *  module defines the "top-level" modules that are visible to the user
   271         *  and must be delivered in the repositories defined in
   272         *  {@link #repositoryArr}.
   273         */
   274        config String productViewModule;
   275    
   276        /*!
   277         *  ======== bundleName ========
   278         *  Product bundle name
   279         *  
   280         *  Product bundle name is embedded in the top level folder name of
   281         *  the product. Example: The top level folder for XDCtools version 
   282         *  3.16.02.31-eng is `xdctools_3_16_02_31-eng`. In this case the 
   283         *  bundle name is `xdctools`.
   284         *  The bundle name is used by tools to discover the product 
   285         *  installed on a filesystem.
   286         */
   287        config String bundleName;
   288    
   289        /*!
   290         *  ======== targetArr ========
   291         *  RTSC target modules contained in product
   292         *
   293         *  The RTSC target modules should be delivered
   294         *  in the repositories defined in {@link #repositoryArr}
   295         */
   296        config Target targetArr[];
   297        
   298        /*!
   299         *  ======== helpTocArr ========
   300         *  Array of table of contents elements in product
   301         * 
   302         *  Tools generating table of contents are required
   303         *  to preserve the order of elements specified in this array
   304         */ 
   305        config HelpToc helpTocArr[];
   306    
   307        /*!
   308         *  ======== tocIndexFile ========
   309         *  Top level index file referred in table of contents
   310         */
   311        config String tocIndexFile;
   312    
   313        /*!
   314         *  ======== exclusive ========
   315         *  This product is a singlton
   316         *
   317         *  This flag indicates whether multiple versions of this product are
   318         *  accessable within the IDE or whether only the latest version is
   319         *  available.
   320         *
   321         *  When flag is set to `true` it indicates that only one 
   322         *  version of the product can be active in the system. Otherwise
   323         *  the system can handle multiple versions of the same product. 
   324         */
   325        config Bool exclusive = false;
   326    
   327        /*!
   328         *  ======== otherFiles ========
   329         *  Array of paths to files that describe the product
   330         *
   331         *  A product may wish to supply files that describing certain aspects 
   332         *  of itself. For example a product may provide text, images and video
   333         *  files that provide branding information for the product. 
   334         *  These files may then be consumed by tools like IDE's via 
   335         *  hooks defined in the IDE framework.
   336         *
   337         *  The source file path is defined relative to the directory containing
   338         *  the implementation  of `IProduct`.  All files are copied to the base
   339         *  directory of the plugin; e.g., "../branding/about.ini" is copied to
   340         *  "about.ini" at the top of the plugin.
   341         *
   342         *  File names that begin with the prefix "tc:" are copied into "target
   343         *  content" plugin whereas file names with any other prefix (such as
   344         *  "ui:" or no prefix) are copied into the "IDE plugin".
   345         */
   346        config String otherFiles[];
   347    
   348        /*!
   349         *  ======== macro ========
   350         *  Macro associated with the product 
   351         *
   352         *  Product macros are often used in IDEs for providing
   353         *  portable build environments. A unique macro name should
   354         *  be selected for the product. 
   355         */
   356        config MacroDescriptor macro;
   357    
   358        /*!
   359         *  ======== externalPlugins ========
   360         *  External plugins delivered with the product
   361         */
   362        config PluginDescriptor externalPlugins[];
   363    
   364        /*!
   365         *  ======== externaRequirements ========
   366         *  External plugins required by this product
   367         */
   368        config String externalRequirements[];
   369    }
   370    /*
   371     *  @(#) xdc.tools.product; 1, 0, 0,65; 11-4-2011 09:12:41; /db/ztree/library/trees/xdctools/xdctools-f07x/src/
   372     */
   373