Warning, /pim/akonadi/src/core/kcfg2dbus.xsl is written in an unsupported language. File is not indexed.
0001 <!-- 0002 SPDX-FileCopyrightText: 2008 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 --> 0006 0007 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 0008 xmlns:kcfg="http://www.kde.org/standards/kcfg/1.0" 0009 xmlns="http://www.kde.org/standards/kcfg/1.0"> 0010 0011 <xsl:param name="code">interfaceName</xsl:param> 0012 0013 <xsl:template match="/"> 0014 <node> 0015 <interface> 0016 <xsl:attribute name="name"><xsl:value-of select="$interfaceName"/></xsl:attribute> 0017 <method> 0018 <xsl:attribute name="name">save</xsl:attribute> 0019 </method> 0020 <xsl:for-each select="kcfg:kcfg/kcfg:group/kcfg:entry"> 0021 <xsl:variable name="annotation"><xsl:call-template name="typeAnnotation"/></xsl:variable> 0022 <method> 0023 <xsl:attribute name="name"> 0024 <xsl:value-of select="concat(translate(substring(@name,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), substring(@name,2))"/> 0025 </xsl:attribute> 0026 <arg direction="out"> 0027 <xsl:attribute name="type"><xsl:call-template name="convertType"/></xsl:attribute> 0028 </arg> 0029 <xsl:if test="$annotation != ''"> 0030 <annotation name="org.qtproject.QtDBus.QtTypeName.Out0"> 0031 <xsl:attribute name="value"><xsl:value-of select="$annotation"/></xsl:attribute> 0032 </annotation> 0033 </xsl:if> 0034 </method> 0035 <method> 0036 <xsl:attribute name="name"> 0037 <xsl:value-of select="concat( 'set', concat(translate(substring(@name,1,1),'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring(@name,2)) )"/> 0038 </xsl:attribute> 0039 <arg direction="in" identifier="value"> 0040 <xsl:attribute name="type"><xsl:call-template name="convertType"/></xsl:attribute> 0041 </arg> 0042 <xsl:if test="$annotation != ''"> 0043 <annotation name="org.qtproject.QtDBus.QtTypeName.In0"> 0044 <xsl:attribute name="value"><xsl:value-of select="$annotation"/></xsl:attribute> 0045 </annotation> 0046 </xsl:if> 0047 </method> 0048 </xsl:for-each> 0049 </interface> 0050 </node> 0051 </xsl:template> 0052 0053 <xsl:template name="convertType"> 0054 <xsl:choose> 0055 <xsl:when test="@type = 'String'">s</xsl:when> 0056 <xsl:when test="@type = 'StringList'">as</xsl:when> 0057 <xsl:when test="@type = 'Font'">?</xsl:when> 0058 <xsl:when test="@type = 'Rect'">(iiii)</xsl:when> 0059 <xsl:when test="@type = 'Size'">(ii)</xsl:when> 0060 <xsl:when test="@type = 'Color'">?</xsl:when> 0061 <xsl:when test="@type = 'Point'">(ii)</xsl:when> 0062 <xsl:when test="@type = 'Int'">i</xsl:when> 0063 <xsl:when test="@type = 'UInt'">u</xsl:when> 0064 <xsl:when test="@type = 'Bool'">b</xsl:when> 0065 <xsl:when test="@type = 'Double'">d</xsl:when> 0066 <xsl:when test="@type = 'DateTime'">((iii)(iiii)i)</xsl:when> 0067 <xsl:when test="@type = 'LongLong'">x</xsl:when> 0068 <xsl:when test="@type = 'ULongLong'">t</xsl:when> 0069 <xsl:when test="@type = 'IntList'">ai</xsl:when> 0070 <xsl:when test="@type = 'Enum'">i</xsl:when> 0071 <xsl:when test="@type = 'Path'">s</xsl:when> 0072 <xsl:when test="@type = 'PathList'">as</xsl:when> 0073 <xsl:when test="@type = 'Password'">s</xsl:when> 0074 <xsl:when test="@type = 'Url'">s</xsl:when> 0075 <xsl:when test="@type = 'UrlList'">as</xsl:when> 0076 <xsl:otherwise>v</xsl:otherwise> 0077 </xsl:choose> 0078 </xsl:template> 0079 0080 <xsl:template name="typeAnnotation"> 0081 <xsl:choose> 0082 <xsl:when test="@type = 'Rect'">QRect</xsl:when> 0083 <xsl:when test="@type = 'Size'">QSize</xsl:when> 0084 <xsl:when test="@type = 'Point'">QPoint</xsl:when> 0085 <xsl:when test="@type = 'DateTime'">QDateTime</xsl:when> 0086 <xsl:when test="@type = 'IntList'">QList<int></xsl:when> 0087 <xsl:otherwise></xsl:otherwise> 0088 </xsl:choose> 0089 </xsl:template> 0090 0091 </xsl:stylesheet>