# $Id$
# automake source for the libcaptive-gnomevfs module for gnome-vfs2 Makefile
-# Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+# Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
gnomevfsmoduleslibdir=$(libdir)/gnome-vfs-2.0/modules
gnomevfsmoduleslib_LTLIBRARIES=libcaptive-gnomevfs.la
-libcaptive_gnomevfs_la_CFLAGS=$(GNOME_VFS_MODULE_CFLAGS)
+libcaptive_gnomevfs_la_CFLAGS= $(GNOME_VFS_MODULE_CFLAGS) $(LIBXML_CFLAGS)
libcaptive_gnomevfs_la_LIBADD=$(captive_library) $(GNOME_VFS_MODULE_LIBS)
libcaptive_gnomevfs_la_LDFLAGS=-release $(VERSION)
libcaptive_gnomevfs_la_SOURCES= \
#include <glib/gmessages.h>
#include "gnome-vfs-module.h"
#include "captive/options.h"
+#include "../../libcaptive/client/giochannel-blind.h" /* for captive_giochannel_setup(); FIXME: pathname */
/* FIXME: fill 'err' */
giognomevfs->iochannel.close_on_unref=TRUE; /* run g_io_channel_shutdown() flush on last unref */
giognomevfs->gnomevfshandle=handle;
+ captive_giochannel_setup(&giognomevfs->iochannel);
+
*giognomevfsp=giognomevfs;
return GNOME_VFS_OK;
}
/* $Id$
* Init and cleanup code of libcaptive to be called by client application
- * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+ * Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{
NTSTATUS err;
gboolean errbool;
-GIOStatus erriostatus;
g_return_val_if_fail(captive_options!=NULL,FALSE);
g_return_val_if_fail(captive_options->filesystem.type!=CAPTIVE_OPTIONS_MODULE_TYPE_EMPTY,FALSE);
- erriostatus=g_io_channel_set_encoding(captive_image_iochannel,
- NULL, /* encoding; force binary data */
- NULL); /* error */
- g_assert(erriostatus==G_IO_STATUS_NORMAL);
-
/* captive_giochannel_size() only _after_ g_io_channel_set_encoding() ! */
captive_image_size=captive_giochannel_size(captive_image_iochannel);
g_return_val_if_fail(captive_image_size>0,FALSE);
#include "init.h"
#include "captive/parent-Vfs.h"
#include "../sandbox/server-Vfs.h" /* for captive_corba_child_options */
+#include "giochannel-blind.h" /* for captive_giochannel_setup() */
static gpointer captive_vfs_object_parent_class=NULL;
captive_options_copy(&captive_vfs_object->options,options);
+ if (captive_vfs_object->options.image_iochannel)
+ captive_giochannel_setup(captive_vfs_object->options.image_iochannel);
+
*captive_vfs_object_return=captive_vfs_object;
/* We are sandboxing && we are the master */
#include "split.h"
#include <string.h>
#include "captive/macros.h"
+#include "../client/giochannel-blind.h" /* for captive_giochannel_setup() */
struct captive_io_channel {
captive_io_channel->iochannel.close_on_unref=TRUE; /* run g_io_channel_shutdown() flush on last unref */
captive_io_channel->corba_captive_io_channel=corba_captive_io_channel;
+ captive_giochannel_setup(captive_io_channel);
+
return captive_io_channel;
}
Captive_CaptiveIOChannel retval;
impl_POA_Captive_CaptiveIOChannel *newservant;
PortableServer_ObjectId *objid;
-GIOStatus erriostatus;
captive_new0(newservant); /* FIXME: leak */
newservant->servant.vepv=&impl_Captive_CaptiveIOChannel_vepv;
newservant->poa=poa;
newservant->image_iochannel=image_iochannel;
- erriostatus=g_io_channel_set_encoding(newservant->image_iochannel,
- NULL, /* encoding; force binary data */
- NULL); /* error */
- g_assert(erriostatus==G_IO_STATUS_NORMAL);
/* captive_giochannel_size() only _after_ g_io_channel_set_encoding() ! */
newservant->image_size=captive_giochannel_size(newservant->image_iochannel);