libgsf r966 - in trunk: . gsf-gvfs tests
- From: doml svn gnome org
- To: svn-commits-list gnome org
- Subject: libgsf r966 - in trunk: . gsf-gvfs tests
- Date: Fri, 14 Mar 2008 19:22:50 +0000 (GMT)
Author: doml
Date: Fri Mar 14 19:22:49 2008
New Revision: 966
URL: http://svn.gnome.org/viewvc/libgsf?rev=966&view=rev
Log:
2008-03-14 Dominic Lachowicz <domlachowicz gmail com>
* tests/Makefile.am:
* gsf-gvfs/gsf-input-gvfs.c:
* gsf-gvfs/gsf-output-gvfs.c:
* gsf-gvfs/gsf-input-gvfs.h:
* gsf-gvfs/gsf-output-gvfs.h:
* gsf-gvfs/Makefile.am:
* configure.in:
* Makefile.am: Update GIO backend to use glib 2.16's API
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/configure.in
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/tests/Makefile.am
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Fri Mar 14 19:22:49 2008
@@ -9,7 +9,7 @@
if WITH_WIN32
pkgconfig_DATA += libgsf-win32-1.pc
endif
-if WITH_GVFS
+if WITH_GIO
pkgconfig_DATA += libgsf-gvfs-1.pc
endif
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Mar 14 19:22:49 2008
@@ -397,30 +397,30 @@
dnl ***********************************************************************************
-dnl gvfs
+dnl gio
dnl
-want_gvfs=auto
-AC_ARG_WITH(gvfs,
- [--{with,without}-gvfs Build additional wrappers for GVFS],
+want_gio=auto
+AC_ARG_WITH(gio,
+ [--{with,without}-gio Build additional wrappers for GIO],
[case $withval in
- yes) want_gvfs=yes;;
- no) want_gvfs=no;;
+ yes) want_gio=yes;;
+ no) want_gio=no;;
esac[]dnl
])
-have_gvfs=no
-if test $want_gvfs = no ; then
- AC_MSG_WARN([GVFS support disabled, as requested (Use --with-gvfs to enable)])
+have_gio=no
+if test $want_gio = no ; then
+ AC_MSG_WARN([GIO support disabled, as requested (Use --with-gio to enable)])
else
- PKG_CHECK_MODULES(LIBGSF_GVFS, gio-standalone >= 0.0.1,
- [have_gvfs=yes],
- [if test $want_gvfs = yes; then
- AC_MSG_ERROR([GVFS support requested, but not available.])
+ PKG_CHECK_MODULES(LIBGSF_GIO, gio-2.0,
+ [have_gio=yes],
+ [if test $want_gio = yes; then
+ AC_MSG_ERROR([GIO support requested, but not available.])
else
- AC_MSG_WARN([GVFS support disabled, unable to find required version of GVFS])
+ AC_MSG_WARN([GIO support disabled, unable to find required version of GIO])
fi])
fi
-AM_CONDITIONAL(WITH_GVFS, test $have_gvfs = yes)
+AM_CONDITIONAL(WITH_GIO, test $have_gio = yes)
# ===================
# GConf configuration
Modified: trunk/gsf-gvfs/Makefile.am
==============================================================================
--- trunk/gsf-gvfs/Makefile.am (original)
+++ trunk/gsf-gvfs/Makefile.am Fri Mar 14 19:22:49 2008
@@ -1,10 +1,10 @@
-AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(LIBGSF_GVFS_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(LIBGSF_GIO_CFLAGS)
-if WITH_GVFS
+if WITH_GIO
lib_LTLIBRARIES = libgsf-gvfs-1.la
-libgsf_gvfs_1_la_LIBADD = $(LIBGSF_LIBS) $(LIBGSF_GVFS_LIBS) $(top_builddir)/gsf/libgsf-1.la
+libgsf_gvfs_1_la_LIBADD = $(LIBGSF_LIBS) $(LIBGSF_GIO_LIBS) $(top_builddir)/gsf/libgsf-1.la
libgsf_gvfs_1_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined
libgsf_gvfs_1_la_SOURCES = \
gsf-input-gvfs.c \
Modified: trunk/gsf-gvfs/gsf-input-gvfs.c
==============================================================================
--- trunk/gsf-gvfs/gsf-input-gvfs.c (original)
+++ trunk/gsf-gvfs/gsf-input-gvfs.c Fri Mar 14 19:22:49 2008
@@ -23,7 +23,6 @@
#include <gsf-gvfs/gsf-input-gvfs.h>
#include <gsf/gsf-input-memory.h>
#include <gsf/gsf-output-memory.h>
-#include <gio/gseekable.h>
#include <gsf/gsf-input-impl.h>
#include <gsf/gsf-impl-utils.h>
#include <string.h>
@@ -82,7 +81,7 @@
gsf_output_size (out));
if (copy != NULL) {
- info = g_file_get_info (file, G_FILE_ATTRIBUTE_STD_NAME, 0, NULL, NULL);
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL);
if (info) {
gsf_input_set_name (GSF_INPUT (copy), g_file_info_get_name (info));
g_object_unref (G_OBJECT (info));
@@ -120,14 +119,6 @@
if (!can_seek (stream))
return make_local_copy (file, stream);
- info = g_file_get_info (file, G_FILE_ATTRIBUTE_STD_SIZE, 0, NULL, NULL);
- if (info) {
- gsf_input_set_size (GSF_INPUT (input), g_file_info_get_size (info));
- g_object_unref (G_OBJECT (info));
- }
- else
- return make_local_copy (file, stream);
-
input = g_object_new (GSF_INPUT_GVFS_TYPE, NULL);
if (G_UNLIKELY (NULL == input)) {
g_input_stream_close (stream, NULL, NULL);
@@ -135,6 +126,14 @@
return NULL;
}
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, NULL, NULL);
+ if (info) {
+ gsf_input_set_size (GSF_INPUT (input), g_file_info_get_size (info));
+ g_object_unref (G_OBJECT (info));
+ }
+ else
+ return make_local_copy (file, stream);
+
g_object_ref (G_OBJECT (file));
input->stream = stream;
@@ -142,7 +141,7 @@
input->buf = NULL;
input->buf_size = 0;
- info = g_file_get_info (file, G_FILE_ATTRIBUTE_STD_NAME, 0, NULL, NULL);
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL);
if (info) {
gsf_input_set_name (GSF_INPUT (input), g_file_info_get_name (info));
g_object_unref (G_OBJECT (info));
@@ -163,7 +162,7 @@
return NULL;
}
- file = g_file_get_for_path (path);
+ file = g_file_new_for_path (path);
if (file != NULL) {
GsfInput *input;
@@ -191,7 +190,7 @@
return NULL;
}
- file = g_file_get_for_uri (uri);
+ file = g_file_new_for_uri (uri);
if (file != NULL) {
GsfInput *input;
Modified: trunk/gsf-gvfs/gsf-input-gvfs.h
==============================================================================
--- trunk/gsf-gvfs/gsf-input-gvfs.h (original)
+++ trunk/gsf-gvfs/gsf-input-gvfs.h Fri Mar 14 19:22:49 2008
@@ -23,7 +23,7 @@
#define GSF_INPUT_GVFS_H
#include <gsf/gsf-input.h>
-#include <gio/gfile.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
Modified: trunk/gsf-gvfs/gsf-output-gvfs.c
==============================================================================
--- trunk/gsf-gvfs/gsf-output-gvfs.c (original)
+++ trunk/gsf-gvfs/gsf-output-gvfs.c Fri Mar 14 19:22:49 2008
@@ -21,8 +21,6 @@
#include <gsf-config.h>
#include <gsf-gvfs/gsf-output-gvfs.h>
-#include <gio/goutputstream.h>
-#include <gio/gseekable.h>
#include <gsf/gsf-output-impl.h>
#include <gsf/gsf-impl-utils.h>
#include <string.h>
@@ -64,7 +62,7 @@
g_return_val_if_fail (file != NULL, NULL);
- stream = (GOutputStream *)g_file_replace (file, 0, FALSE, NULL, NULL);
+ stream = (GOutputStream *)g_file_replace (file, NULL, 0, FALSE, NULL, NULL);
if (stream == NULL) {
return NULL;
}
@@ -95,7 +93,7 @@
return NULL;
}
- file = g_file_get_for_path (path);
+ file = g_file_new_for_path (path);
if (file != NULL) {
GsfOutput *output;
@@ -123,7 +121,7 @@
return NULL;
}
- file = g_file_get_for_uri (uri);
+ file = g_file_new_for_uri (uri);
if (file != NULL) {
GsfOutput *output;
Modified: trunk/gsf-gvfs/gsf-output-gvfs.h
==============================================================================
--- trunk/gsf-gvfs/gsf-output-gvfs.h (original)
+++ trunk/gsf-gvfs/gsf-output-gvfs.h Fri Mar 14 19:22:49 2008
@@ -23,7 +23,7 @@
#define GSF_OUTPUT_GVFS_H
#include <gsf/gsf-output.h>
-#include <gio/gfile.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Fri Mar 14 19:22:49 2008
@@ -11,7 +11,7 @@
test-dump-msole test-restore-msole test-msvba-zip \
test-http # test-xml
-if WITH_GVFS
+if WITH_GIO
check_PROGRAMS += test-gvfs
-test_gvfs_LDADD = $(top_builddir)/gsf-gvfs/libgsf-gvfs-1.la $(LDADD) $(LIBGSF_GVFS_LIBS)
+test_gvfs_LDADD = $(top_builddir)/gsf-gvfs/libgsf-gvfs-1.la $(LDADD) $(LIBGSF_GIO_LIBS)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]