mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Coding style fixups
svn path=/trunk/; revision=5993
This commit is contained in:
parent
7c0e098f4e
commit
09471fec46
@ -1,3 +1,7 @@
|
||||
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* *.c: Coding style fixups
|
||||
|
||||
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* inotify/inotify-helper.c: Don't export the lock from libgio.
|
||||
|
@ -114,8 +114,8 @@ g_app_info_dup (GAppInfo *appinfo)
|
||||
* Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_equal (GAppInfo *appinfo1,
|
||||
GAppInfo *appinfo2)
|
||||
g_app_info_equal (GAppInfo *appinfo1,
|
||||
GAppInfo *appinfo2)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -255,9 +255,9 @@ g_app_info_set_as_default_for_type (GAppInfo *appinfo,
|
||||
* or in case of an error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error)
|
||||
g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -284,12 +284,12 @@ g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
* application is capable of opening files with the given content type.
|
||||
*
|
||||
* Returns: %TRUE if @appinfo supports @content_type.
|
||||
* %FALSE if not, or in case of an error.
|
||||
* %FALSE if not, or in case of an error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -301,7 +301,10 @@ g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
if (iface->add_supports_type)
|
||||
return (* iface->add_supports_type) (appinfo, content_type, error);
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "g_app_info_add_supports_type not supported yet");
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_NOT_SUPPORTED,
|
||||
"g_app_info_add_supports_type not supported yet");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -313,7 +316,7 @@ g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
* Checks if a supported content type can be removed from an application.
|
||||
*
|
||||
* Returns: %TRUE if it is possible to remove supported
|
||||
* content types from a given @appinfo, %FALSE if not.
|
||||
* content types from a given @appinfo, %FALSE if not.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
@ -340,12 +343,12 @@ g_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
* Removes a supported type from an application, if possible.
|
||||
*
|
||||
* Returns: %TRUE if @content_type support was removed
|
||||
* from @appinfo. %FALSE if not.
|
||||
* from @appinfo. %FALSE if not.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -357,7 +360,10 @@ g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
if (iface->remove_supports_type)
|
||||
return (* iface->remove_supports_type) (appinfo, content_type, error);
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "g_app_info_remove_supports_type not supported yet");
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_NOT_SUPPORTED,
|
||||
"g_app_info_remove_supports_type not supported yet");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -397,10 +403,10 @@ g_app_info_get_icon (GAppInfo *appinfo)
|
||||
* Returns: %TRUE on successful launch, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_launch (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
g_app_info_launch (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -447,10 +453,10 @@ g_app_info_supports_uris (GAppInfo *appinfo)
|
||||
* Returns: %TRUE if the @appinfo was launched successfully, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -473,8 +479,8 @@ g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
* Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_should_show (GAppInfo *appinfo,
|
||||
const char *desktop_env)
|
||||
g_app_info_should_show (GAppInfo *appinfo,
|
||||
const char *desktop_env)
|
||||
{
|
||||
GAppInfoIface *iface;
|
||||
|
||||
@ -548,10 +554,12 @@ g_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
* @files: a #GList of files.
|
||||
*
|
||||
* Gets the DESKTOP_STARTUP_ID for the launched application, if supported.
|
||||
* Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard,
|
||||
* at <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"/>.
|
||||
* Startup notification IDs are defined in the FreeDesktop.Org Startup
|
||||
* Notifications standard, at
|
||||
* <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"/>.
|
||||
*
|
||||
* Returns: a startup notifaction ID for the application, or %NULL if not supported.
|
||||
* Returns: a startup notifaction ID for the application, or %NULL if
|
||||
* not supported.
|
||||
**/
|
||||
char *
|
||||
g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||
@ -575,14 +583,14 @@ g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||
/**
|
||||
* g_app_launch_context_launch_failed:
|
||||
* @context: a #GAppLaunchContext.
|
||||
* @startup_notify_id: a string containing the DESKTOP_STARTUP_ID of the launched application.
|
||||
* @startup_notify_id: a string containing the DESKTOP_STARTUP_ID
|
||||
* of the launched application.
|
||||
*
|
||||
* TODO: what does this do? Can't find it implemented anywhere.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_app_launch_context_launch_failed (GAppLaunchContext *context,
|
||||
const char *startup_notify_id)
|
||||
const char *startup_notify_id)
|
||||
{
|
||||
GAppLaunchContextClass *class;
|
||||
|
||||
|
@ -50,10 +50,10 @@ async_result_free (gpointer data)
|
||||
|
||||
void
|
||||
_g_queue_async_result (GAsyncResultData *result,
|
||||
gpointer async_object,
|
||||
GError *error,
|
||||
gpointer user_data,
|
||||
GSourceFunc source_func)
|
||||
gpointer async_object,
|
||||
GError *error,
|
||||
gpointer user_data,
|
||||
GSourceFunc source_func)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
@ -83,8 +83,8 @@ typedef struct
|
||||
} FDSource;
|
||||
|
||||
static gboolean
|
||||
fd_source_prepare (GSource *source,
|
||||
gint *timeout)
|
||||
fd_source_prepare (GSource *source,
|
||||
gint *timeout)
|
||||
{
|
||||
FDSource *fd_source = (FDSource *)source;
|
||||
*timeout = -1;
|
||||
@ -93,7 +93,7 @@ fd_source_prepare (GSource *source,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fd_source_check (GSource *source)
|
||||
fd_source_check (GSource *source)
|
||||
{
|
||||
FDSource *fd_source = (FDSource *)source;
|
||||
|
||||
@ -139,15 +139,15 @@ static GSourceFuncs fd_source_funcs = {
|
||||
/* Might be called on another thread */
|
||||
static void
|
||||
fd_source_cancelled_cb (GCancellable *cancellable,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
/* Wake up the mainloop in case we're waiting on async calls with FDSource */
|
||||
g_main_context_wakeup (NULL);
|
||||
}
|
||||
|
||||
GSource *
|
||||
_g_fd_source_new (int fd,
|
||||
gushort events,
|
||||
_g_fd_source_new (int fd,
|
||||
gushort events,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GSource *source;
|
||||
|
@ -197,7 +197,7 @@ g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream)
|
||||
**/
|
||||
void
|
||||
g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream,
|
||||
gsize size)
|
||||
gsize size)
|
||||
{
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
gsize in_buffer;
|
||||
@ -232,10 +232,10 @@ g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_buffered_input_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
g_buffered_input_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
GBufferedInputStream *bstream;
|
||||
@ -270,15 +270,14 @@ g_buffered_input_stream_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
case PROP_BUFSIZE:
|
||||
g_value_set_uint (value, priv->len);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@ -333,8 +332,8 @@ g_buffered_input_stream_new (GInputStream *base_stream)
|
||||
* @base_stream: a #GOutputStream.
|
||||
* @size: a #gsize.
|
||||
*
|
||||
* Creates a new #GBufferedInputStream from the given @base_stream, with
|
||||
* a buffer set to @size.
|
||||
* Creates a new #GBufferedInputStream from the given @base_stream,
|
||||
* with a buffer set to @size.
|
||||
*
|
||||
* Returns: a #GInputStream.
|
||||
**/
|
||||
@ -384,13 +383,13 @@ g_buffered_input_stream_new_sized (GInputStream *base_stream,
|
||||
* g_buffered_input_stream_fill_async().
|
||||
*
|
||||
* Returns: the number of bytes read into @stream's buffer, up to @count,
|
||||
* or -1 on error.
|
||||
* or -1 on error.
|
||||
**/
|
||||
gssize
|
||||
g_buffered_input_stream_fill (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GBufferedInputStreamClass *class;
|
||||
GInputStream *input_stream;
|
||||
@ -431,9 +430,9 @@ g_buffered_input_stream_fill (GBufferedInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
async_fill_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
async_fill_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
GBufferedInputStream *stream = G_BUFFERED_INPUT_STREAM (source_object);
|
||||
|
||||
@ -446,7 +445,7 @@ async_fill_callback_wrapper (GObject *source_object,
|
||||
* g_buffered_input_stream_fill_async:
|
||||
* @stream: #GBufferedInputStream.
|
||||
* @count: a #gssize.
|
||||
* @io_priority: the io priority of the request. the io priority of the request.
|
||||
* @io_priority: the io priority of the request.
|
||||
* @cancellable: optional #GCancellable object
|
||||
* @callback: a #GAsyncReadyCallback.
|
||||
* @user_data: a #gpointer.
|
||||
@ -454,16 +453,14 @@ async_fill_callback_wrapper (GObject *source_object,
|
||||
* Reads data into @stream's buffer asynchronously, up to @count size.
|
||||
* @io_priority can be used to prioritize reads. For the synchronous
|
||||
* version of this function, see g_buffered_input_stream_fill().
|
||||
*
|
||||
**/
|
||||
|
||||
void
|
||||
g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GBufferedInputStreamClass *class;
|
||||
GSimpleAsyncResult *simple;
|
||||
@ -517,7 +514,7 @@ g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
stream->priv->outstanding_callback = callback;
|
||||
g_object_ref (stream);
|
||||
class->fill_async (stream, count, io_priority, cancellable,
|
||||
async_fill_callback_wrapper, user_data);
|
||||
async_fill_callback_wrapper, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -532,8 +529,8 @@ g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
**/
|
||||
gssize
|
||||
g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GBufferedInputStreamClass *class;
|
||||
@ -545,11 +542,11 @@ g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
|
||||
{
|
||||
simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
if (g_simple_async_result_propagate_error (simple, error))
|
||||
return -1;
|
||||
return -1;
|
||||
|
||||
/* Special case read of 0 bytes */
|
||||
if (g_simple_async_result_get_source_tag (simple) == g_buffered_input_stream_fill_async)
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
class = G_BUFFERED_INPUT_STREAM_GET_CLASS (stream);
|
||||
@ -565,7 +562,7 @@ g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
|
||||
* Returns: size of the available stream.
|
||||
**/
|
||||
gsize
|
||||
g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
||||
g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_BUFFERED_INPUT_STREAM (stream), -1);
|
||||
|
||||
@ -579,16 +576,16 @@ g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
||||
* @offset: a #gsize.
|
||||
* @count: a #gsize.
|
||||
*
|
||||
* Peeks in the buffer, copying data of size @count into @buffer, offset
|
||||
* @offset bytes.
|
||||
* Peeks in the buffer, copying data of size @count into @buffer,
|
||||
* offset @offset bytes.
|
||||
*
|
||||
* Returns: a #gsize of the number of bytes peeked, or %-1 on error.
|
||||
**/
|
||||
gsize
|
||||
g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
void *buffer,
|
||||
gsize offset,
|
||||
gsize count)
|
||||
g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
void *buffer,
|
||||
gsize offset,
|
||||
gsize count)
|
||||
{
|
||||
gsize available;
|
||||
gsize end;
|
||||
@ -620,8 +617,8 @@ g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
* Returns: read-only buffer
|
||||
**/
|
||||
const void*
|
||||
g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
|
||||
gsize *count)
|
||||
g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
|
||||
gsize *count)
|
||||
{
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
|
||||
@ -629,9 +626,8 @@ g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
|
||||
|
||||
priv = stream->priv;
|
||||
|
||||
if (count) {
|
||||
if (count)
|
||||
*count = priv->end - priv->pos;
|
||||
}
|
||||
|
||||
return priv->buffer + priv->pos;
|
||||
}
|
||||
@ -646,19 +642,17 @@ compact_buffer (GBufferedInputStream *stream)
|
||||
|
||||
current_size = priv->end - priv->pos;
|
||||
|
||||
g_memmove (priv->buffer,
|
||||
priv->buffer + priv->pos,
|
||||
current_size);
|
||||
g_memmove (priv->buffer, priv->buffer + priv->pos, current_size);
|
||||
|
||||
priv->pos = 0;
|
||||
priv->end = current_size;
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_buffered_input_stream_real_fill (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_buffered_input_stream_real_fill (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
GInputStream *base_stream;
|
||||
@ -693,10 +687,10 @@ g_buffered_input_stream_real_fill (GBufferedInputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_buffered_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_buffered_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GBufferedInputStream *bstream;
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
@ -715,7 +709,9 @@ g_buffered_input_stream_skip (GInputStream *stream,
|
||||
return count;
|
||||
}
|
||||
|
||||
/* Full request not available, skip all currently availbile and request refill for more */
|
||||
/* Full request not available, skip all currently available and
|
||||
* request refill for more
|
||||
*/
|
||||
|
||||
priv->pos = 0;
|
||||
priv->end = 0;
|
||||
@ -732,15 +728,15 @@ g_buffered_input_stream_skip (GInputStream *stream,
|
||||
base_stream = G_FILTER_INPUT_STREAM (stream)->base_stream;
|
||||
|
||||
nread = g_input_stream_skip (base_stream,
|
||||
count,
|
||||
cancellable,
|
||||
error);
|
||||
count,
|
||||
cancellable,
|
||||
error);
|
||||
|
||||
if (nread < 0 && bytes_skipped == 0)
|
||||
return -1;
|
||||
return -1;
|
||||
|
||||
if (nread > 0)
|
||||
bytes_skipped += nread;
|
||||
bytes_skipped += nread;
|
||||
|
||||
return bytes_skipped;
|
||||
}
|
||||
@ -752,9 +748,9 @@ g_buffered_input_stream_skip (GInputStream *stream,
|
||||
if (nread < 0)
|
||||
{
|
||||
if (bytes_skipped == 0)
|
||||
return -1;
|
||||
return -1;
|
||||
else
|
||||
return bytes_skipped;
|
||||
return bytes_skipped;
|
||||
}
|
||||
|
||||
available = priv->end - priv->pos;
|
||||
@ -815,10 +811,10 @@ g_buffered_input_stream_read (GInputStream *stream,
|
||||
error);
|
||||
|
||||
if (nread < 0 && bytes_read == 0)
|
||||
return -1;
|
||||
return -1;
|
||||
|
||||
if (nread > 0)
|
||||
bytes_read += nread;
|
||||
bytes_read += nread;
|
||||
|
||||
return bytes_read;
|
||||
}
|
||||
@ -829,9 +825,9 @@ g_buffered_input_stream_read (GInputStream *stream,
|
||||
if (nread < 0)
|
||||
{
|
||||
if (bytes_read == 0)
|
||||
return -1;
|
||||
return -1;
|
||||
else
|
||||
return bytes_read;
|
||||
return bytes_read;
|
||||
}
|
||||
|
||||
available = priv->end - priv->pos;
|
||||
@ -924,9 +920,9 @@ g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
|
||||
/* ************************** */
|
||||
|
||||
static void
|
||||
fill_async_callback (GObject *source_object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
fill_async_callback (GObject *source_object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
GError *error;
|
||||
gssize res;
|
||||
@ -951,12 +947,12 @@ fill_async_callback (GObject *source_object,
|
||||
}
|
||||
|
||||
static void
|
||||
g_buffered_input_stream_real_fill_async (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_buffered_input_stream_real_fill_async (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
GInputStream *base_stream;
|
||||
@ -1364,5 +1360,3 @@ g_buffered_input_stream_skip_finish (GInputStream *stream,
|
||||
|
||||
#define __G_BUFFERED_INPUT_STREAM_C__
|
||||
#include "gioaliasdef.c"
|
||||
|
||||
/* vim: ts=2 sw=2 et */
|
||||
|
@ -762,5 +762,3 @@ g_buffered_output_stream_close_finish (GOutputStream *stream,
|
||||
|
||||
#define __G_BUFFERED_OUTPUT_STREAM_C__
|
||||
#include "gioaliasdef.c"
|
||||
|
||||
/* vim: ts=2 sw=2 et */
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
static char *
|
||||
get_registry_classes_key (const char *subdir,
|
||||
get_registry_classes_key (const char *subdir,
|
||||
const wchar_t *key_name)
|
||||
{
|
||||
wchar_t *wc_key;
|
||||
@ -105,8 +105,8 @@ g_content_type_equals (const char *type1,
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_content_type_is_a (const char *type,
|
||||
const char *supertype)
|
||||
g_content_type_is_a (const char *type,
|
||||
const char *supertype)
|
||||
{
|
||||
gboolean res;
|
||||
char *value_utf8;
|
||||
@ -158,7 +158,7 @@ g_content_type_get_description (const char *type)
|
||||
}
|
||||
|
||||
char *
|
||||
g_content_type_get_mime_type (const char *type)
|
||||
g_content_type_get_mime_type (const char *type)
|
||||
{
|
||||
char *mime;
|
||||
|
||||
@ -177,7 +177,7 @@ g_content_type_get_mime_type (const char *type)
|
||||
}
|
||||
|
||||
GIcon *
|
||||
g_content_type_get_icon (const char *type)
|
||||
g_content_type_get_icon (const char *type)
|
||||
{
|
||||
g_return_val_if_fail (type != NULL, NULL);
|
||||
|
||||
@ -192,7 +192,7 @@ g_content_type_get_icon (const char *type)
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_content_type_can_be_executable (const char *type)
|
||||
g_content_type_can_be_executable (const char *type)
|
||||
{
|
||||
g_return_val_if_fail (type != NULL, FALSE);
|
||||
|
||||
@ -204,7 +204,8 @@ g_content_type_can_be_executable (const char *type)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
looks_like_text (const guchar *data, gsize data_size)
|
||||
looks_like_text (const guchar *data,
|
||||
gsize data_size)
|
||||
{
|
||||
gsize i;
|
||||
guchar c;
|
||||
@ -352,8 +353,8 @@ _g_unix_content_type_get_parents (const char *type)
|
||||
* %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_content_type_equals (const char *type1,
|
||||
const char *type2)
|
||||
g_content_type_equals (const char *type1,
|
||||
const char *type2)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
@ -378,8 +379,8 @@ g_content_type_equals (const char *type1,
|
||||
* %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_content_type_is_a (const char *type,
|
||||
const char *supertype)
|
||||
g_content_type_is_a (const char *type,
|
||||
const char *supertype)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
@ -441,12 +442,12 @@ language_level (const char *lang)
|
||||
}
|
||||
|
||||
static void
|
||||
mime_info_start_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
mime_info_start_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
int i;
|
||||
const char *lang;
|
||||
@ -471,10 +472,10 @@ mime_info_start_element (GMarkupParseContext *context,
|
||||
}
|
||||
|
||||
static void
|
||||
mime_info_end_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
mime_info_end_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
MimeParser *parser = user_data;
|
||||
|
||||
@ -482,11 +483,11 @@ mime_info_end_element (GMarkupParseContext *context,
|
||||
}
|
||||
|
||||
static void
|
||||
mime_info_text (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
mime_info_text (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
MimeParser *parser = user_data;
|
||||
|
||||
@ -500,7 +501,8 @@ mime_info_text (GMarkupParseContext *context,
|
||||
}
|
||||
|
||||
static char *
|
||||
load_comment_for_mime_helper (const char *dir, const char *basename)
|
||||
load_comment_for_mime_helper (const char *dir,
|
||||
const char *basename)
|
||||
{
|
||||
GMarkupParseContext *context;
|
||||
char *filename, *data;
|
||||
@ -612,7 +614,7 @@ g_content_type_get_description (const char *type)
|
||||
* Returns: the registered mime-type for the given @type.
|
||||
**/
|
||||
char *
|
||||
g_content_type_get_mime_type (const char *type)
|
||||
g_content_type_get_mime_type (const char *type)
|
||||
{
|
||||
g_return_val_if_fail (type != NULL, NULL);
|
||||
|
||||
@ -628,7 +630,7 @@ g_content_type_get_mime_type (const char *type)
|
||||
* Returns: #GIcon corresponding to the content type.
|
||||
**/
|
||||
GIcon *
|
||||
g_content_type_get_icon (const char *type)
|
||||
g_content_type_get_icon (const char *type)
|
||||
{
|
||||
g_return_val_if_fail (type != NULL, NULL);
|
||||
|
||||
@ -647,7 +649,7 @@ g_content_type_get_icon (const char *type)
|
||||
* can be executable, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_content_type_can_be_executable (const char *type)
|
||||
g_content_type_can_be_executable (const char *type)
|
||||
{
|
||||
g_return_val_if_fail (type != NULL, FALSE);
|
||||
|
||||
@ -777,9 +779,9 @@ g_content_type_guess (const char *filename,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
foreach_mimetype (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
foreach_mimetype (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GList **l = user_data;
|
||||
|
||||
@ -788,7 +790,9 @@ foreach_mimetype (gpointer key,
|
||||
}
|
||||
|
||||
static void
|
||||
enumerate_mimetypes_subdir (const char *dir, const char *prefix, GHashTable *mimetypes)
|
||||
enumerate_mimetypes_subdir (const char *dir,
|
||||
const char *prefix,
|
||||
GHashTable *mimetypes)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *ent;
|
||||
@ -810,7 +814,8 @@ enumerate_mimetypes_subdir (const char *dir, const char *prefix, GHashTable *mim
|
||||
}
|
||||
|
||||
static void
|
||||
enumerate_mimetypes_dir (const char *dir, GHashTable *mimetypes)
|
||||
enumerate_mimetypes_dir (const char *dir,
|
||||
GHashTable *mimetypes)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *ent;
|
||||
|
@ -73,10 +73,10 @@ g_data_input_stream_class_init (GDataInputStreamClass *klass)
|
||||
}
|
||||
|
||||
static void
|
||||
g_data_input_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
g_data_input_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GDataInputStreamPrivate *priv;
|
||||
GDataInputStream *dstream;
|
||||
@ -96,9 +96,9 @@ g_data_input_stream_set_property (GObject *object,
|
||||
|
||||
static void
|
||||
g_data_input_stream_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GDataInputStreamPrivate *priv;
|
||||
GDataInputStream *dstream;
|
||||
@ -108,7 +108,6 @@ g_data_input_stream_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -158,8 +157,8 @@ g_data_input_stream_new (GInputStream *base_stream)
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_data_input_stream_set_byte_order (GDataInputStream *stream,
|
||||
GDataStreamByteOrder order)
|
||||
g_data_input_stream_set_byte_order (GDataInputStream *stream,
|
||||
GDataStreamByteOrder order)
|
||||
{
|
||||
g_return_if_fail (G_IS_DATA_INPUT_STREAM (stream));
|
||||
|
||||
@ -194,8 +193,8 @@ g_data_input_stream_get_byte_order (GDataInputStream *stream)
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_data_input_stream_set_newline_type (GDataInputStream *stream,
|
||||
GDataStreamNewlineType type)
|
||||
g_data_input_stream_set_newline_type (GDataInputStream *stream,
|
||||
GDataStreamNewlineType type)
|
||||
{
|
||||
g_return_if_fail (G_IS_DATA_INPUT_STREAM (stream));
|
||||
|
||||
@ -219,11 +218,11 @@ g_data_input_stream_get_newline_type (GDataInputStream *stream)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
read_data (GDataInputStream *stream,
|
||||
void *buffer,
|
||||
gsize size,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
read_data (GDataInputStream *stream,
|
||||
void *buffer,
|
||||
gsize size,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize available;
|
||||
gssize res;
|
||||
@ -264,9 +263,9 @@ read_data (GDataInputStream *stream,
|
||||
* if an error occured.
|
||||
**/
|
||||
guchar
|
||||
g_data_input_stream_read_byte (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_byte (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
guchar c;
|
||||
|
||||
@ -294,9 +293,9 @@ g_data_input_stream_read_byte (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
gint16
|
||||
g_data_input_stream_read_int16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_int16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gint16 v;
|
||||
|
||||
@ -338,9 +337,9 @@ g_data_input_stream_read_int16 (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
guint16
|
||||
g_data_input_stream_read_uint16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_uint16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
guint16 v;
|
||||
|
||||
@ -386,9 +385,9 @@ g_data_input_stream_read_uint16 (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
gint32
|
||||
g_data_input_stream_read_int32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_int32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gint32 v;
|
||||
|
||||
@ -434,9 +433,9 @@ g_data_input_stream_read_int32 (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
guint32
|
||||
g_data_input_stream_read_uint32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_uint32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
guint32 v;
|
||||
|
||||
@ -482,9 +481,9 @@ g_data_input_stream_read_uint32 (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
gint64
|
||||
g_data_input_stream_read_int64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_int64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gint64 v;
|
||||
|
||||
@ -530,9 +529,9 @@ g_data_input_stream_read_int64 (GDataInputStream *stream,
|
||||
* an error occured.
|
||||
**/
|
||||
guint64
|
||||
g_data_input_stream_read_uint64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_uint64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
guint64 v;
|
||||
|
||||
@ -560,9 +559,9 @@ g_data_input_stream_read_uint64 (GDataInputStream *stream,
|
||||
|
||||
static gssize
|
||||
scan_for_newline (GDataInputStream *stream,
|
||||
gsize *checked_out,
|
||||
gboolean *last_saw_cr_out,
|
||||
int *newline_len_out)
|
||||
gsize *checked_out,
|
||||
gboolean *last_saw_cr_out,
|
||||
int *newline_len_out)
|
||||
{
|
||||
GBufferedInputStream *bstream;
|
||||
GDataInputStreamPrivate *priv;
|
||||
@ -674,10 +673,10 @@ scan_for_newline (GDataInputStream *stream,
|
||||
* a #gsize to get the length of the read line. Returns %NULL on an error.
|
||||
**/
|
||||
char *
|
||||
g_data_input_stream_read_line (GDataInputStream *stream,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_line (GDataInputStream *stream,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GBufferedInputStream *bstream;
|
||||
gsize checked;
|
||||
@ -740,8 +739,8 @@ g_data_input_stream_read_line (GDataInputStream *stream,
|
||||
|
||||
static gssize
|
||||
scan_for_chars (GDataInputStream *stream,
|
||||
gsize *checked_out,
|
||||
const char *stop_chars)
|
||||
gsize *checked_out,
|
||||
const char *stop_chars)
|
||||
{
|
||||
GBufferedInputStream *bstream;
|
||||
GDataInputStreamPrivate *priv;
|
||||
@ -795,11 +794,11 @@ scan_for_chars (GDataInputStream *stream,
|
||||
* of the string. This function will return %NULL on an error.
|
||||
**/
|
||||
char *
|
||||
g_data_input_stream_read_until (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_input_stream_read_until (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GBufferedInputStream *bstream;
|
||||
gsize checked;
|
||||
|
@ -74,10 +74,10 @@ g_data_output_stream_class_init (GDataOutputStreamClass *klass)
|
||||
}
|
||||
|
||||
static void
|
||||
g_data_output_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
g_data_output_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GDataOutputStreamPrivate *priv;
|
||||
GDataOutputStream *dstream;
|
||||
@ -87,12 +87,10 @@ g_data_output_stream_set_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@ -109,13 +107,12 @@ g_data_output_stream_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
g_data_output_stream_init (GDataOutputStream *stream)
|
||||
{
|
||||
@ -154,11 +151,10 @@ g_data_output_stream_new (GOutputStream *base_stream)
|
||||
* @order: a %GDataStreamByteOrder.
|
||||
*
|
||||
* Sets the byte order of the data output stream to @order.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_data_output_stream_set_byte_order (GDataOutputStream *stream,
|
||||
GDataStreamByteOrder order)
|
||||
g_data_output_stream_set_byte_order (GDataOutputStream *stream,
|
||||
GDataStreamByteOrder order)
|
||||
{
|
||||
g_return_if_fail (G_IS_DATA_OUTPUT_STREAM (stream));
|
||||
|
||||
@ -193,10 +189,10 @@ g_data_output_stream_get_byte_order (GDataOutputStream *stream)
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_byte (GDataOutputStream *stream,
|
||||
guchar data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_byte (GDataOutputStream *stream,
|
||||
guchar data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -220,10 +216,10 @@ g_data_output_stream_put_byte (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_int16 (GDataOutputStream *stream,
|
||||
gint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_int16 (GDataOutputStream *stream,
|
||||
gint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -260,10 +256,10 @@ g_data_output_stream_put_int16 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_uint16 (GDataOutputStream *stream,
|
||||
guint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_uint16 (GDataOutputStream *stream,
|
||||
guint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -300,10 +296,10 @@ g_data_output_stream_put_uint16 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_int32 (GDataOutputStream *stream,
|
||||
gint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_int32 (GDataOutputStream *stream,
|
||||
gint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -340,10 +336,10 @@ g_data_output_stream_put_int32 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_uint32 (GDataOutputStream *stream,
|
||||
guint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_uint32 (GDataOutputStream *stream,
|
||||
guint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -380,10 +376,10 @@ g_data_output_stream_put_uint32 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_int64 (GDataOutputStream *stream,
|
||||
gint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_int64 (GDataOutputStream *stream,
|
||||
gint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -420,10 +416,10 @@ g_data_output_stream_put_int64 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @data was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_uint64 (GDataOutputStream *stream,
|
||||
guint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_uint64 (GDataOutputStream *stream,
|
||||
guint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
@ -460,10 +456,10 @@ g_data_output_stream_put_uint64 (GDataOutputStream *stream,
|
||||
* Returns: %TRUE if @string was successfully added to the @stream.
|
||||
**/
|
||||
gboolean
|
||||
g_data_output_stream_put_string (GDataOutputStream *stream,
|
||||
const char *str,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_data_output_stream_put_string (GDataOutputStream *stream,
|
||||
const char *str,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize bytes_written;
|
||||
|
||||
|
@ -449,7 +449,10 @@ expand_macro_single (char macro, GFile *file)
|
||||
}
|
||||
|
||||
static void
|
||||
expand_macro (char macro, GString *exec, GDesktopAppInfo *info, GList **file_list)
|
||||
expand_macro (char macro,
|
||||
GString *exec,
|
||||
GDesktopAppInfo *info,
|
||||
GList **file_list)
|
||||
{
|
||||
GList *files = *file_list;
|
||||
char *expanded;
|
||||
@ -526,11 +529,11 @@ expand_macro (char macro, GString *exec, GDesktopAppInfo *info, GList **file_lis
|
||||
}
|
||||
|
||||
static gboolean
|
||||
expand_application_parameters (GDesktopAppInfo *info,
|
||||
GList **files,
|
||||
int *argc,
|
||||
char ***argv,
|
||||
GError **error)
|
||||
expand_application_parameters (GDesktopAppInfo *info,
|
||||
GList **files,
|
||||
int *argc,
|
||||
char ***argv,
|
||||
GError **error)
|
||||
{
|
||||
GList *file_list = *files;
|
||||
const char *p = info->exec;
|
||||
@ -571,7 +574,7 @@ expand_application_parameters (GDesktopAppInfo *info,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
prepend_terminal_to_vector (int *argc,
|
||||
prepend_terminal_to_vector (int *argc,
|
||||
char ***argv)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
@ -680,9 +683,9 @@ is_env (const char *a,
|
||||
|
||||
/* free with g_strfreev */
|
||||
static char **
|
||||
replace_env_var (char **old_environ,
|
||||
const char *env_var,
|
||||
const char *new_value)
|
||||
replace_env_var (char **old_environ,
|
||||
const char *env_var,
|
||||
const char *new_value)
|
||||
{
|
||||
int length, new_length;
|
||||
int index, new_index;
|
||||
@ -792,10 +795,10 @@ dup_list_segment (GList *start,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_launch (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
g_desktop_app_info_launch (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
{
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
gboolean completed = FALSE;
|
||||
@ -916,10 +919,10 @@ g_desktop_app_info_supports_xdg_startup_notify (GAppInfo *appinfo)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_launch_uris (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
g_desktop_app_info_launch_uris (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GError **error)
|
||||
{
|
||||
GList *files;
|
||||
GFile *file;
|
||||
@ -947,7 +950,7 @@ g_desktop_app_info_launch_uris (GAppInfo *appinfo,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_should_show (GAppInfo *appinfo,
|
||||
g_desktop_app_info_should_show (GAppInfo *appinfo,
|
||||
const char *desktop_env)
|
||||
{
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
@ -993,20 +996,16 @@ typedef enum {
|
||||
} DirType;
|
||||
|
||||
static char *
|
||||
ensure_dir (DirType type,
|
||||
GError **error)
|
||||
ensure_dir (DirType type,
|
||||
GError **error)
|
||||
{
|
||||
char *path, *display_name;
|
||||
int err;
|
||||
|
||||
if (type == APP_DIR)
|
||||
{
|
||||
path = g_build_filename (g_get_user_data_dir (), "applications", NULL);
|
||||
}
|
||||
path = g_build_filename (g_get_user_data_dir (), "applications", NULL);
|
||||
else
|
||||
{
|
||||
path = g_build_filename (g_get_user_data_dir (), "mime", "packages", NULL);
|
||||
}
|
||||
path = g_build_filename (g_get_user_data_dir (), "mime", "packages", NULL);
|
||||
|
||||
errno = 0;
|
||||
if (g_mkdir_with_parents (path, 0700) == 0)
|
||||
@ -1015,17 +1014,13 @@ ensure_dir (DirType type,
|
||||
err = errno;
|
||||
display_name = g_filename_display_name (path);
|
||||
if (type == APP_DIR)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||
_("Can't create user application configuration folder %s: %s"),
|
||||
display_name, g_strerror (err));
|
||||
}
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||
_("Can't create user application configuration folder %s: %s"),
|
||||
display_name, g_strerror (err));
|
||||
else
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||
_("Can't create user MIME configuration folder %s: %s"),
|
||||
display_name, g_strerror (err));
|
||||
}
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||
_("Can't create user MIME configuration folder %s: %s"),
|
||||
display_name, g_strerror (err));
|
||||
|
||||
g_free (display_name);
|
||||
g_free (path);
|
||||
@ -1034,7 +1029,10 @@ ensure_dir (DirType type,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_default_list (const char *desktop_id, const char *content_type, gboolean add, GError **error)
|
||||
update_default_list (const char *desktop_id,
|
||||
const char *content_type,
|
||||
gboolean add,
|
||||
GError **error)
|
||||
{
|
||||
char *dirname, *filename;
|
||||
GKeyFile *key_file;
|
||||
@ -1167,9 +1165,9 @@ run_update_command (char *command,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error)
|
||||
g_desktop_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error)
|
||||
{
|
||||
char *filename, *basename, *mimetype;
|
||||
char *dirname;
|
||||
@ -1215,9 +1213,9 @@ g_desktop_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
g_desktop_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
{
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
GKeyFile *keyfile;
|
||||
@ -1267,7 +1265,7 @@ g_desktop_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
g_desktop_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
{
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
char *user_dirname;
|
||||
@ -1277,9 +1275,9 @@ g_desktop_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_desktop_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
g_desktop_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error)
|
||||
{
|
||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||
GKeyFile *keyfile;
|
||||
@ -1349,10 +1347,10 @@ g_desktop_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
* Returns: new #GAppInfo for given command.
|
||||
**/
|
||||
GAppInfo *
|
||||
g_app_info_create_from_commandline (const char *commandline,
|
||||
const char *application_name,
|
||||
GAppInfoCreateFlags flags,
|
||||
GError **error)
|
||||
g_app_info_create_from_commandline (const char *commandline,
|
||||
const char *application_name,
|
||||
GAppInfoCreateFlags flags,
|
||||
GError **error)
|
||||
{
|
||||
GKeyFile *key_file;
|
||||
char *dirname;
|
||||
@ -1475,13 +1473,14 @@ g_desktop_app_info_iface_init (GAppInfoIface *iface)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
app_info_in_list (GAppInfo *info, GList *l)
|
||||
app_info_in_list (GAppInfo *info,
|
||||
GList *list)
|
||||
{
|
||||
while (l != NULL)
|
||||
while (list != NULL)
|
||||
{
|
||||
if (g_app_info_equal (info, l->data))
|
||||
if (g_app_info_equal (info, list->data))
|
||||
return TRUE;
|
||||
l = l->next;
|
||||
list = list->next;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@ -1538,7 +1537,7 @@ g_app_info_get_all_for_type (const char *content_type)
|
||||
**/
|
||||
GAppInfo *
|
||||
g_app_info_get_default_for_type (const char *content_type,
|
||||
gboolean must_support_uris)
|
||||
gboolean must_support_uris)
|
||||
{
|
||||
GList *desktop_entries, *l;
|
||||
GAppInfo *info;
|
||||
@ -1587,7 +1586,9 @@ g_app_info_get_default_for_uri_scheme (const char *uri_scheme)
|
||||
|
||||
|
||||
static void
|
||||
get_apps_from_dir (GHashTable *apps, const char *dirname, const char *prefix)
|
||||
get_apps_from_dir (GHashTable *apps,
|
||||
const char *dirname,
|
||||
const char *prefix)
|
||||
{
|
||||
GDir *dir;
|
||||
const char *basename;
|
||||
@ -1653,9 +1654,9 @@ get_apps_from_dir (GHashTable *apps, const char *dirname, const char *prefix)
|
||||
}
|
||||
|
||||
static void
|
||||
collect_apps (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
collect_apps (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GList **infos = user_data;
|
||||
|
||||
@ -1717,14 +1718,16 @@ typedef struct {
|
||||
static MimeInfoCache *mime_info_cache = NULL;
|
||||
G_LOCK_DEFINE_STATIC (mime_info_cache);
|
||||
|
||||
static void mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir,
|
||||
const char *mime_type,
|
||||
char **new_desktop_file_ids);
|
||||
static void mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir,
|
||||
const char *mime_type,
|
||||
char **new_desktop_file_ids);
|
||||
|
||||
static MimeInfoCache * mime_info_cache_new (void);
|
||||
|
||||
static void
|
||||
destroy_info_cache_value (gpointer key, GList *value, gpointer data)
|
||||
destroy_info_cache_value (gpointer key,
|
||||
GList *value,
|
||||
gpointer data)
|
||||
{
|
||||
g_list_foreach (value, (GFunc)g_free, NULL);
|
||||
g_list_free (value);
|
||||
@ -1739,8 +1742,8 @@ destroy_info_cache_map (GHashTable *info_cache_map)
|
||||
|
||||
static gboolean
|
||||
mime_info_cache_dir_out_of_date (MimeInfoCacheDir *dir,
|
||||
const char *cache_file,
|
||||
time_t *timestamp)
|
||||
const char *cache_file,
|
||||
time_t *timestamp)
|
||||
{
|
||||
struct stat buf;
|
||||
char *filename;
|
||||
@ -1978,9 +1981,9 @@ mime_info_cache_dir_free (MimeInfoCacheDir *dir)
|
||||
}
|
||||
|
||||
static void
|
||||
mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir,
|
||||
const char *mime_type,
|
||||
char **new_desktop_file_ids)
|
||||
mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir,
|
||||
const char *mime_type,
|
||||
char **new_desktop_file_ids)
|
||||
{
|
||||
GList *desktop_file_ids;
|
||||
int i;
|
||||
@ -2120,7 +2123,8 @@ mime_info_cache_reload (const char *dir)
|
||||
}
|
||||
|
||||
static GList *
|
||||
append_desktop_entry (GList *list, const char *desktop_entry)
|
||||
append_desktop_entry (GList *list,
|
||||
const char *desktop_entry)
|
||||
{
|
||||
/* Add if not already in list, and valid */
|
||||
if (!g_list_find_custom (list, desktop_entry, (GCompareFunc) strcmp))
|
||||
|
@ -164,7 +164,7 @@ g_directory_monitor_init (GDirectoryMonitor *monitor)
|
||||
* Returns: %TRUE if the monitor was cancelled successfully. %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
||||
g_directory_monitor_cancel (GDirectoryMonitor *monitor)
|
||||
{
|
||||
GDirectoryMonitorClass *class;
|
||||
|
||||
@ -182,14 +182,15 @@ g_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
||||
/**
|
||||
* g_directory_monitor_set_rate_limit:
|
||||
* @monitor: a #GDirectoryMonitor.
|
||||
* @limit_msecs: an integer to set the limit of the directory monitor in milliseconds.
|
||||
* @limit_msecs: an integer to set the limit of the directory monitor
|
||||
* in milliseconds.
|
||||
*
|
||||
* Sets the limit of the directory monitor to watch for changes every @limit_msecs milliseconds.
|
||||
*
|
||||
* Sets the limit of the directory monitor to watch for changes every
|
||||
* @limit_msecs milliseconds.
|
||||
**/
|
||||
void
|
||||
g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor,
|
||||
int limit_msecs)
|
||||
int limit_msecs)
|
||||
{
|
||||
g_return_if_fail (G_IS_DIRECTORY_MONITOR (monitor));
|
||||
|
||||
@ -202,7 +203,8 @@ g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor,
|
||||
*
|
||||
* Checks whether @monitor is cancelled.
|
||||
*
|
||||
* Returns: %TRUE if the monitor on the directory was cancelled. %FALSE otherwise.
|
||||
* Returns: %TRUE if the monitor on the directory was cancelled.
|
||||
* %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_directory_monitor_is_cancelled (GDirectoryMonitor *monitor)
|
||||
@ -228,7 +230,7 @@ time_difference (guint32 from, guint32 to)
|
||||
|
||||
static RateLimiter *
|
||||
new_limiter (GDirectoryMonitor *monitor,
|
||||
GFile *file)
|
||||
GFile *file)
|
||||
{
|
||||
RateLimiter *limiter;
|
||||
|
||||
@ -240,7 +242,8 @@ new_limiter (GDirectoryMonitor *monitor,
|
||||
}
|
||||
|
||||
static void
|
||||
rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor, RateLimiter *limiter)
|
||||
rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor,
|
||||
RateLimiter *limiter)
|
||||
{
|
||||
if (limiter->send_virtual_changes_done_at != 0)
|
||||
{
|
||||
@ -250,7 +253,9 @@ rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor, RateLimi
|
||||
}
|
||||
|
||||
static void
|
||||
rate_limiter_send_delayed_change_now (GDirectoryMonitor *monitor, RateLimiter *limiter, guint32 time_now)
|
||||
rate_limiter_send_delayed_change_now (GDirectoryMonitor *monitor,
|
||||
RateLimiter *limiter,
|
||||
guint32 time_now)
|
||||
{
|
||||
if (limiter->send_delayed_change_at != 0)
|
||||
{
|
||||
@ -267,7 +272,10 @@ typedef struct {
|
||||
} ForEachData;
|
||||
|
||||
static gboolean
|
||||
calc_min_time (GDirectoryMonitor *monitor, RateLimiter *limiter, guint32 time_now, guint32 *min_time)
|
||||
calc_min_time (GDirectoryMonitor *monitor,
|
||||
RateLimiter *limiter,
|
||||
guint32 time_now,
|
||||
guint32 *min_time)
|
||||
{
|
||||
gboolean delete_me;
|
||||
guint32 expire_at;
|
||||
@ -305,9 +313,9 @@ calc_min_time (GDirectoryMonitor *monitor, RateLimiter *limiter, guint32 time_no
|
||||
}
|
||||
|
||||
static gboolean
|
||||
foreach_rate_limiter_fire (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
foreach_rate_limiter_fire (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
RateLimiter *limiter = value;
|
||||
ForEachData *data = user_data;
|
||||
@ -361,9 +369,9 @@ rate_limiter_timeout (gpointer timeout_data)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
foreach_rate_limiter_update (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
foreach_rate_limiter_update (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
RateLimiter *limiter = value;
|
||||
ForEachData *data = user_data;
|
||||
@ -372,7 +380,8 @@ foreach_rate_limiter_update (gpointer key,
|
||||
}
|
||||
|
||||
static void
|
||||
update_rate_limiter_timeout (GDirectoryMonitor *monitor, guint new_time)
|
||||
update_rate_limiter_timeout (GDirectoryMonitor *monitor,
|
||||
guint new_time)
|
||||
{
|
||||
ForEachData data;
|
||||
GSource *source;
|
||||
@ -416,16 +425,15 @@ update_rate_limiter_timeout (GDirectoryMonitor *monitor, guint new_time)
|
||||
* @other_file: a #GFile.
|
||||
* @event_type: a set of #GFileMonitorEvent flags.
|
||||
*
|
||||
* Emits the GDirectoryMonitor::changed signal if a change
|
||||
* Emits the #GDirectoryMonitor::changed signal if a change
|
||||
* has taken place. Should be called from directory monitor
|
||||
* implementations only.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_directory_monitor_emit_event (GDirectoryMonitor *monitor,
|
||||
GFile *child,
|
||||
GFile *other_file,
|
||||
GFileMonitorEvent event_type)
|
||||
GFile *child,
|
||||
GFile *other_file,
|
||||
GFileMonitorEvent event_type)
|
||||
{
|
||||
guint32 time_now, since_last;
|
||||
gboolean emit_now;
|
||||
|
31
gio/gdrive.c
31
gio/gdrive.c
@ -73,7 +73,7 @@ g_drive_get_type (void)
|
||||
|
||||
static void
|
||||
g_drive_class_init (gpointer g_class,
|
||||
gpointer class_data)
|
||||
gpointer class_data)
|
||||
{
|
||||
}
|
||||
|
||||
@ -260,14 +260,13 @@ g_drive_can_eject (GDrive *drive)
|
||||
* @user_data: a #gpointer.
|
||||
*
|
||||
* Mounts a drive.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_drive_mount (GDrive *drive,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_drive_mount (GDrive *drive,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
@ -299,9 +298,9 @@ g_drive_mount (GDrive *drive,
|
||||
* Returns: %TRUE, %FALSE if operation failed.
|
||||
**/
|
||||
gboolean
|
||||
g_drive_mount_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_drive_mount_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
@ -330,10 +329,10 @@ g_drive_mount_finish (GDrive *drive,
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_drive_eject (GDrive *drive,
|
||||
GCancellable *cancellable,
|
||||
g_drive_eject (GDrive *drive,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
@ -365,9 +364,9 @@ g_drive_eject (GDrive *drive,
|
||||
* %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_drive_eject_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_drive_eject_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include "gioalias.h"
|
||||
|
||||
static void g_dummy_file_file_iface_init (GFileIface *iface);
|
||||
static void g_dummy_file_file_iface_init (GFileIface *iface);
|
||||
|
||||
typedef struct {
|
||||
char *scheme;
|
||||
@ -70,7 +70,8 @@ static char * unescape_string (const gchar *escaped_string,
|
||||
const gchar *escaped_string_end,
|
||||
const gchar *illegal_characters);
|
||||
|
||||
static void g_string_append_encoded (GString *string, const char *encoded,
|
||||
static void g_string_append_encoded (GString *string,
|
||||
const char *encoded,
|
||||
const char *reserved_chars_allowed);
|
||||
|
||||
static void
|
||||
@ -218,7 +219,8 @@ g_dummy_file_equal (GFile *file1,
|
||||
}
|
||||
|
||||
static int
|
||||
safe_strcmp (const char *a, const char *b)
|
||||
safe_strcmp (const char *a,
|
||||
const char *b)
|
||||
{
|
||||
if (a == NULL)
|
||||
a = "";
|
||||
@ -245,7 +247,8 @@ uri_same_except_path (GDecodedUri *a,
|
||||
}
|
||||
|
||||
static const char *
|
||||
match_prefix (const char *path, const char *prefix)
|
||||
match_prefix (const char *path,
|
||||
const char *prefix)
|
||||
{
|
||||
int prefix_len;
|
||||
|
||||
@ -683,7 +686,8 @@ is_valid (char c, const char *reserved_chars_allowed)
|
||||
}
|
||||
|
||||
static void
|
||||
g_string_append_encoded (GString *string, const char *encoded,
|
||||
g_string_append_encoded (GString *string,
|
||||
const char *encoded,
|
||||
const char *reserved_chars_allowed)
|
||||
{
|
||||
unsigned char c;
|
||||
|
1109
gio/gfile.c
1109
gio/gfile.c
File diff suppressed because it is too large
Load Diff
@ -232,7 +232,7 @@ g_file_attribute_value_clear (GFileAttributeValue *attr)
|
||||
* Sets an attribute's value from another attribute.
|
||||
**/
|
||||
void
|
||||
g_file_attribute_value_set (GFileAttributeValue *attr,
|
||||
g_file_attribute_value_set (GFileAttributeValue *attr,
|
||||
const GFileAttributeValue *new_value)
|
||||
{
|
||||
g_return_if_fail (attr != NULL);
|
||||
|
@ -179,9 +179,9 @@ g_file_enumerator_next_file (GFileEnumerator *enumerator,
|
||||
* Return value: #TRUE on success or #FALSE on error.
|
||||
**/
|
||||
gboolean
|
||||
g_file_enumerator_close (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_file_enumerator_close (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFileEnumeratorClass *class;
|
||||
|
||||
@ -215,9 +215,9 @@ g_file_enumerator_close (GFileEnumerator *enumerator,
|
||||
}
|
||||
|
||||
static void
|
||||
next_async_callback_wrapper (GObject *source_object,
|
||||
next_async_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileEnumerator *enumerator = G_FILE_ENUMERATOR (source_object);
|
||||
|
||||
@ -254,12 +254,12 @@ next_async_callback_wrapper (GObject *source_object,
|
||||
* priority is %G_PRIORITY_DEFAULT.
|
||||
**/
|
||||
void
|
||||
g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileEnumeratorClass *class;
|
||||
GSimpleAsyncResult *simple;
|
||||
@ -320,9 +320,9 @@ g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
|
||||
* Returns:
|
||||
**/
|
||||
GList *
|
||||
g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GFileEnumeratorClass *class;
|
||||
GSimpleAsyncResult *simple;
|
||||
@ -346,9 +346,9 @@ g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
|
||||
}
|
||||
|
||||
static void
|
||||
close_async_callback_wrapper (GObject *source_object,
|
||||
close_async_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileEnumerator *enumerator = G_FILE_ENUMERATOR (source_object);
|
||||
|
||||
@ -362,18 +362,18 @@ close_async_callback_wrapper (GObject *source_object,
|
||||
/**
|
||||
* g_file_enumerator_close_async:
|
||||
* @enumerator: a #GFileEnumerator.
|
||||
* @io_priority: the io priority of the request. the io priority of the request
|
||||
* @io_priority: the io priority of the request.
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: callback to call when the request is satisfied
|
||||
* @user_data: the user_data to pass to callback function
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_enumerator_close_async (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_enumerator_close_async (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileEnumeratorClass *class;
|
||||
|
||||
@ -420,9 +420,9 @@ g_file_enumerator_close_async (GFileEnumerator *enumerator,
|
||||
* Returns: %TRUE if the close operation has finished successfully.
|
||||
**/
|
||||
gboolean
|
||||
g_file_enumerator_close_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_file_enumerator_close_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GFileEnumeratorClass *class;
|
||||
@ -476,8 +476,8 @@ g_file_enumerator_has_pending (GFileEnumerator *enumerator)
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_enumerator_set_pending (GFileEnumerator *enumerator,
|
||||
gboolean pending)
|
||||
g_file_enumerator_set_pending (GFileEnumerator *enumerator,
|
||||
gboolean pending)
|
||||
{
|
||||
g_return_if_fail (G_IS_FILE_ENUMERATOR (enumerator));
|
||||
|
||||
@ -491,8 +491,8 @@ typedef struct {
|
||||
|
||||
static void
|
||||
next_files_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
NextAsyncOp *op;
|
||||
GFileEnumeratorClass *class;
|
||||
@ -535,12 +535,12 @@ next_files_thread (GSimpleAsyncResult *res,
|
||||
|
||||
|
||||
static void
|
||||
g_file_enumerator_real_next_files_async (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_enumerator_real_next_files_async (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
NextAsyncOp *op;
|
||||
@ -575,8 +575,8 @@ g_file_enumerator_real_next_files_finish (GFileEnumerator *enumer
|
||||
|
||||
static void
|
||||
close_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GFileEnumeratorClass *class;
|
||||
GError *error = NULL;
|
||||
@ -598,11 +598,11 @@ close_async_thread (GSimpleAsyncResult *res,
|
||||
|
||||
|
||||
static void
|
||||
g_file_enumerator_real_close_async (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_enumerator_real_close_async (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
|
||||
@ -621,9 +621,9 @@ g_file_enumerator_real_close_async (GFileEnumerator *enumerator,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_file_enumerator_real_close_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_file_enumerator_real_close_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
g_assert (g_simple_async_result_get_source_tag (simple) ==
|
||||
|
@ -155,11 +155,11 @@ g_file_icon_icon_iface_init (GIconIface *iface)
|
||||
|
||||
|
||||
static GInputStream *
|
||||
g_file_icon_load (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_file_icon_load (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFileInputStream *stream;
|
||||
GFileIcon *file_icon = G_FILE_ICON (icon);
|
||||
@ -185,9 +185,9 @@ load_data_free (LoadData *data)
|
||||
}
|
||||
|
||||
static void
|
||||
load_async_callback (GObject *source_object,
|
||||
load_async_callback (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileInputStream *stream;
|
||||
GError *error = NULL;
|
||||
@ -223,11 +223,11 @@ load_async_callback (GObject *source_object,
|
||||
}
|
||||
|
||||
static void
|
||||
g_file_icon_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_icon_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileIcon *file_icon = G_FILE_ICON (icon);
|
||||
LoadData *data;
|
||||
@ -244,10 +244,10 @@ g_file_icon_load_async (GLoadableIcon *icon,
|
||||
}
|
||||
|
||||
static GInputStream *
|
||||
g_file_icon_load_finish (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error)
|
||||
g_file_icon_load_finish (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
|
||||
gpointer op;
|
||||
|
104
gio/gfileinfo.c
104
gio/gfileinfo.c
@ -257,7 +257,8 @@ g_file_info_new (void)
|
||||
* Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
|
||||
**/
|
||||
void
|
||||
g_file_info_copy_into (GFileInfo *src_info, GFileInfo *dest_info)
|
||||
g_file_info_copy_into (GFileInfo *src_info,
|
||||
GFileInfo *dest_info)
|
||||
{
|
||||
GFileAttribute *source, *dest;
|
||||
int i;
|
||||
@ -297,7 +298,7 @@ g_file_info_copy_into (GFileInfo *src_info, GFileInfo *dest_info)
|
||||
* Returns: a duplicate #GFileInfo of @other.
|
||||
**/
|
||||
GFileInfo *
|
||||
g_file_info_dup (GFileInfo *other)
|
||||
g_file_info_dup (GFileInfo *other)
|
||||
{
|
||||
GFileInfo *new;
|
||||
|
||||
@ -316,7 +317,7 @@ g_file_info_dup (GFileInfo *other)
|
||||
* Sets @mask on @info to match specific attribute types.
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_mask (GFileInfo *info,
|
||||
g_file_info_set_attribute_mask (GFileInfo *info,
|
||||
GFileAttributeMatcher *mask)
|
||||
{
|
||||
GFileAttribute *attr;
|
||||
@ -384,7 +385,7 @@ g_file_info_clear_status (GFileInfo *info)
|
||||
|
||||
static int
|
||||
g_file_info_find_place (GFileInfo *info,
|
||||
guint32 attribute)
|
||||
guint32 attribute)
|
||||
{
|
||||
int min, max, med;
|
||||
GFileAttribute *attrs;
|
||||
@ -415,7 +416,7 @@ g_file_info_find_place (GFileInfo *info,
|
||||
|
||||
static GFileAttributeValue *
|
||||
g_file_info_find_value (GFileInfo *info,
|
||||
guint32 attr_id)
|
||||
guint32 attr_id)
|
||||
{
|
||||
GFileAttribute *attrs;
|
||||
int i;
|
||||
@ -430,7 +431,7 @@ g_file_info_find_value (GFileInfo *info,
|
||||
}
|
||||
|
||||
static GFileAttributeValue *
|
||||
g_file_info_find_value_by_name (GFileInfo *info,
|
||||
g_file_info_find_value_by_name (GFileInfo *info,
|
||||
const char *attribute)
|
||||
{
|
||||
guint32 attr_id;
|
||||
@ -680,7 +681,7 @@ g_file_info_get_attribute_boolean (GFileInfo *info,
|
||||
*
|
||||
* Gets an unsigned 32-bit integer contained within the attribute. If the
|
||||
* attribute does not contain an unsigned 32-bit integer, or is invalid,
|
||||
* %0 will be returned.
|
||||
* 0 will be returned.
|
||||
*
|
||||
* Returns: an unsigned 32-bit integer from the attribute.
|
||||
**/
|
||||
@ -704,7 +705,7 @@ g_file_info_get_attribute_uint32 (GFileInfo *info,
|
||||
*
|
||||
* Gets a signed 32-bit integer contained within the attribute. If the
|
||||
* attribute does not contain a signed 32-bit integer, or is invalid,
|
||||
* %0 will be returned.
|
||||
* 0 will be returned.
|
||||
*
|
||||
* Returns: a signed 32-bit integer from the attribute.
|
||||
**/
|
||||
@ -728,7 +729,7 @@ g_file_info_get_attribute_int32 (GFileInfo *info,
|
||||
*
|
||||
* Gets a unsigned 64-bit integer contained within the attribute. If the
|
||||
* attribute does not contain an unsigned 64-bit integer, or is invalid,
|
||||
* %0 will be returned.
|
||||
* 0 will be returned.
|
||||
*
|
||||
* Returns: a unsigned 64-bit integer from the attribute.
|
||||
**/
|
||||
@ -752,7 +753,7 @@ g_file_info_get_attribute_uint64 (GFileInfo *info,
|
||||
*
|
||||
* Gets a signed 64-bit integer contained within the attribute. If the
|
||||
* attribute does not contain an signed 64-bit integer, or is invalid,
|
||||
* %0 will be returned.
|
||||
* 0 will be returned.
|
||||
*
|
||||
* Returns: a signed 64-bit integer from the attribute.
|
||||
**/
|
||||
@ -817,11 +818,10 @@ g_file_info_create_value_by_name (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute (GFileInfo *info,
|
||||
const char *attribute,
|
||||
g_file_info_set_attribute (GFileInfo *info,
|
||||
const char *attribute,
|
||||
const GFileAttributeValue *attr_value)
|
||||
{
|
||||
GFileAttributeValue *value;
|
||||
@ -843,12 +843,11 @@ g_file_info_set_attribute (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_object (GFileInfo *info,
|
||||
const char *attribute,
|
||||
GObject *attr_value)
|
||||
GObject *attr_value)
|
||||
{
|
||||
GFileAttributeValue *value;
|
||||
|
||||
@ -869,7 +868,6 @@ g_file_info_set_attribute_object (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_string (GFileInfo *info,
|
||||
@ -895,7 +893,6 @@ g_file_info_set_attribute_string (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_byte_string (GFileInfo *info,
|
||||
@ -921,12 +918,11 @@ g_file_info_set_attribute_byte_string (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_boolean (GFileInfo *info,
|
||||
const char *attribute,
|
||||
gboolean attr_value)
|
||||
gboolean attr_value)
|
||||
{
|
||||
GFileAttributeValue *value;
|
||||
|
||||
@ -946,9 +942,7 @@ g_file_info_set_attribute_boolean (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
|
||||
void
|
||||
g_file_info_set_attribute_uint32 (GFileInfo *info,
|
||||
const char *attribute,
|
||||
@ -973,12 +967,11 @@ g_file_info_set_attribute_uint32 (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_int32 (GFileInfo *info,
|
||||
const char *attribute,
|
||||
gint32 attr_value)
|
||||
g_file_info_set_attribute_int32 (GFileInfo *info,
|
||||
const char *attribute,
|
||||
gint32 attr_value)
|
||||
{
|
||||
GFileAttributeValue *value;
|
||||
|
||||
@ -998,7 +991,6 @@ g_file_info_set_attribute_int32 (GFileInfo *info,
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_attribute_uint64 (GFileInfo *info,
|
||||
@ -1283,9 +1275,7 @@ g_file_info_get_size (GFileInfo *info)
|
||||
*
|
||||
* Gets the modification time of the current @info and sets it
|
||||
* in @result.
|
||||
*
|
||||
**/
|
||||
|
||||
void
|
||||
g_file_info_get_modification_time (GFileInfo *info,
|
||||
GTimeVal *result)
|
||||
@ -1389,8 +1379,8 @@ g_file_info_get_sort_order (GFileInfo *info)
|
||||
* See %G_FILE_ATTRIBUTE_STD_TYPE.
|
||||
**/
|
||||
void
|
||||
g_file_info_set_file_type (GFileInfo *info,
|
||||
GFileType type)
|
||||
g_file_info_set_file_type (GFileInfo *info,
|
||||
GFileType type)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1437,7 +1427,6 @@ g_file_info_set_is_hidden (GFileInfo *info,
|
||||
*
|
||||
* Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
|
||||
* See %G_FILE_ATTRIBUTE_STD_IS_SYMLINK.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_is_symlink (GFileInfo *info,
|
||||
@ -1463,11 +1452,10 @@ g_file_info_set_is_symlink (GFileInfo *info,
|
||||
*
|
||||
* Sets the name attribute for the current #GFileInfo.
|
||||
* See %G_FILE_ATTRIBUTE_STD_NAME.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_name (GFileInfo *info,
|
||||
const char *name)
|
||||
g_file_info_set_name (GFileInfo *info,
|
||||
const char *name)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1490,11 +1478,10 @@ g_file_info_set_name (GFileInfo *info,
|
||||
*
|
||||
* Sets the display name for the current #GFileInfo.
|
||||
* See %G_FILE_ATTRIBUTE_STD_DISPLAY_NAME.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_display_name (GFileInfo *info,
|
||||
const char *display_name)
|
||||
g_file_info_set_display_name (GFileInfo *info,
|
||||
const char *display_name)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1517,12 +1504,10 @@ g_file_info_set_display_name (GFileInfo *info,
|
||||
*
|
||||
* Sets the edit name for the current file.
|
||||
* See %G_FILE_ATTRIBUTE_STD_EDIT_NAME.
|
||||
*
|
||||
**/
|
||||
|
||||
void
|
||||
g_file_info_set_edit_name (GFileInfo *info,
|
||||
const char *edit_name)
|
||||
g_file_info_set_edit_name (GFileInfo *info,
|
||||
const char *edit_name)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1545,11 +1530,10 @@ g_file_info_set_edit_name (GFileInfo *info,
|
||||
*
|
||||
* Sets the icon for a given #GFileInfo.
|
||||
* See %G_FILE_ATTRIBUTE_STD_ICON.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_icon (GFileInfo *info,
|
||||
GIcon *icon)
|
||||
g_file_info_set_icon (GFileInfo *info,
|
||||
GIcon *icon)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1572,11 +1556,10 @@ g_file_info_set_icon (GFileInfo *info,
|
||||
*
|
||||
* Sets the content type attribute for a given #GFileInfo.
|
||||
* See %G_FILE_ATTRIBUTE_STD_CONTENT_TYPE.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_content_type (GFileInfo *info,
|
||||
const char *content_type)
|
||||
g_file_info_set_content_type (GFileInfo *info,
|
||||
const char *content_type)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1599,11 +1582,10 @@ g_file_info_set_content_type (GFileInfo *info,
|
||||
*
|
||||
* Sets the %G_FILE_ATTRIBUTE_STD_SIZE attribute in the file info
|
||||
* to the given size.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_size (GFileInfo *info,
|
||||
goffset size)
|
||||
g_file_info_set_size (GFileInfo *info,
|
||||
goffset size)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1625,11 +1607,10 @@ g_file_info_set_size (GFileInfo *info,
|
||||
*
|
||||
* Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
|
||||
* info to the given time value.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_modification_time (GFileInfo *info,
|
||||
GTimeVal *mtime)
|
||||
g_file_info_set_modification_time (GFileInfo *info,
|
||||
GTimeVal *mtime)
|
||||
{
|
||||
static guint32 attr_mtime = 0, attr_mtime_usec;
|
||||
GFileAttributeValue *value;
|
||||
@ -1658,11 +1639,10 @@ g_file_info_set_modification_time (GFileInfo *info,
|
||||
*
|
||||
* Sets the %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET attribute in the file info
|
||||
* to the given symlink target.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_symlink_target (GFileInfo *info,
|
||||
const char *symlink_target)
|
||||
g_file_info_set_symlink_target (GFileInfo *info,
|
||||
const char *symlink_target)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1685,11 +1665,10 @@ g_file_info_set_symlink_target (GFileInfo *info,
|
||||
*
|
||||
* Sets the sort order attribute in the file info structure. See
|
||||
* %G_FILE_ATTRIBUTE_STD_SORT_ORDER.
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_info_set_sort_order (GFileInfo *info,
|
||||
gint32 sort_order)
|
||||
g_file_info_set_sort_order (GFileInfo *info,
|
||||
gint32 sort_order)
|
||||
{
|
||||
static guint32 attr = 0;
|
||||
GFileAttributeValue *value;
|
||||
@ -1725,7 +1704,8 @@ struct _GFileAttributeMatcher {
|
||||
|
||||
static void
|
||||
matcher_add (GFileAttributeMatcher *matcher,
|
||||
guint id, guint mask)
|
||||
guint id,
|
||||
guint mask)
|
||||
{
|
||||
SubMatcher *sub_matchers;
|
||||
int i;
|
||||
@ -1923,7 +1903,7 @@ g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher,
|
||||
|
||||
static gboolean
|
||||
matcher_matches_id (GFileAttributeMatcher *matcher,
|
||||
guint32 id)
|
||||
guint32 id)
|
||||
{
|
||||
SubMatcher *sub_matchers;
|
||||
int i;
|
||||
@ -1952,7 +1932,7 @@ matcher_matches_id (GFileAttributeMatcher *matcher,
|
||||
|
||||
static gboolean
|
||||
g_file_attribute_matcher_matches_id (GFileAttributeMatcher *matcher,
|
||||
guint32 id)
|
||||
guint32 id)
|
||||
{
|
||||
g_return_val_if_fail (matcher != NULL, FALSE);
|
||||
|
||||
|
@ -106,19 +106,19 @@ g_file_input_stream_init (GFileInputStream *stream)
|
||||
* @error: a #GError location to store the error occuring, or %NULL to
|
||||
* ignore.
|
||||
*
|
||||
* Queries a file input stream the given @attributes.his function blocks while querying
|
||||
* the stream. For the asynchronous (non-blocking) version of this function, see
|
||||
* g_file_input_stream_query_info_async(). While the stream is blocked,
|
||||
* the stream will set the pending flag internally, and any other operations on the
|
||||
* stream will fail with %G_IO_ERROR_PENDING.
|
||||
* Queries a file input stream the given @attributes.his function blocks
|
||||
* while querying the stream. For the asynchronous (non-blocking) version
|
||||
* of this function, see g_file_input_stream_query_info_async(). While the
|
||||
* stream is blocked, the stream will set the pending flag internally, and
|
||||
* any other operations on the stream will fail with %G_IO_ERROR_PENDING.
|
||||
*
|
||||
* Returns: a #GFileInfo, or %NULL on error.
|
||||
**/
|
||||
GFileInfo *
|
||||
g_file_input_stream_query_info (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_file_input_stream_query_info (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFileInputStreamClass *class;
|
||||
GInputStream *input_stream;
|
||||
@ -165,9 +165,9 @@ g_file_input_stream_query_info (GFileInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
async_ready_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
async_ready_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileInputStream *stream = G_FILE_INPUT_STREAM (source_object);
|
||||
|
||||
@ -186,8 +186,8 @@ async_ready_callback_wrapper (GObject *source_object,
|
||||
* @callback: callback to call when the request is satisfied
|
||||
* @user_data: the data to pass to callback function
|
||||
*
|
||||
* Queries the stream information asynchronously. For the synchronous version
|
||||
* of this function, see g_file_input_stream_query_info().
|
||||
* Queries the stream information asynchronously. For the synchronous
|
||||
* version of this function, see g_file_input_stream_query_info().
|
||||
*
|
||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||
* triggering the cancellable object from another thread. If the operation
|
||||
@ -195,12 +195,12 @@ async_ready_callback_wrapper (GObject *source_object,
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_file_input_stream_query_info_async (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_input_stream_query_info_async (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFileInputStreamClass *klass;
|
||||
GInputStream *input_stream;
|
||||
@ -242,17 +242,17 @@ g_file_input_stream_query_info_async (GFileInputStream *stream,
|
||||
* g_file_input_stream_query_info_finish:
|
||||
* @stream: a #GFileInputStream.
|
||||
* @result: a #GAsyncResult.
|
||||
* @error: a #GError location to store the error occuring, or %NULL to
|
||||
* ignore.
|
||||
* @error: a #GError location to store the error occuring,
|
||||
* or %NULL to ignore.
|
||||
*
|
||||
* Finishes an asynchronous info query operation.
|
||||
*
|
||||
* Returns: #GFileInfo.
|
||||
**/
|
||||
GFileInfo *
|
||||
g_file_input_stream_query_info_finish (GFileInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_file_input_stream_query_info_finish (GFileInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GFileInputStreamClass *class;
|
||||
@ -280,7 +280,7 @@ g_file_input_stream_query_info_finish (GFileInputStream *stream,
|
||||
* Returns: a #goffset with the position in the stream.
|
||||
**/
|
||||
goffset
|
||||
g_file_input_stream_tell (GFileInputStream *stream)
|
||||
g_file_input_stream_tell (GFileInputStream *stream)
|
||||
{
|
||||
GFileInputStreamClass *class;
|
||||
goffset offset;
|
||||
@ -311,7 +311,7 @@ g_file_input_stream_seekable_tell (GSeekable *seekable)
|
||||
* Returns: %TRUE if stream can be seeked. %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_file_input_stream_can_seek (GFileInputStream *stream)
|
||||
g_file_input_stream_can_seek (GFileInputStream *stream)
|
||||
{
|
||||
GFileInputStreamClass *class;
|
||||
gboolean can_seek;
|
||||
@ -343,8 +343,8 @@ g_file_input_stream_seekable_can_seek (GSeekable *seekable)
|
||||
* @offset: a #goffset to seek.
|
||||
* @type: a #GSeekType.
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||
* @error: a #GError location to store the error occuring, or %NULL to
|
||||
* ignore.
|
||||
* @error: a #GError location to store the error occuring, or
|
||||
* %NULL to ignore.
|
||||
*
|
||||
* Seeks in the file input stream.
|
||||
*
|
||||
@ -408,27 +408,27 @@ g_file_input_stream_seek (GFileInputStream *stream,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_file_input_stream_seekable_seek (GSeekable *seekable,
|
||||
goffset offset,
|
||||
GSeekType type,
|
||||
g_file_input_stream_seekable_seek (GSeekable *seekable,
|
||||
goffset offset,
|
||||
GSeekType type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
GError **error)
|
||||
{
|
||||
return g_file_input_stream_seek (G_FILE_INPUT_STREAM (seekable),
|
||||
offset, type, cancellable, error);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_file_input_stream_seekable_can_truncate (GSeekable *seekable)
|
||||
g_file_input_stream_seekable_can_truncate (GSeekable *seekable)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_file_input_stream_seekable_truncate (GSeekable *seekable,
|
||||
goffset offset,
|
||||
g_file_input_stream_seekable_truncate (GSeekable *seekable,
|
||||
goffset offset,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
GError **error)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Truncate not allowed on input stream"));
|
||||
@ -455,8 +455,8 @@ query_info_data_free (QueryInfoAsyncData *data)
|
||||
|
||||
static void
|
||||
query_info_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GFileInputStreamClass *class;
|
||||
GError *error = NULL;
|
||||
@ -484,12 +484,12 @@ query_info_async_thread (GSimpleAsyncResult *res,
|
||||
}
|
||||
|
||||
static void
|
||||
g_file_input_stream_real_query_info_async (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_file_input_stream_real_query_info_async (GFileInputStream *stream,
|
||||
char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
QueryInfoAsyncData *data;
|
||||
@ -505,9 +505,9 @@ g_file_input_stream_real_query_info_async (GFileInputStream *stream,
|
||||
}
|
||||
|
||||
static GFileInfo *
|
||||
g_file_input_stream_real_query_info_finish (GFileInputStream *stream,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
g_file_input_stream_real_query_info_finish (GFileInputStream *stream,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
|
||||
QueryInfoAsyncData *data;
|
||||
|
@ -211,11 +211,11 @@ g_filter_input_stream_get_base_stream (GFilterInputStream *stream)
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_filter_input_stream_read (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_filter_input_stream_read (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFilterInputStream *filter_stream;
|
||||
GInputStream *base_stream;
|
||||
@ -234,10 +234,10 @@ g_filter_input_stream_read (GInputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_filter_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_filter_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFilterInputStream *filter_stream;
|
||||
GInputStream *base_stream;
|
||||
@ -273,13 +273,13 @@ g_filter_input_stream_close (GInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_input_stream_read_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_filter_input_stream_read_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFilterInputStream *filter_stream;
|
||||
GInputStream *base_stream;
|
||||
@ -358,11 +358,11 @@ g_filter_input_stream_skip_finish (GInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_input_stream_close_async (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_filter_input_stream_close_async (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GFilterInputStream *filter_stream;
|
||||
GInputStream *base_stream;
|
||||
@ -375,8 +375,6 @@ g_filter_input_stream_close_async (GInputStream *stream,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -400,5 +398,3 @@ g_filter_input_stream_close_finish (GInputStream *stream,
|
||||
|
||||
#define __G_FILTER_INPUT_STREAM_C__
|
||||
#include "gioaliasdef.c"
|
||||
|
||||
/* vim: ts=2 sw=2 et */
|
||||
|
@ -128,10 +128,10 @@ g_filter_output_stream_class_init (GFilterOutputStreamClass *klass)
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_output_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
g_filter_output_stream_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
GObject *obj;
|
||||
@ -178,7 +178,7 @@ g_filter_output_stream_get_property (GObject *object,
|
||||
static void
|
||||
g_filter_output_stream_dispose (GObject *object)
|
||||
{
|
||||
GFilterOutputStream *stream;
|
||||
GFilterOutputStream *stream;
|
||||
|
||||
stream = G_FILTER_OUTPUT_STREAM (object);
|
||||
|
||||
@ -214,11 +214,11 @@ g_filter_output_stream_get_base_stream (GFilterOutputStream *stream)
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_filter_output_stream_write (GOutputStream *stream,
|
||||
const void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_filter_output_stream_write (GOutputStream *stream,
|
||||
const void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
gssize nwritten;
|
||||
@ -235,9 +235,9 @@ g_filter_output_stream_write (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_filter_output_stream_flush (GOutputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_filter_output_stream_flush (GOutputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
gboolean res;
|
||||
@ -269,13 +269,13 @@ g_filter_output_stream_close (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_output_stream_write_async (GOutputStream *stream,
|
||||
const void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
g_filter_output_stream_write_async (GOutputStream *stream,
|
||||
const void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
|
||||
@ -292,9 +292,9 @@ g_filter_output_stream_write_async (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_filter_output_stream_write_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_filter_output_stream_write_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
gssize nwritten;
|
||||
@ -309,11 +309,11 @@ g_filter_output_stream_write_finish (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_output_stream_flush_async (GOutputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
g_filter_output_stream_flush_async (GOutputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
|
||||
@ -327,9 +327,9 @@ g_filter_output_stream_flush_async (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_filter_output_stream_flush_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_filter_output_stream_flush_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
gboolean res;
|
||||
@ -344,11 +344,11 @@ g_filter_output_stream_flush_finish (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
g_filter_output_stream_close_async (GOutputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
g_filter_output_stream_close_async (GOutputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
|
||||
@ -362,9 +362,9 @@ g_filter_output_stream_close_async (GOutputStream *stream,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_filter_output_stream_close_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_filter_output_stream_close_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GFilterOutputStream *filter_stream;
|
||||
gboolean res;
|
||||
|
@ -248,12 +248,12 @@ g_input_stream_read (GInputStream *stream,
|
||||
* Return value: %TRUE on success, %FALSE if there was an error
|
||||
**/
|
||||
gboolean
|
||||
g_input_stream_read_all (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
gsize *bytes_read,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_input_stream_read_all (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
gsize *bytes_read,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gsize _bytes_read;
|
||||
gssize res;
|
||||
@ -309,10 +309,10 @@ g_input_stream_read_all (GInputStream *stream,
|
||||
* Return value: Number of bytes skipped, or -1 on error
|
||||
**/
|
||||
gssize
|
||||
g_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GInputStreamClass *class;
|
||||
gssize res;
|
||||
@ -359,10 +359,10 @@ g_input_stream_skip (GInputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_input_stream_real_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_input_stream_real_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GInputStreamClass *class;
|
||||
gssize ret, read_bytes;
|
||||
@ -489,7 +489,7 @@ g_input_stream_close (GInputStream *stream,
|
||||
}
|
||||
|
||||
static void
|
||||
async_ready_callback_wrapper (GObject *source_object,
|
||||
async_ready_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
@ -502,7 +502,7 @@ async_ready_callback_wrapper (GObject *source_object,
|
||||
}
|
||||
|
||||
static void
|
||||
async_ready_close_callback_wrapper (GObject *source_object,
|
||||
async_ready_close_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
@ -625,9 +625,9 @@ g_input_stream_read_async (GInputStream *stream,
|
||||
* Returns: number of bytes read in, or -1 on error.
|
||||
**/
|
||||
gssize
|
||||
g_input_stream_read_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_read_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GInputStreamClass *class;
|
||||
@ -757,9 +757,9 @@ g_input_stream_skip_async (GInputStream *stream,
|
||||
* Returns: the size of the bytes skipped, or %-1 on error.
|
||||
**/
|
||||
gssize
|
||||
g_input_stream_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GInputStreamClass *class;
|
||||
@ -800,11 +800,11 @@ g_input_stream_skip_finish (GInputStream *stream,
|
||||
* override one you must override all.
|
||||
**/
|
||||
void
|
||||
g_input_stream_close_async (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_input_stream_close_async (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GInputStreamClass *class;
|
||||
GSimpleAsyncResult *simple;
|
||||
@ -853,9 +853,9 @@ g_input_stream_close_async (GInputStream *stream,
|
||||
* Returns: %TRUE if the stream was closed successfully.
|
||||
**/
|
||||
gboolean
|
||||
g_input_stream_close_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_close_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple;
|
||||
GInputStreamClass *class;
|
||||
@ -918,8 +918,8 @@ g_input_stream_has_pending (GInputStream *stream)
|
||||
* Sets @stream has actions pending.
|
||||
**/
|
||||
void
|
||||
g_input_stream_set_pending (GInputStream *stream,
|
||||
gboolean pending)
|
||||
g_input_stream_set_pending (GInputStream *stream,
|
||||
gboolean pending)
|
||||
{
|
||||
g_return_if_fail (G_IS_INPUT_STREAM (stream));
|
||||
|
||||
@ -938,8 +938,8 @@ typedef struct {
|
||||
|
||||
static void
|
||||
read_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
ReadData *op;
|
||||
GInputStreamClass *class;
|
||||
@ -960,13 +960,13 @@ read_async_thread (GSimpleAsyncResult *res,
|
||||
}
|
||||
|
||||
static void
|
||||
g_input_stream_real_read_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_input_stream_real_read_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
ReadData *op;
|
||||
@ -982,9 +982,9 @@ g_input_stream_real_read_async (GInputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_input_stream_real_read_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_real_read_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
ReadData *op;
|
||||
@ -1005,8 +1005,8 @@ typedef struct {
|
||||
|
||||
static void
|
||||
skip_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
SkipData *op;
|
||||
GInputStreamClass *class;
|
||||
@ -1035,9 +1035,9 @@ typedef struct {
|
||||
} SkipFallbackAsyncData;
|
||||
|
||||
static void
|
||||
skip_callback_wrapper (GObject *source_object,
|
||||
skip_callback_wrapper (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GInputStreamClass *class;
|
||||
SkipFallbackAsyncData *data = user_data;
|
||||
@ -1139,9 +1139,9 @@ g_input_stream_real_skip_async (GInputStream *stream,
|
||||
}
|
||||
|
||||
static gssize
|
||||
g_input_stream_real_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_real_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
SkipData *op;
|
||||
@ -1153,8 +1153,8 @@ g_input_stream_real_skip_finish (GInputStream *stream,
|
||||
|
||||
static void
|
||||
close_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GInputStreamClass *class;
|
||||
GError *error = NULL;
|
||||
@ -1198,9 +1198,9 @@ g_input_stream_real_close_async (GInputStream *stream,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_input_stream_real_close_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
g_input_stream_real_close_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
g_assert (g_simple_async_result_get_source_tag (simple) == g_input_stream_real_close_async);
|
||||
|
@ -53,8 +53,8 @@ static GSList *active_jobs = NULL;
|
||||
|
||||
static GThreadPool *job_thread_pool = NULL;
|
||||
|
||||
static void io_job_thread (gpointer data,
|
||||
gpointer user_data);
|
||||
static void io_job_thread (gpointer data,
|
||||
gpointer user_data);
|
||||
|
||||
static void
|
||||
g_io_job_free (GIOJob *job)
|
||||
@ -65,9 +65,9 @@ g_io_job_free (GIOJob *job)
|
||||
}
|
||||
|
||||
static gint
|
||||
g_io_job_compare (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
g_io_job_compare (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
{
|
||||
const GIOJob *aa = a;
|
||||
const GIOJob *bb = b;
|
||||
@ -142,8 +142,8 @@ remove_active_job (GIOJob *job)
|
||||
}
|
||||
|
||||
static void
|
||||
io_job_thread (gpointer data,
|
||||
gpointer user_data)
|
||||
io_job_thread (gpointer data,
|
||||
gpointer user_data)
|
||||
{
|
||||
GIOJob *job = data;
|
||||
|
||||
@ -195,11 +195,11 @@ run_job_at_idle (gpointer data)
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_schedule_io_job (GIOJobFunc job_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable)
|
||||
g_schedule_io_job (GIOJobFunc job_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
static GOnce once_init = G_ONCE_INIT;
|
||||
GIOJob *job;
|
||||
@ -329,11 +329,11 @@ mainloop_proxy_notify (gpointer data)
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_io_job_send_to_mainloop (GIOJob *job,
|
||||
GIODataFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify,
|
||||
gboolean block)
|
||||
g_io_job_send_to_mainloop (GIOJob *job,
|
||||
GIODataFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify,
|
||||
gboolean block)
|
||||
{
|
||||
GSource *source;
|
||||
MainLoopProxy *proxy;
|
||||
|
@ -109,11 +109,11 @@ g_loadable_icon_base_init (gpointer g_class)
|
||||
* Returns: a #GInputStream to read the icon from.
|
||||
**/
|
||||
GInputStream *
|
||||
g_loadable_icon_load (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
g_loadable_icon_load (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GLoadableIconIface *iface;
|
||||
|
||||
@ -139,11 +139,11 @@ g_loadable_icon_load (GLoadableIcon *icon,
|
||||
*
|
||||
**/
|
||||
void
|
||||
g_loadable_icon_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_loadable_icon_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GLoadableIconIface *iface;
|
||||
|
||||
@ -168,10 +168,10 @@ g_loadable_icon_load_async (GLoadableIcon *icon,
|
||||
* Returns: a #GInputStream to read the icon from.
|
||||
**/
|
||||
GInputStream *
|
||||
g_loadable_icon_load_finish (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error)
|
||||
g_loadable_icon_load_finish (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error)
|
||||
{
|
||||
GLoadableIconIface *iface;
|
||||
|
||||
@ -212,8 +212,8 @@ load_data_free (LoadData *data)
|
||||
|
||||
static void
|
||||
load_async_thread (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
GObject *object,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GLoadableIconIface *iface;
|
||||
GInputStream *stream;
|
||||
@ -241,11 +241,11 @@ load_async_thread (GSimpleAsyncResult *res,
|
||||
|
||||
|
||||
static void
|
||||
g_loadable_icon_real_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
g_loadable_icon_real_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
LoadData *data;
|
||||
|
Loading…
Reference in New Issue
Block a user