libgsf r968 - in trunk: . gsf gsf-gvfs tests



Author: doml
Date: Fri Mar 14 19:44:19 2008
New Revision: 968
URL: http://svn.gnome.org/viewvc/libgsf?rev=968&view=rev

Log:
2008-03-14  Dominic Lachowicz <domlachowicz gmail com>

        * libgsf-gio-1.pc.in:
        * tests/test-gio.c:
        * tests/test-gvfs.c:
        * tests/Makefile.am:
        * gsf/gsf-output-gio.h:
        * gsf/Makefile.am:
        * gsf/gsf-input-gio.c:
        * gsf/gsf-output-gio.c:
        * gsf/gsf-input-gio.h:
        * gsf-gvfs:
        * configure.in:
        * Makefile.am:
        * libgsf-gvfs-1.pc.in: Migrate names from "gvfs" to "gio";
        move GIO code to gsf/ and get rid of gsf-gvfs/



Added:
   trunk/gsf/gsf-input-gio.c
      - copied, changed from r967, /trunk/gsf-gvfs/gsf-input-gvfs.c
   trunk/gsf/gsf-input-gio.h
      - copied, changed from r966, /trunk/gsf-gvfs/gsf-input-gvfs.h
   trunk/gsf/gsf-output-gio.c
      - copied, changed from r967, /trunk/gsf-gvfs/gsf-output-gvfs.c
   trunk/gsf/gsf-output-gio.h
      - copied, changed from r966, /trunk/gsf-gvfs/gsf-output-gvfs.h
   trunk/libgsf-gio-1.pc.in
      - copied, changed from r965, /trunk/libgsf-gvfs-1.pc.in
   trunk/tests/test-gio.c
      - copied, changed from r965, /trunk/tests/test-gvfs.c
Removed:
   trunk/gsf-gvfs/.gitignore
   trunk/gsf-gvfs/Makefile.am
   trunk/gsf-gvfs/gsf-input-gvfs.c
   trunk/gsf-gvfs/gsf-input-gvfs.h
   trunk/gsf-gvfs/gsf-output-gvfs.c
   trunk/gsf-gvfs/gsf-output-gvfs.h
   trunk/libgsf-gvfs-1.pc.in
   trunk/tests/test-gvfs.c
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.in
   trunk/gsf/Makefile.am
   trunk/tests/Makefile.am

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Fri Mar 14 19:44:19 2008
@@ -10,10 +10,10 @@
   pkgconfig_DATA += libgsf-win32-1.pc
 endif
 if WITH_GIO
-  pkgconfig_DATA += libgsf-gvfs-1.pc
+  pkgconfig_DATA += libgsf-gio-1.pc
 endif
 
-SUBDIRS = po gsf gsf-gnome gsf-win32 gsf-gvfs doc tools tests m4
+SUBDIRS = po gsf gsf-gnome gsf-win32 doc tools tests m4
 
 if WITH_PYTHON
   SUBDIRS += python

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Mar 14 19:44:19 2008
@@ -448,7 +448,6 @@
 doc/Makefile
 gsf/Makefile
 gsf-gnome/Makefile
-gsf-gvfs/Makefile
 gsf-win32/Makefile
 tests/Makefile
 tools/Makefile
@@ -460,7 +459,7 @@
 libgsf-1.pc
 libgsf-1.spec
 libgsf-gnome-1.pc
-libgsf-gvfs-1.pc
+libgsf-gio-1.pc
 libgsf-gnome-1.spec
 libgsf-win32-1.pc
 libgsf-zip

Modified: trunk/gsf/Makefile.am
==============================================================================
--- trunk/gsf/Makefile.am	(original)
+++ trunk/gsf/Makefile.am	Fri Mar 14 19:44:19 2008
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) \
+AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) $(LIBGSF_GIO_CFLAGS) \
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"
 
 lib_LTLIBRARIES = libgsf-1.la
@@ -10,6 +10,19 @@
   libgsf_1_la_LDFLAGS += -no-undefined -export-symbols lib.def
 endif
 
+if WITH_GIO
+
+lib_LTLIBRARIES += libgsf-gio-1.la
+
+libgsf_gio_1_la_LIBADD  = $(LIBGSF_LIBS) $(LIBGSF_GIO_LIBS) $(top_builddir)/gsf/libgsf-1.la
+libgsf_gio_1_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined
+libgsf_gio_1_la_SOURCES =	\
+	gsf-input-gio.c		\
+	gsf-input-gio.h		\
+	gsf-output-gio.c 	\
+	gsf-output-gio.h
+endif
+
 libgsf_1_la_SOURCES =		\
 	gsf-utils.c		\
 	gsf-libxml.c		\
