1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2013 Intel Corporation
5 * This library is free software: you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Tristan Van Berkom <tristanvb@openismus.com>
20 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
21 #error "Only <libedataserver/libedataserver.h> should be included directly."
25 #include <libedataserver/e-source-enumtypes.h>
26 #include <libedataserver/e-data-server-util.h>
34 * An error domain for collation errors
38 #define E_COLLATOR_ERROR (e_collator_error_quark ())
40 #define E_TYPE_COLLATOR (e_collator_get_type ())
46 * @E_COLLATOR_ERROR_OPEN: An error occured trying to open a collator and access collation data.
47 * @E_COLLATOR_ERROR_CONVERSION: An error occurred converting character encodings
48 * @E_COLLATOR_ERROR_INVALID_LOCALE: A malformed locale name was given to e_collator_new()
50 * Errors from the #E_COLLATOR_ERROR domain.
53 E_COLLATOR_ERROR_OPEN
,
54 E_COLLATOR_ERROR_CONVERSION
,
55 E_COLLATOR_ERROR_INVALID_LOCALE
61 * An opaque object used for locale specific string comparisons
66 typedef struct _ECollator ECollator
;
68 GType
e_collator_get_type (void);
69 GQuark
e_collator_error_quark (void);
70 ECollator
*e_collator_new (const gchar
*locale
,
72 ECollator
*e_collator_new_interpret_country
76 ECollator
*e_collator_ref (ECollator
*collator
);
77 void e_collator_unref (ECollator
*collator
);
78 gchar
*e_collator_generate_key (ECollator
*collator
,
81 gchar
*e_collator_generate_key_for_index
84 gboolean
e_collator_collate (ECollator
*collator
,
89 const gchar
*const *e_collator_get_index_labels (ECollator
*collator
,
94 gint
e_collator_get_index (ECollator
*collator
,
99 #endif /* E_COLLATOR_H */