~ubuntu-branches/ubuntu/natty/empathy/natty-updates

« back to all changes in this revision

Viewing changes to tools/glib-errors-enum-header.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons
  • Date: 2008-03-10 16:39:07 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080310163907-tv41g2zmf0qqgi85
Tags: 0.22.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- Stylesheet to extract GLib error enumerations from the Telepathy spec.
 
2
The master copy of this stylesheet is in telepathy-glib - please make any
 
3
changes there.
 
4
 
 
5
Copyright (C) 2006, 2007 Collabora Limited
 
6
 
 
7
This library is free software; you can redistribute it and/or
 
8
modify it under the terms of the GNU Lesser General Public
 
9
License as published by the Free Software Foundation; either
 
10
version 2.1 of the License, or (at your option) any later version.
 
11
 
 
12
This library is distributed in the hope that it will be useful,
 
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
Lesser General Public License for more details.
 
16
 
 
17
You should have received a copy of the GNU Lesser General Public
 
18
License along with this library; if not, write to the Free Software
 
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
-->
 
21
 
 
22
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
23
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
 
24
  exclude-result-prefixes="tp">
 
25
 
 
26
  <xsl:output method="text" indent="no" encoding="ascii"/>
 
27
 
 
28
  <xsl:template match="tp:error" mode="gtkdoc">
 
29
 * @TP_ERROR_<xsl:value-of select="translate(@name, 'abcdefghijklmnopqrstuvwxyz .', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>: <xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/>:
 
30
 * <xsl:value-of select="translate(tp:docstring, '&#13;&#10;', '')"/>
 
31
  </xsl:template>
 
32
 
 
33
  <xsl:template match="tp:error" mode="enum">
 
34
<xsl:text>    TP_ERROR_</xsl:text><xsl:value-of select="translate(@name, 'abcdefghijklmnopqrstuvwxyz .', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>,
 
35
</xsl:template>
 
36
 
 
37
  <xsl:template match="text()"/>
 
38
 
 
39
  <xsl:template match="//tp:errors">/* Generated from the Telepathy spec
 
40
 
 
41
<xsl:for-each select="tp:copyright">
 
42
<xsl:value-of select="."/><xsl:text>
 
43
</xsl:text></xsl:for-each><xsl:text>
 
44
</xsl:text><xsl:value-of select="tp:license"/>
 
45
*/
 
46
 
 
47
#include &lt;glib-object.h&gt;
 
48
 
 
49
G_BEGIN_DECLS
 
50
 
 
51
GType tp_error_get_type (void);
 
52
 
 
53
/**
 
54
 * TP_TYPE_ERROR:
 
55
 *
 
56
 * The GType of the Telepathy error enumeration.
 
57
 */
 
58
#define TP_TYPE_ERROR (tp_error_get_type())
 
59
 
 
60
/**
 
61
 * TpError:<xsl:apply-templates select="tp:error" mode="gtkdoc"/>
 
62
 *
 
63
 * Enumerated type representing the Telepathy D-Bus errors.
 
64
 */
 
65
typedef enum {
 
66
<xsl:apply-templates select="tp:error" mode="enum"/>} TpError;
 
67
 
 
68
G_END_DECLS
 
69
</xsl:template>
 
70
 
 
71
</xsl:stylesheet>
 
72
 
 
73
<!-- vim:set sw=2 sts=2 et noai noci: -->