First phase of multifilesystem enhancement
[captive.git] / src / libcaptive / sandbox / server-Directory.c
1 /* $Id$
2  * CORBA/ORBit server side of Directory object, ran by sandbox_child()
3  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
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
8  * 
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.
13  * 
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
17  */
18
19
20 #include "config.h"
21
22 #include "server-Directory.h"   /* self */
23 #include "sandbox.h"
24 #include <glib/gmessages.h>
25 #include "captive/macros.h"
26
27
28 typedef struct {
29         POA_Captive_Directory servant;
30         PortableServer_POA poa;
31         } impl_POA_Captive_Directory;
32
33 static Captive_GnomeVFSFileInfo *impl_Captive_Directory_read
34                 (impl_POA_Captive_Directory *servant,CORBA_Environment *ev);
35
36 static PortableServer_ServantBase__epv impl_Captive_Directory_base_epv={
37         NULL,   /* _private data */
38         NULL,   /* finalize routine */
39         NULL,   /* default_POA routine */
40         };
41 static POA_Captive_Directory__epv impl_Captive_Directory_epv={
42         NULL,   /* _private */
43         (gpointer)&impl_Captive_Directory_read,
44         };
45 static POA_Captive_Directory__vepv impl_Captive_Directory_vepv={
46         &impl_Captive_Directory_base_epv,
47         &impl_Captive_Directory_epv,
48         };
49
50
51 Captive_Directory impl_Captive_Directory__create(PortableServer_POA poa,CORBA_Environment *ev)
52 {
53 Captive_Directory retval;
54 impl_POA_Captive_Directory *newservant;
55 PortableServer_ObjectId *objid;
56
57         captive_new0(newservant);       /* FIXME: leak */
58         newservant->servant.vepv=&impl_Captive_Directory_vepv;
59         newservant->poa=poa;
60         POA_Captive_Directory__init((PortableServer_Servant)newservant,ev);
61         objid=PortableServer_POA_activate_object(poa,newservant,ev);
62         CORBA_free(objid);
63         retval=PortableServer_POA_servant_to_reference(poa,newservant,ev);
64
65         return retval;
66 }
67
68
69 static Captive_GnomeVFSFileInfo *impl_Captive_Directory_read
70                 (impl_POA_Captive_Directory *servant,CORBA_Environment *ev)
71 {
72 Captive_GnomeVFSFileInfo *retval;
73
74         retval=Captive_GnomeVFSFileInfo__alloc();
75 /*
76                 CORBA_string name;
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;
84 */
85         return retval;
86 }