@@ -58,6 +71,9 @@
 	gsf-structured-blob.c	\
 	gsf-blob.c		\
 	gsf-clip-data.c		\
+	\
+	gsf-input-gio.h	\
+	gsf-output-gio.h	\
 	version.c
 #	gsf-output-transaction.c	\
 #	gsf-command-context.c	\

Copied: trunk/gsf/gsf-input-gio.c (from r967, /trunk/gsf-gvfs/gsf-input-gvfs.c)
==============================================================================
--- /trunk/gsf-gvfs/gsf-input-gvfs.c	(original)
+++ trunk/gsf/gsf-input-gio.c	Fri Mar 14 19:44:19 2008
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gsf-input-gvfs.c:
+ * gsf-input-gio.c:
  *
  * Copyright (C) 2007 Dom Lachowicz <cinamod hotmail com>
  *
@@ -20,14 +20,14 @@
  */
 
 #include <gsf-config.h>
-#include <gsf-gvfs/gsf-input-gvfs.h>
+#include <gsf/gsf-input-gio.h>
 #include <gsf/gsf-input-memory.h>
 #include <gsf/gsf-output-memory.h>
 #include <gsf/gsf-input-impl.h>
 #include <gsf/gsf-impl-utils.h>
 #include <string.h>
 
-struct _GsfInputGvfs {
+struct _GsfInputGio {
 	GsfInput     input;
 	GFile        *file;
 	GInputStream *stream;
@@ -37,7 +37,7 @@
 
 typedef struct {
 	GsfInputClass input_class;
-} GsfInputGvfsClass;
+} GsfInputGioClass;
 
 static gboolean
 can_seek (GInputStream *stream)
@@ -99,9 +99,9 @@
 }
 
 GsfInput *
-gsf_input_gvfs_new (GFile *file, GError **err)
+gsf_input_gio_new (GFile *file, GError **err)
 {
-	GsfInputGvfs *input;
+	GsfInputGio *input;
 	GInputStream *stream;
 	GFileInfo    *info;
 
@@ -119,7 +119,7 @@
 	if (!can_seek (stream))
 		return make_local_copy (file, stream);
 
-	input = g_object_new (GSF_INPUT_GVFS_TYPE, NULL);
+	input = g_object_new (GSF_INPUT_GIO_TYPE, NULL);
 	if (G_UNLIKELY (NULL == input)) {
 		g_input_stream_close (stream, NULL, NULL);
 		g_object_unref (G_OBJECT (stream));
@@ -151,7 +151,7 @@
 }
 
 GsfInput *
-gsf_input_gvfs_new_for_path (char const *path, GError **err)
+gsf_input_gio_new_for_path (char const *path, GError **err)
 {
 	GFile *file;
 	GsfInput *input;
@@ -165,14 +165,14 @@
 
 	file = g_file_new_for_path (path);
 
-	input = gsf_input_gvfs_new (file, err);
+	input = gsf_input_gio_new (file, err);
 	g_object_unref (G_OBJECT (file));
 	
 	return input;
 }
 
 GsfInput *
-gsf_input_gvfs_new_for_uri (char const *uri, GError **err)
+gsf_input_gio_new_for_uri (char const *uri, GError **err)
 {
 	GFile *file;
 	GsfInput *input;
@@ -186,17 +186,17 @@
 
 	file = g_file_new_for_uri (uri);
 
-	input = gsf_input_gvfs_new (file, err);
+	input = gsf_input_gio_new (file, err);
 	g_object_unref (G_OBJECT (file));
 	
 	return input;
 }
 
 static void
-gsf_input_gvfs_finalize (GObject *obj)
+gsf_input_gio_finalize (GObject *obj)
 {
 	GObjectClass *parent_class;
-	GsfInputGvfs *input = (GsfInputGvfs *)obj;
+	GsfInputGio *input = (GsfInputGio *)obj;
 
 	g_input_stream_close (input->stream, NULL, NULL);
 	g_object_unref (G_OBJECT (input->stream));
@@ -217,9 +217,9 @@
 }
 
 static GsfInput *
-gsf_input_gvfs_dup (GsfInput *src_input, GError **err)
+gsf_input_gio_dup (GsfInput *src_input, GError **err)
 {
-	GsfInputGvfs *src = (GsfInputGvfs *)src_input;
+	GsfInputGio *src = (GsfInputGio *)src_input;
 	GFile *clone;
 
 	g_return_val_if_fail (src_input != NULL, NULL);
@@ -229,8 +229,8 @@
 	if (clone != NULL) {
 		GsfInput *dst;
 
-		dst = gsf_input_gvfs_new (clone, err);
-	        g_object_unref (G_OBJECT (clone)); /* gsf_input_gvfs_new() adds a ref, or fails to create a new file. 
+		dst = gsf_input_gio_new (clone, err);
+	        g_object_unref (G_OBJECT (clone)); /* gsf_input_gio_new() adds a ref, or fails to create a new file. 
 						      in any case, we need to unref the clone */
 		return dst;
 	}
@@ -239,28 +239,28 @@
 }
 
 static guint8 const *
-gsf_input_gvfs_read (GsfInput *input, size_t num_bytes,
+gsf_input_gio_read (GsfInput *input, size_t num_bytes,
 		     guint8 *buffer)
 {
-	GsfInputGvfs *gvfs = GSF_INPUT_GVFS (input);
+	GsfInputGio *gio = GSF_INPUT_GIO (input);
 	size_t total_read = 0;
 
-	g_return_val_if_fail (gvfs != NULL, NULL);
-	g_return_val_if_fail (gvfs->stream != NULL, NULL);
+	g_return_val_if_fail (gio != NULL, NULL);
+	g_return_val_if_fail (gio->stream != NULL, NULL);
 
 	if (buffer == NULL) {
-		if (gvfs->buf_size < num_bytes) {
-			gvfs->buf_size = num_bytes;
-			g_free (gvfs->buf);
-			gvfs->buf = g_new (guint8, gvfs->buf_size);
+		if (gio->buf_size < num_bytes) {
+			gio->buf_size = num_bytes;
+			g_free (gio->buf);
+			gio->buf = g_new (guint8, gio->buf_size);
 		}
-		buffer = gvfs->buf;
+		buffer = gio->buf;
 	}
 
 	while (1) {
 		gssize nread;
 		
-		nread = g_input_stream_read (gvfs->stream, (buffer + total_read), (num_bytes - total_read), NULL, NULL);
+		nread = g_input_stream_read (gio->stream, (buffer + total_read), (num_bytes - total_read), NULL, NULL);
 		
 		if (nread >= 0) {
 			total_read += nread;
@@ -275,41 +275,41 @@
 }
 
 static gboolean
-gsf_input_gvfs_seek (GsfInput *input, gsf_off_t offset, GSeekType whence)
+gsf_input_gio_seek (GsfInput *input, gsf_off_t offset, GSeekType whence)
 {
-	GsfInputGvfs *gvfs = GSF_INPUT_GVFS (input);
+	GsfInputGio *gio = GSF_INPUT_GIO (input);
 
-	g_return_val_if_fail (gvfs != NULL, TRUE);
-	g_return_val_if_fail (gvfs->stream != NULL, TRUE);
-	g_return_val_if_fail (can_seek (gvfs->stream), TRUE);
+	g_return_val_if_fail (gio != NULL, TRUE);
+	g_return_val_if_fail (gio->stream != NULL, TRUE);
+	g_return_val_if_fail (can_seek (gio->stream), TRUE);
 
-	return (g_seekable_seek (G_SEEKABLE (gvfs->stream), offset, whence, NULL, NULL) ? FALSE : TRUE);
+	return (g_seekable_seek (G_SEEKABLE (gio->stream), offset, whence, NULL, NULL) ? FALSE : TRUE);
 }
 
 static void
-gsf_input_gvfs_init (GObject *obj)
+gsf_input_gio_init (GObject *obj)
 {
-	GsfInputGvfs *gvfs = GSF_INPUT_GVFS (obj);
+	GsfInputGio *gio = GSF_INPUT_GIO (obj);
 
-	gvfs->file = NULL;
-	gvfs->stream = NULL;
-	gvfs->buf  = NULL;
-	gvfs->buf_size = 0;
+	gio->file = NULL;
+	gio->stream = NULL;
+	gio->buf  = NULL;
+	gio->buf_size = 0;
 }
 
 static void
-gsf_input_gvfs_class_init (GObjectClass *gobject_class)
+gsf_input_gio_class_init (GObjectClass *gobject_class)
 {
 	GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class);
 
-	gobject_class->finalize = gsf_input_gvfs_finalize;
-	input_class->Dup	= gsf_input_gvfs_dup;
-	input_class->Read	= gsf_input_gvfs_read;
-	input_class->Seek	= gsf_input_gvfs_seek;
+	gobject_class->finalize = gsf_input_gio_finalize;
+	input_class->Dup	= gsf_input_gio_dup;
+	input_class->Read	= gsf_input_gio_read;
+	input_class->Seek	= gsf_input_gio_seek;
 }
 
-GSF_CLASS (GsfInputGvfs, gsf_input_gvfs,
-	   gsf_input_gvfs_class_init, gsf_input_gvfs_init, GSF_INPUT_TYPE)
+GSF_CLASS (GsfInputGio, gsf_input_gio,
+	   gsf_input_gio_class_init, gsf_input_gio_init, GSF_INPUT_TYPE)
 
 /***************************************************************************/
 /***************************************************************************/

Copied: trunk/gsf/gsf-input-gio.h (from r966, /trunk/gsf-gvfs/gsf-input-gvfs.h)
==============================================================================
--- /trunk/gsf-gvfs/gsf-input-gvfs.h	(original)
+++ trunk/gsf/gsf-input-gio.h	Fri Mar 14 19:44:19 2008
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gsf-input-gvfs.h: 
+ * gsf-input-gio.h: 
  *
  * Copyright (C) 2007 Dom Lachowicz <cinamod hotmail com>
  *
@@ -19,25 +19,25 @@
  * USA
  */
 
-#ifndef GSF_INPUT_GVFS_H
-#define GSF_INPUT_GVFS_H
+#ifndef GSF_INPUT_GIO_H
+#define GSF_INPUT_GIO_H
 
 #include <gsf/gsf-input.h>
 #include <gio/gio.h>
 
 G_BEGIN_DECLS
 
-#define GSF_INPUT_GVFS_TYPE        (gsf_input_gvfs_get_type ())
-#define GSF_INPUT_GVFS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_GVFS_TYPE, GsfInputGvfs))
-#define GSF_IS_INPUT_GVFS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_GVFS_TYPE))
-
-typedef struct _GsfInputGvfs GsfInputGvfs;
-
-GType     gsf_input_gvfs_get_type (void);
-GsfInput *gsf_input_gvfs_new (GFile *file, GError **err);
-GsfInput *gsf_input_gvfs_new_for_path (char const *path, GError **err);
-GsfInput *gsf_input_gvfs_new_for_uri (char const *uri, GError **err);
+#define GSF_INPUT_GIO_TYPE        (gsf_input_gio_get_type ())
+#define GSF_INPUT_GIO(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_GIO_TYPE, GsfInputGio))
+#define GSF_IS_INPUT_GIO(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_GIO_TYPE))
+
+typedef struct _GsfInputGio GsfInputGio;
+
+GType     gsf_input_gio_get_type (void);
+GsfInput *gsf_input_gio_new (GFile *file, GError **err);
+GsfInput *gsf_input_gio_new_for_path (char const *path, GError **err);
+GsfInput *gsf_input_gio_new_for_uri (char const *uri, GError **err);
 
 G_END_DECLS
 
-#endif /* GSF_INPUT_GVFS_H */
+#endif /* GSF_INPUT_GIO_H */

Copied: trunk/gsf/gsf-output-gio.c (from r967, /trunk/gsf-gvfs/gsf-output-gvfs.c)
==============================================================================
--- /trunk/gsf-gvfs/gsf-output-gvfs.c	(original)
+++ trunk/gsf/gsf-output-gio.c	Fri Mar 14 19:44:19 2008
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gsf-output-gvfs.c:
+ * gsf-output-gio.c:
  *
  * Copyright (C) 2007 Dom Lachowicz <cinamod hotmail com>
  *
@@ -20,12 +20,12 @@
  */
 
 #include <gsf-config.h>
-#include <gsf-gvfs/gsf-output-gvfs.h>
+#include <gsf/gsf-output-gio.h>
 #include <gsf/gsf-output-impl.h>
 #include <gsf/gsf-impl-utils.h>
 #include <string.h>
 
-struct _GsfOutputGvfs {
+struct _GsfOutputGio {
 	GsfOutput output;
 	GFile *file;
 	GOutputStream *stream;
@@ -33,7 +33,7 @@
 
 typedef struct {
 	GsfOutputClass output_class;
-} GsfOutputGvfsClass;
+} GsfOutputGioClass;
 
 static gboolean
 can_seek (GOutputStream *stream)
@@ -45,7 +45,7 @@
 }
 
 static GsfOutput *
-wrap_if_not_seekable (GsfOutputGvfs *output)
+wrap_if_not_seekable (GsfOutputGio *output)
 {
 	if (!can_seek (output->stream)) {
 		/* todo: return a wrapper around the output that's seekable */
@@ -55,9 +55,9 @@
 }
 
 GsfOutput *
-gsf_output_gvfs_new (GFile *file)
+gsf_output_gio_new (GFile *file)
 {
-	GsfOutputGvfs *output;
+	GsfOutputGio *output;
 	GOutputStream *stream;
 
 	g_return_val_if_fail (file != NULL, NULL);
@@ -67,7 +67,7 @@
 		return NULL;
 	}
 
-	output = g_object_new (GSF_OUTPUT_GVFS_TYPE, NULL);
+	output = g_object_new (GSF_OUTPUT_GIO_TYPE, NULL);
 	if (G_UNLIKELY (NULL == output)) {
 		g_output_stream_close (stream, NULL, NULL);
 		g_object_unref (G_OBJECT (stream));
@@ -82,7 +82,7 @@
 }
 
 GsfOutput *
-gsf_output_gvfs_new_for_path (char const *path, GError **err)
+gsf_output_gio_new_for_path (char const *path, GError **err)
 {
 	GFile *file;
 	GsfOutput *output;
@@ -96,14 +96,14 @@
 
 	file = g_file_new_for_path (path);
 
-	output = gsf_output_gvfs_new (file);
+	output = gsf_output_gio_new (file);
 	g_object_unref (G_OBJECT (file));
 	
 	return output;
 }
 
 GsfOutput *
-gsf_output_gvfs_new_for_uri (char const *uri, GError **err)
+gsf_output_gio_new_for_uri (char const *uri, GError **err)
 {
 	GFile *file;
 	GsfOutput *output;
@@ -117,24 +117,24 @@
 
 	file = g_file_new_for_uri (uri);
 
-	output = gsf_output_gvfs_new (file);
+	output = gsf_output_gio_new (file);
 	g_object_unref (G_OBJECT (file));
 	
 	return output;
 }
 
 static gboolean
-gsf_output_gvfs_close (GsfOutput *output)
+gsf_output_gio_close (GsfOutput *output)
 {
-	GsfOutputGvfs *gvfs = GSF_OUTPUT_GVFS (output);
+	GsfOutputGio *gio = GSF_OUTPUT_GIO (output);
 
-	if (gvfs->stream != NULL) {
-		g_output_stream_close (gvfs->stream, NULL, NULL);
-		g_object_unref (G_OBJECT (gvfs->stream));
-		gvfs->stream = NULL;
+	if (gio->stream != NULL) {
+		g_output_stream_close (gio->stream, NULL, NULL);
+		g_object_unref (G_OBJECT (gio->stream));
+		gio->stream = NULL;
 		
-		g_object_unref (G_OBJECT (gvfs->file));
-		gvfs->file = NULL;
+		g_object_unref (G_OBJECT (gio->file));
+		gio->file = NULL;
 
 		return TRUE;
 	}
@@ -143,12 +143,12 @@
 }
 
 static void
-gsf_output_gvfs_finalize (GObject *obj)
+gsf_output_gio_finalize (GObject *obj)
 {
 	GObjectClass *parent_class;
-	GsfOutputGvfs *output = (GsfOutputGvfs *)obj;
+	GsfOutputGio *output = (GsfOutputGio *)obj;
 
-	gsf_output_gvfs_close (GSF_OUTPUT(output));
+	gsf_output_gio_close (GSF_OUTPUT(output));
 
 	parent_class = g_type_class_peek (GSF_OUTPUT_TYPE);
 	if (parent_class && parent_class->finalize)
@@ -156,20 +156,20 @@
 }
 
 static gboolean
-gsf_output_gvfs_write (GsfOutput *output,
+gsf_output_gio_write (GsfOutput *output,
 		       size_t num_bytes,
 		       guint8 const *buffer)
 {
-	GsfOutputGvfs *gvfs = GSF_OUTPUT_GVFS (output);
+	GsfOutputGio *gio = GSF_OUTPUT_GIO (output);
 	size_t total_written = 0;
 
-	g_return_val_if_fail (gvfs != NULL, FALSE);
-	g_return_val_if_fail (gvfs->stream != NULL, FALSE);
+	g_return_val_if_fail (gio != NULL, FALSE);
+	g_return_val_if_fail (gio->stream != NULL, FALSE);
 
 	while (1) {
 		gssize nwritten;
 
-		nwritten = g_output_stream_write (gvfs->stream, (guint8 *)(buffer + total_written), (num_bytes - total_written), NULL, NULL);
+		nwritten = g_output_stream_write (gio->stream, (guint8 *)(buffer + total_written), (num_bytes - total_written), NULL, NULL);
 
 		if (nwritten >= 0) {
 			total_written += nwritten;
@@ -184,41 +184,41 @@
 }
 
 static gboolean
-gsf_output_gvfs_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence)
+gsf_output_gio_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence)
 {
-	GsfOutputGvfs *gvfs = GSF_OUTPUT_GVFS (output);
+	GsfOutputGio *gio = GSF_OUTPUT_GIO (output);
 
-	g_return_val_if_fail (gvfs != NULL, FALSE);
-	g_return_val_if_fail (gvfs->stream != NULL, FALSE);
+	g_return_val_if_fail (gio != NULL, FALSE);
+	g_return_val_if_fail (gio->stream != NULL, FALSE);
 	
-	if (!can_seek (gvfs->stream))
+	if (!can_seek (gio->stream))
 		return FALSE;
 
-	return g_seekable_seek (G_SEEKABLE (gvfs->stream), offset, whence, NULL, NULL);
+	return g_seekable_seek (G_SEEKABLE (gio->stream), offset, whence, NULL, NULL);
 }
 
 static void
-gsf_output_gvfs_init (GObject *obj)
+gsf_output_gio_init (GObject *obj)
 {
-	GsfOutputGvfs *gvfs = GSF_OUTPUT_GVFS (obj);
+	GsfOutputGio *gio = GSF_OUTPUT_GIO (obj);
 
-	gvfs->file   = NULL;
-	gvfs->stream = NULL;
+	gio->file   = NULL;
+	gio->stream = NULL;
 }
 
 static void
-gsf_output_gvfs_class_init (GObjectClass *gobject_class)
+gsf_output_gio_class_init (GObjectClass *gobject_class)
 {
 	GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class);
 
-	gobject_class->finalize = gsf_output_gvfs_finalize;
-	output_class->Close	= gsf_output_gvfs_close;
-	output_class->Write	= gsf_output_gvfs_write;
-	output_class->Seek	= gsf_output_gvfs_seek;
+	gobject_class->finalize = gsf_output_gio_finalize;
+	output_class->Close	= gsf_output_gio_close;
+	output_class->Write	= gsf_output_gio_write;
+	output_class->Seek	= gsf_output_gio_seek;
 }
 
-GSF_CLASS (GsfOutputGvfs, gsf_output_gvfs,
-	   gsf_output_gvfs_class_init, gsf_output_gvfs_init, GSF_OUTPUT_TYPE)
+GSF_CLASS (GsfOutputGio, gsf_output_gio,
+	   gsf_output_gio_class_init, gsf_output_gio_init, GSF_OUTPUT_TYPE)
 
 /***************************************************************************/
 /***************************************************************************/

Copied: trunk/gsf/gsf-output-gio.h (from r966, /trunk/gsf-gvfs/gsf-output-gvfs.h)
==============================================================================
--- /trunk/gsf-gvfs/gsf-output-gvfs.h	(original)
+++ trunk/gsf/gsf-output-gio.h	Fri Mar 14 19:44:19 2008
@@ -1,6 +1,6 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * gsf-output-gvfs.h: 
+ * gsf-output-gio.h: 
  *
  * Copyright (C) 2007 Dom Lachowicz <cinamod hotmail com>
  *
@@ -19,25 +19,25 @@
  * USA
  */
 
-#ifndef GSF_OUTPUT_GVFS_H
-#define GSF_OUTPUT_GVFS_H
+#ifndef GSF_OUTPUT_GIO_H
+#define GSF_OUTPUT_GIO_H
 
 #include <gsf/gsf-output.h>
 #include <gio/gio.h>
 
 G_BEGIN_DECLS
 
-#define GSF_OUTPUT_GVFS_TYPE        (gsf_output_gvfs_get_type ())
-#define GSF_OUTPUT_GVFS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_GVFS_TYPE, GsfOutputGvfs))
-#define GSF_IS_OUTPUT_GVFS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_GVFS_TYPE))
-
-typedef struct _GsfOutputGvfs GsfOutputGvfs;
-
-GType      gsf_output_gvfs_get_type (void);
-GsfOutput *gsf_output_gvfs_new      (GFile *file);
-GsfOutput *gsf_output_gvfs_new_for_path (char const *path, GError **err);
-GsfOutput *gsf_output_gvfs_new_for_uri (char const *uri, GError **err);
+#define GSF_OUTPUT_GIO_TYPE        (gsf_output_gio_get_type ())
+#define GSF_OUTPUT_GIO(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_GIO_TYPE, GsfOutputGio))
+#define GSF_IS_OUTPUT_GIO(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_GIO_TYPE))
+
+typedef struct _GsfOutputGio GsfOutputGio;
+
+GType      gsf_output_gio_get_type (void);
+GsfOutput *gsf_output_gio_new      (GFile *file);
+GsfOutput *gsf_output_gio_new_for_path (char const *path, GError **err);
+GsfOutput *gsf_output_gio_new_for_uri (char const *uri, GError **err);
 
 G_END_DECLS
 
-#endif /* GSF_OUTPUT_GVFS_H */
+#endif /* GSF_OUTPUT_GIO_H */

Copied: trunk/libgsf-gio-1.pc.in (from r965, /trunk/libgsf-gvfs-1.pc.in)
==============================================================================
--- /trunk/libgsf-gvfs-1.pc.in	(original)
+++ trunk/libgsf-gio-1.pc.in	Fri Mar 14 19:44:19 2008
@@ -3,9 +3,9 @@
 libdir= libdir@
 includedir= includedir@
 
-Name: libgsf-gvfs-1
-Description: GVFS specific extensions to libgsf
+Name: libgsf-gio-1
+Description: GIO specific extensions to libgsf
 Version: @VERSION@
-Requires: libgsf-1 gio-standalone >= 0.0.1
-Libs: -L${libdir} -lgsf-gvfs-1
+Requires: libgsf-1 gio-2.0
+Libs: -L${libdir} -lgsf-gio-1
 Cflags:

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Fri Mar 14 19:44:19 2008
@@ -12,6 +12,6 @@
 		 test-http # test-xml
 
 if WITH_GIO
-check_PROGRAMS += test-gvfs
-test_gvfs_LDADD = $(top_builddir)/gsf-gvfs/libgsf-gvfs-1.la $(LDADD) $(LIBGSF_GIO_LIBS)
+check_PROGRAMS += test-gio
+test_gio_LDADD = $(top_builddir)/gsf/libgsf-gio-1.la $(LDADD) $(LIBGSF_GIO_LIBS)
 endif

Copied: trunk/tests/test-gio.c (from r965, /trunk/tests/test-gvfs.c)
==============================================================================
--- /trunk/tests/test-gvfs.c	(original)
+++ trunk/tests/test-gio.c	Fri Mar 14 19:44:19 2008
@@ -21,9 +21,9 @@
 
 #include <stdio.h>
 #include <gsf/gsf-utils.h>
-#include <gsf-gvfs/gsf-input-gvfs.h>
+#include <gsf/gsf-input-gio.h>
 #include <gsf/gsf-infile.h>
-#include <gsf-gvfs/gsf-output-gvfs.h>
+#include <gsf/gsf-output-gio.h>
 #include <gsf/gsf-outfile.h>
 
 static int
@@ -34,7 +34,7 @@
 	GError     *err = NULL;
 	int         rval = 0;
 
-	input = gsf_input_gvfs_new_for_path (argv[1], &err);
+	input = gsf_input_gio_new_for_path (argv[1], &err);
 	if (input == NULL) {
 
 		g_return_val_if_fail (err != NULL, 1);
@@ -44,7 +44,7 @@
 		return 1;
 	}
 
-	output = gsf_output_gvfs_new_for_path (argv[2], &err);
+	output = gsf_output_gio_new_for_path (argv[2], &err);
 	if (output == NULL) {
 
 		g_return_val_if_fail (err != NULL, 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]