2 * CORBA/ORBit server side of Directory object, ran by sandbox_child()
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 "server-Directory.h" /* self */
24 #include <glib/gmessages.h>
25 #include "captive/macros.h"
29 POA_Captive_Directory servant;
30 PortableServer_POA poa;
31 } impl_POA_Captive_Directory;
33 static Captive_Directory_GnomeVFSFileInfo *impl_Captive_Directory_read
34 (impl_POA_Captive_Directory *servant,CORBA_Environment *ev);
36 static PortableServer_ServantBase__epv impl_Captive_Directory_base_epv={
37 NULL, /* _private data */
38 NULL, /* finalize routine */
39 NULL, /* default_POA routine */
41 static POA_Captive_Directory__epv impl_Captive_Directory_epv={
43 (gpointer)&impl_Captive_Directory_read,
45 static POA_Captive_Directory__vepv impl_Captive_Directory_vepv={
46 &impl_Captive_Directory_base_epv,
47 &impl_Captive_Directory_epv,
51 Captive_Directory impl_Captive_Directory__create(PortableServer_POA poa,CORBA_Environment *ev)
53 Captive_Directory retval;
54 impl_POA_Captive_Directory *newservant;
55 PortableServer_ObjectId *objid;
57 captive_new0(newservant); /* FIXME: leak */
58 newservant->servant.vepv=&impl_Captive_Directory_vepv;
60 POA_Captive_Directory__init((PortableServer_Servant)newservant,ev);
61 objid=PortableServer_POA_activate_object(poa,newservant,ev);
63 retval=PortableServer_POA_servant_to_reference(poa,newservant,ev);
69 static Captive_Directory_GnomeVFSFileInfo *impl_Captive_Directory_read
70 (impl_POA_Captive_Directory *servant,CORBA_Environment *ev)
72 Captive_Directory_GnomeVFSFileInfo *retval;
74 retval=Captive_Directory_GnomeVFSFileInfo__alloc();
77 Captive_Directory_GnomeVFSFileType type;
78 Captive_Directory_GnomeVFSFilePermissions permissions;
79 Captive_Directory_GnomeVFSFileSize size;
80 Captive_Directory_GnomeVFSFileSize block_count;
81 Captive_Directory_time_t atime;
82 Captive_Directory_time_t mtime;
83 Captive_Directory_time_t ctime;