VirtualBox

source: vbox/trunk/src/VBox/Main/idl/doxygen.xsl@ 40685

Last change on this file since 40685 was 29200, checked in by vboxsync, 15 years ago

more manual Oracle rebranding in headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.5 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 * A template to generate a generic IDL file from the generic interface
5 * definition expressed in XML. The generated file is intended solely to
6 * generate the documentation using Doxygen.
7
8 Copyright (C) 2006-2010 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="html" indent="yes"/>
21
22<xsl:strip-space elements="*"/>
23
24
25<!--
26// helper definitions
27/////////////////////////////////////////////////////////////////////////////
28-->
29
30<!--
31 * uncapitalizes the first letter only if the second one is not capital
32 * otherwise leaves the string unchanged
33-->
34<xsl:template name="uncapitalize">
35 <xsl:param name="str" select="."/>
36 <xsl:choose>
37 <xsl:when test="not(contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', substring($str,2,1)))">
38 <xsl:value-of select="
39 concat(
40 translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
41 substring($str,2)
42 )
43 "/>
44 </xsl:when>
45 <xsl:otherwise>
46 <xsl:value-of select="string($str)"/>
47 </xsl:otherwise>
48 </xsl:choose>
49</xsl:template>
50
51<!--
52 * translates the string to uppercase
53-->
54<xsl:template name="uppercase">
55 <xsl:param name="str" select="."/>
56 <xsl:value-of select="
57 translate($str,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')
58 "/>
59</xsl:template>
60
61
62<!--
63// Doxygen transformation rules
64/////////////////////////////////////////////////////////////////////////////
65-->
66
67<!--
68 * all text elements that are not explicitly matched are normalized
69 * (all whitespace chars are converted to single spaces)
70-->
71<!--xsl:template match="desc//text()">
72 <xsl:value-of select="concat(' ',normalize-space(.),' ')"/>
73</xsl:template-->
74
75<!--
76 * all elements that are not explicitly matched are considered to be html tags
77 * and copied w/o modifications
78-->
79<xsl:template match="desc//*">
80 <xsl:copy>
81 <xsl:apply-templates/>
82 </xsl:copy>
83</xsl:template>
84
85<!--
86 * paragraph
87-->
88<xsl:template match="desc//p">
89 <xsl:text>&#x0A;</xsl:text>
90 <xsl:apply-templates/>
91 <xsl:text>&#x0A;</xsl:text>
92</xsl:template>
93
94<!--
95 * link
96-->
97<xsl:template match="desc//link">
98 <xsl:text>@link </xsl:text>
99 <!--
100 * sometimes Doxygen is stupid and cannot resolve global enums properly,
101 * thinking they are members of the current class. Fix it by adding ::
102 * in front of any @to value that doesn't start with #.
103 -->
104 <xsl:choose>
105 <xsl:when test="not(starts-with(@to, '#')) and not(contains(@to, '::'))">
106 <xsl:text>::</xsl:text>
107 </xsl:when>
108 </xsl:choose>
109 <!--
110 * Doxygen doesn't understand autolinks like Class::func() if Class
111 * doesn't actually contain a func with no arguments. Fix it.
112 -->
113 <xsl:choose>
114 <xsl:when test="substring(@to, string-length(@to)-1)='()'">
115 <xsl:value-of select="substring-before(@to, '()')"/>
116 </xsl:when>
117 <xsl:otherwise>
118 <xsl:value-of select="@to"/>
119 </xsl:otherwise>
120 </xsl:choose>
121 <xsl:text> </xsl:text>
122 <xsl:choose>
123 <xsl:when test="normalize-space(text())">
124 <xsl:value-of select="normalize-space(text())"/>
125 </xsl:when>
126 <xsl:otherwise>
127 <xsl:choose>
128 <xsl:when test="starts-with(@to, '#')">
129 <xsl:value-of select="substring-after(@to, '#')"/>
130 </xsl:when>
131 <xsl:when test="starts-with(@to, '::')">
132 <xsl:value-of select="substring-after(@to, '::')"/>
133 </xsl:when>
134 <xsl:otherwise>
135 <xsl:value-of select="@to"/>
136 </xsl:otherwise>
137 </xsl:choose>
138 </xsl:otherwise>
139 </xsl:choose>
140 <xsl:text>@endlink</xsl:text>
141 <!--
142 * insert a dummy empty B element to distinctly separate @endlink
143 * from the following text
144 -->
145 <xsl:element name="b"/>
146</xsl:template>
147
148<!--
149 * note
150-->
151<xsl:template match="desc/note">
152 <xsl:if test="not(@internal='yes')">
153 <xsl:text>&#x0A;@note </xsl:text>
154 <xsl:apply-templates/>
155 <xsl:text>&#x0A;</xsl:text>
156 </xsl:if>
157</xsl:template>
158
159<!--
160 * see
161-->
162<xsl:template match="desc/see">
163 <xsl:text>&#x0A;@see </xsl:text>
164 <xsl:apply-templates/>
165 <xsl:text>&#x0A;</xsl:text>
166</xsl:template>
167
168
169<!--
170 * common comment prologue (handles group IDs)
171-->
172<xsl:template match="desc" mode="begin">
173 <xsl:param name="id" select="@group | preceding::descGroup[1]/@id"/>
174 <xsl:text>/**&#x0A;</xsl:text>
175 <xsl:if test="$id">
176 <xsl:value-of select="concat(' @ingroup ',$id,'&#x0A;')"/>
177 </xsl:if>
178</xsl:template>
179
180<!--
181 * common brief comment prologue (handles group IDs)
182-->
183<xsl:template match="desc" mode="begin_brief">
184 <xsl:param name="id" select="@group | preceding::descGroup[1]/@id"/>
185 <xsl:text>/**&#x0A;</xsl:text>
186 <xsl:if test="$id">
187 <xsl:value-of select="concat(' @ingroup ',$id,'&#x0A;')"/>
188 </xsl:if>
189 <xsl:text> @brief&#x0A;</xsl:text>
190</xsl:template>
191
192<!--
193 * common middle part of the comment block
194-->
195<xsl:template match="desc" mode="middle">
196 <xsl:apply-templates select="text() | *[not(self::note or self::see)]"/>
197 <xsl:apply-templates select="note"/>
198 <xsl:apply-templates select="see"/>
199</xsl:template>
200
201<!--
202 * result part of the comment block
203-->
204<xsl:template match="desc" mode="results">
205 <xsl:if test="result">
206 <xsl:text>
207 @par Expected result codes:
208 </xsl:text>
209 <table>
210 <xsl:for-each select="result">
211 <tr>
212 <xsl:choose>
213 <xsl:when test="ancestor::library/result[@name=current()/@name]">
214 <td><xsl:value-of select=
215 "concat('@link ::',@name,' ',@name,' @endlink')"/></td>
216 </xsl:when>
217 <xsl:otherwise>
218 <td><xsl:value-of select="@name"/></td>
219 </xsl:otherwise>
220 </xsl:choose>
221 <td>
222 <xsl:apply-templates select="text() | *[not(self::note or self::see or
223 self::result)]"/>
224 </td>
225 </tr>
226 </xsl:for-each>
227 </table>
228 </xsl:if>
229</xsl:template>
230
231
232<!--
233 * comment for interfaces
234-->
235<xsl:template match="interface/desc">
236 <xsl:apply-templates select="." mode="begin"/>
237 <xsl:apply-templates select="." mode="middle"/>
238@par Interface ID:
239<tt>{<xsl:call-template name="uppercase">
240 <xsl:with-param name="str" select="../@uuid"/>
241 </xsl:call-template>}</tt>
242 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
243</xsl:template>
244
245<!--
246 * comment for attributes
247-->
248<xsl:template match="attribute/desc">
249 <xsl:apply-templates select="." mode="begin"/>
250 <xsl:apply-templates select="text() | *[not(self::note or self::see or self::result)]"/>
251 <xsl:apply-templates select="." mode="results"/>
252 <xsl:apply-templates select="note"/>
253 <xsl:if test="../@mod='ptr'">
254 <xsl:text>
255
256@warning This attribute is non-scriptable. In particular, this also means that an
257attempt to get or set it from a process other than the process that has created and
258owns the object will most likely fail or crash your application.
259</xsl:text>
260 </xsl:if>
261 <xsl:apply-templates select="see"/>
262 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
263</xsl:template>
264
265<!--
266 * comment for methods
267-->
268<xsl:template match="method/desc">
269 <xsl:apply-templates select="." mode="begin"/>
270 <xsl:apply-templates select="text() | *[not(self::note or self::see or self::result)]"/>
271 <xsl:for-each select="../param">
272 <xsl:apply-templates select="desc"/>
273 </xsl:for-each>
274 <xsl:apply-templates select="." mode="results"/>
275 <xsl:apply-templates select="note"/>
276 <xsl:apply-templates select="../param/desc/note"/>
277 <xsl:if test="../param/@mod='ptr'">
278 <xsl:text>
279
280@warning This method is non-scriptable. In particular, this also means that an
281attempt to call it from a process other than the process that has created and
282owns the object will most likely fail or crash your application.
283</xsl:text>
284 </xsl:if>
285 <xsl:apply-templates select="see"/>
286 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
287</xsl:template>
288
289<!--
290 * comment for method parameters
291-->
292<xsl:template match="method/param/desc">
293 <xsl:text>&#x0A;@param </xsl:text>
294 <xsl:value-of select="../@name"/>
295 <xsl:text> </xsl:text>
296 <xsl:apply-templates select="text() | *[not(self::note or self::see)]"/>
297 <xsl:text>&#x0A;</xsl:text>
298</xsl:template>
299
300<!--
301 * comment for enums
302-->
303<xsl:template match="enum/desc">
304 <xsl:apply-templates select="." mode="begin"/>
305 <xsl:apply-templates select="." mode="middle"/>
306@par Interface ID:
307<tt>{<xsl:call-template name="uppercase">
308 <xsl:with-param name="str" select="../@uuid"/>
309 </xsl:call-template>}</tt>
310 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
311</xsl:template>
312
313<!--
314 * comment for enum values
315-->
316<xsl:template match="enum/const/desc">
317 <xsl:apply-templates select="." mode="begin_brief"/>
318 <xsl:apply-templates select="." mode="middle"/>
319 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
320</xsl:template>
321
322<!--
323 * comment for result codes
324-->
325<xsl:template match="result/desc">
326 <xsl:apply-templates select="." mode="begin_brief"/>
327 <xsl:apply-templates select="." mode="middle"/>
328 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
329</xsl:template>
330
331<!--
332 * ignore descGroups by default (processed in /idl)
333-->
334<xsl:template match="descGroup"/>
335
336<!--
337// templates
338/////////////////////////////////////////////////////////////////////////////
339-->
340
341
342<!--
343 * header
344-->
345<xsl:template match="/idl">
346/*
347 * DO NOT EDIT! This is a generated file.
348 *
349 * Doxygen IDL definition for VirtualBox Main API (COM interfaces)
350 * generated from XIDL (XML interface definition).
351 *
352 * Source : src/VBox/Main/idl/VirtualBox.xidl
353 * Generator : src/VBox/Main/idl/doxygen.xsl
354 *
355 * This IDL is generated using some generic OMG IDL-like syntax SOLELY
356 * for the purpose of generating the documentation using Doxygen and
357 * is not syntactically valid.
358 *
359 * DO NOT USE THIS HEADER IN ANY OTHER WAY!
360 */
361
362 <!-- general description -->
363 <xsl:text>/** @mainpage &#x0A;</xsl:text>
364 <xsl:apply-templates select="desc" mode="middle"/>
365 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
366
367 <!-- group (module) definitions -->
368 <xsl:for-each select="//descGroup">
369 <xsl:if test="@id and (@title or desc)">
370 <xsl:value-of select="concat('/** @defgroup ',@id,' ',@title)"/>
371 <xsl:apply-templates select="desc" mode="middle"/>
372 <xsl:text>&#x0A;*/&#x0A;</xsl:text>
373 </xsl:if>
374 </xsl:for-each>
375
376 <!-- everything else -->
377 <xsl:apply-templates select="*[not(self::desc)]"/>
378
379</xsl:template>
380
381
382<!--
383 * accept all <if>s
384-->
385<xsl:template match="if">
386 <xsl:apply-templates/>
387</xsl:template>
388
389
390<!--
391 * cpp_quote (ignore)
392-->
393<xsl:template match="cpp">
394</xsl:template>
395
396
397<!--
398 * #ifdef statement (@if attribute)
399-->
400<xsl:template match="@if" mode="begin">
401 <xsl:text>#if </xsl:text>
402 <xsl:value-of select="."/>
403 <xsl:text>&#x0A;</xsl:text>
404</xsl:template>
405<xsl:template match="@if" mode="end">
406 <xsl:text>#endif&#x0A;</xsl:text>
407</xsl:template>
408
409
410<!--
411 * libraries
412-->
413<xsl:template match="library">
414 <!-- result codes -->
415 <xsl:for-each select="result">
416 <xsl:apply-templates select="."/>
417 </xsl:for-each>
418 <!-- all enums go first -->
419 <xsl:apply-templates select="enum | if/enum"/>
420 <!-- everything else but result codes and enums -->
421 <xsl:apply-templates select="*[not(self::result or self::enum) and
422 not(self::if[result] or self::if[enum])]"/>
423</xsl:template>
424
425
426<!--
427 * result codes
428-->
429<xsl:template match="result">
430 <xsl:apply-templates select="@if" mode="begin"/>
431 <xsl:apply-templates select="desc"/>
432 <xsl:value-of select="concat('const HRESULT ',@name,' = ',@value,';')"/>
433 <xsl:text>&#x0A;</xsl:text>
434 <xsl:apply-templates select="@if" mode="end"/>
435</xsl:template>
436
437
438<!--
439 * interfaces
440-->
441<xsl:template match="interface">
442 <xsl:apply-templates select="desc"/>
443 <xsl:text>interface </xsl:text>
444 <xsl:value-of select="@name"/>
445 <xsl:text> : </xsl:text>
446 <xsl:value-of select="@extends"/>
447 <xsl:text>&#x0A;{&#x0A;</xsl:text>
448 <!-- attributes (properties) -->
449 <xsl:apply-templates select="attribute"/>
450 <!-- methods -->
451 <xsl:apply-templates select="method"/>
452 <!-- 'if' enclosed elements, unsorted -->
453 <xsl:apply-templates select="if"/>
454 <!-- -->
455 <xsl:text>}; /* interface </xsl:text>
456 <xsl:value-of select="@name"/>
457 <xsl:text> */&#x0A;&#x0A;</xsl:text>
458</xsl:template>
459
460
461<!--
462 * attributes
463-->
464<xsl:template match="interface//attribute">
465 <xsl:apply-templates select="@if" mode="begin"/>
466 <xsl:apply-templates select="desc"/>
467 <xsl:text> </xsl:text>
468 <xsl:if test="@readonly='yes'">
469 <xsl:text>readonly </xsl:text>
470 </xsl:if>
471 <xsl:text>attribute </xsl:text>
472 <xsl:apply-templates select="@type"/>
473 <xsl:text> </xsl:text>
474 <xsl:value-of select="@name"/>
475 <xsl:text>;&#x0A;</xsl:text>
476 <xsl:apply-templates select="@if" mode="end"/>
477 <xsl:text>&#x0A;</xsl:text>
478</xsl:template>
479
480<!--
481 * methods
482-->
483<xsl:template match="interface//method">
484 <xsl:apply-templates select="@if" mode="begin"/>
485 <xsl:apply-templates select="desc"/>
486 <xsl:text> void </xsl:text>
487 <xsl:value-of select="@name"/>
488 <xsl:if test="param">
489 <xsl:text> (&#x0A;</xsl:text>
490 <xsl:for-each select="param [position() != last()]">
491 <xsl:text> </xsl:text>
492 <xsl:apply-templates select="."/>
493 <xsl:text>,&#x0A;</xsl:text>
494 </xsl:for-each>
495 <xsl:text> </xsl:text>
496 <xsl:apply-templates select="param [last()]"/>
497 <xsl:text>&#x0A; );&#x0A;</xsl:text>
498 </xsl:if>
499 <xsl:if test="not(param)">
500 <xsl:text>();&#x0A;</xsl:text>
501 </xsl:if>
502 <xsl:apply-templates select="@if" mode="end"/>
503 <xsl:text>&#x0A;</xsl:text>
504</xsl:template>
505
506
507<!--
508 * co-classes
509-->
510<xsl:template match="module/class">
511 <!-- class and contract id: later -->
512 <!-- CLSID_xxx declarations for XPCOM, for compatibility with Win32: later -->
513</xsl:template>
514
515
516<!--
517 * enums
518-->
519<xsl:template match="enum">
520 <xsl:apply-templates select="desc"/>
521 <xsl:text>enum </xsl:text>
522 <xsl:value-of select="@name"/>
523 <xsl:text>&#x0A;{&#x0A;</xsl:text>
524 <xsl:for-each select="const">
525 <xsl:apply-templates select="desc"/>
526 <xsl:text> </xsl:text>
527 <xsl:value-of select="../@name"/>
528 <xsl:text>_</xsl:text>
529 <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>
530 <xsl:text>,&#x0A;</xsl:text>
531 </xsl:for-each>
532 <xsl:text>};&#x0A;&#x0A;</xsl:text>
533</xsl:template>
534
535
536<!--
537 * method parameters
538-->
539<xsl:template match="method/param">
540 <xsl:choose>
541 <xsl:when test="@dir='in'">in </xsl:when>
542 <xsl:when test="@dir='out'">out </xsl:when>
543 <xsl:when test="@dir='return'">[retval] out </xsl:when>
544 <xsl:otherwise>in</xsl:otherwise>
545 </xsl:choose>
546 <xsl:apply-templates select="@type"/>
547 <xsl:text> </xsl:text>
548 <xsl:value-of select="@name"/>
549</xsl:template>
550
551
552<!--
553 * attribute/parameter type conversion
554-->
555<xsl:template match="attribute/@type | param/@type">
556 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/>
557
558 <xsl:choose>
559 <!-- modifiers (ignored for 'enumeration' attributes)-->
560 <xsl:when test="name(current())='type' and ../@mod">
561 <xsl:choose>
562 <xsl:when test="../@mod='ptr'">
563 <xsl:choose>
564 <!-- standard types -->
565 <!--xsl:when test=".='result'">??</xsl:when-->
566 <xsl:when test=".='boolean'">booleanPtr</xsl:when>
567 <xsl:when test=".='octet'">octetPtr</xsl:when>
568 <xsl:when test=".='short'">shortPtr</xsl:when>
569 <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
570 <xsl:when test=".='long'">longPtr</xsl:when>
571 <xsl:when test=".='long long'">llongPtr</xsl:when>
572 <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
573 <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
574 <xsl:otherwise>
575 <xsl:message terminate="yes">
576 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
577 <xsl:text>attribute 'mod=</xsl:text>
578 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
579 <xsl:text>' cannot be used with type </xsl:text>
580 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
581 </xsl:message>
582 </xsl:otherwise>
583 </xsl:choose>
584 </xsl:when>
585 <xsl:when test="../@mod='string'">
586 <xsl:choose>
587 <!-- standard types -->
588 <!--xsl:when test=".='result'">??</xsl:when-->
589 <xsl:when test=".='uuid'">wstringUUID</xsl:when>
590 <xsl:otherwise>
591 <xsl:message terminate="yes">
592 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
593 <xsl:text>attribute 'mod=</xsl:text>
594 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
595 <xsl:text>' cannot be used with type </xsl:text>
596 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
597 </xsl:message>
598 </xsl:otherwise>
599 </xsl:choose>
600 </xsl:when>
601 <xsl:otherwise>
602 <xsl:message terminate="yes">
603 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
604 <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
605 <xsl:text>of attribute 'mod' is invalid!</xsl:text>
606 </xsl:message>
607 </xsl:otherwise>
608 </xsl:choose>
609 </xsl:when>
610 <!-- no modifiers -->
611 <xsl:otherwise>
612 <xsl:choose>
613 <!-- standard types -->
614 <xsl:when test=".='result'">result</xsl:when>
615 <xsl:when test=".='boolean'">boolean</xsl:when>
616 <xsl:when test=".='octet'">octet</xsl:when>
617 <xsl:when test=".='short'">short</xsl:when>
618 <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
619 <xsl:when test=".='long'">long</xsl:when>
620 <xsl:when test=".='long long'">long long</xsl:when>
621 <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
622 <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
623 <xsl:when test=".='char'">char</xsl:when>
624 <xsl:when test=".='wchar'">wchar</xsl:when>
625 <xsl:when test=".='string'">string</xsl:when>
626 <xsl:when test=".='wstring'">wstring</xsl:when>
627 <!-- UUID type -->
628 <xsl:when test=".='uuid'">uuid</xsl:when>
629 <!-- system interface types -->
630 <xsl:when test=".='$unknown'">$unknown</xsl:when>
631 <xsl:otherwise>
632 <xsl:choose>
633 <!-- enum types -->
634 <xsl:when test="
635 (ancestor::library/enum[@name=current()]) or
636 (ancestor::library/if[@target=$self_target]/enum[@name=current()])
637 ">
638 <xsl:value-of select="."/>
639 </xsl:when>
640 <!-- custom interface types -->
641 <xsl:when test="
642 ((ancestor::library/interface[@name=current()]) or
643 (ancestor::library/if[@target=$self_target]/interface[@name=current()])
644 )
645 ">
646 <xsl:value-of select="."/>
647 </xsl:when>
648 <!-- other types -->
649 <xsl:otherwise>
650 <xsl:message terminate="yes">
651 <xsl:text>Unknown parameter type: </xsl:text>
652 <xsl:value-of select="."/>
653 </xsl:message>
654 </xsl:otherwise>
655 </xsl:choose>
656 </xsl:otherwise>
657 </xsl:choose>
658 </xsl:otherwise>
659 </xsl:choose>
660 <xsl:if test="../@safearray='yes'">
661 <xsl:text>[]</xsl:text>
662 </xsl:if>
663</xsl:template>
664
665</xsl:stylesheet>
666
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