Make GSocketSourceFunc return the GSocket

This is very useful when you have multiple sockets with sources.
This commit is contained in:
Alexander Larsson
2009-05-14 16:58:47 +02:00
parent 7ffdc91f51
commit bd87df9e73
4 changed files with 50 additions and 18 deletions

View File

@@ -24,6 +24,7 @@
#define __G_ASYNC_HELPER_H__
#include <gio/gio.h>
#include <glib-object.h>
G_BEGIN_DECLS
@@ -37,6 +38,9 @@ typedef struct
typedef gboolean (*GFDSourceFunc) (gpointer user_data,
GIOCondition condition,
int fd);
typedef gboolean (*GFDSourceObjectFunc) (GObject *object,
GIOCondition condition,
gpointer user_data);
void _g_queue_async_result (GAsyncResultData *result,
gpointer async_object,
@@ -44,9 +48,13 @@ void _g_queue_async_result (GAsyncResultData *result,
gpointer user_data,
GSourceFunc source_func);
GSource *_g_fd_source_new (int fd,
gushort events,
GCancellable *cancellable);
GSource *_g_fd_source_new_with_object (GObject *object,
int fd,
gushort events,
GCancellable *cancellable);
GSource *_g_fd_source_new (int fd,
gushort events,
GCancellable *cancellable);
G_END_DECLS