summaryrefslogtreecommitdiff
path: root/daemon/gvfsreadchannel.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2007-09-13 10:34:09 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-09-13 10:34:09 +0000
commit824891203199e3dd493846c94374020f422422db (patch)
tree1b13408d07d9f5ec38896e1ec2e71bc41e89a9a4 /daemon/gvfsreadchannel.h
parent5d528aa6ebe7d9a4b0b669e9654729654ee209db (diff)
downloadgvfs-824891203199e3dd493846c94374020f422422db.tar.gz
Rename GVfsReadStream to GVfsReadChannel
Make GVfsJobDBus class to share code Make GVfsJob backend be construct property Implement daemon-side support for dbus call cancellation Finish dbus call cancellation client-side Original git commit by Alexander Larsson <alex@greebo.(none)> at 1165257484 +0100 svn path=/trunk/; revision=217
Diffstat (limited to 'daemon/gvfsreadchannel.h')
-rw-r--r--daemon/gvfsreadchannel.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/daemon/gvfsreadchannel.h b/daemon/gvfsreadchannel.h
new file mode 100644
index 00000000..3ff59e1f
--- /dev/null
+++ b/daemon/gvfsreadchannel.h
@@ -0,0 +1,63 @@
+#ifndef __G_VFS_READ_CHANNEL_H__
+#define __G_VFS_READ_CHANNEL_H__
+
+#include <glib-object.h>
+#include <gvfsjob.h>
+#include <gvfsbackend.h>
+#include <gvfs/gvfstypes.h>
+
+G_BEGIN_DECLS
+
+#define G_TYPE_VFS_READ_CHANNEL (g_vfs_read_channel_get_type ())
+#define G_VFS_READ_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS_READ_CHANNEL, GVfsReadChannel))
+#define G_VFS_READ_CHANNEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS_READ_CHANNEL, GVfsReadChannelClass))
+#define G_IS_VFS_READ_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS_READ_CHANNEL))
+#define G_IS_VFS_READ_CHANNEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS_READ_CHANNEL))
+#define G_VFS_READ_CHANNEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS_READ_CHANNEL, GVfsReadChannelClass))
+
+typedef struct _GVfsReadChannel GVfsReadChannel;
+typedef struct _GVfsReadChannelClass GVfsReadChannelClass;
+typedef struct _GVfsReadChannelPrivate GVfsReadChannelPrivate;
+
+struct _GVfsReadChannel
+{
+ GObject parent_instance;
+
+ GVfsReadChannelPrivate *priv;
+};
+
+struct _GVfsReadChannelClass
+{
+ GObjectClass parent_class;
+
+ /* signals */
+
+ void (*new_job) (GVfsReadChannel *stream,
+ GVfsJob *job);
+ void (*closed) (GVfsReadChannel *stream);
+};
+
+GType g_vfs_read_channel_get_type (void) G_GNUC_CONST;
+
+GVfsReadChannel *g_vfs_read_channel_new (GVfsBackend *backend,
+ GError **error);
+int g_vfs_read_channel_steal_remote_fd (GVfsReadChannel *read_channel);
+GVfsBackend *g_vfs_read_channel_get_backend (GVfsReadChannel *read_channel);
+void g_vfs_read_channel_set_backend_handle (GVfsReadChannel *read_channel,
+ GVfsBackendHandle backend_handle);
+gboolean g_vfs_read_channel_has_job (GVfsReadChannel *read_channel);
+GVfsJob * g_vfs_read_channel_get_job (GVfsReadChannel *read_channel);
+void g_vfs_read_channel_send_data (GVfsReadChannel *read_channel,
+ char *buffer,
+ gsize count);
+void g_vfs_read_channel_send_error (GVfsReadChannel *read_channel,
+ GError *error);
+void g_vfs_read_channel_send_closed (GVfsReadChannel *read_channel);
+void g_vfs_read_channel_send_seek_offset (GVfsReadChannel *read_channel,
+ goffset offset);
+
+/* TODO: i/o priority? */
+
+G_END_DECLS
+
+#endif /* __G_VFS_READ_CHANNEL_H__ */