Imported Upstream version 2.13.1
[platform/upstream/fontconfig.git] / doc / fcdircache.sgml
1 <!--
2    fontconfig/doc/func.sgml
3   
4    Copyright © 2003 Keith Packard
5   
6    Permission to use, copy, modify, distribute, and sell this software and its
7    documentation for any purpose is hereby granted without fee, provided that
8    the above copyright notice appear in all copies and that both that
9    copyright notice and this permission notice appear in supporting
10    documentation, and that the name of the author(s) not be used in
11    advertising or publicity pertaining to distribution of the software without
12    specific, written prior permission.  The authors make no
13    representations about the suitability of this software for any purpose.  It
14    is provided "as is" without express or implied warranty.
15   
16    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22    PERFORMANCE OF THIS SOFTWARE.
23  -->
24     <refentry id="FcDirCacheUnlink">
25         <refmeta>
26             <refentrytitle>FcDirCacheUnlink</refentrytitle>
27             <manvolnum>3</manvolnum>
28             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
29         </refmeta>
30         <refnamediv>
31             <refname>FcDirCacheUnlink</refname>
32             <refpurpose>Remove all caches related to <parameter>dir</parameter></refpurpose>
33         </refnamediv>
34         <refsynopsisdiv>
35         <funcsynopsis>
36         <funcsynopsisinfo>
37 #include &lt;fontconfig/fontconfig.h&gt;
38         </funcsynopsisinfo>
39         <funcprototype>
40             <funcdef>FcBool <function>FcDirCacheUnlink</function></funcdef>
41                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
42                 <paramdef>FcConfig *<parameter>config</parameter></paramdef>
43         </funcprototype>
44         </funcsynopsis>
45         </refsynopsisdiv>
46         <refsect1><title>Description</title>
47             <para>
48 Scans the cache directories in <parameter>config</parameter>, removing any
49 instances of the cache file for <parameter>dir</parameter>. Returns FcFalse
50 when some internal error occurs (out of memory, etc). Errors actually
51 unlinking any files are ignored.
52             </para>
53         </refsect1>
54     </refentry>
55 <!--
56    fontconfig/doc/func.sgml
57   
58    Copyright © 2003 Keith Packard
59   
60    Permission to use, copy, modify, distribute, and sell this software and its
61    documentation for any purpose is hereby granted without fee, provided that
62    the above copyright notice appear in all copies and that both that
63    copyright notice and this permission notice appear in supporting
64    documentation, and that the name of the author(s) not be used in
65    advertising or publicity pertaining to distribution of the software without
66    specific, written prior permission.  The authors make no
67    representations about the suitability of this software for any purpose.  It
68    is provided "as is" without express or implied warranty.
69   
70    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
71    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
72    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
73    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
74    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
75    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
76    PERFORMANCE OF THIS SOFTWARE.
77  -->
78     <refentry id="FcDirCacheValid">
79         <refmeta>
80             <refentrytitle>FcDirCacheValid</refentrytitle>
81             <manvolnum>3</manvolnum>
82             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
83         </refmeta>
84         <refnamediv>
85             <refname>FcDirCacheValid</refname>
86             <refpurpose>check directory cache</refpurpose>
87         </refnamediv>
88         <refsynopsisdiv>
89         <funcsynopsis>
90         <funcsynopsisinfo>
91 #include &lt;fontconfig/fontconfig.h&gt;
92         </funcsynopsisinfo>
93         <funcprototype>
94             <funcdef>FcBool <function>FcDirCacheValid</function></funcdef>
95                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
96         </funcprototype>
97         </funcsynopsis>
98         </refsynopsisdiv>
99         <refsect1><title>Description</title>
100             <para>
101 Returns FcTrue if <parameter>dir</parameter> has an associated valid cache
102 file, else returns FcFalse
103             </para>
104         </refsect1>
105     </refentry>
106 <!--
107    fontconfig/doc/func.sgml
108   
109    Copyright © 2003 Keith Packard
110   
111    Permission to use, copy, modify, distribute, and sell this software and its
112    documentation for any purpose is hereby granted without fee, provided that
113    the above copyright notice appear in all copies and that both that
114    copyright notice and this permission notice appear in supporting
115    documentation, and that the name of the author(s) not be used in
116    advertising or publicity pertaining to distribution of the software without
117    specific, written prior permission.  The authors make no
118    representations about the suitability of this software for any purpose.  It
119    is provided "as is" without express or implied warranty.
120   
121    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
122    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
123    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
124    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
125    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
126    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
127    PERFORMANCE OF THIS SOFTWARE.
128  -->
129     <refentry id="FcDirCacheLoad">
130         <refmeta>
131             <refentrytitle>FcDirCacheLoad</refentrytitle>
132             <manvolnum>3</manvolnum>
133             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
134         </refmeta>
135         <refnamediv>
136             <refname>FcDirCacheLoad</refname>
137             <refpurpose>load a directory cache</refpurpose>
138         </refnamediv>
139         <refsynopsisdiv>
140         <funcsynopsis>
141         <funcsynopsisinfo>
142 #include &lt;fontconfig/fontconfig.h&gt;
143         </funcsynopsisinfo>
144         <funcprototype>
145             <funcdef>FcCache * <function>FcDirCacheLoad</function></funcdef>
146                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
147                 <paramdef>FcConfig *<parameter>config</parameter></paramdef>
148                 <paramdef>FcChar8 **<parameter>cache_file</parameter></paramdef>
149         </funcprototype>
150         </funcsynopsis>
151         </refsynopsisdiv>
152         <refsect1><title>Description</title>
153             <para>
154 Loads the cache related to <parameter>dir</parameter>. If no cache file
155 exists, returns NULL. The name of the cache file is returned in
156 <parameter>cache_file</parameter>, unless that is NULL. See also
157 FcDirCacheRead.
158             </para>
159         </refsect1>
160     </refentry>
161 <!--
162    fontconfig/doc/func.sgml
163   
164    Copyright © 2003 Keith Packard
165   
166    Permission to use, copy, modify, distribute, and sell this software and its
167    documentation for any purpose is hereby granted without fee, provided that
168    the above copyright notice appear in all copies and that both that
169    copyright notice and this permission notice appear in supporting
170    documentation, and that the name of the author(s) not be used in
171    advertising or publicity pertaining to distribution of the software without
172    specific, written prior permission.  The authors make no
173    representations about the suitability of this software for any purpose.  It
174    is provided "as is" without express or implied warranty.
175   
176    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
177    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
178    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
179    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
180    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
181    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
182    PERFORMANCE OF THIS SOFTWARE.
183  -->
184     <refentry id="FcDirCacheRescan">
185         <refmeta>
186             <refentrytitle>FcDirCacheRescan</refentrytitle>
187             <manvolnum>3</manvolnum>
188             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
189         </refmeta>
190         <refnamediv>
191             <refname>FcDirCacheRescan</refname>
192             <refpurpose>Re-scan a directory cache</refpurpose>
193         </refnamediv>
194         <refsynopsisdiv>
195         <funcsynopsis>
196         <funcsynopsisinfo>
197 #include &lt;fontconfig/fontconfig.h&gt;
198         </funcsynopsisinfo>
199         <funcprototype>
200             <funcdef>FcCache * <function>FcDirCacheRescan</function></funcdef>
201                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
202                 <paramdef>FcConfig *<parameter>config</parameter></paramdef>
203         </funcprototype>
204         </funcsynopsis>
205         </refsynopsisdiv>
206         <refsect1><title>Description</title>
207             <para>
208 Re-scan directories only at <parameter>dir</parameter> and update the cache.
209 returns NULL if failed.
210             </para>
211         </refsect1>
212         <refsect1><title>Since</title>
213             <para>version 2.11.1</para>
214         </refsect1>
215     </refentry>
216 <!--
217    fontconfig/doc/func.sgml
218   
219    Copyright © 2003 Keith Packard
220   
221    Permission to use, copy, modify, distribute, and sell this software and its
222    documentation for any purpose is hereby granted without fee, provided that
223    the above copyright notice appear in all copies and that both that
224    copyright notice and this permission notice appear in supporting
225    documentation, and that the name of the author(s) not be used in
226    advertising or publicity pertaining to distribution of the software without
227    specific, written prior permission.  The authors make no
228    representations about the suitability of this software for any purpose.  It
229    is provided "as is" without express or implied warranty.
230   
231    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
232    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
233    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
234    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
235    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
236    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
237    PERFORMANCE OF THIS SOFTWARE.
238  -->
239     <refentry id="FcDirCacheRead">
240         <refmeta>
241             <refentrytitle>FcDirCacheRead</refentrytitle>
242             <manvolnum>3</manvolnum>
243             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
244         </refmeta>
245         <refnamediv>
246             <refname>FcDirCacheRead</refname>
247             <refpurpose>read or construct a directory cache</refpurpose>
248         </refnamediv>
249         <refsynopsisdiv>
250         <funcsynopsis>
251         <funcsynopsisinfo>
252 #include &lt;fontconfig/fontconfig.h&gt;
253         </funcsynopsisinfo>
254         <funcprototype>
255             <funcdef>FcCache * <function>FcDirCacheRead</function></funcdef>
256                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
257                 <paramdef>FcBool <parameter>force</parameter></paramdef>
258                 <paramdef>FcConfig *<parameter>config</parameter></paramdef>
259         </funcprototype>
260         </funcsynopsis>
261         </refsynopsisdiv>
262         <refsect1><title>Description</title>
263             <para>
264 This returns a cache for <parameter>dir</parameter>. If
265 <parameter>force</parameter> is FcFalse, then an existing, valid cache file
266 will be used. Otherwise, a new cache will be created by scanning the
267 directory and that returned.
268             </para>
269         </refsect1>
270     </refentry>
271 <!--
272    fontconfig/doc/func.sgml
273   
274    Copyright © 2003 Keith Packard
275   
276    Permission to use, copy, modify, distribute, and sell this software and its
277    documentation for any purpose is hereby granted without fee, provided that
278    the above copyright notice appear in all copies and that both that
279    copyright notice and this permission notice appear in supporting
280    documentation, and that the name of the author(s) not be used in
281    advertising or publicity pertaining to distribution of the software without
282    specific, written prior permission.  The authors make no
283    representations about the suitability of this software for any purpose.  It
284    is provided "as is" without express or implied warranty.
285   
286    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
287    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
288    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
289    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
290    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
291    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
292    PERFORMANCE OF THIS SOFTWARE.
293  -->
294     <refentry id="FcDirCacheLoadFile">
295         <refmeta>
296             <refentrytitle>FcDirCacheLoadFile</refentrytitle>
297             <manvolnum>3</manvolnum>
298             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
299         </refmeta>
300         <refnamediv>
301             <refname>FcDirCacheLoadFile</refname>
302             <refpurpose>load a cache file</refpurpose>
303         </refnamediv>
304         <refsynopsisdiv>
305         <funcsynopsis>
306         <funcsynopsisinfo>
307 #include &lt;fontconfig/fontconfig.h&gt;
308         </funcsynopsisinfo>
309         <funcprototype>
310             <funcdef>FcCache * <function>FcDirCacheLoadFile</function></funcdef>
311                 <paramdef>const FcChar8 *<parameter>cache_file</parameter></paramdef>
312                 <paramdef>struct stat *<parameter>file_stat</parameter></paramdef>
313         </funcprototype>
314         </funcsynopsis>
315         </refsynopsisdiv>
316         <refsect1><title>Description</title>
317             <para>
318 This function loads a directory cache from
319 <parameter>cache_file</parameter>. If <parameter>file_stat</parameter> is
320 non-NULL, it will be filled with the results of stat(2) on the cache file.
321             </para>
322         </refsect1>
323     </refentry>
324 <!--
325    fontconfig/doc/func.sgml
326   
327    Copyright © 2003 Keith Packard
328   
329    Permission to use, copy, modify, distribute, and sell this software and its
330    documentation for any purpose is hereby granted without fee, provided that
331    the above copyright notice appear in all copies and that both that
332    copyright notice and this permission notice appear in supporting
333    documentation, and that the name of the author(s) not be used in
334    advertising or publicity pertaining to distribution of the software without
335    specific, written prior permission.  The authors make no
336    representations about the suitability of this software for any purpose.  It
337    is provided "as is" without express or implied warranty.
338   
339    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
340    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
341    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
342    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
343    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
344    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
345    PERFORMANCE OF THIS SOFTWARE.
346  -->
347     <refentry id="FcDirCacheUnload">
348         <refmeta>
349             <refentrytitle>FcDirCacheUnload</refentrytitle>
350             <manvolnum>3</manvolnum>
351             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
352         </refmeta>
353         <refnamediv>
354             <refname>FcDirCacheUnload</refname>
355             <refpurpose>unload a cache file</refpurpose>
356         </refnamediv>
357         <refsynopsisdiv>
358         <funcsynopsis>
359         <funcsynopsisinfo>
360 #include &lt;fontconfig/fontconfig.h&gt;
361         </funcsynopsisinfo>
362         <funcprototype>
363             <funcdef>void <function>FcDirCacheUnload</function></funcdef>
364                 <paramdef>FcCache *<parameter>cache</parameter></paramdef>
365         </funcprototype>
366         </funcsynopsis>
367         </refsynopsisdiv>
368         <refsect1><title>Description</title>
369             <para>
370 This function dereferences <parameter>cache</parameter>. When no other
371 references to it remain, all memory associated with the cache will be freed.
372             </para>
373         </refsect1>
374     </refentry>