+libcaptive/sandbox/
[captive.git] / src / libcaptive / sandbox / sandbox.idl
diff --git a/src/libcaptive/sandbox/sandbox.idl b/src/libcaptive/sandbox/sandbox.idl
new file mode 100644 (file)
index 0000000..ad1c13c
--- /dev/null
@@ -0,0 +1,76 @@
+/* $Id$
+ * CORBA ORBit IDL definition of sandbox intra-captive interface
+ * Copyright (C) 2002 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
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+module Captive
+{
+       typedef unsigned long GnomeVFSResult;   /* enum */
+       exception GnomeVFSResultException {
+               GnomeVFSResult gnome_vfs_result;
+               };
+
+       typedef unsigned long GLogLevelFlags;   /* enum */
+       struct GlibLogMessage { /* accepted by 'GLogFunc' */
+               /* string log_domain; always "Captive" */
+               GLogLevelFlags log_level;
+               string message;
+               };
+       exception GlibLogMessageFatal {
+               GlibLogMessage g_log_message;
+               };
+
+       interface GlibLogFunc {
+               /* Do not use 'oneway' as we would loose logging order coherency. */
+               void glibLogFunc(in GlibLogMessage glib_log_message);
+               };
+
+       interface Directory
+       {
+               enum GnomeVFSFileType {
+                       GNOME_VFS_FILE_TYPE_UNKNOWN,
+                       GNOME_VFS_FILE_TYPE_REGULAR,
+                       GNOME_VFS_FILE_TYPE_DIRECTORY,
+                       GNOME_VFS_FILE_TYPE_SOCKET,
+                       GNOME_VFS_FILE_TYPE_CHARACTER_DEVICE,
+                       GNOME_VFS_FILE_TYPE_BLOCK_DEVICE
+                       };
+               typedef unsigned short GnomeVFSFilePermissions;
+               typedef unsigned long long time_t;
+               typedef unsigned long long GnomeVFSFileSize;
+               struct GnomeVFSFileInfo {
+                       string name;    /* Base name of the file (no path). */
+                       /* File type (i.e. regular, directory, block device...). */
+                       GnomeVFSFileType type;
+                       GnomeVFSFilePermissions permissions;    /* File permissions. */
+                       GnomeVFSFileSize size;  /* Size in bytes. */
+                       GnomeVFSFileSize block_count;   /* Size measured in units of 512-byte blocks. */
+                       /* Access, modification and change times. */
+                       time_t atime;   /* not present if ==(time_t)0 */
+                       time_t mtime;   /* not present if ==(time_t)0 */
+                       time_t ctime;   /* not present if ==(time_t)0 */
+                       };
+               GnomeVFSFileInfo read()
+                       raises (GnomeVFSResultException,GlibLogMessageFatal);
+               };
+       interface VFS
+       {
+               void registerGlibLogFunc(in GlibLogFunc glib_log_func);
+               Directory openDirectory(in string pathname)
+                       raises (GnomeVFSResultException,GlibLogMessageFatal);
+               };
+};