1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2003 Novell Inc.
5 * This library 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 library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 * Authors: Rodrigo Moya <rodrigo@ximian.com>
22 #ifndef __E_DATA_SERVER_UTIL_H__
23 #define __E_DATA_SERVER_UTIL_H__
26 #include <sys/types.h>
27 #include <glib/gmacros.h>
28 #include <glib/gtypes.h>
29 #include <glib/gunicode.h>
35 #ifndef EDS_DISABLE_DEPRECATED
37 int e_util_mkdir_hier (const char *path, mode_t mode);
40 gchar *e_util_strstrcase (const gchar *haystack, const gchar *needle);
41 gchar *e_util_unicode_get_utf8 (const gchar *text, gunichar *out);
42 const gchar *e_util_utf8_strstrcase (const gchar *haystack, const gchar *needle);
43 const gchar *e_util_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle);
44 int e_util_utf8_strcasecmp (const gchar *s1, const gchar *s2);
45 guint64 e_util_pthread_id (pthread_t t);
46 void e_filename_make_safe (gchar *string);
48 size_t e_utf8_strftime(char *s, size_t max, const char *fmt, const struct tm *tm);
49 size_t e_strftime(char *s, size_t max, const char *fmt, const struct tm *tm);
52 const char *e_util_get_prefix (void) G_GNUC_CONST;
53 const char *e_util_get_cp_prefix (void) G_GNUC_CONST;
54 const char *e_util_get_localedir (void) G_GNUC_CONST;
55 char *e_util_replace_prefix (const char *configure_time_prefix, const char *runtime_prefix, const char *configure_time_path);