add 'set language function', fontlist, fontsize with buf fix.
[platform/framework/native/tizen-config-fw.git] / plugin_model / config_header.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
5 <xsl:strip-space elements="*"/>
6 <xsl:template match="/">
7 /*
8  * config-header.h
9  *
10  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
11  *
12  * Contact: MyoungJun Park &lt;email at samsung.com&gt;
13  *
14  * Licensed under the Apache License, Version 2.0 (the "License");
15  * you may not use this file except in compliance with the License.
16  * You may obtain a copy of the License at
17  *
18  * http://www.apache.org/licenses/LICENSE-2.0
19  *
20  * Unless required by applicable law or agreed to in writing, software
21  * distributed under the License is distributed on an "AS IS" BASIS,
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  * See the License for the specific language governing permissions and
24  * limitations under the License.
25  *
26  */
27 #ifndef bool
28 typedef int bool;
29 #ifndef true
30 #define true 1
31 #endif
32 #ifndef false
33 #define false 0
34 #endif
35 #endif
36 <xsl:apply-templates select="configlists/config"></xsl:apply-templates>
37 </xsl:template>
38
39 <xsl:template match="config">
40 char* <xsl:value-of select="./@name"/>_plugin_path();<xsl:text>&#xa;</xsl:text>
41 <xsl:apply-templates select="plugin/function"></xsl:apply-templates>
42 </xsl:template>
43 <xsl:template match="function">
44
45 <xsl:choose>
46         <xsl:when test="../../@type='string'">
47 <!-- begin choose STRING-->
48 <xsl:choose>
49         <xsl:when test="./@type='init'">
50 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
51                 </xsl:when>
52
53         <xsl:when test="./@type='destroy'">
54 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
55                 </xsl:when>
56
57         <xsl:when test="./@type='get'">
58 char* <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key);<xsl:text>&#xa;</xsl:text>
59                 </xsl:when>
60
61         <xsl:when test="./@type='set'">
62 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, char* value);<xsl:text>&#xa;</xsl:text>
63 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
64                 </xsl:when>
65
66         <xsl:when test="./@type='list'">
67 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, char* value);<xsl:text>&#xa;</xsl:text>
68 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>_list(char* key, void (*callback)(int,void* , void*), void* data);<xsl:text>&#xa;</xsl:text>
69 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
70                 </xsl:when>
71
72 </xsl:choose>
73 <!-- end choose STRING-->
74         </xsl:when>
75         <xsl:when test="../../@type='int'">
76 <!-- begin choose INT-->
77 <xsl:choose>
78         <xsl:when test="./@type='init'">
79 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
80                 </xsl:when>
81
82         <xsl:when test="./@type='destroy'">
83 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
84                 </xsl:when>
85
86         <xsl:when test="./@type='get'">
87 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key);<xsl:text>&#xa;</xsl:text>
88                 </xsl:when>
89
90         <xsl:when test="./@type='set'">
91 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, int value);<xsl:text>&#xa;</xsl:text>
92 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
93                 </xsl:when>
94 </xsl:choose>
95 <!-- end choose INT -->
96         </xsl:when>
97         <xsl:when test="../../@type='bool'">
98 <!-- begin choose BOOL -->
99 <xsl:choose>
100         <xsl:when test="./@type='init'">
101 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
102                 </xsl:when>
103
104         <xsl:when test="./@type='destroy'">
105 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
106                 </xsl:when>
107
108         <xsl:when test="./@type='get'">
109 bool <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key);<xsl:text>&#xa;</xsl:text>
110                 </xsl:when>
111
112         <xsl:when test="./@type='set'">
113 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, bool value);<xsl:text>&#xa;</xsl:text>
114 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
115                 </xsl:when>
116 </xsl:choose>
117 <!-- end choose BOOL -->
118         </xsl:when>
119
120         <xsl:when test="../../@type='float'">
121 <!-- begin choose FLOAT -->
122 <xsl:choose>
123         <xsl:when test="./@type='init'">
124 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
125                 </xsl:when>
126
127         <xsl:when test="./@type='destroy'">
128 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
129                 </xsl:when>
130
131         <xsl:when test="./@type='get'">
132 float <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key);<xsl:text>&#xa;</xsl:text>
133                 </xsl:when>
134
135         <xsl:when test="./@type='set'">
136 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, float value);<xsl:text>&#xa;</xsl:text>
137 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
138                 </xsl:when>
139 </xsl:choose>
140 <!-- end choose FLOAT -->
141         </xsl:when>
142
143         <!--
144         <xsl:when test="../../@type='list'">
145 <xsl:choose>
146         <xsl:when test="./@type='init'">
147 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
148                 </xsl:when>
149
150         <xsl:when test="./@type='destroy'">
151 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>();<xsl:text>&#xa;</xsl:text>
152                 </xsl:when>
153
154         <xsl:when test="./@type='get'">
155 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>_list(char* key, void (*callback)(int,void* , void*), void* data);<xsl:text>&#xa;</xsl:text>
156                 </xsl:when>
157
158 int <xsl:value-of select="../../@name"/>_<xsl:value-of select="./@type"/>(char* key, float value);<xsl:text>&#xa;</xsl:text>
159 <xsl:text>&#xa;</xsl:text><xsl:text>&#xa;</xsl:text>
160                 </xsl:when>
161 </xsl:choose>
162         </xsl:when>
163         -->
164
165 </xsl:choose>
166
167 </xsl:template>
168 </xsl:stylesheet>
169
170
171