2
* Copyright (C) 1999, 2000 Red Hat Inc.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef GCONF_GCONF_LOCALE_H
21
#define GCONF_GCONF_LOCALE_H
27
#endif /* __cplusplus */
30
* This thing caches the fallback list for a locale string.
32
typedef struct _GConfLocaleCache GConfLocaleCache;
34
GConfLocaleCache* gconf_locale_cache_new (void);
35
void gconf_locale_cache_free (GConfLocaleCache* cache);
36
void gconf_locale_cache_expire (GConfLocaleCache* cache,
37
/* >= max_age is deleted */
38
guint max_age_exclusive_in_seconds);
41
/* This API is annoying, but hey it's all GConf internal. No users will see it.
42
We need it for thread safety without the penalty of copying a string vector
43
every time we get the fallback list.
46
typedef struct _GConfLocaleList GConfLocaleList;
48
struct _GConfLocaleList {
52
void gconf_locale_list_ref (GConfLocaleList* list);
53
void gconf_locale_list_unref (GConfLocaleList* list);
55
/* for thread safety, this is going to increment the reference count
56
on the locale list. You must unref() when done. This automatically
57
adds a cache entry if necessary. locale may be NULL, in which case
58
it just gets converted to "C"
60
GConfLocaleList* gconf_locale_cache_get_list (GConfLocaleCache* cache,
63
/* Use this if you don't care about the locale cache */
64
gchar** gconf_split_locale (const gchar* locale);
68
#endif /* __cplusplus */