VirtualBox

Changeset 4097 in vbox for trunk/src/VBox/Main/idl


Ignore:
Timestamp:
Aug 9, 2007 3:16:21 PM (17 years ago)
Author:
vboxsync
Message:

Main, Installer:

  • XIDL Schema: Renamed module/ => library, class => module/class.
  • WiX: Created XSLT to generate the TypeLib block from XIDL to avoid usage of tallow.exe.
Location:
trunk/src/VBox/Main/idl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r4071 r4097  
    99 *
    1010 * From this document, the build system generates several files
    11  * via XSLT that are then used during the build process:
     11 * via XSLT that are then used during the build process.
    1212 *
    13  *   -  out/<platform>/bin/sdk/idl/VirtualBox[_XPCOM].idl, a
    14  *      COM/XPCOM interface definition file (IDL)
     13 * Below is the list of XSL templates that operate on this file and
     14 * output files they generate. These XSL templates must be updated
     15 * whenever the schema of this file changes:
    1516 *
    16  *   -  out/<platform>/bin/sdk/include/VirtualBox[_XPCOM].h, which
    17  *      gets included from the include/VBox/com/VirtualBox.h
    18  *      wrapper, to allow clients to access the COM/XPCOM API;
     17 * 1. src/VBox/Main/idl/midl.xsl =>
     18 *    out/<platform>/bin/sdk/idl/VirtualBox.idl
     19 *    (MS COM interface definition file for Main API)
     20 *
     21 * 2. src/VBox/Main/idl/xpidl.xsl =>
     22 *    out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
     23 *    (XPCOM interface definition file for Main API)
    1924 *
    20  *   -  also, another intermediate file that is then used to
    21  *      produce the official Doxygen documentation of the API.
     25 * 3. src/VBox/Main/idl/doxygen.xsl =>
     26 *    out/<platform>/obj/src/VBox/Main/VirtualBox.idl
     27 *    (pseudo-IDL for Doxygen to generate the official Main API
     28 *     documentation)
    2229 *
    23  *   -  a lot of files for the web service by XSLT stylesheets
    24  *      in the ../webservice directory; the targets include a
    25  *      WSDL file that describes the web service and C++ method
    26  *      mappers that map SOAP messages to COM calls.
     30 * 4. src/VBox/Main/idl/webservice/*.xsl =>
     31 *    a bunch of WSDL and C++ files
     32 *    (VirtualBox web service sources and SOAP mappers)
     33 *
     34 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
     35 *    out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
     36 *    (smart Qt-based C++ wrapper classes for COM interfaces
     37 *     of the Main API)
     38 *
     39 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
     40 *    out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
     41 *    (Main API TypeLib block for the WiX installer)
    2742 *
    2843     Copyright (C) 2006-2007 innotek GmbH
     
    6782</if>
    6883
    69 <module
     84<library
    7085   name="VirtualBox"
    7186   uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
    7287   version="1.3"
    7388   desc="innotek VirtualBox Type Library"
     89   appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
    7490   supportsErrorInfo="yes"
    7591>
     
    16081624
    16091625  </interface>
    1610 
    1611   <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
    1612          namespace="virtualbox.org">
    1613     <interface name="IVirtualBox" default="yes"/>
    1614   </class>
    16151626
    16161627  <!--
     
    80848095  </interface>
    80858096
    8086   <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
    8087          namespace="virtualbox.org">
    8088     <interface name="ISession" default="yes"/>
    8089   </class>
    8090 
    80918097<if target="wsdl">
    80928098
     
    81218127</if>
    81228128
    8123 </module>
     8129  <module name="VBoxSVC" context="LocalServer">
     8130    <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
     8131           namespace="virtualbox.org">
     8132      <interface name="IVirtualBox" default="yes"/>
     8133    </class>
     8134  </module>
     8135
     8136  <module name="VBoxC" context="InprocServer" threadingModel="Free">
     8137    <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
     8138           namespace="virtualbox.org">
     8139      <interface name="ISession" default="yes"/>
     8140    </class>
     8141  </module>
     8142
     8143</library>
    81248144
    81258145</idl>
  • trunk/src/VBox/Main/idl/doxygen.xsl

    r4071 r4097  
    269269<xsl:template match="/idl">
    270270/*
    271  *  DO NOT EDIT.
    272  *
    273  *  This IDL is automatically generated from the generic interface definition
    274  *  using some generic OMG IDL-like syntax SOLELY for the purpose of generating
    275  *  the documentation using Doxygen and is not syntactically valid.
     271 *  DO NOT EDIT! This is a generated file.
     272 *
     273 *  Doxygen IDL definition for VirualBox Main API (COM interfaces)
     274 *  generated from XIDL (XML interface definition).
     275 *
     276 *  Source    : src/VBox/Main/idl/VirtualBox.xidl
     277 *  Generator : src/VBox/Main/idl/doxygen.xsl
     278 *
     279 *  This IDL is generated using some generic OMG IDL-like syntax SOLELY
     280 *  for the purpose of generating the documentation using Doxygen and
     281 *  is not syntactically valid.
    276282 *
    277283 *  DO NOT USE THIS HEADER IN ANY OTHER WAY!
     
    340346 *  libraries
    341347-->
    342 <xsl:template match="module">
     348<xsl:template match="library">
    343349    <!-- all enums go first -->
    344350    <xsl:apply-templates select="enum | if/enum"/>
     
    420426 *  co-classes
    421427-->
    422 <xsl:template match="class">
     428<xsl:template match="module/class">
    423429    <!-- class and contract id: later -->
    424430    <!-- CLSID_xxx declarations for XPCOM, for compatibility with Win32: later -->
     
    633639                        <!-- enum types -->
    634640                        <xsl:when test="
    635                             (ancestor::module/enum[@name=current()]) or
    636                             (ancestor::module/if[@target=$self_target]/enum[@name=current()])
     641                            (ancestor::library/enum[@name=current()]) or
     642                            (ancestor::library/if[@target=$self_target]/enum[@name=current()])
    637643                        ">
    638644                            <xsl:value-of select="."/>
     
    641647                        <xsl:when test="
    642648                            (name(current())='enumerator' and
    643                              ((ancestor::module/enumerator[@name=current()]) or
    644                               (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
     649                             ((ancestor::library/enumerator[@name=current()]) or
     650                              (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
    645651                            ) or
    646                             ((ancestor::module/interface[@name=current()]) or
    647                              (ancestor::module/if[@target=$self_target]/interface[@name=current()])
     652                            ((ancestor::library/interface[@name=current()]) or
     653                             (ancestor::library/if[@target=$self_target]/interface[@name=current()])
    648654                            ) or
    649                             ((ancestor::module/collection[@name=current()]) or
    650                              (ancestor::module/if[@target=$self_target]/collection[@name=current()])
     655                            ((ancestor::library/collection[@name=current()]) or
     656                             (ancestor::library/if[@target=$self_target]/collection[@name=current()])
    651657                            )
    652658                        ">
  • trunk/src/VBox/Main/idl/midl.xsl

    r4071 r4097  
    7474    <xsl:text>
    7575/*
    76  *  DO NOT EDIT.
     76 *  DO NOT EDIT! This is a generated file.
    7777 *
    78  *  This IDL is automatically generated from the generic interface definition
    79  *  using MS IDL (MIDL) syntax.
     78 *  MS IDL (MIDL) definition for VirualBox Main API (COM interfaces)
     79 *  generated from XIDL (XML interface definition).
     80 *
     81 *  Source    : src/VBox/Main/idl/VirtualBox.xidl
     82 *  Generator : src/VBox/Main/idl/midl.xsl
    8083 */
    8184    </xsl:text>
     
    127130 *  libraries
    128131-->
    129 <xsl:template match="module">[
     132<xsl:template match="library">[
    130133    uuid(<xsl:value-of select="@uuid"/>),
    131134    version(<xsl:value-of select="@version"/>),
     
    256259 *  co-classes
    257260-->
    258 <xsl:template match="class">[
     261<xsl:template match="module/class">[
    259262    uuid(<xsl:value-of select="@uuid"/>)
    260263]
     
    525528                        <!-- enum types -->
    526529                        <xsl:when test="
    527                             (ancestor::module/enum[@name=current()]) or
    528                             (ancestor::module/if[@target=$self_target]/enum[@name=current()])
     530                            (ancestor::library/enum[@name=current()]) or
     531                            (ancestor::library/if[@target=$self_target]/enum[@name=current()])
    529532                        ">
    530533                            <xsl:value-of select="."/>
     
    533536                        <xsl:when test="
    534537                            (name(current())='enumerator' and
    535                              ((ancestor::module/enumerator[@name=current()]) or
    536                               (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
     538                             ((ancestor::library/enumerator[@name=current()]) or
     539                              (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
    537540                            ) or
    538                             ((ancestor::module/interface[@name=current()]) or
    539                              (ancestor::module/if[@target=$self_target]/interface[@name=current()])
     541                            ((ancestor::library/interface[@name=current()]) or
     542                             (ancestor::library/if[@target=$self_target]/interface[@name=current()])
    540543                            ) or
    541                             ((ancestor::module/collection[@name=current()]) or
    542                              (ancestor::module/if[@target=$self_target]/collection[@name=current()])
     544                            ((ancestor::library/collection[@name=current()]) or
     545                             (ancestor::library/if[@target=$self_target]/collection[@name=current()])
    543546                            )
    544547                        ">
  • trunk/src/VBox/Main/idl/xpidl.xsl

    r4071 r4097  
    7171    <xsl:text>
    7272/*
    73 # DO NOT EDIT! This is a generated file.
    74 # Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
    75 # Generator: src/VBox/Main/idl/xpidl.xsl
     73 *  DO NOT EDIT! This is a generated file.
     74 *
     75 *  XPCOM IDL (XPIDL) definition for VirualBox Main API (COM interfaces)
     76 *  generated from XIDL (XML interface definition).
     77 *
     78 *  Source    : src/VBox/Main/idl/VirtualBox.xidl
     79 *  Generator : src/VBox/Main/idl/xpidl.xsl
    7680 */
    7781
     
    156160 *  libraries
    157161-->
    158 <xsl:template match="module">
     162<xsl:template match="library">
    159163    <!-- forward declarations -->
    160164    <xsl:apply-templates select="if | interface | collection | enumerator" mode="forward"/>
     
    261265 *  co-classes
    262266-->
    263 <xsl:template match="class">
     267<xsl:template match="module/class">
    264268    <!-- class and contract id -->
    265269    <xsl:text>%{C++&#x0A;</xsl:text>
     
    559563                        <!-- enum types -->
    560564                        <xsl:when test="
    561                             (ancestor::module/enum[@name=current()]) or
    562                             (ancestor::module/if[@target=$self_target]/enum[@name=current()])
     565                            (ancestor::library/enum[@name=current()]) or
     566                            (ancestor::library/if[@target=$self_target]/enum[@name=current()])
    563567                        ">
    564568                            <xsl:text>PRUint32</xsl:text>
     
    567571                        <xsl:when test="
    568572                            (name(current())='enumerator' and
    569                              ((ancestor::module/enumerator[@name=current()]) or
    570                               (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
     573                             ((ancestor::library/enumerator[@name=current()]) or
     574                              (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
    571575                            ) or
    572                             ((ancestor::module/interface[@name=current()]) or
    573                              (ancestor::module/if[@target=$self_target]/interface[@name=current()])
     576                            ((ancestor::library/interface[@name=current()]) or
     577                             (ancestor::library/if[@target=$self_target]/interface[@name=current()])
    574578                            ) or
    575                             ((ancestor::module/collection[@name=current()]) or
    576                              (ancestor::module/if[@target=$self_target]/collection[@name=current()])
     579                            ((ancestor::library/collection[@name=current()]) or
     580                             (ancestor::library/if[@target=$self_target]/collection[@name=current()])
    577581                            )
    578582                        ">
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette