1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/gconvert.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/gconvert.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,137 @@
1.4 -gconvert.h
1.5 +/* GLIB - Library of useful routines for C programming
1.6 + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
1.7 + * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
1.8 + *
1.9 + * This library is free software; you can redistribute it and/or
1.10 + * modify it under the terms of the GNU Lesser General Public
1.11 + * License as published by the Free Software Foundation; either
1.12 + * version 2 of the License, or (at your option) any later version.
1.13 + *
1.14 + * This library is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.17 + * Lesser General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU Lesser General Public
1.20 + * License along with this library; if not, write to the
1.21 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1.22 + * Boston, MA 02111-1307, USA.
1.23 + */
1.24 +
1.25 +/*
1.26 + * Modified by the GLib Team and others 1997-2000. See the AUTHORS
1.27 + * file for a list of people on the GLib Team. See the ChangeLog
1.28 + * files for a list of changes. These files are distributed with
1.29 + * GLib at ftp://ftp.gtk.org/pub/gtk/.
1.30 + */
1.31 +
1.32 +#ifndef __G_CONVERT_H__
1.33 +#define __G_CONVERT_H__
1.34 +
1.35 +#include <_ansi.h>
1.36 +#include <stddef.h> /* For size_t */
1.37 +#include <glib/gerror.h>
1.38 +
1.39 +G_BEGIN_DECLS
1.40 +
1.41 +typedef enum
1.42 +{
1.43 + G_CONVERT_ERROR_NO_CONVERSION,
1.44 + G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
1.45 + G_CONVERT_ERROR_FAILED,
1.46 + G_CONVERT_ERROR_PARTIAL_INPUT,
1.47 + G_CONVERT_ERROR_BAD_URI,
1.48 + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
1.49 +} GConvertError;
1.50 +
1.51 +#define G_CONVERT_ERROR g_convert_error_quark()
1.52 +IMPORT_C GQuark g_convert_error_quark (void);
1.53 +
1.54 +/* Thin wrappers around iconv
1.55 + */
1.56 +typedef struct _GIConv *GIConv;
1.57 +
1.58 +IMPORT_C GIConv g_iconv_open (const gchar *to_codeset,
1.59 + const gchar *from_codeset);
1.60 +IMPORT_C size_t g_iconv (GIConv converter,
1.61 + gchar **inbuf,
1.62 + gsize *inbytes_left,
1.63 + gchar **outbuf,
1.64 + gsize *outbytes_left);
1.65 +IMPORT_C gint g_iconv_close (GIConv converter);
1.66 +
1.67 +
1.68 +IMPORT_C gchar* g_convert (const gchar *str,
1.69 + gssize len,
1.70 + const gchar *to_codeset,
1.71 + const gchar *from_codeset,
1.72 + gsize *bytes_read,
1.73 + gsize *bytes_written,
1.74 + GError **error) G_GNUC_MALLOC;
1.75 +IMPORT_C gchar* g_convert_with_iconv (const gchar *str,
1.76 + gssize len,
1.77 + GIConv converter,
1.78 + gsize *bytes_read,
1.79 + gsize *bytes_written,
1.80 + GError **error) G_GNUC_MALLOC;
1.81 +IMPORT_C gchar* g_convert_with_fallback (const gchar *str,
1.82 + gssize len,
1.83 + const gchar *to_codeset,
1.84 + const gchar *from_codeset,
1.85 + gchar *fallback,
1.86 + gsize *bytes_read,
1.87 + gsize *bytes_written,
1.88 + GError **error) G_GNUC_MALLOC;
1.89 +
1.90 +
1.91 +/* Convert between libc's idea of strings and UTF-8.
1.92 + */
1.93 +IMPORT_C gchar* g_locale_to_utf8 (const gchar *opsysstring,
1.94 + gssize len,
1.95 + gsize *bytes_read,
1.96 + gsize *bytes_written,
1.97 + GError **error) G_GNUC_MALLOC;
1.98 +IMPORT_C gchar* g_locale_from_utf8 (const gchar *utf8string,
1.99 + gssize len,
1.100 + gsize *bytes_read,
1.101 + gsize *bytes_written,
1.102 + GError **error) G_GNUC_MALLOC;
1.103 +
1.104 +/* Convert between the operating system (or C runtime)
1.105 + * representation of file names and UTF-8.
1.106 + */
1.107 +#ifdef G_OS_WIN32
1.108 +#define g_filename_to_utf8 g_filename_to_utf8_utf8
1.109 +#define g_filename_from_utf8 g_filename_from_utf8_utf8
1.110 +#define g_filename_from_uri g_filename_from_uri_utf8
1.111 +#define g_filename_to_uri g_filename_to_uri_utf8
1.112 +#endif
1.113 +
1.114 +IMPORT_C gchar* g_filename_to_utf8 (const gchar *opsysstring,
1.115 + gssize len,
1.116 + gsize *bytes_read,
1.117 + gsize *bytes_written,
1.118 + GError **error) G_GNUC_MALLOC;
1.119 +IMPORT_C gchar* g_filename_from_utf8 (const gchar *utf8string,
1.120 + gssize len,
1.121 + gsize *bytes_read,
1.122 + gsize *bytes_written,
1.123 + GError **error) G_GNUC_MALLOC;
1.124 +
1.125 +IMPORT_C gchar *g_filename_from_uri (const gchar *uri,
1.126 + gchar **hostname,
1.127 + GError **error) G_GNUC_MALLOC;
1.128 +
1.129 +IMPORT_C gchar *g_filename_to_uri (const gchar *filename,
1.130 + const gchar *hostname,
1.131 + GError **error) G_GNUC_MALLOC;
1.132 +IMPORT_C gchar *g_filename_display_name (const gchar *filename) G_GNUC_MALLOC;
1.133 +IMPORT_C gboolean g_get_filename_charsets (G_CONST_RETURN gchar ***charsets);
1.134 +
1.135 +IMPORT_C gchar *g_filename_display_basename (const gchar *filename) G_GNUC_MALLOC;
1.136 +
1.137 +IMPORT_C gchar **g_uri_list_extract_uris (const gchar *uri_list) G_GNUC_MALLOC;
1.138 +
1.139 +G_END_DECLS
1.140 +
1.141 +#endif /* __G_CONVERT_H__ */