VirtualBox

source: vbox/trunk/src/VBox/Main/idl/xpidl_iid.xsl@ 103795

Last change on this file since 103795 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1<?xml version="1.0"?>
2<!-- $Id: xpidl_iid.xsl 98103 2023-01-17 14:15:46Z vboxsync $ -->
3
4<!--
5 * A template to generate a header file containing IIDs for XPCOM
6 * from the generic interface definition expressed in XML.
7-->
8
9<!--
10 Copyright (C) 2006-2023 Oracle and/or its affiliates.
11
12 This file is part of VirtualBox base platform packages, as
13 available from https://www.virtualbox.org.
14
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation, in version 3 of the
18 License.
19
20 This program is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, see <https://www.gnu.org/licenses>.
27
28 SPDX-License-Identifier: GPL-3.0-only
29-->
30
31<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
32<xsl:output method="text"/>
33
34<xsl:strip-space elements="*"/>
35
36<!--
37// templates
38/////////////////////////////////////////////////////////////////////////////
39-->
40
41
42<!--
43 * not explicitly matched elements and attributes
44-->
45<xsl:template match="*"/>
46
47
48<!--
49 * header
50-->
51<xsl:template match="/idl">
52 <xsl:text>
53/*
54 * DO NOT EDIT! This is a generated file.
55 *
56 * XPCOM C definitions for VirtualBox Main API (IIDs for COM interfaces)
57 * generated from XIDL (XML interface definition).
58 *
59 * Source : src/VBox/Main/idl/VirtualBox.xidl
60 * Generator : src/VBox/Main/idl/xpidl_iid.xsl
61 */
62
63#ifndef nsID_h__
64struct nsID
65{
66 unsigned int m0;
67 unsigned short m1;
68 unsigned short m2;
69 unsigned char m3[8];
70};
71
72typedef struct nsID nsID;
73typedef struct nsID nsIID;
74typedef struct nsID nsCID;
75#endif /* nsID_h__ */
76
77#ifdef __cplusplus
78extern "C" {
79#endif
80
81</xsl:text>
82 <xsl:apply-templates/>
83 <xsl:text>
84
85#ifdef __cplusplus
86}
87#endif
88
89</xsl:text>
90</xsl:template>
91
92
93<!--
94 * ignore all |if|s except those for XPIDL target
95-->
96<xsl:template match="if">
97 <xsl:if test="@target='xpidl'">
98 <xsl:apply-templates/>
99 </xsl:if>
100</xsl:template>
101
102
103<!--
104 * libraries
105-->
106<xsl:template match="library">
107 <xsl:apply-templates select="application/if | application/interface"/>
108 <xsl:apply-templates select="application/module"/>
109</xsl:template>
110
111
112<!--
113 * interfaces
114-->
115<xsl:template match="interface">
116 <xsl:text>const nsID IID_</xsl:text>
117 <xsl:value-of select="@name"/>
118 <xsl:text> = {&#x0A;</xsl:text>
119 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
120 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
121 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
122 <xsl:text>, \&#x0A; </xsl:text>
123 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
124 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
125 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
126 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
127 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
128 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
129 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
130 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
131 <xsl:text> } \&#x0A;};&#x0A;&#x0A;</xsl:text>
132</xsl:template>
133
134
135<!--
136 * modules
137-->
138<xsl:template match="module">
139 <xsl:apply-templates select="class"/>
140</xsl:template>
141
142
143<!--
144 * co-classes
145-->
146<xsl:template match="module/class">
147 <xsl:text>const nsCID CLSID_</xsl:text>
148 <xsl:value-of select="@name"/>
149 <xsl:text> = {&#x0A;</xsl:text>
150 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
151 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
152 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
153 <xsl:text>, \&#x0A; </xsl:text>
154 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
155 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
156 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
157 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
158 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
159 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
160 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
161 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
162 <xsl:text> } \&#x0A;};&#x0A;&#x0A;</xsl:text>
163</xsl:template>
164
165
166<xsl:template match="application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']//module/class" />
167
168<xsl:template match="application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']/if//interface
169| application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']//interface" />
170
171</xsl:stylesheet>
172
Note: See TracBrowser for help on using the repository browser.

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