2 * CORBA/ORBit server side of Vfs object of sandbox_parent()
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "captive/parent-Vfs.h" /* self */
23 #include <glib/gmessages.h>
25 #include "../client/vfs.h"
30 GnomeVFSResult captive_sandbox_parent_vfs_new(CaptiveVfsObject *captive_vfs_object)
34 g_return_val_if_fail(captive_vfs_object!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
36 captive_vfs_object->is_sandbox_parent=TRUE;
38 errbool=captive_sandbox_spawn(
39 captive_vfs_object, /* child_captive_vfs_object */
40 &captive_vfs_object->corba_Vfs_object, /* corba_Vfs_object_return */
41 &captive_vfs_object->corba_GlibLogFunc_object, /* corba_GlibLogFunc_object_return */
42 &captive_vfs_object->corba_parentheart_fds_1); /* parentheart_fds_1_return */
43 g_return_val_if_fail(errbool==TRUE,GNOME_VFS_ERROR_GENERIC);
49 gboolean corba_shutdown(CORBA_Environment *evp,CORBA_ORB *orbp,PortableServer_POA *poap);
51 GnomeVFSResult captive_sandbox_parent_vfs_close(CaptiveVfsObject *captive_vfs_object)
56 g_return_val_if_fail(captive_vfs_object!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
58 Captive_Vfs_shutdown(captive_vfs_object->corba_Vfs_object,&captive_corba_ev);
59 r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev);
61 CORBA_Object_release(captive_vfs_object->corba_Vfs_object,&captive_corba_ev);
62 g_assert(validate_CORBA_Environment(&captive_corba_ev));
64 /* Shutdown 'GlibLogFunc' servant */
65 CORBA_Object_release(captive_vfs_object->corba_GlibLogFunc_object,&captive_corba_ev);
66 g_assert(validate_CORBA_Environment(&captive_corba_ev));
68 errint=close(captive_vfs_object->corba_parentheart_fds_1); /* close parentheart_fd_write */
69 g_return_val_if_fail(errint==0,FALSE);