<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<xi:include href="xml/gioscheduler.xml"/>
<xi:include href="xml/gsimpleasyncresult.xml"/>
</chapter>
-
+ <chapter id="conversion">
+ <title>Data conversion</title>
+ <xi:include href="xml/gconverter.xml"/>
+ <xi:include href="xml/gcharsetconverter.xml"/>
+ <xi:include href="xml/gzcompressor.xml"/>
+ <xi:include href="xml/gzdecompressor.xml"/>
+ </chapter>
<chapter id="streaming">
<title>Streaming I/O</title>
<xi:include href="xml/gseekable.xml"/>
-
- <xi:include href="xml/ginputstream.xml"/>
+ <xi:include href="xml/ginputstream.xml"/>
<xi:include href="xml/goutputstream.xml"/>
<xi:include href="xml/giostream.xml"/>
-
<xi:include href="xml/gfileinputstream.xml"/>
<xi:include href="xml/gfileoutputstream.xml"/>
<xi:include href="xml/gfileiostream.xml"/>
-
- <xi:include href="xml/gfilterinputstream.xml"/>
+ <xi:include href="xml/gfilterinputstream.xml"/>
<xi:include href="xml/gfilteroutputstream.xml"/>
-
- <xi:include href="xml/gmemoryinputstream.xml"/>
+ <xi:include href="xml/gmemoryinputstream.xml"/>
<xi:include href="xml/gmemoryoutputstream.xml"/>
-
<xi:include href="xml/gbufferedinputstream.xml"/>
<xi:include href="xml/gbufferedoutputstream.xml"/>
-
<xi:include href="xml/gdatainputstream.xml"/>
<xi:include href="xml/gdataoutputstream.xml"/>
-
<xi:include href="xml/gunixinputstream.xml"/>
<xi:include href="xml/gunixoutputstream.xml"/>
-
+ <xi:include href="xml/gconverterinputstream.xml"/>
+ <xi:include href="xml/gconverteroutputstream.xml"/>
</chapter>
-
<chapter id="types">
<title>File types and applications</title>
<xi:include href="xml/gcontenttype.xml"/>
<xi:include href="xml/gappinfo.xml"/>
<xi:include href="xml/gdesktopappinfo.xml"/>
</chapter>
-
<chapter id="volume_mon">
<title>Volumes and Drives</title>
<xi:include href="xml/gvolumemonitor.xml"/>
<index role="2.22">
<title>Index of new symbols in 2.22</title>
</index>
+ <index role="2.24">
+ <title>Index of new symbols in 2.24</title>
+ </index>
</book>
g_output_stream_flush_finish
g_output_stream_close_async
g_output_stream_close_finish
+g_output_stream_is_closing
g_output_stream_is_closed
g_output_stream_has_pending
g_output_stream_set_pending
g_mount_get_drive
g_mount_get_root
g_mount_get_volume
+g_mount_get_default_location
g_mount_can_unmount
GMountMountFlags
GMountUnmountFlags
g_app_info_equal
g_app_info_get_id
g_app_info_get_name
+g_app_info_get_display_name
g_app_info_get_description
g_app_info_get_executable
g_app_info_get_commandline
GUnixFDMessagePrivate
g_unix_fd_message_get_type
</SECTION>
+
+<SECTION>
+<FILE>gconverter</FILE>
+<TITLE>GConverter</TITLE>
+GConverter
+GConverterIface
+GConverterResult
+g_converter_convert
+g_converter_reset
+<SUBSECTION Standard>
+G_TYPE_CONVERTER
+G_CONVERTER
+G_IS_CONVERTER
+G_CONVERTER_GET_IFACE
+<SUBSECTION Private>
+g_converter_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gcharsetconverter</FILE>
+<TITLE>GCharsetConverter</TITLE>
+GCharsetConverter
+g_charset_converter_new
+g_charset_converter_set_use_fallback
+g_charset_converter_get_use_fallback
+g_charset_converter_get_num_fallbacks
+<SUBSECTION Standard>
+GCharsetConverterClass
+G_TYPE_CHARSET_CONVERTER
+G_CHARSET_CONVERTER
+G_IS_CHARSET_CONVERTER
+G_CHARSET_CONVERTER_CLASS
+G_IS_CHARSET_CONVERTER_CLASS
+G_CHARSET_CONVERTER_GET_CLASS
+<SUBSECTION Private>
+g_charset_converter_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gconverterinputstream</FILE>
+<TITLE>GConverterInputstream</TITLE>
+GConverterInputStream
+g_converter_input_stream_new
+g_converter_input_stream_get_converter
+<SUBSECTION Standard>
+GConverterInputStreamClass
+G_TYPE_CONVERTER_INPUT_STREAM
+G_CONVERTER_INPUT_STREAM
+G_IS_CONVERTER_INPUT_STREAM
+G_CONVERTER_INPUT_STREAM_CLASS
+G_IS_CONVERTER_INPUT_STREAM_CLASS
+G_CONVERTER_INPUT_STREAM_GET_CLASS
+<SUBSECTION Private>
+GConverterInputStreamPrivate
+g_converter_input_stream_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gconverteroutputstream</FILE>
+<TITLE>GConverterOutputstream</TITLE>
+GConverterOutputStream
+g_converter_output_stream_new
+g_converter_output_stream_get_converter
+<SUBSECTION Standard>
+GConverterOutputStreamClass
+G_TYPE_CONVERTER_OUTPUT_STREAM
+G_CONVERTER_OUTPUT_STREAM
+G_IS_CONVERTER_OUTPUT_STREAM
+G_CONVERTER_OUTPUT_STREAM_CLASS
+G_IS_CONVERTER_OUTPUT_STREAM_CLASS
+G_CONVERTER_OUTPUT_STREAM_GET_CLASS
+<SUBSECTION Private>
+GConverterOutputStreamPrivate
+g_converter_output_stream_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gzcompressor</FILE>
+<TITLE>GZlibCompressor</TITLE>
+GZLibCompressor
+GZlibCompressorFormat
+g_zlib_compressor_new
+<SUBSECTION Standard>
+GZlibCompressorClass
+G_TYPE_ZLIB_COMPRESSOR
+G_ZLIB_COMPRESSOR
+G_IS_ZLIB_COMPRESSOR
+G_ZLIB_COMPRESSOR_CLASS
+G_IS_ZLIB_COMPRESSOR_CLASS
+G_ZLIB_COMPRESSOR_GET_CLASS
+<SUBSECTION Private>
+g_zlib_compressor_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gzdecompressor</FILE>
+<TITLE>GZlibDecompressor</TITLE>
+GZLibDecompressor
+g_zlib_decompressor_new
+<SUBSECTION Standard>
+GZlibDecompressorClass
+G_TYPE_ZLIB_DECOMPRESSOR
+G_ZLIB_DECOMPRESSOR
+G_IS_ZLIB_DECOMPRESSOR
+G_ZLIB_DECOMPRESSOR_CLASS
+G_IS_ZLIB_DECOMPRESSOR_CLASS
+G_ZLIB_DECOMPRESSOR_GET_CLASS
+<SUBSECTION Private>
+g_zlib_decompressor_get_type
+</SECTION>
g_buffered_input_stream_get_type
g_buffered_output_stream_get_type
g_cancellable_get_type
+g_charset_converter_get_type
+g_converter_get_type
+g_converter_flags_get_type
+g_converter_input_stream_get_type
+g_converter_output_stream_get_type
+g_converter_result_get_type
g_data_input_stream_get_type
g_data_output_stream_get_type
g_data_stream_byte_order_get_type
g_vfs_get_type
g_volume_get_type
g_volume_monitor_get_type
+g_zlib_compressor_get_type
+g_zlib_compressor_format_get_type
+g_zlib_decompressor_get_type
return FALSE;
}
-/**
- * _fdata_add_event:
- *
- */
void
_fdata_add_event (fdata *f, fnode_event_t *ev)
{
* @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
* @do_delete: Deletes a #GAppInfo. Since 2.20
* @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
+ * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
*
* Application Information interface, for operating system portability.
*/
return ret;
}
+/**
+ * g_charset_converter_set_use_fallback:
+ * @converter: a #GCharsetConverter
+ * @use_fallback: %TRUE to use fallbacks
+ *
+ * Sets the #GCharsetConverter:use-fallback property.
+ *
+ * Since: 2.24
+ */
void
g_charset_converter_set_use_fallback (GCharsetConverter *converter,
- gboolean use_fallback)
+ gboolean use_fallback)
{
use_fallback = !!use_fallback;
}
}
+/**
+ * g_charset_converter_get_use_fallback:
+ * @converter: a #GCharsetConverter
+ *
+ * Gets the #GCharsetConverter:use-fallback property.
+ *
+ * Returns: %TRUE if fallbacks are used by @converter
+ *
+ * Since: 2.24
+ */
gboolean
g_charset_converter_get_use_fallback (GCharsetConverter *converter)
{
return converter->use_fallback;
}
+/**
+ * g_charset_converter_get_num_fallbacks:
+ * @converter: a #GCharsetConverter
+ *
+ * Gets the number of fallbacks that @converter has applied so far.
+ *
+ * Returns: the number of fallbacks that @converter has applied
+ *
+ * Since: 2.24
+ */
guint
g_charset_converter_get_num_fallbacks (GCharsetConverter *converter)
{
/**
* g_converter_input_stream_new:
- * @base_stream: a #GInputStream.
+ * @base_stream: a #GInputStream
+ * @converter: a #GConverter
*
* Creates a new converter input stream for the @base_stream.
*
g_assert_not_reached ();
}
+/**
+ * g_converter_input_stream_get_converter:
+ * @converter_stream: a #GConverterInputStream
+ *
+ * Gets the #GConverter that is used by @converter_stream.
+ *
+ * Returns: the converter of the converter input stream
+ *
+ * Since: 2.24
+ */
GConverter *
g_converter_input_stream_get_converter (GConverterInputStream *converter_stream)
{
/**
* GConverterInputStream:
- * @parent: a #GFilterInputStream.
+ * @parent_interface: a #GFilterInputStream.
*
* An implementation of #GFilterInputStream that allows data
* conversion.
/**
* g_converter_output_stream_new:
- * @base_stream: a #GOutputStream.
+ * @base_stream: a #GOutputStream
+ * @converter: a #GConverter
*
* Creates a new converter output stream for the @base_stream.
*
return TRUE;
}
+/**
+ * g_converter_output_stream_get_converter:
+ * @converter_stream: a #GConverterOutputStream
+ *
+ * Gets the #GConverter that is used by @converter_stream.
+ *
+ * Returns: the converter of the converter output stream
+ *
+ * Since: 2.24
+ */
GConverter *
g_converter_output_stream_get_converter (GConverterOutputStream *converter_stream)
{
/**
* GConverterOutputStream:
- * @parent: a #GFilterOutputStream.
+ * @parent_instance: a #GFilterOutputStream.
*
* An implementation of #GFilterOutputStream that allows data
* conversion.
{
}
-/**
- * g_dummy_file_new:
- * @uri: Universal Resource Identifier for the dummy file object.
- *
- * Returns: a new #GFile.
- **/
GFile *
_g_dummy_file_new (const char *uri)
{
/**
* GZlibCompressorFormat:
- * @G_ZLIB_COMRESSOR_FORMAT_ZLIB: deflate compression with zlib header
- * @G_ZLIB_COMRESSOR_FORMAT_GZIP: gzip file format
- * @G_ZLIB_COMRESSOR_FORMAT_RAW: deflate compression with no header
+ * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
+ * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
+ * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
*
* Used to select the type of data format to use for #GZlibDecompressor
* and #GZlibCompressor.
return (gpointer)G_TYPE_INVALID;
}
-/**
- * _g_local_directory_monitor_new:
- * @dirname: filename of the directory to monitor.
- * @flags: #GFileMonitorFlags.
- *
- * Returns: new #GFileMonitor for the given @dirname.
- **/
GFileMonitor*
_g_local_directory_monitor_new (const char *dirname,
GFileMonitorFlags flags,
return canon;
}
-/**
- * _g_local_file_new:
- * @filename: filename of the file to create.
- *
- * Returns: new local #GFile.
- **/
GFile *
_g_local_file_new (const char *filename)
{
info->priv->do_close = TRUE;
}
-/**
- * g_local_file_input_stream_new:
- * @fd: File Descriptor.
- *
- * Returns: #GFileInputStream for the given file descriptor.
- **/
GFileInputStream *
_g_local_file_input_stream_new (int fd)
{
return (gpointer)G_TYPE_INVALID;
}
-/**
- * g_local_file_monitor_new:
- * @pathname: path name to monitor.
- * @flags: #GFileMonitorFlags.
- *
- * Returns: a new #GFileMonitor for the given @pathname.
- **/
GFileMonitor*
_g_local_file_monitor_new (const char *pathname,
GFileMonitorFlags flags,
return vm;
}
-/**
- * _g_mount_get_for_mount_path:
- * @mountpoint: a string.
- * @cancellable: a #GCancellable, or %NULL
- *
- * Returns: a #GMount for given @mount_path or %NULL.
- **/
GMount *
-_g_mount_get_for_mount_path (const char *mount_path,
+_g_mount_get_for_mount_path (const gchar *mount_path,
GCancellable *cancellable)
{
GNativeVolumeMonitorClass *klass;
{
}
-/**
- * g_unix_volume_new:
- * @volume_monitor: a #GVolumeMonitor.
- * @mountpoint: a #GUnixMountPoint.
- *
- * Returns: a #GUnixVolume for the given #GUnixMountPoint.
- **/
GUnixVolume *
_g_unix_volume_new (GVolumeMonitor *volume_monitor,
GUnixMountPoint *mountpoint)
return volume;
}
-/**
- * g_unix_volume_disconnected:
- * @volume:
- *
- **/
void
_g_unix_volume_disconnected (GUnixVolume *volume)
{
}
}
-/**
- * g_unix_volume_set_mount:
- * @volume:
- * @mount:
- *
- **/
void
-_g_unix_volume_set_mount (GUnixVolume *volume,
- GUnixMount *mount)
+_g_unix_volume_set_mount (GUnixVolume *volume,
+ GUnixMount *mount)
{
if (volume->mount == mount)
return;
g_signal_emit_by_name (volume->volume_monitor, "volume-changed", volume);
}
-/**
- * g_unix_volume_unset_mount:
- * @volume:
- * @mount:
- *
- **/
void
_g_unix_volume_unset_mount (GUnixVolume *volume,
GUnixMount *mount)
g_unix_volume_should_automount (GVolume *volume)
{
/* We automount all local volumes because we don't even
- make the internal stuff visible */
+ * make the internal stuff visible
+ */
return TRUE;
}
gboolean
_g_unix_volume_has_mount_path (GUnixVolume *volume,
- const char *mount_path)
+ const char *mount_path)
{
return strcmp (volume->mount_path, mount_path) == 0;
}
GString *error_string;
} EjectMountOp;
-static void
-eject_mount_cb (GPid pid, gint status, gpointer user_data)
+static void
+eject_mount_cb (GPid pid,
+ gint status,
+ gpointer user_data)
{
EjectMountOp *data = user_data;
GSimpleAsyncResult *simple;
}
static gboolean
-eject_mount_read_error (GIOChannel *channel,
- GIOCondition condition,
- gpointer user_data)
+eject_mount_read_error (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data)
{
EjectMountOp *data = user_data;
char buf[BUFSIZ];
NULL, /* standard_input */
NULL, /* standard_output */
&(data->error_fd),
- &error)) {
- g_assert (error != NULL);
- goto handle_error;
- }
+ &error))
+ {
+ g_assert (error != NULL);
+ goto handle_error;
+ }
data->error_string = g_string_new ("");
g_source_unref (child_watch);
handle_error:
- if (error != NULL) {
- GSimpleAsyncResult *simple;
- simple = g_simple_async_result_new_from_error (G_OBJECT (data->unix_volume),
- data->callback,
- data->user_data,
- error);
- g_simple_async_result_complete (simple);
- g_object_unref (simple);
-
- if (data->error_string != NULL)
- g_string_free (data->error_string, TRUE);
-
- if (data->error_channel != NULL)
- g_io_channel_unref (data->error_channel);
-
- g_error_free (error);
- g_free (data);
- }
+ if (error != NULL)
+ {
+ GSimpleAsyncResult *simple;
+ simple = g_simple_async_result_new_from_error (G_OBJECT (data->unix_volume),
+ data->callback,
+ data->user_data,
+ error);
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+
+ if (data->error_string != NULL)
+ g_string_free (data->error_string, TRUE);
+
+ if (data->error_channel != NULL)
+ g_io_channel_unref (data->error_channel);
+
+ g_error_free (error);
+ g_free (data);
+ }
}
static void
-g_unix_volume_mount (GVolume *volume,
+g_unix_volume_mount (GVolume *volume,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
gpointer user_data)
{
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
- char *argv[] = {"mount", NULL, NULL};
+ char *argv[] = { "mount", NULL, NULL };
if (unix_volume->mount_path != NULL)
argv[1] = unix_volume->mount_path;
static gboolean
g_unix_volume_mount_finish (GVolume *volume,
- GAsyncResult *result,
- GError **error)
+ GAsyncResult *result,
+ GError **error)
{
return TRUE;
}
static void
-g_unix_volume_eject (GVolume *volume,
+g_unix_volume_eject (GVolume *volume,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
- char *argv[] = {"eject", NULL, NULL};
+ char *argv[] = { "eject", NULL, NULL };
argv[1] = unix_volume->device_path;
}
static gboolean
-g_unix_volume_eject_finish (GVolume *volume,
+g_unix_volume_eject_finish (GVolume *volume,
GAsyncResult *result,
GError **error)
{
return TRUE;
}
-static char *
-g_unix_volume_get_identifier (GVolume *volume,
- const char *kind)
+static gchar *
+g_unix_volume_get_identifier (GVolume *volume,
+ const gchar *kind)
{
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
if (unix_volume->identifier_type != NULL &&
strcmp (kind, unix_volume->identifier_type) == 0)
return g_strdup (unix_volume->identifier);
+
return NULL;
}
-static char **
+static gchar **
g_unix_volume_enumerate_identifiers (GVolume *volume)
{
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
- char **res;
+ gchar **res;
if (unix_volume->identifier_type)
{
- res = g_new (char *, 2);
+ res = g_new (gchar *, 2);
res[0] = g_strdup (unix_volume->identifier_type);
res[1] = NULL;
}
else
{
- res = g_new (char *, 1);
+ res = g_new (gchar *, 1);
res[0] = NULL;
}
update_mounts (unix_monitor);
}
-/**
- * g_unix_volume_monitor_new:
- *
- * Returns: a new #GVolumeMonitor.
- **/
GVolumeMonitor *
_g_unix_volume_monitor_new (void)
{
}
}
-/**
- * _g_unix_volume_monitor_lookup_volume_for_mount_path:
- * @monitor:
- * @mount_path:
- *
- * Returns: #GUnixVolume for the given @mount_path.
- **/
GUnixVolume *
_g_unix_volume_monitor_lookup_volume_for_mount_path (GUnixVolumeMonitor *monitor,
const char *mount_path)
return name ? name : g_strdup (drive);
}
-/**
+/*
* _g_win32_mount_new:
* @volume_monitor: a #GVolumeMonitor.
* @path: a win32 path.
(*G_OBJECT_CLASS (g_win32_volume_monitor_parent_class)->finalize) (object);
}
-/**
+/*
* get_viewable_logical_drives:
- *
+ *
* Returns the list of logical and viewable drives as defined by
* GetLogicalDrives() and the registry keys
* Software\Microsoft\Windows\CurrentVersion\Policies\Explorer under
* GetLogicalDrives() is returned.
*
* Return value: bitmask with same meaning as returned by GetLogicalDrives()
-**/
+ */
static guint32
get_viewable_logical_drives (void)
{
{
}
-/**
+/*
* _g_winhttp_file_new:
* @vfs: GWinHttpVfs to use
* @uri: URI of the GWinHttpFile to create.
*
* Returns: new winhttp #GFile.
- **/
+ */
GFile *
_g_winhttp_file_new (GWinHttpVfs *vfs,
const char *uri)
{
}
-/**
+/*
* g_winhttp_file_input_stream_new:
* @file: the GWinHttpFile being read
* @connection: handle to the HTTP connection, as from WinHttpConnect()
* @request: handle to the HTTP request, as from WinHttpOpenRequest
*
* Returns: #GFileInputStream for the given request
- **/
+ */
GFileInputStream *
_g_winhttp_file_input_stream_new (GWinHttpFile *file,
HINTERNET connection,
{
}
-/**
+/*
* g_winhttp_file_output_stream_new:
* @file: the GWinHttpFile being read
* @connection: handle to the HTTP connection, as from WinHttpConnect()
* @request: handle to the HTTP request, as from WinHttpOpenRequest
*
* Returns: #GFileOutputStream for the given request
- **/
+ */
GFileOutputStream *
_g_winhttp_file_output_stream_new (GWinHttpFile *file,
HINTERNET connection)
0);
}
-/**
+/*
* g_winhttp_vfs_new:
*
* Returns a new #GVfs handle for a WinHttp vfs.