| 1 |
/* |
| 2 |
* Copyright © 2007 Keith Packard |
| 3 |
* |
| 4 |
* Permission to use, copy, modify, distribute, and sell this software and its |
| 5 |
* documentation for any purpose is hereby granted without fee, provided that |
| 6 |
* the above copyright notice appear in all copies and that both that copyright |
| 7 |
* notice and this permission notice appear in supporting documentation, and |
| 8 |
* that the name of the copyright holders not be used in advertising or |
| 9 |
* publicity pertaining to distribution of the software without specific, |
| 10 |
* written prior permission. The copyright holders make no representations |
| 11 |
* about the suitability of this software for any purpose. It is provided "as |
| 12 |
* is" without express or implied warranty. |
| 13 |
* |
| 14 |
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 15 |
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
| 16 |
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 17 |
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
| 18 |
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 19 |
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
| 20 |
* OF THIS SOFTWARE. |
| 21 |
*/ |
| 22 |
|
| 23 |
@RET@ FcBool |
| 24 |
@FUNC@ FcDirCacheUnlink |
| 25 |
@TYPE1@ const FcChar8 * @ARG1@ dir |
| 26 |
@TYPE2@ FcConfig * @ARG2@ config |
| 27 |
@PURPOSE@ Remove all caches related to <parameter>dir</parameter> |
| 28 |
@DESC@ |
| 29 |
Scans the cache directories in <parameter>config</parameter>, removing any |
| 30 |
instances of the cache file for <parameter>dir</parameter>. Returns FcFalse |
| 31 |
when some internal error occurs (out of memory, etc). Errors actually |
| 32 |
unlinking any files are ignored. |
| 33 |
@@ |
| 34 |
|
| 35 |
@RET@ FcBool |
| 36 |
@FUNC@ FcDirCacheValid |
| 37 |
@TYPE1@ const FcChar8 * @ARG1@ dir |
| 38 |
@PURPOSE@ check directory cache |
| 39 |
@DESC@ |
| 40 |
Returns FcTrue if <parameter>dir</parameter> has an associated valid cache |
| 41 |
file, else returns FcFalse |
| 42 |
@@ |
| 43 |
|
| 44 |
@RET@ FcCache * |
| 45 |
@FUNC@ FcDirCacheLoad |
| 46 |
@TYPE1@ const FcChar8 * @ARG1@ dir |
| 47 |
@TYPE2@ FcConfig * @ARG2@ config |
| 48 |
@TYPE3@ FcChar8 ** @ARG3@ cache_file |
| 49 |
@PURPOSE@ load a directory cache |
| 50 |
@DESC@ |
| 51 |
Loads the cache related to <parameter>dir</parameter>. If no cache file |
| 52 |
exists, returns NULL. The name of the cache file is returned in |
| 53 |
<parameter>cache_file</parameter>, unless that is NULL. See also |
| 54 |
FcDirCacheRead. |
| 55 |
@@ |
| 56 |
|
| 57 |
@RET@ FcCache * |
| 58 |
@FUNC@ FcDirCacheRescan |
| 59 |
@TYPE1@ const FcChar8 * @ARG1@ dir |
| 60 |
@TYPE2@ FcConfig * @ARG2@ config |
| 61 |
@PURPOSE@ Re-scan a directory cache |
| 62 |
@DESC@ |
| 63 |
Re-scan directories only at <parameter>dir</parameter> and update the cache. |
| 64 |
returns NULL if failed. |
| 65 |
@SINCE@ 2.11.1 |
| 66 |
@@ |
| 67 |
|
| 68 |
@RET@ FcCache * |
| 69 |
@FUNC@ FcDirCacheRead |
| 70 |
@TYPE1@ const FcChar8 * @ARG1@ dir |
| 71 |
@TYPE2@ FcBool% @ARG2@ force |
| 72 |
@TYPE3@ FcConfig * @ARG3@ config |
| 73 |
@PURPOSE@ read or construct a directory cache |
| 74 |
@DESC@ |
| 75 |
This returns a cache for <parameter>dir</parameter>. If |
| 76 |
<parameter>force</parameter> is FcFalse, then an existing, valid cache file |
| 77 |
will be used. Otherwise, a new cache will be created by scanning the |
| 78 |
directory and that returned. |
| 79 |
@@ |
| 80 |
|
| 81 |
@RET@ FcCache * |
| 82 |
@FUNC@ FcDirCacheLoadFile |
| 83 |
@TYPE1@ const FcChar8 * @ARG1@ cache_file |
| 84 |
@TYPE2@ struct stat * @ARG2@ file_stat |
| 85 |
@PURPOSE@ load a cache file |
| 86 |
@DESC@ |
| 87 |
This function loads a directory cache from |
| 88 |
<parameter>cache_file</parameter>. If <parameter>file_stat</parameter> is |
| 89 |
non-NULL, it will be filled with the results of stat(2) on the cache file. |
| 90 |
@@ |
| 91 |
|
| 92 |
@RET@ void |
| 93 |
@FUNC@ FcDirCacheUnload |
| 94 |
@TYPE1@ FcCache * @ARG1@ cache |
| 95 |
@PURPOSE@ unload a cache file |
| 96 |
@DESC@ |
| 97 |
This function dereferences <parameter>cache</parameter>. When no other |
| 98 |
references to it remain, all memory associated with the cache will be freed. |
| 99 |
@@ |