2 * CORBA ORBit IDL definition of sandbox intra-captive interface
3 * Copyright (C) 2002-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 typedef sequence<octet> Bytes;
25 typedef unsigned long GnomeVFSResult; /* enum */
26 exception GnomeVFSResultException {
27 GnomeVFSResult gnome_vfs_result;
31 typedef unsigned long GIOStatus; /* enum */
32 exception GIOStatusException {
33 GIOStatus g_io_status;
37 typedef unsigned long GLogLevelFlags; /* enum mask */
38 struct GLogMessage { /* accepted by 'GLogFunc' */
39 /* string log_domain; always "Captive" */
40 GLogLevelFlags log_level;
43 exception GLogMessageFatal {
44 GLogMessage g_log_message;
48 /* Do not use 'oneway' as we would loose logging order coherency. */
49 void g_log_func(in GLogMessage g_log_message);
53 typedef unsigned long GnomeVFSFileType; /* enum */
54 typedef unsigned short GnomeVFSFilePermissions;
55 typedef unsigned long long time_t;
56 typedef unsigned long long GnomeVFSFileSize;
57 typedef unsigned long long GnomeVFSFileFlags;
58 typedef long long GnomeVFSFileOffset;
59 typedef unsigned long GnomeVFSSeekPosition; /* enum */
60 typedef unsigned long GnomeVFSSetFileInfoMask; /* enum mask */
61 typedef unsigned long long GnomeVFSOpenMode; /* enum mask */
62 struct GnomeVFSFileInfo {
63 string name; /* Base name of the file (no path). */
64 /* File type (i.e. regular, directory, block device...). */
65 GnomeVFSFileType type;
67 GnomeVFSFilePermissions permissions; /* File permissions. */
68 boolean permissions_valid;
69 GnomeVFSFileSize size; /* Size in bytes. */
71 GnomeVFSFileSize block_count; /* Size measured in units of 512-byte blocks. */
72 boolean block_count_valid;
73 /* Access, modification and change times. */
74 time_t atime; /* not valid if ==(time_t)0 */
75 time_t mtime; /* not valid if ==(time_t)0 */
76 time_t ctime; /* not valid if ==(time_t)0 */
77 GnomeVFSFileFlags flags;
82 typedef long long GInt64;
83 typedef unsigned long long GUInt64;
84 typedef unsigned long GSeekType; /* enum */
85 typedef unsigned long GSize;
86 interface CaptiveIOChannel {
87 void read(out Bytes buffer,in GSize count)
88 raises (GIOStatusException,GLogMessageFatal);
89 void write(in Bytes buffer,out GSize bytes_written_return)
90 raises (GIOStatusException,GLogMessageFatal);
91 void seek(in GInt64 offset,in GSeekType type)
92 raises (GIOStatusException,GLogMessageFatal);
94 raises (GLogMessageFatal);
98 typedef unsigned long CaptiveOptionRwmode; /* enum */
99 typedef unsigned long CaptiveOptionMedia; /* enum */
100 struct CaptiveOptionsModule {
101 string pathname_utf8;
104 typedef sequence<CaptiveOptionsModule> CaptiveOptionsModuleList;
105 struct CaptiveOptions {
107 CaptiveOptionsModule filesystem;
108 CaptiveOptionRwmode rwmode;
109 CaptiveOptionMedia media;
110 boolean debug_messages;
111 CaptiveIOChannel image_iochannel;
112 CaptiveOptionsModuleList load_module;
116 typedef unsigned long GUInt32;
117 struct CaptiveVfsVolumeInfo {
121 GUInt64 bytes_available;
125 interface Directory {
126 void read(out GnomeVFSFileInfo file_info)
127 raises (GnomeVFSResultException,GLogMessageFatal);
129 raises (GnomeVFSResultException,GLogMessageFatal);
135 void read(out Bytes buffer,in GnomeVFSFileSize num_bytes)
136 raises (GnomeVFSResultException,GLogMessageFatal);
137 void write(in Bytes buffer,out GnomeVFSFileSize bytes_written_return)
138 raises (GnomeVFSResultException,GLogMessageFatal);
139 void seek(in GnomeVFSSeekPosition whence,in GnomeVFSFileOffset offset)
140 raises (GnomeVFSResultException,GLogMessageFatal);
141 void tell(out GnomeVFSFileOffset offset_return)
142 raises (GnomeVFSResultException,GLogMessageFatal);
144 raises (GnomeVFSResultException,GLogMessageFatal);
145 void file_info_get(out GnomeVFSFileInfo file_info)
146 raises (GnomeVFSResultException,GLogMessageFatal);
147 void file_info_set(in GnomeVFSFileInfo file_info,in GnomeVFSSetFileInfoMask mask)
148 raises (GnomeVFSResultException,GLogMessageFatal);
149 void truncate(in GnomeVFSFileSize file_size)
150 raises (GnomeVFSResultException,GLogMessageFatal);
151 void move(in string pathname_new,in boolean force_replace)
152 raises (GnomeVFSResultException,GLogMessageFatal);
158 void init(in CaptiveOptions options);
160 Directory directory_new_open(in string pathname)
161 raises (GnomeVFSResultException,GLogMessageFatal);
162 Directory directory_new_make(in string pathname,in GnomeVFSFilePermissions perm)
163 raises (GnomeVFSResultException,GLogMessageFatal);
164 File file_new_open(in string pathname,in GnomeVFSOpenMode mode)
165 raises (GnomeVFSResultException,GLogMessageFatal);
166 File file_new_create(in string pathname,in GnomeVFSOpenMode mode,in boolean exclusive,in unsigned long perm)
167 raises (GnomeVFSResultException,GLogMessageFatal);
168 void volume_info_get(out CaptiveVfsVolumeInfo volume_info)
169 raises (GnomeVFSResultException,GLogMessageFatal);