1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2013 Intel Corporation
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.
9 * This program 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 * General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 * Author: Tristan Van Berkom <tristanvb@openismus.com>
21 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
22 #error "Only <libedataserver/libedataserver.h> should be included directly."
26 #include <libedataserver/e-source-enumtypes.h>
27 #include <libedataserver/e-data-server-util.h>
35 * An error domain for collation errors
39 #define E_COLLATOR_ERROR (e_collator_error_quark ())
41 #define E_TYPE_COLLATOR (e_collator_get_type ())
47 * @E_COLLATOR_ERROR_OPEN: An error occured trying to open a collator and access collation data.
48 * @E_COLLATOR_ERROR_CONVERSION: An error occurred converting character encodings
49 * @E_COLLATOR_ERROR_INVALID_LOCALE: A malformed locale name was given to e_collator_new()
51 * Errors from the #E_COLLATOR_ERROR domain.
54 E_COLLATOR_ERROR_OPEN,
55 E_COLLATOR_ERROR_CONVERSION,
56 E_COLLATOR_ERROR_INVALID_LOCALE
62 * An opaque object used for locale specific string comparisons
67 typedef struct _ECollator ECollator;
69 GType e_collator_get_type (void);
70 GQuark e_collator_error_quark (void);
71 ECollator *e_collator_new (const gchar *locale,
72 const gchar *collation_type,
74 ECollator *e_collator_ref (ECollator *collator);
75 void e_collator_unref (ECollator *collator);
76 gchar *e_collator_generate_key (ECollator *collator,
79 gboolean e_collator_collate (ECollator *collator,
87 #endif /* E_COLLATOR_H */