VirtualBox

source: vbox/trunk/src/VBox/Main/cbinding/xpcidl.xsl@ 28823

Last change on this file since 28823 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
File size: 72.7 KB
Line 
1<?xml version="1.0"?>
2<!-- $Id: xpidl.xsl 39869 2008-11-25 13:37:40Z dmik $ -->
3
4<!--
5 * A template to generate a XPCOM IDL compatible interface definition file
6 * from the generic interface definition expressed in XML.
7
8 Copyright (C) 2008-2009 Oracle Corporation
9
10 This file is part of VirtualBox Open Source Edition (OSE), as
11 available from http://www.virtualbox.org. This file is free software;
12 you can redistribute it and/or modify it under the terms of the GNU
13 General Public License (GPL) as published by the Free Software
14 Foundation, in version 2 as it comes in the "COPYING" file of the
15 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17-->
18
19<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
20<xsl:output method="text"/>
21
22<xsl:strip-space elements="*"/>
23
24
25<!--
26// helper definitions
27/////////////////////////////////////////////////////////////////////////////
28-->
29
30<!--
31 * capitalizes the first letter
32-->
33<xsl:template name="capitalize">
34 <xsl:param name="str" select="."/>
35 <xsl:value-of select="
36 concat(
37 translate(substring($str,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
38 substring($str,2)
39 )
40 "/>
41</xsl:template>
42
43<!--
44 * uncapitalizes the first letter only if the second one is not capital
45 * otherwise leaves the string unchanged
46-->
47<xsl:template name="uncapitalize">
48 <xsl:param name="str" select="."/>
49 <xsl:choose>
50 <xsl:when test="not(contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', substring($str,2,1)))">
51 <xsl:value-of select="
52 concat(
53 translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
54 substring($str,2)
55 )
56 "/>
57 </xsl:when>
58 <xsl:otherwise>
59 <xsl:value-of select="string($str)"/>
60 </xsl:otherwise>
61 </xsl:choose>
62</xsl:template>
63
64<!--
65 * translates the string to uppercase
66-->
67<xsl:template name="uppercase">
68 <xsl:param name="str" select="."/>
69 <xsl:value-of select="
70 translate($str,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')
71 "/>
72</xsl:template>
73
74
75<!--
76 * translates the string to lowercase
77-->
78<xsl:template name="lowercase">
79 <xsl:param name="str" select="."/>
80 <xsl:value-of select="
81 translate($str,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')
82 "/>
83</xsl:template>
84
85
86<!--
87// templates
88/////////////////////////////////////////////////////////////////////////////
89-->
90
91
92<!--
93 * not explicitly matched elements and attributes
94-->
95<xsl:template match="*"/>
96
97
98<!--
99 * header
100-->
101<xsl:template match="/idl">
102 <xsl:text>
103/*
104 * DO NOT EDIT! This is a generated file.
105 *
106 * XPCOM IDL (XPIDL) definition for VirtualBox Main API (COM interfaces)
107 * generated from XIDL (XML interface definition).
108 *
109 * Source : src/VBox/Main/idl/VirtualBox.xidl
110 * Generator : src/VBox/Main/idl/xpcidl.xsl
111 *
112 * This file contains portions from the following Mozilla XPCOM files:
113 * xpcom/include/xpcom/nsID.h
114 * xpcom/include/nsIException.h
115 * xpcom/include/nsprpub/prtypes.h
116 * xpcom/include/xpcom/nsISupportsBase.h
117 *
118 * These files were originally triple-licensed (MPL/GPL2/LGPL2.1). Sun
119 * elects to distribute this derived work under the LGPL2.1 only.
120 */
121
122/*
123 * Copyright (C) 2008-2009 Sun Microsystems, Inc.
124 *
125 * This file is part of a free software library; you can redistribute
126 * it and/or modify it under the terms of the GNU Lesser General
127 * Public License version 2.1 as published by the Free Software
128 * Foundation and shipped in the "COPYING" file with this library.
129 * The library is distributed in the hope that it will be useful,
130 * but WITHOUT ANY WARRANTY of any kind.
131 *
132 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if
133 * any license choice other than GPL or LGPL is available it will
134 * apply instead, Sun elects to use only the Lesser General Public
135 * License version 2.1 (LGPLv2) at this time for any software where
136 * a choice of LGPL license versions is made available with the
137 * language indicating that LGPLv2 or any later version may be used,
138 * or where a choice of which version of the LGPL is applied is
139 * otherwise unspecified.
140 *
141 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
142 * Clara, CA 95054 USA or visit http://www.sun.com if you need
143 * additional information or have any questions.
144 */
145
146#ifndef ___VirtualBox_CXPCOM_h
147#define ___VirtualBox_CXPCOM_h
148
149#ifdef __cplusplus
150# include "VirtualBox_XPCOM.h"
151#else /* !__cplusplus */
152
153#include &lt;stddef.h&gt;
154#include "wchar.h"
155
156#if defined(WIN32)
157
158#define PR_EXPORT(__type) extern __declspec(dllexport) __type
159#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
160#define PR_IMPORT(__type) __declspec(dllimport) __type
161#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type
162
163#define PR_EXTERN(__type) extern __declspec(dllexport) __type
164#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
165#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
166#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
167
168#define PR_CALLBACK
169#define PR_CALLBACK_DECL
170#define PR_STATIC_CALLBACK(__x) static __x
171
172#elif defined(XP_BEOS)
173
174#define PR_EXPORT(__type) extern __declspec(dllexport) __type
175#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
176#define PR_IMPORT(__type) extern __declspec(dllexport) __type
177#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
178
179#define PR_EXTERN(__type) extern __declspec(dllexport) __type
180#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
181#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
182#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
183
184#define PR_CALLBACK
185#define PR_CALLBACK_DECL
186#define PR_STATIC_CALLBACK(__x) static __x
187
188#elif defined(WIN16)
189
190#define PR_CALLBACK_DECL __cdecl
191
192#if defined(_WINDLL)
193#define PR_EXPORT(__type) extern __type _cdecl _export _loadds
194#define PR_IMPORT(__type) extern __type _cdecl _export _loadds
195#define PR_EXPORT_DATA(__type) extern __type _export
196#define PR_IMPORT_DATA(__type) extern __type _export
197
198#define PR_EXTERN(__type) extern __type _cdecl _export _loadds
199#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds
200#define PR_EXTERN_DATA(__type) extern __type _export
201#define PR_IMPLEMENT_DATA(__type) __type _export
202
203#define PR_CALLBACK __cdecl __loadds
204#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
205
206#else /* this must be .EXE */
207#define PR_EXPORT(__type) extern __type _cdecl _export
208#define PR_IMPORT(__type) extern __type _cdecl _export
209#define PR_EXPORT_DATA(__type) extern __type _export
210#define PR_IMPORT_DATA(__type) extern __type _export
211
212#define PR_EXTERN(__type) extern __type _cdecl _export
213#define PR_IMPLEMENT(__type) __type _cdecl _export
214#define PR_EXTERN_DATA(__type) extern __type _export
215#define PR_IMPLEMENT_DATA(__type) __type _export
216
217#define PR_CALLBACK __cdecl __loadds
218#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK
219#endif /* _WINDLL */
220
221#elif defined(XP_MAC)
222
223#define PR_EXPORT(__type) extern __declspec(export) __type
224#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
225#define PR_IMPORT(__type) extern __declspec(export) __type
226#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
227
228#define PR_EXTERN(__type) extern __declspec(export) __type
229#define PR_IMPLEMENT(__type) __declspec(export) __type
230#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
231#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
232
233#define PR_CALLBACK
234#define PR_CALLBACK_DECL
235#define PR_STATIC_CALLBACK(__x) static __x
236
237#elif defined(XP_OS2) &amp;&amp; defined(__declspec)
238
239#define PR_EXPORT(__type) extern __declspec(dllexport) __type
240#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
241#define PR_IMPORT(__type) __declspec(dllimport) __type
242#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type
243
244#define PR_EXTERN(__type) extern __declspec(dllexport) __type
245#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
246#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
247#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
248
249#define PR_CALLBACK
250#define PR_CALLBACK_DECL
251#define PR_STATIC_CALLBACK(__x) static __x
252
253#elif defined(XP_OS2_VACPP)
254
255#define PR_EXPORT(__type) extern __type
256#define PR_EXPORT_DATA(__type) extern __type
257#define PR_IMPORT(__type) extern __type
258#define PR_IMPORT_DATA(__type) extern __type
259
260#define PR_EXTERN(__type) extern __type
261#define PR_IMPLEMENT(__type) __type
262#define PR_EXTERN_DATA(__type) extern __type
263#define PR_IMPLEMENT_DATA(__type) __type
264#define PR_CALLBACK _Optlink
265#define PR_CALLBACK_DECL
266#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
267
268#else /* Unix */
269
270# ifdef VBOX_HAVE_VISIBILITY_HIDDEN
271# define PR_EXPORT(__type) __attribute__((visibility("default"))) extern __type
272# define PR_EXPORT_DATA(__type) __attribute__((visibility("default"))) extern __type
273# define PR_IMPORT(__type) extern __type
274# define PR_IMPORT_DATA(__type) extern __type
275# define PR_EXTERN(__type) __attribute__((visibility("default"))) extern __type
276# define PR_IMPLEMENT(__type) __attribute__((visibility("default"))) __type
277# define PR_EXTERN_DATA(__type) __attribute__((visibility("default"))) extern __type
278# define PR_IMPLEMENT_DATA(__type) __attribute__((visibility("default"))) __type
279# define PR_CALLBACK
280# define PR_CALLBACK_DECL
281# define PR_STATIC_CALLBACK(__x) static __x
282# else
283# define PR_EXPORT(__type) extern __type
284# define PR_EXPORT_DATA(__type) extern __type
285# define PR_IMPORT(__type) extern __type
286# define PR_IMPORT_DATA(__type) extern __type
287# define PR_EXTERN(__type) extern __type
288# define PR_IMPLEMENT(__type) __type
289# define PR_EXTERN_DATA(__type) extern __type
290# define PR_IMPLEMENT_DATA(__type) __type
291# define PR_CALLBACK
292# define PR_CALLBACK_DECL
293# define PR_STATIC_CALLBACK(__x) static __x
294# endif
295#endif
296
297#if defined(_NSPR_BUILD_)
298#define NSPR_API(__type) PR_EXPORT(__type)
299#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type)
300#else
301#define NSPR_API(__type) PR_IMPORT(__type)
302#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)
303#endif
304
305typedef unsigned char PRUint8;
306#if (defined(HPUX) &amp;&amp; defined(__cplusplus) \
307 &amp;&amp; !defined(__GNUC__) &amp;&amp; __cplusplus &lt; 199707L) \
308 || (defined(SCO) &amp;&amp; defined(__cplusplus) \
309 &amp;&amp; !defined(__GNUC__) &amp;&amp; __cplusplus == 1L)
310typedef char PRInt8;
311#else
312typedef signed char PRInt8;
313#endif
314
315#define PR_INT8_MAX 127
316#define PR_INT8_MIN (-128)
317#define PR_UINT8_MAX 255U
318
319typedef unsigned short PRUint16;
320typedef short PRInt16;
321
322#define PR_INT16_MAX 32767
323#define PR_INT16_MIN (-32768)
324#define PR_UINT16_MAX 65535U
325
326typedef unsigned int PRUint32;
327typedef int PRInt32;
328#define PR_INT32(x) x
329#define PR_UINT32(x) x ## U
330
331#define PR_INT32_MAX PR_INT32(2147483647)
332#define PR_INT32_MIN (-PR_INT32_MAX - 1)
333#define PR_UINT32_MAX PR_UINT32(4294967295)
334
335typedef long PRInt64;
336typedef unsigned long PRUint64;
337typedef int PRIntn;
338typedef unsigned int PRUintn;
339
340typedef double PRFloat64;
341typedef size_t PRSize;
342
343typedef ptrdiff_t PRPtrdiff;
344
345typedef unsigned long PRUptrdiff;
346
347typedef PRIntn PRBool;
348
349#define PR_TRUE 1
350#define PR_FALSE 0
351
352typedef PRUint8 PRPackedBool;
353
354/*
355** Status code used by some routines that have a single point of failure or
356** special status return.
357*/
358typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
359
360#ifndef __PRUNICHAR__
361#define __PRUNICHAR__
362#if defined(WIN32) || defined(XP_MAC)
363typedef wchar_t PRUnichar;
364#else
365typedef PRUint16 PRUnichar;
366#endif
367#endif
368
369typedef long PRWord;
370typedef unsigned long PRUword;
371
372#define nsnull 0
373typedef PRUint32 nsresult;
374
375#if defined(__GNUC__) &amp;&amp; (__GNUC__ > 2)
376#define NS_LIKELY(x) (__builtin_expect((x), 1))
377#define NS_UNLIKELY(x) (__builtin_expect((x), 0))
378#else
379#define NS_LIKELY(x) (x)
380#define NS_UNLIKELY(x) (x)
381#endif
382
383#define NS_FAILED(_nsresult) (NS_UNLIKELY((_nsresult) &amp; 0x80000000))
384#define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) &amp; 0x80000000)))
385
386#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
387# define PR_IntervalNow VBoxNsprPR_IntervalNow
388# define PR_TicksPerSecond VBoxNsprPR_TicksPerSecond
389# define PR_SecondsToInterval VBoxNsprPR_SecondsToInterval
390# define PR_MillisecondsToInterval VBoxNsprPR_MillisecondsToInterval
391# define PR_MicrosecondsToInterval VBoxNsprPR_MicrosecondsToInterval
392# define PR_IntervalToSeconds VBoxNsprPR_IntervalToSeconds
393# define PR_IntervalToMilliseconds VBoxNsprPR_IntervalToMilliseconds
394# define PR_IntervalToMicroseconds VBoxNsprPR_IntervalToMicroseconds
395# define PR_EnterMonitor VBoxNsprPR_EnterMonitor
396# define PR_ExitMonitor VBoxNsprPR_ExitMonitor
397# define PR_Notify VBoxNsprPR_Notify
398# define PR_NotifyAll VBoxNsprPR_NotifyAll
399# define PR_Wait VBoxNsprPR_Wait
400# define PR_NewMonitor VBoxNsprPR_NewMonitor
401# define PR_DestroyMonitor VBoxNsprPR_DestroyMonitor
402#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
403
404typedef PRUint32 PRIntervalTime;
405
406#define PR_INTERVAL_MIN 1000UL
407#define PR_INTERVAL_MAX 100000UL
408#define PR_INTERVAL_NO_WAIT 0UL
409#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
410
411NSPR_API(PRIntervalTime) PR_IntervalNow(void);
412NSPR_API(PRUint32) PR_TicksPerSecond(void);
413NSPR_API(PRIntervalTime) PR_SecondsToInterval(PRUint32 seconds);
414NSPR_API(PRIntervalTime) PR_MillisecondsToInterval(PRUint32 milli);
415NSPR_API(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro);
416NSPR_API(PRUint32) PR_IntervalToSeconds(PRIntervalTime ticks);
417NSPR_API(PRUint32) PR_IntervalToMilliseconds(PRIntervalTime ticks);
418NSPR_API(PRUint32) PR_IntervalToMicroseconds(PRIntervalTime ticks);
419
420typedef struct PRMonitor PRMonitor;
421
422NSPR_API(PRMonitor*) PR_NewMonitor(void);
423NSPR_API(void) PR_DestroyMonitor(PRMonitor *mon);
424NSPR_API(void) PR_EnterMonitor(PRMonitor *mon);
425NSPR_API(PRStatus) PR_ExitMonitor(PRMonitor *mon);
426NSPR_API(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks);
427NSPR_API(PRStatus) PR_Notify(PRMonitor *mon);
428NSPR_API(PRStatus) PR_NotifyAll(PRMonitor *mon);
429
430#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
431# define PR_CreateThread VBoxNsprPR_CreateThread
432# define PR_JoinThread VBoxNsprPR_JoinThread
433# define PR_Sleep VBoxNsprPR_Sleep
434# define PR_GetCurrentThread VBoxNsprPR_GetCurrentThread
435# define PR_GetThreadState VBoxNsprPR_GetThreadState
436# define PR_SetThreadPrivate VBoxNsprPR_SetThreadPrivate
437# define PR_GetThreadPrivate VBoxNsprPR_GetThreadPrivate
438# define PR_NewThreadPrivateIndex VBoxNsprPR_NewThreadPrivateIndex
439# define PR_GetThreadPriority VBoxNsprPR_GetThreadPriority
440# define PR_SetThreadPriority VBoxNsprPR_SetThreadPriority
441# define PR_Interrupt VBoxNsprPR_Interrupt
442# define PR_ClearInterrupt VBoxNsprPR_ClearInterrupt
443# define PR_BlockInterrupt VBoxNsprPR_BlockInterrupt
444# define PR_UnblockInterrupt VBoxNsprPR_UnblockInterrupt
445# define PR_GetThreadScope VBoxNsprPR_GetThreadScope
446# define PR_GetThreadType VBoxNsprPR_GetThreadType
447#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
448
449typedef struct PRThread PRThread;
450typedef struct PRThreadStack PRThreadStack;
451
452typedef enum PRThreadType {
453 PR_USER_THREAD,
454 PR_SYSTEM_THREAD
455} PRThreadType;
456
457typedef enum PRThreadScope {
458 PR_LOCAL_THREAD,
459 PR_GLOBAL_THREAD,
460 PR_GLOBAL_BOUND_THREAD
461} PRThreadScope;
462
463typedef enum PRThreadState {
464 PR_JOINABLE_THREAD,
465 PR_UNJOINABLE_THREAD
466} PRThreadState;
467
468typedef enum PRThreadPriority
469{
470 PR_PRIORITY_FIRST = 0, /* just a placeholder */
471 PR_PRIORITY_LOW = 0, /* the lowest possible priority */
472 PR_PRIORITY_NORMAL = 1, /* most common expected priority */
473 PR_PRIORITY_HIGH = 2, /* slightly more aggressive scheduling */
474 PR_PRIORITY_URGENT = 3, /* it does little good to have more than one */
475 PR_PRIORITY_LAST = 3 /* this is just a placeholder */
476} PRThreadPriority;
477
478NSPR_API(PRThread*) PR_CreateThread(PRThreadType type,
479 void (PR_CALLBACK *start)(void *arg),
480 void *arg,
481 PRThreadPriority priority,
482 PRThreadScope scope,
483 PRThreadState state,
484 PRUint32 stackSize);
485NSPR_API(PRStatus) PR_JoinThread(PRThread *thread);
486NSPR_API(PRThread*) PR_GetCurrentThread(void);
487#ifndef NO_NSPR_10_SUPPORT
488#define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */
489#endif /* NO_NSPR_10_SUPPORT */
490NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread);
491NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority);
492
493typedef void (PR_CALLBACK *PRThreadPrivateDTOR)(void *priv);
494
495NSPR_API(PRStatus) PR_NewThreadPrivateIndex(
496 PRUintn *newIndex, PRThreadPrivateDTOR destructor);
497NSPR_API(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
498NSPR_API(void*) PR_GetThreadPrivate(PRUintn tpdIndex);
499NSPR_API(PRStatus) PR_Interrupt(PRThread *thread);
500NSPR_API(void) PR_ClearInterrupt(void);
501NSPR_API(void) PR_BlockInterrupt(void);
502NSPR_API(void) PR_UnblockInterrupt(void);
503NSPR_API(PRStatus) PR_Sleep(PRIntervalTime ticks);
504NSPR_API(PRThreadScope) PR_GetThreadScope(const PRThread *thread);
505NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread);
506NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread);
507
508#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
509# define PR_DestroyLock VBoxNsprPR_DestroyLock
510# define PR_Lock VBoxNsprPR_Lock
511# define PR_NewLock VBoxNsprPR_NewLock
512# define PR_Unlock VBoxNsprPR_Unlock
513#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
514
515typedef struct PRLock PRLock;
516
517NSPR_API(PRLock*) PR_NewLock(void);
518NSPR_API(void) PR_DestroyLock(PRLock *lock);
519NSPR_API(void) PR_Lock(PRLock *lock);
520NSPR_API(PRStatus) PR_Unlock(PRLock *lock);
521
522#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
523# define PR_NewCondVar VBoxNsprPR_NewCondVar
524# define PR_DestroyCondVar VBoxNsprPR_DestroyCondVar
525# define PR_WaitCondVar VBoxNsprPR_WaitCondVar
526# define PR_NotifyCondVar VBoxNsprPR_NotifyCondVar
527# define PR_NotifyAllCondVar VBoxNsprPR_NotifyAllCondVar
528#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
529
530typedef struct PRCondVar PRCondVar;
531
532NSPR_API(PRCondVar*) PR_NewCondVar(PRLock *lock);
533NSPR_API(void) PR_DestroyCondVar(PRCondVar *cvar);
534NSPR_API(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout);
535NSPR_API(PRStatus) PR_NotifyCondVar(PRCondVar *cvar);
536NSPR_API(PRStatus) PR_NotifyAllCondVar(PRCondVar *cvar);
537
538typedef struct PRCListStr PRCList;
539
540struct PRCListStr {
541 PRCList *next;
542 PRCList *prev;
543};
544
545#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
546# define PL_DestroyEvent VBoxNsplPL_DestroyEvent
547# define PL_HandleEvent VBoxNsplPL_HandleEvent
548# define PL_InitEvent VBoxNsplPL_InitEvent
549# define PL_CreateEventQueue VBoxNsplPL_CreateEventQueue
550# define PL_CreateMonitoredEventQueue VBoxNsplPL_CreateMonitoredEventQueue
551# define PL_CreateNativeEventQueue VBoxNsplPL_CreateNativeEventQueue
552# define PL_DequeueEvent VBoxNsplPL_DequeueEvent
553# define PL_DestroyEventQueue VBoxNsplPL_DestroyEventQueue
554# define PL_EventAvailable VBoxNsplPL_EventAvailable
555# define PL_EventLoop VBoxNsplPL_EventLoop
556# define PL_GetEvent VBoxNsplPL_GetEvent
557# define PL_GetEventOwner VBoxNsplPL_GetEventOwner
558# define PL_GetEventQueueMonitor VBoxNsplPL_GetEventQueueMonitor
559# define PL_GetEventQueueSelectFD VBoxNsplPL_GetEventQueueSelectFD
560# define PL_MapEvents VBoxNsplPL_MapEvents
561# define PL_PostEvent VBoxNsplPL_PostEvent
562# define PL_PostSynchronousEvent VBoxNsplPL_PostSynchronousEvent
563# define PL_ProcessEventsBeforeID VBoxNsplPL_ProcessEventsBeforeID
564# define PL_ProcessPendingEvents VBoxNsplPL_ProcessPendingEvents
565# define PL_RegisterEventIDFunc VBoxNsplPL_RegisterEventIDFunc
566# define PL_RevokeEvents VBoxNsplPL_RevokeEvents
567# define PL_UnregisterEventIDFunc VBoxNsplPL_UnregisterEventIDFunc
568# define PL_WaitForEvent VBoxNsplPL_WaitForEvent
569# define PL_IsQueueNative VBoxNsplPL_IsQueueNative
570# define PL_IsQueueOnCurrentThread VBoxNsplPL_IsQueueOnCurrentThread
571# define PL_FavorPerformanceHint VBoxNsplPL_FavorPerformanceHint
572#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
573
574typedef struct PLEvent PLEvent;
575typedef struct PLEventQueue PLEventQueue;
576
577PR_EXTERN(PLEventQueue*)
578PL_CreateEventQueue(const char* name, PRThread* handlerThread);
579PR_EXTERN(PLEventQueue *)
580 PL_CreateNativeEventQueue(
581 const char *name,
582 PRThread *handlerThread
583 );
584PR_EXTERN(PLEventQueue *)
585 PL_CreateMonitoredEventQueue(
586 const char *name,
587 PRThread *handlerThread
588 );
589PR_EXTERN(void)
590PL_DestroyEventQueue(PLEventQueue* self);
591PR_EXTERN(PRMonitor*)
592PL_GetEventQueueMonitor(PLEventQueue* self);
593
594#define PL_ENTER_EVENT_QUEUE_MONITOR(queue) \
595 PR_EnterMonitor(PL_GetEventQueueMonitor(queue))
596
597#define PL_EXIT_EVENT_QUEUE_MONITOR(queue) \
598 PR_ExitMonitor(PL_GetEventQueueMonitor(queue))
599
600PR_EXTERN(PRStatus) PL_PostEvent(PLEventQueue* self, PLEvent* event);
601PR_EXTERN(void*) PL_PostSynchronousEvent(PLEventQueue* self, PLEvent* event);
602PR_EXTERN(PLEvent*) PL_GetEvent(PLEventQueue* self);
603PR_EXTERN(PRBool) PL_EventAvailable(PLEventQueue* self);
604
605typedef void (PR_CALLBACK *PLEventFunProc)(PLEvent* event, void* data, PLEventQueue* queue);
606
607PR_EXTERN(void) PL_MapEvents(PLEventQueue* self, PLEventFunProc fun, void* data);
608PR_EXTERN(void) PL_RevokeEvents(PLEventQueue* self, void* owner);
609PR_EXTERN(void) PL_ProcessPendingEvents(PLEventQueue* self);
610PR_EXTERN(PLEvent*) PL_WaitForEvent(PLEventQueue* self);
611PR_EXTERN(void) PL_EventLoop(PLEventQueue* self);
612PR_EXTERN(PRInt32) PL_GetEventQueueSelectFD(PLEventQueue* self);
613PR_EXTERN(PRBool) PL_IsQueueOnCurrentThread( PLEventQueue *queue );
614PR_EXTERN(PRBool) PL_IsQueueNative(PLEventQueue *queue);
615
616typedef void* (PR_CALLBACK *PLHandleEventProc)(PLEvent* self);
617typedef void (PR_CALLBACK *PLDestroyEventProc)(PLEvent* self);
618PR_EXTERN(void)
619PL_InitEvent(PLEvent* self, void* owner,
620 PLHandleEventProc handler,
621 PLDestroyEventProc destructor);
622PR_EXTERN(void*) PL_GetEventOwner(PLEvent* self);
623PR_EXTERN(void) PL_HandleEvent(PLEvent* self);
624PR_EXTERN(void) PL_DestroyEvent(PLEvent* self);
625PR_EXTERN(void) PL_DequeueEvent(PLEvent* self, PLEventQueue* queue);
626PR_EXTERN(void) PL_FavorPerformanceHint(PRBool favorPerformanceOverEventStarvation, PRUint32 starvationDelay);
627
628struct PLEvent {
629 PRCList link;
630 PLHandleEventProc handler;
631 PLDestroyEventProc destructor;
632 void* owner;
633 void* synchronousResult;
634 PRLock* lock;
635 PRCondVar* condVar;
636 PRBool handled;
637#ifdef PL_POST_TIMINGS
638 PRIntervalTime postTime;
639#endif
640#ifdef XP_UNIX
641 unsigned long id;
642#endif /* XP_UNIX */
643 /* other fields follow... */
644};
645
646#if defined(XP_WIN) || defined(XP_OS2)
647
648PR_EXTERN(HWND)
649 PL_GetNativeEventReceiverWindow(
650 PLEventQueue *eqp
651 );
652#endif /* XP_WIN || XP_OS2 */
653
654#ifdef XP_UNIX
655
656PR_EXTERN(PRInt32)
657PL_ProcessEventsBeforeID(PLEventQueue *aSelf, unsigned long aID);
658
659typedef unsigned long (PR_CALLBACK *PLGetEventIDFunc)(void *aClosure);
660
661PR_EXTERN(void)
662PL_RegisterEventIDFunc(PLEventQueue *aSelf, PLGetEventIDFunc aFunc,
663 void *aClosure);
664PR_EXTERN(void) PL_UnregisterEventIDFunc(PLEventQueue *aSelf);
665
666#endif /* XP_UNIX */
667
668/* Standard "it worked" return value */
669#define NS_OK 0
670
671#define NS_ERROR_BASE ((nsresult) 0xC1F30000)
672
673/* Returned when an instance is not initialized */
674#define NS_ERROR_NOT_INITIALIZED (NS_ERROR_BASE + 1)
675
676/* Returned when an instance is already initialized */
677#define NS_ERROR_ALREADY_INITIALIZED (NS_ERROR_BASE + 2)
678
679/* Returned by a not implemented function */
680#define NS_ERROR_NOT_IMPLEMENTED ((nsresult) 0x80004001L)
681
682/* Returned when a given interface is not supported. */
683#define NS_NOINTERFACE ((nsresult) 0x80004002L)
684#define NS_ERROR_NO_INTERFACE NS_NOINTERFACE
685
686#define NS_ERROR_INVALID_POINTER ((nsresult) 0x80004003L)
687#define NS_ERROR_NULL_POINTER NS_ERROR_INVALID_POINTER
688
689/* Returned when a function aborts */
690#define NS_ERROR_ABORT ((nsresult) 0x80004004L)
691
692/* Returned when a function fails */
693#define NS_ERROR_FAILURE ((nsresult) 0x80004005L)
694
695/* Returned when an unexpected error occurs */
696#define NS_ERROR_UNEXPECTED ((nsresult) 0x8000ffffL)
697
698/* Returned when a memory allocation fails */
699#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL)
700
701/* Returned when an illegal value is passed */
702#define NS_ERROR_ILLEGAL_VALUE ((nsresult) 0x80070057L)
703#define NS_ERROR_INVALID_ARG NS_ERROR_ILLEGAL_VALUE
704
705/* Returned when a class doesn't allow aggregation */
706#define NS_ERROR_NO_AGGREGATION ((nsresult) 0x80040110L)
707
708/* Returned when an operation can't complete due to an unavailable resource */
709#define NS_ERROR_NOT_AVAILABLE ((nsresult) 0x80040111L)
710
711/* Returned when a class is not registered */
712#define NS_ERROR_FACTORY_NOT_REGISTERED ((nsresult) 0x80040154L)
713
714/* Returned when a class cannot be registered, but may be tried again later */
715#define NS_ERROR_FACTORY_REGISTER_AGAIN ((nsresult) 0x80040155L)
716
717/* Returned when a dynamically loaded factory couldn't be found */
718#define NS_ERROR_FACTORY_NOT_LOADED ((nsresult) 0x800401f8L)
719
720/* Returned when a factory doesn't support signatures */
721#define NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT \
722 (NS_ERROR_BASE + 0x101)
723
724/* Returned when a factory already is registered */
725#define NS_ERROR_FACTORY_EXISTS (NS_ERROR_BASE + 0x100)
726
727
728/**
729 * An "interface id" which can be used to uniquely identify a given
730 * interface.
731 * A "unique identifier". This is modeled after OSF DCE UUIDs.
732 */
733
734struct nsID {
735 PRUint32 m0;
736 PRUint16 m1;
737 PRUint16 m2;
738 PRUint8 m3[8];
739};
740
741typedef struct nsID nsID;
742typedef nsID nsIID;
743
744struct nsISupports; /* forward declaration */
745struct nsIStackFrame; /* forward declaration */
746struct nsIException; /* forward declaration */
747typedef struct nsISupports nsISupports; /* forward declaration */
748typedef struct nsIStackFrame nsIStackFrame; /* forward declaration */
749typedef struct nsIException nsIException; /* forward declaration */
750
751/**
752 * IID for the nsISupports interface
753 * {00000000-0000-0000-c000-000000000046}
754 *
755 * To maintain binary compatibility with COM's IUnknown, we define the IID
756 * of nsISupports to be the same as that of COM's IUnknown.
757 */
758#define NS_ISUPPORTS_IID \
759 { 0x00000000, 0x0000, 0x0000, \
760 {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }
761
762/**
763 * Reference count values
764 *
765 * This is the return type for AddRef() and Release() in nsISupports.
766 * IUnknown of COM returns an unsigned long from equivalent functions.
767 * The following ifdef exists to maintain binary compatibility with
768 * IUnknown.
769 */
770
771/**
772 * Basic component object model interface. Objects which implement
773 * this interface support runtime interface discovery (QueryInterface)
774 * and a reference counted memory model (AddRef/Release). This is
775 * modelled after the win32 IUnknown API.
776 */
777struct nsISupports_vtbl {
778
779 /**
780 * @name Methods
781 */
782
783 /**
784 * A run time mechanism for interface discovery.
785 * @param aIID [in] A requested interface IID
786 * @param aInstancePtr [out] A pointer to an interface pointer to
787 * receive the result.
788 * @return NS_OK if the interface is supported by the associated
789 * instance, NS_NOINTERFACE if it is not.
790 * NS_ERROR_INVALID_POINTER if aInstancePtr is NULL.
791 */
792 nsresult (*QueryInterface)(nsISupports *pThis, const nsID *iid, void **resultp);
793 /**
794 * Increases the reference count for this interface.
795 * The associated instance will not be deleted unless
796 * the reference count is returned to zero.
797 *
798 * @return The resulting reference count.
799 */
800 nsresult (*AddRef)(nsISupports *pThis);
801
802 /**
803 * Decreases the reference count for this interface.
804 * Generally, if the reference count returns to zero,
805 * the associated instance is deleted.
806 *
807 * @return The resulting reference count.
808 */
809 nsresult (*Release)(nsISupports *pThis);
810
811};
812
813struct nsISupports {
814 struct nsISupports_vtbl *vtbl;
815};
816
817/* starting interface: nsIException */
818#define NS_IEXCEPTION_IID_STR "f3a8d3b4-c424-4edc-8bf6-8974c983ba78"
819
820#define NS_IEXCEPTION_IID \
821 {0xf3a8d3b4, 0xc424, 0x4edc, \
822 { 0x8b, 0xf6, 0x89, 0x74, 0xc9, 0x83, 0xba, 0x78 }}
823
824struct nsIException_vtbl {
825
826 /* Methods from the Class nsISupports */
827 struct nsISupports_vtbl nsisupports;
828
829 /* readonly attribute string message; */
830 nsresult (*GetMessage)(nsIException *pThis, PRUnichar * *aMessage);
831
832 /* readonly attribute nsresult (*result; */
833 nsresult (*GetResult)(nsIException *pThis, nsresult *aResult);
834
835 /* readonly attribute string name; */
836 nsresult (*GetName)(nsIException *pThis, PRUnichar * *aName);
837
838 /* readonly attribute string filename; */
839 nsresult (*GetFilename)(nsIException *pThis, PRUnichar * *aFilename);
840
841 /* readonly attribute PRUint32 lineNumber; */
842 nsresult (*GetLineNumber)(nsIException *pThis, PRUint32 *aLineNumber);
843
844 /* readonly attribute PRUint32 columnNumber; */
845 nsresult (*GetColumnNumber)(nsIException *pThis, PRUint32 *aColumnNumber);
846
847 /* readonly attribute nsIStackFrame location; */
848 nsresult (*GetLocation)(nsIException *pThis, nsIStackFrame * *aLocation);
849
850 /* readonly attribute nsIException inner; */
851 nsresult (*GetInner)(nsIException *pThis, nsIException * *aInner);
852
853 /* readonly attribute nsISupports data; */
854 nsresult (*GetData)(nsIException *pThis, nsISupports * *aData);
855
856 /* string toString (); */
857 nsresult (*ToString)(nsIException *pThis, PRUnichar **_retval);
858};
859
860struct nsIException {
861 struct nsIException_vtbl *vtbl;
862};
863
864/* starting interface: nsIStackFrame */
865#define NS_ISTACKFRAME_IID_STR "91d82105-7c62-4f8b-9779-154277c0ee90"
866
867#define NS_ISTACKFRAME_IID \
868 {0x91d82105, 0x7c62, 0x4f8b, \
869 { 0x97, 0x79, 0x15, 0x42, 0x77, 0xc0, 0xee, 0x90 }}
870
871struct nsIStackFrame_vtbl {
872
873 /* Methods from the Class nsISupports */
874 struct nsISupports_vtbl nsisupports;
875
876 /* readonly attribute PRUint32 language; */
877 nsresult (*GetLanguage)(nsIStackFrame *pThis, PRUint32 *aLanguage);
878
879 /* readonly attribute string languageName; */
880 nsresult (*GetLanguageName)(nsIStackFrame *pThis, PRUnichar * *aLanguageName);
881
882 /* readonly attribute string filename; */
883 nsresult (*GetFilename)(nsIStackFrame *pThis, PRUnichar * *aFilename);
884
885 /* readonly attribute string name; */
886 nsresult (*GetName)(nsIStackFrame *pThis, PRUnichar * *aName);
887
888 /* readonly attribute PRInt32 lineNumber; */
889 nsresult (*GetLineNumber)(nsIStackFrame *pThis, PRInt32 *aLineNumber);
890
891 /* readonly attribute string sourceLine; */
892 nsresult (*GetSourceLine)(nsIStackFrame *pThis, PRUnichar * *aSourceLine);
893
894 /* readonly attribute nsIStackFrame caller; */
895 nsresult (*GetCaller)(nsIStackFrame *pThis, nsIStackFrame * *aCaller);
896
897 /* string toString (); */
898 nsresult (*ToString)(nsIStackFrame *pThis, PRUnichar **_retval);
899};
900
901struct nsIStackFrame {
902 struct nsIStackFrame_vtbl *vtbl;
903};
904
905/* starting interface: nsIEventTarget */
906#define NS_IEVENTTARGET_IID_STR "ea99ad5b-cc67-4efb-97c9-2ef620a59f2a"
907
908#define NS_IEVENTTARGET_IID \
909 {0xea99ad5b, 0xcc67, 0x4efb, \
910 { 0x97, 0xc9, 0x2e, 0xf6, 0x20, 0xa5, 0x9f, 0x2a }}
911
912struct nsIEventTarget;
913typedef struct nsIEventTarget nsIEventTarget;
914
915struct nsIEventTarget_vtbl {
916
917 struct nsISupports_vtbl nsisupports;
918
919 nsresult (*PostEvent)(nsIEventTarget *pThis, PLEvent * aEvent);
920
921 nsresult (*IsOnCurrentThread)(nsIEventTarget *pThis, PRBool *_retval);
922
923};
924
925struct nsIEventTarget {
926 struct nsIEventTarget_vtbl *vtbl;
927};
928
929/* starting interface: nsIEventQueue */
930#define NS_IEVENTQUEUE_IID_STR "176afb41-00a4-11d3-9f2a-00400553eef0"
931
932#define NS_IEVENTQUEUE_IID \
933 {0x176afb41, 0x00a4, 0x11d3, \
934 { 0x9f, 0x2a, 0x00, 0x40, 0x05, 0x53, 0xee, 0xf0 }}
935
936struct nsIEventQueue;
937typedef struct nsIEventQueue nsIEventQueue;
938
939struct nsIEventQueue_vtbl {
940
941 struct nsIEventTarget_vtbl nsieventtarget;
942
943 nsresult (*InitEvent)(nsIEventQueue *pThis, PLEvent * aEvent, void * owner, PLHandleEventProc handler, PLDestroyEventProc destructor);
944
945 nsresult (*PostSynchronousEvent)(nsIEventQueue *pThis, PLEvent * aEvent, void * *aResult);
946
947 nsresult (*PendingEvents)(nsIEventQueue *pThis, PRBool *_retval);
948
949 nsresult (*ProcessPendingEvents)(nsIEventQueue *pThis);
950
951 nsresult (*EventLoop)(nsIEventQueue *pThis);
952
953 nsresult (*EventAvailable)(nsIEventQueue *pThis, PRBool *aResult);
954
955 nsresult (*GetEvent)(nsIEventQueue *pThis, PLEvent * *_retval);
956
957 nsresult (*HandleEvent)(nsIEventQueue *pThis, PLEvent * aEvent);
958
959 nsresult (*WaitForEvent)(nsIEventQueue *pThis, PLEvent * *_retval);
960
961 PRInt32 (*GetEventQueueSelectFD)(nsIEventQueue *pThis);
962
963 nsresult (*Init)(nsIEventQueue *pThis, PRBool aNative);
964
965 nsresult (*InitFromPRThread)(nsIEventQueue *pThis, PRThread * thread, PRBool aNative);
966
967 nsresult (*InitFromPLQueue)(nsIEventQueue *pThis, PLEventQueue * aQueue);
968
969 nsresult (*EnterMonitor)(nsIEventQueue *pThis);
970
971 nsresult (*ExitMonitor)(nsIEventQueue *pThis);
972
973 nsresult (*RevokeEvents)(nsIEventQueue *pThis, void * owner);
974
975 nsresult (*GetPLEventQueue)(nsIEventQueue *pThis, PLEventQueue * *_retval);
976
977 nsresult (*IsQueueNative)(nsIEventQueue *pThis, PRBool *_retval);
978
979 nsresult (*StopAcceptingEvents)(nsIEventQueue *pThis);
980
981};
982
983struct nsIEventQueue {
984 struct nsIEventQueue_vtbl *vtbl;
985};
986
987</xsl:text>
988 <xsl:apply-templates/>
989<xsl:text>
990#endif /* !__cplusplus */
991
992#ifdef IN_VBOXXPCOMC
993# define VBOXXPCOMC_DECL(type) PR_EXPORT(type)
994#else
995# define VBOXXPCOMC_DECL(type) PR_IMPORT(type)
996#endif
997
998#ifdef __cplusplus
999extern "C" {
1000#endif
1001
1002
1003/**
1004 * Function table for dynamic linking.
1005 * Use VBoxGetFunctions() to obtain the pointer to it.
1006 */
1007typedef struct VBOXXPCOMC
1008{
1009 /** The size of the structure. */
1010 unsigned cb;
1011 /** The structure version. */
1012 unsigned uVersion;
1013
1014 unsigned int (*pfnGetVersion)(void);
1015
1016 void (*pfnComInitialize)(const char *pszVirtualBoxIID,
1017 IVirtualBox **ppVirtualBox,
1018 const char *pszSessionIID,
1019 ISession **ppSession);
1020 void (*pfnComUninitialize)(void);
1021
1022 void (*pfnComUnallocMem)(void *pv);
1023 void (*pfnUtf16Free)(PRUnichar *pwszString);
1024 void (*pfnUtf8Free)(char *pszString);
1025
1026 int (*pfnUtf16ToUtf8)(const PRUnichar *pwszString, char **ppszString);
1027 int (*pfnUtf8ToUtf16)(const char *pszString, PRUnichar **ppwszString);
1028
1029 void (*pfnGetEventQueue)(nsIEventQueue **eventQueue);
1030
1031 /** Tail version, same as uVersion. */
1032 unsigned uEndVersion;
1033} VBOXXPCOMC;
1034/** Pointer to a const VBoxXPCOMC function table. */
1035typedef VBOXXPCOMC const *PCVBOXXPCOM;
1036
1037/** The current interface version.
1038 * For use with VBoxGetXPCOMCFunctions and to be found in
1039 * VBOXXPCOMC::uVersion. */
1040#define VBOX_XPCOMC_VERSION 0x00020000U
1041
1042VBOXXPCOMC_DECL(PCVBOXXPCOM) VBoxGetXPCOMCFunctions(unsigned uVersion);
1043/** Typedef for VBoxGetXPCOMCFunctions. */
1044typedef PCVBOXXPCOM (*PFNVBOXGETXPCOMCFUNCTIONS)(unsigned uVersion);
1045
1046/** The symbol name of VBoxGetXPCOMCFunctions. */
1047#if defined(__OS2__)
1048# define VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME "_VBoxGetXPCOMCFunctions"
1049#else
1050# define VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME "VBoxGetXPCOMCFunctions"
1051#endif
1052
1053
1054#ifdef __cplusplus
1055}
1056#endif
1057
1058#endif /* !___VirtualBox_CXPCOM_h */
1059</xsl:text>
1060</xsl:template>
1061
1062<!--
1063 * ignore all |if|s except those for XPIDL target
1064<xsl:template match="if">
1065 <xsl:if test="@target='xpidl'">
1066 <xsl:apply-templates/>
1067 </xsl:if>
1068</xsl:template>
1069<xsl:template match="if" mode="forward">
1070 <xsl:if test="@target='xpidl'">
1071 <xsl:apply-templates mode="forward"/>
1072 </xsl:if>
1073</xsl:template>
1074<xsl:template match="if" mode="forwarder">
1075 <xsl:if test="@target='midl'">
1076 <xsl:apply-templates mode="forwarder"/>
1077 </xsl:if>
1078</xsl:template>
1079
1080-->
1081
1082<!--
1083 * cpp_quote
1084<xsl:template match="cpp">
1085 <xsl:if test="text()">
1086 <xsl:text>%{C++</xsl:text>
1087 <xsl:value-of select="text()"/>
1088 <xsl:text>&#x0A;%}&#x0A;&#x0A;</xsl:text>
1089 </xsl:if>
1090 <xsl:if test="not(text()) and @line">
1091 <xsl:text>%{C++&#x0A;</xsl:text>
1092 <xsl:value-of select="@line"/>
1093 <xsl:text>&#x0A;%}&#x0A;&#x0A;</xsl:text>
1094 </xsl:if>
1095</xsl:template>
1096-->
1097
1098
1099<!--
1100 * #if statement (@if attribute)
1101 * @note
1102 * xpidl doesn't support any preprocessor defines other than #include
1103 * (it just ignores them), so the generated IDL will most likely be
1104 * invalid. So for now we forbid using @if attributes
1105-->
1106<xsl:template match="@if" mode="begin">
1107 <xsl:message terminate="yes">
1108 @if attributes are not currently allowed because xpidl lacks
1109 support for #ifdef and stuff.
1110 </xsl:message>
1111 <xsl:text>#if </xsl:text>
1112 <xsl:value-of select="."/>
1113 <xsl:text>&#x0A;</xsl:text>
1114</xsl:template>
1115<xsl:template match="@if" mode="end">
1116 <xsl:text>#endif&#x0A;</xsl:text>
1117</xsl:template>
1118
1119
1120<!--
1121 * libraries
1122-->
1123<xsl:template match="library">
1124 <!-- result codes -->
1125 <xsl:text>&#x0A;</xsl:text>
1126 <xsl:for-each select="result">
1127 <xsl:apply-templates select="."/>
1128 </xsl:for-each>
1129 <xsl:text>&#x0A;&#x0A;</xsl:text>
1130 <!-- forward declarations -->
1131 <xsl:apply-templates select="if | interface" mode="forward"/>
1132 <xsl:text>&#x0A;</xsl:text>
1133 <!-- typedef'ing the struct declarations -->
1134 <xsl:apply-templates select="if | interface" mode="typedef"/>
1135 <xsl:text>&#x0A;</xsl:text>
1136 <!-- all enums go first -->
1137 <xsl:apply-templates select="enum | if/enum"/>
1138 <!-- everything else but result codes and enums -->
1139 <xsl:apply-templates select="*[not(self::result or self::enum) and
1140 not(self::if[result] or self::if[enum])]"/>
1141 <!-- -->
1142</xsl:template>
1143
1144
1145<!--
1146 * result codes
1147-->
1148<xsl:template match="result">
1149 <xsl:value-of select="concat('#define ',@name,' ',@value)"/>
1150 <xsl:text>&#x0A;</xsl:text>
1151</xsl:template>
1152
1153
1154<!--
1155 * forward declarations
1156-->
1157<xsl:template match="interface" mode="forward">
1158 <xsl:text>struct </xsl:text>
1159 <xsl:value-of select="@name"/>
1160 <xsl:text>;&#x0A;</xsl:text>
1161</xsl:template>
1162
1163
1164<!--
1165 * typedef'ing the struct declarations
1166-->
1167<xsl:template match="interface" mode="typedef">
1168 <xsl:text>typedef struct </xsl:text>
1169 <xsl:value-of select="@name"/>
1170 <xsl:text> </xsl:text>
1171 <xsl:value-of select="@name"/>
1172 <xsl:text>;&#x0A;</xsl:text>
1173</xsl:template>
1174
1175
1176<!--
1177 * interfaces
1178-->
1179<xsl:template match="interface">
1180 <xsl:text>/* Start of struct </xsl:text>
1181 <xsl:value-of select="@name"/>
1182 <xsl:text> Declaration */&#x0A;</xsl:text>
1183 <xsl:text>#define </xsl:text>
1184 <xsl:call-template name="uppercase">
1185 <xsl:with-param name="str" select="@name"/>
1186 </xsl:call-template>
1187 <xsl:value-of select="concat('_IID_STR &quot;',@uuid,'&quot;')"/>
1188 <xsl:text>&#x0A;</xsl:text>
1189 <xsl:text>#define </xsl:text>
1190 <xsl:call-template name="uppercase">
1191 <xsl:with-param name="str" select="@name"/>
1192 </xsl:call-template>
1193 <xsl:text>_IID { \&#x0A;</xsl:text>
1194 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
1195 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
1196 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
1197 <xsl:text>, \&#x0A; </xsl:text>
1198 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
1199 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
1200 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
1201 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
1202 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
1203 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
1204 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
1205 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
1206 <xsl:text> } \&#x0A;}&#x0A;</xsl:text>
1207 <xsl:text>struct </xsl:text>
1208 <xsl:value-of select="@name"/>
1209 <xsl:text>_vtbl&#x0A;{&#x0A;</xsl:text>
1210 <xsl:text> </xsl:text>
1211 <xsl:choose>
1212 <xsl:when test="@extends='$unknown'">struct nsISupports_vtbl nsisupports;</xsl:when>
1213 <xsl:when test="@extends='$dispatched'">struct nsISupports_vtbl nsisupports;</xsl:when>
1214 <xsl:when test="@extends='$errorinfo'">struct nsIException_vtbl nsiexception;</xsl:when>
1215 <xsl:otherwise>
1216 <xsl:text>struct </xsl:text>
1217 <xsl:value-of select="@extends"/>
1218 <xsl:text>_vtbl </xsl:text>
1219 <xsl:call-template name="lowercase">
1220 <xsl:with-param name="str" select="@extends"/>
1221 </xsl:call-template>
1222 <xsl:text>;</xsl:text>
1223 </xsl:otherwise>
1224 </xsl:choose>
1225 <xsl:text>&#x0A;&#x0A;</xsl:text>
1226 <!-- attributes (properties) -->
1227 <xsl:apply-templates select="attribute"/>
1228 <!-- methods -->
1229 <xsl:apply-templates select="method"/>
1230 <!-- 'if' enclosed elements, unsorted -->
1231 <xsl:apply-templates select="if"/>
1232 <!-- -->
1233 <xsl:text>};</xsl:text>
1234 <xsl:text>&#x0A;&#x0A;</xsl:text>
1235 <xsl:text>struct </xsl:text>
1236 <xsl:value-of select="@name"/>
1237 <xsl:text>&#x0A;{&#x0A; struct </xsl:text>
1238 <xsl:value-of select="@name"/>
1239 <xsl:text>_vtbl *vtbl;&#x0A;};&#x0A;</xsl:text>
1240 <xsl:text>/* End of struct </xsl:text>
1241 <xsl:value-of select="@name"/>
1242 <xsl:text> Declaration */&#x0A;&#x0A;&#x0A;</xsl:text>
1243</xsl:template>
1244
1245
1246<!--
1247 * attributes
1248-->
1249<xsl:template match="interface//attribute">
1250 <xsl:apply-templates select="@if" mode="begin"/>
1251 <xsl:if test="@mod='ptr'">
1252 <!-- attributes using native types must be non-scriptable
1253 <xsl:text> [noscript]&#x0A;</xsl:text>-->
1254 </xsl:if>
1255 <xsl:choose>
1256 <!-- safearray pseudo attribute -->
1257 <xsl:when test="@safearray='yes'">
1258 <!-- getter -->
1259 <xsl:text> nsresult (*Get</xsl:text>
1260 <xsl:call-template name="capitalize">
1261 <xsl:with-param name="str" select="@name"/>
1262 </xsl:call-template>
1263 <xsl:text>)(</xsl:text>
1264 <xsl:value-of select="../@name" />
1265 <xsl:text> *pThis, </xsl:text>
1266 <!-- array size -->
1267 <xsl:text>PRUint32 *</xsl:text>
1268 <xsl:value-of select="@name"/>
1269 <xsl:text>Size, </xsl:text>
1270 <!-- array pointer -->
1271 <xsl:apply-templates select="@type" mode="forwarder"/>
1272 <xsl:text> **</xsl:text>
1273 <xsl:value-of select="@name"/>
1274 <xsl:text>);&#x0A;</xsl:text>
1275 <!-- setter -->
1276 <xsl:if test="not(@readonly='yes')">
1277 <xsl:text> nsresult set</xsl:text>
1278 <xsl:call-template name="capitalize">
1279 <xsl:with-param name="str" select="@name"/>
1280 </xsl:call-template>
1281 <xsl:text> (&#x0A;</xsl:text>
1282 <!-- array size -->
1283 <xsl:text> in unsigned long </xsl:text>
1284 <xsl:value-of select="@name"/>
1285 <xsl:text>Size,&#x0A;</xsl:text>
1286 <!-- array pointer -->
1287 <xsl:text> [array, size_is(</xsl:text>
1288 <xsl:value-of select="@name"/>
1289 <xsl:text>Size)] in </xsl:text>
1290 <xsl:apply-templates select="@type" mode="forwarder"/>
1291 <xsl:text> </xsl:text>
1292 <xsl:value-of select="@name"/>
1293 <xsl:text>&#x0A; );&#x0A;</xsl:text>
1294 </xsl:if>
1295 </xsl:when>
1296 <!-- normal attribute -->
1297 <xsl:otherwise>
1298 <xsl:text> </xsl:text>
1299 <xsl:if test="@readonly='yes'">
1300 <xsl:text>nsresult (*Get</xsl:text>
1301 <xsl:call-template name="capitalize">
1302 <xsl:with-param name="str" select="@name"/>
1303 </xsl:call-template>
1304 <xsl:text>)(</xsl:text>
1305 <xsl:value-of select="../@name" />
1306 <xsl:text> *pThis, </xsl:text>
1307 <xsl:apply-templates select="@type" mode="forwarder"/>
1308 <xsl:text> *</xsl:text>
1309 <xsl:value-of select="@name"/>
1310 <xsl:text>);&#x0A;</xsl:text>
1311 </xsl:if>
1312 <xsl:choose>
1313 <xsl:when test="@readonly='yes'">
1314 </xsl:when>
1315 <xsl:otherwise>
1316 <xsl:text>nsresult (*Get</xsl:text>
1317 <xsl:call-template name="capitalize">
1318 <xsl:with-param name="str" select="@name"/>
1319 </xsl:call-template>
1320 <xsl:text>)(</xsl:text>
1321 <xsl:value-of select="../@name" />
1322 <xsl:text> *pThis, </xsl:text>
1323 <xsl:apply-templates select="@type" mode="forwarder"/>
1324 <xsl:text> *</xsl:text>
1325 <xsl:value-of select="@name"/>
1326 <xsl:text>);&#x0A; </xsl:text>
1327 <xsl:text>nsresult (*Set</xsl:text>
1328 <xsl:call-template name="capitalize">
1329 <xsl:with-param name="str" select="@name"/>
1330 </xsl:call-template>
1331 <xsl:text>)(</xsl:text>
1332 <xsl:value-of select="../@name" />
1333 <xsl:text> *pThis, </xsl:text>
1334 <xsl:apply-templates select="@type" mode="forwarder"/>
1335 <xsl:text> </xsl:text>
1336 <xsl:value-of select="@name"/>
1337 <xsl:text>);&#x0A;</xsl:text>
1338 </xsl:otherwise>
1339 </xsl:choose>
1340 </xsl:otherwise>
1341 </xsl:choose>
1342 <xsl:apply-templates select="@if" mode="end"/>
1343 <xsl:text>&#x0A;</xsl:text>
1344</xsl:template>
1345
1346<xsl:template match="interface//attribute" mode="forwarder">
1347
1348 <xsl:variable name="parent" select="ancestor::interface"/>
1349
1350 <xsl:apply-templates select="@if" mode="begin"/>
1351
1352 <!-- getter: COM_FORWARD_Interface_GETTER_Name_TO(smth) -->
1353 <xsl:text>#define COM_FORWARD_</xsl:text>
1354 <xsl:value-of select="$parent/@name"/>
1355 <xsl:text>_GETTER_</xsl:text>
1356 <xsl:call-template name="capitalize">
1357 <xsl:with-param name="str" select="@name"/>
1358 </xsl:call-template>
1359 <xsl:text>_TO(smth) NS_IMETHOD Get</xsl:text>
1360 <xsl:call-template name="capitalize">
1361 <xsl:with-param name="str" select="@name"/>
1362 </xsl:call-template>
1363 <xsl:text> (</xsl:text>
1364 <xsl:if test="@safearray='yes'">
1365 <xsl:text>PRUint32 * a</xsl:text>
1366 <xsl:call-template name="capitalize">
1367 <xsl:with-param name="str" select="@name"/>
1368 </xsl:call-template>
1369 <xsl:text>Size, </xsl:text>
1370 </xsl:if>
1371 <xsl:apply-templates select="@type" mode="forwarder"/>
1372 <xsl:if test="@safearray='yes'">
1373 <xsl:text> *</xsl:text>
1374 </xsl:if>
1375 <xsl:text> * a</xsl:text>
1376 <xsl:call-template name="capitalize">
1377 <xsl:with-param name="str" select="@name"/>
1378 </xsl:call-template>
1379 <xsl:text>) { return smth Get</xsl:text>
1380 <xsl:call-template name="capitalize">
1381 <xsl:with-param name="str" select="@name"/>
1382 </xsl:call-template>
1383 <xsl:text> (</xsl:text>
1384 <xsl:if test="@safearray='yes'">
1385 <xsl:text>a</xsl:text>
1386 <xsl:call-template name="capitalize">
1387 <xsl:with-param name="str" select="@name"/>
1388 </xsl:call-template>
1389 <xsl:text>Size, </xsl:text>
1390 </xsl:if>
1391 <xsl:text>a</xsl:text>
1392 <xsl:call-template name="capitalize">
1393 <xsl:with-param name="str" select="@name"/>
1394 </xsl:call-template>
1395 <xsl:text>); }&#x0A;</xsl:text>
1396 <!-- getter: COM_FORWARD_Interface_GETTER_Name_TO_OBJ(obj) -->
1397 <xsl:text>#define COM_FORWARD_</xsl:text>
1398 <xsl:value-of select="$parent/@name"/>
1399 <xsl:text>_GETTER_</xsl:text>
1400 <xsl:call-template name="capitalize">
1401 <xsl:with-param name="str" select="@name"/>
1402 </xsl:call-template>
1403 <xsl:text>_TO_OBJ(obj) COM_FORWARD_</xsl:text>
1404 <xsl:value-of select="$parent/@name"/>
1405 <xsl:text>_GETTER_</xsl:text>
1406 <xsl:call-template name="capitalize">
1407 <xsl:with-param name="str" select="@name"/>
1408 </xsl:call-template>
1409 <xsl:text>_TO ((obj)->)&#x0A;</xsl:text>
1410 <!-- getter: COM_FORWARD_Interface_GETTER_Name_TO_BASE(base) -->
1411 <xsl:text>#define COM_FORWARD_</xsl:text>
1412 <xsl:value-of select="$parent/@name"/>
1413 <xsl:text>_GETTER_</xsl:text>
1414 <xsl:call-template name="capitalize">
1415 <xsl:with-param name="str" select="@name"/>
1416 </xsl:call-template>
1417 <xsl:text>_TO_BASE(base) COM_FORWARD_</xsl:text>
1418 <xsl:value-of select="$parent/@name"/>
1419 <xsl:text>_GETTER_</xsl:text>
1420 <xsl:call-template name="capitalize">
1421 <xsl:with-param name="str" select="@name"/>
1422 </xsl:call-template>
1423 <xsl:text>_TO (base::)&#x0A;</xsl:text>
1424 <!-- -->
1425 <xsl:if test="not(@readonly='yes')">
1426 <!-- setter: COM_FORWARD_Interface_SETTER_Name_TO(smth) -->
1427 <xsl:text>#define COM_FORWARD_</xsl:text>
1428 <xsl:value-of select="$parent/@name"/>
1429 <xsl:text>_SETTER_</xsl:text>
1430 <xsl:call-template name="capitalize">
1431 <xsl:with-param name="str" select="@name"/>
1432 </xsl:call-template>
1433 <xsl:text>_TO(smth) NS_IMETHOD Set</xsl:text>
1434 <xsl:call-template name="capitalize">
1435 <xsl:with-param name="str" select="@name"/>
1436 </xsl:call-template>
1437 <xsl:text> (</xsl:text>
1438 <xsl:if test="@safearray='yes'">
1439 <xsl:text>PRUint32 a</xsl:text>
1440 <xsl:call-template name="capitalize">
1441 <xsl:with-param name="str" select="@name"/>
1442 </xsl:call-template>
1443 <xsl:text>Size, </xsl:text>
1444 </xsl:if>
1445 <xsl:if test="not(@safearray='yes') and (@type='string' or @type='wstring')">
1446 <xsl:text>const </xsl:text>
1447 </xsl:if>
1448 <xsl:apply-templates select="@type" mode="forwarder"/>
1449 <xsl:if test="@safearray='yes'">
1450 <xsl:text> *</xsl:text>
1451 </xsl:if>
1452 <xsl:text> a</xsl:text>
1453 <xsl:call-template name="capitalize">
1454 <xsl:with-param name="str" select="@name"/>
1455 </xsl:call-template>
1456 <xsl:text>) { return smth Set</xsl:text>
1457 <xsl:call-template name="capitalize">
1458 <xsl:with-param name="str" select="@name"/>
1459 </xsl:call-template>
1460 <xsl:text> (a</xsl:text>
1461 <xsl:call-template name="capitalize">
1462 <xsl:with-param name="str" select="@name"/>
1463 </xsl:call-template>
1464 <xsl:text>); }&#x0A;</xsl:text>
1465 <!-- setter: COM_FORWARD_Interface_SETTER_Name_TO_OBJ(obj) -->
1466 <xsl:text>#define COM_FORWARD_</xsl:text>
1467 <xsl:value-of select="$parent/@name"/>
1468 <xsl:text>_SETTER_</xsl:text>
1469 <xsl:call-template name="capitalize">
1470 <xsl:with-param name="str" select="@name"/>
1471 </xsl:call-template>
1472 <xsl:text>_TO_OBJ(obj) COM_FORWARD_</xsl:text>
1473 <xsl:value-of select="$parent/@name"/>
1474 <xsl:text>_SETTER_</xsl:text>
1475 <xsl:call-template name="capitalize">
1476 <xsl:with-param name="str" select="@name"/>
1477 </xsl:call-template>
1478 <xsl:text>_TO ((obj)->)&#x0A;</xsl:text>
1479 <!-- setter: COM_FORWARD_Interface_SETTER_Name_TO_BASE(base) -->
1480 <xsl:text>#define COM_FORWARD_</xsl:text>
1481 <xsl:value-of select="$parent/@name"/>
1482 <xsl:text>_SETTER_</xsl:text>
1483 <xsl:call-template name="capitalize">
1484 <xsl:with-param name="str" select="@name"/>
1485 </xsl:call-template>
1486 <xsl:text>_TO_BASE(base) COM_FORWARD_</xsl:text>
1487 <xsl:value-of select="$parent/@name"/>
1488 <xsl:text>_SETTER_</xsl:text>
1489 <xsl:call-template name="capitalize">
1490 <xsl:with-param name="str" select="@name"/>
1491 </xsl:call-template>
1492 <xsl:text>_TO (base::)&#x0A;</xsl:text>
1493 </xsl:if>
1494
1495 <xsl:apply-templates select="@if" mode="end"/>
1496
1497</xsl:template>
1498
1499
1500<!--
1501 * methods
1502-->
1503<xsl:template match="interface//method">
1504 <xsl:apply-templates select="@if" mode="begin"/>
1505 <xsl:if test="param/@mod='ptr'">
1506 <!-- methods using native types must be non-scriptable
1507 <xsl:text> [noscript]&#x0A;</xsl:text>-->
1508 </xsl:if>
1509 <xsl:text> nsresult (*</xsl:text>
1510 <xsl:call-template name="capitalize">
1511 <xsl:with-param name="str" select="@name"/>
1512 </xsl:call-template>
1513 <xsl:if test="param">
1514 <xsl:text>)(&#x0A;</xsl:text>
1515 <xsl:text> </xsl:text>
1516 <xsl:value-of select="../@name" />
1517 <xsl:text> *pThis,&#x0A;</xsl:text>
1518 <xsl:for-each select="param [position() != last()]">
1519 <xsl:text> </xsl:text>
1520 <xsl:apply-templates select="."/>
1521 <xsl:text>,&#x0A;</xsl:text>
1522 </xsl:for-each>
1523 <xsl:text> </xsl:text>
1524 <xsl:apply-templates select="param [last()]"/>
1525 <xsl:text>&#x0A; );&#x0A;</xsl:text>
1526 </xsl:if>
1527 <xsl:if test="not(param)">
1528 <xsl:text>)(</xsl:text>
1529 <xsl:value-of select="../@name" />
1530 <xsl:text> *pThis );&#x0A;</xsl:text>
1531 </xsl:if>
1532 <xsl:apply-templates select="@if" mode="end"/>
1533 <xsl:text>&#x0A;</xsl:text>
1534</xsl:template>
1535
1536<xsl:template match="interface//method" mode="forwarder">
1537
1538 <xsl:variable name="parent" select="ancestor::interface"/>
1539
1540 <xsl:apply-templates select="@if" mode="begin"/>
1541
1542 <xsl:text>#define COM_FORWARD_</xsl:text>
1543 <xsl:value-of select="$parent/@name"/>
1544 <xsl:text>_</xsl:text>
1545 <xsl:call-template name="capitalize">
1546 <xsl:with-param name="str" select="@name"/>
1547 </xsl:call-template>
1548 <xsl:text>_TO(smth) NS_IMETHOD </xsl:text>
1549 <xsl:call-template name="capitalize">
1550 <xsl:with-param name="str" select="@name"/>
1551 </xsl:call-template>
1552 <xsl:choose>
1553 <xsl:when test="param">
1554 <xsl:text> (</xsl:text>
1555 <xsl:for-each select="param [position() != last()]">
1556 <xsl:apply-templates select="." mode="forwarder"/>
1557 <xsl:text>, </xsl:text>
1558 </xsl:for-each>
1559 <xsl:apply-templates select="param [last()]" mode="forwarder"/>
1560 <xsl:text>) { return smth </xsl:text>
1561 <xsl:call-template name="capitalize">
1562 <xsl:with-param name="str" select="@name"/>
1563 </xsl:call-template>
1564 <xsl:text> (</xsl:text>
1565 <xsl:for-each select="param [position() != last()]">
1566 <xsl:if test="@safearray='yes'">
1567 <xsl:text>a</xsl:text>
1568 <xsl:call-template name="capitalize">
1569 <xsl:with-param name="str" select="@name"/>
1570 </xsl:call-template>
1571 <xsl:text>Size+++, </xsl:text>
1572 </xsl:if>
1573 <xsl:text>a</xsl:text>
1574 <xsl:call-template name="capitalize">
1575 <xsl:with-param name="str" select="@name"/>
1576 </xsl:call-template>
1577 <xsl:text>, </xsl:text>
1578 </xsl:for-each>
1579 <xsl:if test="param [last()]/@safearray='yes'">
1580 <xsl:text>a</xsl:text>
1581 <xsl:call-template name="capitalize">
1582 <xsl:with-param name="str" select="param [last()]/@name"/>
1583 </xsl:call-template>
1584 <xsl:text>Size, </xsl:text>
1585 </xsl:if>
1586 <xsl:text>a</xsl:text>
1587 <xsl:call-template name="capitalize">
1588 <xsl:with-param name="str" select="param [last()]/@name"/>
1589 </xsl:call-template>
1590 <xsl:text>); }</xsl:text>
1591 </xsl:when>
1592 <xsl:otherwise test="not(param)">
1593 <xsl:text>() { return smth </xsl:text>
1594 <xsl:call-template name="capitalize">
1595 <xsl:with-param name="str" select="@name"/>
1596 </xsl:call-template>
1597 <xsl:text>(); }</xsl:text>
1598 </xsl:otherwise>
1599 </xsl:choose>
1600 <xsl:text>&#x0A;</xsl:text>
1601 <!-- COM_FORWARD_Interface_Method_TO_OBJ(obj) -->
1602 <xsl:text>#define COM_FORWARD_</xsl:text>
1603 <xsl:value-of select="$parent/@name"/>
1604 <xsl:text>_</xsl:text>
1605 <xsl:call-template name="capitalize">
1606 <xsl:with-param name="str" select="@name"/>
1607 </xsl:call-template>
1608 <xsl:text>_TO_OBJ(obj) COM_FORWARD_</xsl:text>
1609 <xsl:value-of select="$parent/@name"/>
1610 <xsl:text>_</xsl:text>
1611 <xsl:call-template name="capitalize">
1612 <xsl:with-param name="str" select="@name"/>
1613 </xsl:call-template>
1614 <xsl:text>_TO ((obj)->)&#x0A;</xsl:text>
1615 <!-- COM_FORWARD_Interface_Method_TO_BASE(base) -->
1616 <xsl:text>#define COM_FORWARD_</xsl:text>
1617 <xsl:value-of select="$parent/@name"/>
1618 <xsl:text>_</xsl:text>
1619 <xsl:call-template name="capitalize">
1620 <xsl:with-param name="str" select="@name"/>
1621 </xsl:call-template>
1622 <xsl:text>_TO_BASE(base) COM_FORWARD_</xsl:text>
1623 <xsl:value-of select="$parent/@name"/>
1624 <xsl:text>_</xsl:text>
1625 <xsl:call-template name="capitalize">
1626 <xsl:with-param name="str" select="@name"/>
1627 </xsl:call-template>
1628 <xsl:text>_TO (base::)&#x0A;</xsl:text>
1629
1630 <xsl:apply-templates select="@if" mode="end"/>
1631
1632</xsl:template>
1633
1634
1635<!--
1636 * modules
1637-->
1638<xsl:template match="module">
1639 <xsl:apply-templates select="class"/>
1640</xsl:template>
1641
1642
1643<!--
1644 * co-classes
1645-->
1646<xsl:template match="module/class">
1647 <!-- class and contract id -->
1648 <xsl:text>&#x0A;</xsl:text>
1649 <xsl:text>#define NS_</xsl:text>
1650 <xsl:call-template name="uppercase">
1651 <xsl:with-param name="str" select="@name"/>
1652 </xsl:call-template>
1653 <xsl:text>_CID { \&#x0A;</xsl:text>
1654 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
1655 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
1656 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
1657 <xsl:text>, \&#x0A; </xsl:text>
1658 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
1659 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
1660 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
1661 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
1662 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
1663 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
1664 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
1665 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
1666 <xsl:text> } \&#x0A;}&#x0A;</xsl:text>
1667 <xsl:text>#define NS_</xsl:text>
1668 <xsl:call-template name="uppercase">
1669 <xsl:with-param name="str" select="@name"/>
1670 </xsl:call-template>
1671 <!-- Contract ID -->
1672 <xsl:text>_CONTRACTID &quot;@</xsl:text>
1673 <xsl:value-of select="@namespace"/>
1674 <xsl:text>/</xsl:text>
1675 <xsl:value-of select="@name"/>
1676 <xsl:text>;1&quot;&#x0A;</xsl:text>
1677 <!-- CLSID_xxx declarations for XPCOM, for compatibility with Win32 -->
1678 <xsl:text>/* for compatibility with Win32 */&#x0A;</xsl:text>
1679 <xsl:text>#define CLSID_</xsl:text>
1680 <xsl:value-of select="@name"/>
1681 <xsl:text> (nsCID) NS_</xsl:text>
1682 <xsl:call-template name="uppercase">
1683 <xsl:with-param name="str" select="@name"/>
1684 </xsl:call-template>
1685 <xsl:text>_CID&#x0A;</xsl:text>
1686 <xsl:text>&#x0A;&#x0A;</xsl:text>
1687</xsl:template>
1688
1689
1690<!--
1691 * enums
1692-->
1693<xsl:template match="enum">
1694 <xsl:text>/* Start of enum </xsl:text>
1695 <xsl:value-of select="@name"/>
1696 <xsl:text> Declaration */&#x0A;</xsl:text>
1697 <xsl:text>#define </xsl:text>
1698 <xsl:call-template name="uppercase">
1699 <xsl:with-param name="str" select="@name"/>
1700 </xsl:call-template>
1701 <xsl:value-of select="concat('_IID_STR &quot;',@uuid,'&quot;')"/>
1702 <xsl:text>&#x0A;</xsl:text>
1703 <xsl:text>#define </xsl:text>
1704 <xsl:call-template name="uppercase">
1705 <xsl:with-param name="str" select="@name"/>
1706 </xsl:call-template>
1707 <xsl:text>_IID { \&#x0A;</xsl:text>
1708 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
1709 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
1710 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
1711 <xsl:text>, \&#x0A; </xsl:text>
1712 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
1713 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
1714 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
1715 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
1716 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
1717 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
1718 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
1719 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
1720 <xsl:text> } \&#x0A;}&#x0A;</xsl:text>
1721 <xsl:text>enum </xsl:text>
1722 <xsl:value-of select="@name"/>
1723 <xsl:text>&#x0A;{&#x0A;</xsl:text>
1724 <xsl:variable name="this" select="."/>
1725 <xsl:for-each select="const">
1726 <xsl:text> </xsl:text>
1727 <xsl:value-of select="$this/@name"/>
1728 <xsl:text>_</xsl:text>
1729 <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>
1730 <xsl:if test="position() != last()">
1731 <xsl:text>,</xsl:text>
1732 </xsl:if>
1733 <xsl:text>&#x0A;</xsl:text>
1734 </xsl:for-each>
1735 <xsl:text>};&#x0A;</xsl:text>
1736 <xsl:text>/* End of enum </xsl:text>
1737 <xsl:value-of select="@name"/>
1738 <xsl:text> Declaration */&#x0A;&#x0A;&#x0A;</xsl:text>
1739</xsl:template>
1740
1741
1742<!--
1743 * method parameters
1744-->
1745<xsl:template match="method/param">
1746 <xsl:choose>
1747 <!-- safearray parameters -->
1748 <xsl:when test="@safearray='yes'">
1749 <!-- array size -->
1750 <xsl:choose>
1751 <xsl:when test="@dir='in'">
1752 <xsl:text>PRUint32 </xsl:text>
1753 <xsl:value-of select="@name"/>
1754 <xsl:text>Size,&#x0A;</xsl:text>
1755 </xsl:when>
1756 <xsl:when test="@dir='out'">
1757 <xsl:text>PRUint32 *</xsl:text>
1758 <xsl:value-of select="@name"/>
1759 <xsl:text>Size,&#x0A;</xsl:text>
1760 </xsl:when>
1761 <xsl:when test="@dir='return'">
1762 <xsl:text>PRUint32 *</xsl:text>
1763 <xsl:value-of select="@name"/>
1764 <xsl:text>Size,&#x0A;</xsl:text>
1765 </xsl:when>
1766 <xsl:otherwise>
1767 <xsl:text>PRUint32 </xsl:text>
1768 <xsl:value-of select="@name"/>
1769 <xsl:text>Size,&#x0A;</xsl:text>
1770 </xsl:otherwise>
1771 </xsl:choose>
1772 <!-- array pointer -->
1773 <xsl:text> </xsl:text>
1774 <xsl:choose>
1775 <xsl:when test="@dir='in'">
1776 <xsl:apply-templates select="@type" mode="forwarder"/>
1777 <xsl:text>*</xsl:text>
1778 </xsl:when>
1779 <xsl:when test="@dir='out'">
1780 <xsl:apply-templates select="@type" mode="forwarder"/>
1781 <xsl:if test="@type='wstring'">
1782 <xsl:text>*</xsl:text>
1783 </xsl:if>
1784 <xsl:text>*</xsl:text>
1785 </xsl:when>
1786 <xsl:when test="@dir='return'">
1787 <xsl:apply-templates select="@type" mode="forwarder"/>
1788 <xsl:text>**</xsl:text>
1789 </xsl:when>
1790 <xsl:otherwise>
1791 <xsl:apply-templates select="@type" mode="forwarder"/>
1792 <xsl:text>*</xsl:text>
1793 </xsl:otherwise>
1794 </xsl:choose>
1795 <xsl:text> </xsl:text>
1796 <xsl:value-of select="@name"/>
1797 </xsl:when>
1798 <!-- normal and array parameters -->
1799 <xsl:otherwise>
1800 <xsl:choose>
1801 <xsl:when test="@dir='in'">
1802 <xsl:apply-templates select="@type" mode="forwarder"/>
1803 <xsl:text></xsl:text>
1804 </xsl:when>
1805 <xsl:when test="@dir='out'">
1806 <xsl:apply-templates select="@type" mode="forwarder"/>
1807 <xsl:text> *</xsl:text>
1808 </xsl:when>
1809 <xsl:when test="@dir='return'">
1810 <xsl:apply-templates select="@type" mode="forwarder"/>
1811 <xsl:text> *</xsl:text>
1812 </xsl:when>
1813 <xsl:otherwise>
1814 <xsl:apply-templates select="@type" mode="forwarder"/>
1815 <xsl:text></xsl:text>
1816 </xsl:otherwise>
1817 </xsl:choose>
1818 <xsl:text> </xsl:text>
1819 <xsl:value-of select="@name"/>
1820 </xsl:otherwise>
1821 </xsl:choose>
1822</xsl:template>
1823
1824<xsl:template match="method/param" mode="forwarder">
1825 <xsl:if test="@safearray='yes'">
1826 <xsl:text>PRUint32</xsl:text>
1827 <xsl:if test="@dir='out' or @dir='return'">
1828 <xsl:text> *</xsl:text>
1829 </xsl:if>
1830 <xsl:text> a</xsl:text>
1831 <xsl:call-template name="capitalize">
1832 <xsl:with-param name="str" select="@name"/>
1833 </xsl:call-template>
1834 <xsl:text>Size, </xsl:text>
1835 </xsl:if>
1836 <xsl:apply-templates select="@type" mode="forwarder"/>
1837 <xsl:if test="@dir='out' or @dir='return'">
1838 <xsl:text> *</xsl:text>
1839 </xsl:if>
1840 <xsl:if test="@safearray='yes'">
1841 <xsl:text> *</xsl:text>
1842 </xsl:if>
1843 <xsl:text> a</xsl:text>
1844 <xsl:call-template name="capitalize">
1845 <xsl:with-param name="str" select="@name"/>
1846 </xsl:call-template>
1847</xsl:template>
1848
1849
1850<!--
1851 * attribute/parameter type conversion
1852-->
1853<xsl:template match="attribute/@type | param/@type">
1854 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/>
1855
1856 <xsl:choose>
1857 <!-- modifiers (ignored for 'enumeration' attributes)-->
1858 <xsl:when test="name(current())='type' and ../@mod">
1859 <xsl:choose>
1860 <xsl:when test="../@mod='ptr'">
1861 <xsl:choose>
1862 <!-- standard types -->
1863 <!--xsl:when test=".='result'">??</xsl:when-->
1864 <xsl:when test=".='boolean'">booleanPtr</xsl:when>
1865 <xsl:when test=".='octet'">octetPtr</xsl:when>
1866 <xsl:when test=".='short'">shortPtr</xsl:when>
1867 <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
1868 <xsl:when test=".='long'">longPtr</xsl:when>
1869 <xsl:when test=".='long long'">llongPtr</xsl:when>
1870 <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
1871 <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
1872 <xsl:otherwise>
1873 <xsl:message terminate="yes">
1874 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
1875 <xsl:text>attribute 'mod=</xsl:text>
1876 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
1877 <xsl:text>' cannot be used with type </xsl:text>
1878 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
1879 </xsl:message>
1880 </xsl:otherwise>
1881 </xsl:choose>
1882 </xsl:when>
1883 <xsl:when test="../@mod='string'">
1884 <xsl:choose>
1885 <!-- standard types -->
1886 <!--xsl:when test=".='result'">??</xsl:when-->
1887 <xsl:when test=".='uuid'">wstring</xsl:when>
1888 <xsl:otherwise>
1889 <xsl:message terminate="yes">
1890 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
1891 <xsl:text>attribute 'mod=</xsl:text>
1892 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
1893 <xsl:text>' cannot be used with type </xsl:text>
1894 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
1895 </xsl:message>
1896 </xsl:otherwise>
1897 </xsl:choose>
1898 </xsl:when>
1899 <xsl:otherwise>
1900 <xsl:message terminate="yes">
1901 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
1902 <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
1903 <xsl:text>of attribute 'mod' is invalid!</xsl:text>
1904 </xsl:message>
1905 </xsl:otherwise>
1906 </xsl:choose>
1907 </xsl:when>
1908 <!-- no modifiers -->
1909 <xsl:otherwise>
1910 <xsl:choose>
1911 <!-- standard types -->
1912 <xsl:when test=".='result'">nsresult</xsl:when>
1913 <xsl:when test=".='boolean'">boolean</xsl:when>
1914 <xsl:when test=".='octet'">octet</xsl:when>
1915 <xsl:when test=".='short'">short</xsl:when>
1916 <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
1917 <xsl:when test=".='long'">long</xsl:when>
1918 <xsl:when test=".='long long'">long long</xsl:when>
1919 <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
1920 <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
1921 <xsl:when test=".='char'">char</xsl:when>
1922 <xsl:when test=".='wchar'">wchar</xsl:when>
1923 <xsl:when test=".='string'">string</xsl:when>
1924 <xsl:when test=".='wstring'">wstring</xsl:when>
1925 <!-- UUID type -->
1926 <xsl:when test=".='uuid'">
1927 <xsl:choose>
1928 <xsl:when test="name(..)='attribute'">
1929 <xsl:choose>
1930 <xsl:when test="../@readonly='yes'">
1931 <xsl:text>nsIDPtr</xsl:text>
1932 </xsl:when>
1933 <xsl:otherwise>
1934 <xsl:message terminate="yes">
1935 <xsl:value-of select="../@name"/>
1936 <xsl:text>: Non-readonly uuid attributes are not supported!</xsl:text>
1937 </xsl:message>
1938 </xsl:otherwise>
1939 </xsl:choose>
1940 </xsl:when>
1941 <xsl:when test="name(..)='param'">
1942 <xsl:choose>
1943 <xsl:when test="../@dir='in' and not(../@safearray='yes')">
1944 <xsl:text>nsIDRef</xsl:text>
1945 </xsl:when>
1946 <xsl:otherwise>
1947 <xsl:text>nsIDPtr</xsl:text>
1948 </xsl:otherwise>
1949 </xsl:choose>
1950 </xsl:when>
1951 </xsl:choose>
1952 </xsl:when>
1953 <!-- system interface types -->
1954 <xsl:when test=".='$unknown'">nsISupports</xsl:when>
1955 <xsl:otherwise>
1956 <xsl:choose>
1957 <!-- enum types -->
1958 <xsl:when test="
1959 (ancestor::library/enum[@name=current()]) or
1960 (ancestor::library/if[@target=$self_target]/enum[@name=current()])
1961 ">
1962 <xsl:text>PRUint32</xsl:text>
1963 </xsl:when>
1964 <!-- custom interface types -->
1965 <xsl:when test="
1966 (name(current())='enumerator' and
1967 ((ancestor::library/enumerator[@name=current()]) or
1968 (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
1969 ) or
1970 ((ancestor::library/interface[@name=current()]) or
1971 (ancestor::library/if[@target=$self_target]/interface[@name=current()])
1972 )
1973 ">
1974 <xsl:value-of select="."/>
1975 </xsl:when>
1976 <!-- other types -->
1977 <xsl:otherwise>
1978 <xsl:message terminate="yes">
1979 <xsl:text>Unknown parameter type: </xsl:text>
1980 <xsl:value-of select="."/>
1981 </xsl:message>
1982 </xsl:otherwise>
1983 </xsl:choose>
1984 </xsl:otherwise>
1985 </xsl:choose>
1986 </xsl:otherwise>
1987 </xsl:choose>
1988</xsl:template>
1989
1990<xsl:template match="attribute/@type | param/@type" mode="forwarder">
1991
1992 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/>
1993
1994 <xsl:choose>
1995 <!-- modifiers (ignored for 'enumeration' attributes)-->
1996 <xsl:when test="name(current())='type' and ../@mod">
1997 <xsl:choose>
1998 <xsl:when test="../@mod='ptr'">
1999 <xsl:choose>
2000 <!-- standard types -->
2001 <!--xsl:when test=".='result'">??</xsl:when-->
2002 <xsl:when test=".='boolean'">PRBool *</xsl:when>
2003 <xsl:when test=".='octet'">PRUint8 *</xsl:when>
2004 <xsl:when test=".='short'">PRInt16 *</xsl:when>
2005 <xsl:when test=".='unsigned short'">PRUint16 *</xsl:when>
2006 <xsl:when test=".='long'">PRInt32 *</xsl:when>
2007 <xsl:when test=".='long long'">PRInt64 *</xsl:when>
2008 <xsl:when test=".='unsigned long'">PRUint32 *</xsl:when>
2009 <xsl:when test=".='unsigned long long'">PRUint64 *</xsl:when>
2010 <xsl:otherwise>
2011 <xsl:message terminate="yes">
2012 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
2013 <xsl:text>attribute 'mod=</xsl:text>
2014 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
2015 <xsl:text>' cannot be used with type </xsl:text>
2016 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
2017 </xsl:message>
2018 </xsl:otherwise>
2019 </xsl:choose>
2020 </xsl:when>
2021 <xsl:when test="../@mod='string'">
2022 <xsl:choose>
2023 <!-- standard types -->
2024 <!--xsl:when test=".='result'">??</xsl:when-->
2025 <xsl:when test=".='uuid'">PRUnichar *</xsl:when>
2026 <xsl:otherwise>
2027 <xsl:message terminate="yes">
2028 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
2029 <xsl:text>attribute 'mod=</xsl:text>
2030 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
2031 <xsl:text>' cannot be used with type </xsl:text>
2032 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
2033 </xsl:message>
2034 </xsl:otherwise>
2035 </xsl:choose>
2036 </xsl:when>
2037 </xsl:choose>
2038 </xsl:when>
2039 <!-- no modifiers -->
2040 <xsl:otherwise>
2041 <xsl:choose>
2042 <!-- standard types -->
2043 <xsl:when test=".='result'">nsresult</xsl:when>
2044 <xsl:when test=".='boolean'">PRBool</xsl:when>
2045 <xsl:when test=".='octet'">PRUint8</xsl:when>
2046 <xsl:when test=".='short'">PRInt16</xsl:when>
2047 <xsl:when test=".='unsigned short'">PRUint16</xsl:when>
2048 <xsl:when test=".='long'">PRInt32</xsl:when>
2049 <xsl:when test=".='long long'">PRInt64</xsl:when>
2050 <xsl:when test=".='unsigned long'">PRUint32</xsl:when>
2051 <xsl:when test=".='unsigned long long'">PRUint64</xsl:when>
2052 <xsl:when test=".='char'">char</xsl:when>
2053 <xsl:when test=".='wchar'">PRUnichar</xsl:when>
2054 <!-- string types -->
2055 <xsl:when test=".='string'">char *</xsl:when>
2056 <xsl:when test=".='wstring'">PRUnichar *</xsl:when>
2057 <!-- UUID type -->
2058 <xsl:when test=".='uuid'">
2059 <xsl:choose>
2060 <xsl:when test="name(..)='attribute'">
2061 <xsl:choose>
2062 <xsl:when test="../@readonly='yes'">
2063 <xsl:text>nsID *</xsl:text>
2064 </xsl:when>
2065 </xsl:choose>
2066 </xsl:when>
2067 <xsl:when test="name(..)='param'">
2068 <xsl:choose>
2069 <xsl:when test="../@dir='in' and not(../@safearray='yes')">
2070 <xsl:text>const nsID *</xsl:text>
2071 </xsl:when>
2072 <xsl:otherwise>
2073 <xsl:text>nsID *</xsl:text>
2074 </xsl:otherwise>
2075 </xsl:choose>
2076 </xsl:when>
2077 </xsl:choose>
2078 </xsl:when>
2079 <!-- system interface types -->
2080 <xsl:when test=".='$unknown'">nsISupports *</xsl:when>
2081 <xsl:otherwise>
2082 <xsl:choose>
2083 <!-- enum types -->
2084 <xsl:when test="
2085 (ancestor::library/enum[@name=current()]) or
2086 (ancestor::library/if[@target=$self_target]/enum[@name=current()])
2087 ">
2088 <xsl:text>PRUint32</xsl:text>
2089 </xsl:when>
2090 <!-- custom interface types -->
2091 <xsl:when test="
2092 (name(current())='enumerator' and
2093 ((ancestor::library/enumerator[@name=current()]) or
2094 (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
2095 ) or
2096 ((ancestor::library/interface[@name=current()]) or
2097 (ancestor::library/if[@target=$self_target]/interface[@name=current()])
2098 )
2099 ">
2100 <xsl:value-of select="."/>
2101 <xsl:text> *</xsl:text>
2102 </xsl:when>
2103 <!-- other types -->
2104 </xsl:choose>
2105 </xsl:otherwise>
2106 </xsl:choose>
2107 </xsl:otherwise>
2108 </xsl:choose>
2109</xsl:template>
2110
2111</xsl:stylesheet>
2112
Note: See TracBrowser for help on using the repository browser.

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