/usr/share/idl/bonobo-2.0/Bonobo_Storage.idl is in libbonobo2-common 2.32.1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | /*
* bonobo-storage.idl: Handles structured storage
*
* Copyright (C) 1999, 2000 Helix Code, Inc.
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
* Dietmar Maurer (dietmar@maurer-it.com)
*
* Terms:
*
* Storage: This interface provides access to a directory
* like storage facility.
*
* Stream: Used to read and write bytes to a storage. The
* Streams are equivalent to files.
*/
#ifndef BONOBO_STORAGE_IDL
#define BONOBO_STORAGE_IDL
#include "Bonobo_Unknown.idl"
module Bonobo {
typedef long StorageInfoFields;
const StorageInfoFields FIELD_CONTENT_TYPE = 1;
const StorageInfoFields FIELD_SIZE = 2;
const StorageInfoFields FIELD_TYPE = 4;
typedef string ContentType;
enum StorageType {
STORAGE_TYPE_REGULAR,
STORAGE_TYPE_DIRECTORY
};
struct StorageInfo {
string name;
StorageType type;
ContentType content_type;
long size;
};
interface Stream : Unknown {
typedef sequence<octet> iobuf;
exception NoPermission {};
exception NotSupported {};
exception IOError {};
enum SeekType {
SeekSet,
SeekCur,
SeekEnd
};
/**
* getInfo:
* @mask:
*
* Returns a StorageInfo structure which contains
* the name, content_type and size info.
*/
StorageInfo getInfo (in StorageInfoFields mask)
raises (IOError, NoPermission, NotSupported);
/**
* setInfo:
* @info:
* @mask:
*
*/
void setInfo (in StorageInfo info, in StorageInfoFields mask)
raises (IOError, NoPermission, NotSupported);
/**
* read:
* @count: number of bytes to read.
* @buffer: the buffer where the data is returned.
*/
void read (in long count, out iobuf buffer)
raises (NoPermission, IOError);
/**
* write:
* @buffer: a buffer to write.
*
* writes the buffer to this stream.
*/
void write (in iobuf buffer)
raises (NoPermission, IOError);
/**
* seek:
* @offset: offset
* @whence:
*
* Sets the read/write pointer to @offset (relative to @whence)
*/
long seek (in long offset, in SeekType whence)
raises (IOError, NotSupported);
/**
* truncate:
* @length: new size of the stream
*
*/
void truncate (in long length)
raises (IOError, NoPermission, NotSupported);
/**
* commit:
*
* Commits any pending changes to the Storage
*/
void commit ()
raises (IOError, NoPermission, NotSupported);
/**
* revert:
*
* Discards any changes since the last commit.
*/
void revert ()
raises (IOError, NoPermission, NotSupported);
void unImplemented1 ();
void unImplemented2 ();
};
interface Storage : Unknown {
typedef sequence<StorageInfo> DirectoryList;
typedef long OpenMode;
const OpenMode READ = 1;
const OpenMode WRITE = 2;
const OpenMode CREATE = 4;
const OpenMode FAILIFEXIST = 8;
const OpenMode COMPRESSED = 16;
const OpenMode TRANSACTED = 32;
exception IOError {};
exception NameExists {};
exception NotFound {};
exception NoPermission {};
exception NotSupported {};
exception NotStream {};
exception NotStorage {};
exception NotEmpty {};
/**
* getInfo:
* @path:
* @mask:
*
* Returns a StorageInfo structure which contains
* the name, content_type and size info.
*/
StorageInfo getInfo (in string path,
in StorageInfoFields mask)
raises (IOError, NoPermission, NotFound, NotSupported);
/**
* setInfo:
* @path:
* @info:
* @mask:
*
*/
void setInfo (in string path, in StorageInfo info,
in StorageInfoFields mask)
raises (IOError, NoPermission, NotFound, NotSupported);
/**
* openStream:
* @path: path of the stream to open
* @mode: open flags
*
* Opens a Stream whose name is @path.
*/
Stream openStream (in string path, in OpenMode mode)
raises (IOError, NotFound, NoPermission,
NotStream, NameExists);
/**
* openStorage:
* @path: path of the storage to open.
* @mode: open mode.
*
* Returns a storage object for @path.
*/
Storage openStorage (in string path, in OpenMode mode)
raises (IOError, NotFound, NoPermission,
NotStorage, NameExists);
/**
* copyTo:
* @target: where to copy this storage to.
*
* Copies this storages contents to the @target storage
*/
void copyTo (in Storage target)
raises (IOError, NoPermission);
/**
* listContents:
* @path: path that we want to examine.
* @mask:
*
* Returns a list of all the Storage and Streams available
* at @path.
*/
DirectoryList listContents (in string path,
in StorageInfoFields mask)
raises (IOError, NotStorage, NotFound, NotSupported);
/**
* erase:
* @path: path to the element to erase.
*
* Destroys the element pointed to by @path. The element
* can be a Storage or a Stream.
*/
void erase (in string path)
raises (IOError, NoPermission, NotFound, NotEmpty);
/**
* rename:
* @path_name: element name to rename
* @new_path_name: new name we want to use
*
* Renames a Stream or Storage component inside a Storage.
*/
void rename (in string path_name, in string new_path_name)
raises (IOError, NameExists, NotFound, NoPermission);
/**
* commit:
*
* Commits any pending changes to the Storage since it was
* opened. This operation is syncronous.
*/
void commit ()
raises (IOError, NoPermission, NotSupported);
/**
* revert:
*
* Discards any changes since the last commit.
*/
void revert ()
raises (IOError, NoPermission, NotSupported);
void unImplemented1 ();
void unImplemented2 ();
};
};
#endif /* BONOBO_STORAGE_IDL */
|