Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / libedataserver / e-data-server-util.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2003 Novell Inc.
4  *
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.
8  *
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.
13  *
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.
18  *
19  * Authors: Rodrigo Moya <rodrigo@ximian.com>
20  */
21
22 #ifndef __E_DATA_SERVER_UTIL_H__
23 #define __E_DATA_SERVER_UTIL_H__
24
25 #include <pthread.h>
26 #include <sys/types.h>
27 #include <glib/gmacros.h>
28 #include <glib/gtypes.h>
29 #include <glib/gunicode.h>
30
31 G_BEGIN_DECLS
32
33 struct tm;
34
35 #ifndef EDS_DISABLE_DEPRECATED
36 G_GNUC_DEPRECATED
37 int          e_util_mkdir_hier (const char *path, mode_t mode);
38 #endif
39
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);
47
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);
50
51 #ifdef G_OS_WIN32
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);
56 #endif
57
58 G_END_DECLS
59
60 #endif