blob: c62d6963c0f4e3a618b1e8d271e34c13f4207a67 (
plain)
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
|
//=============================================================================
/**
* @file File.idl
*
* A simple File Descriptor and File System IDL interface.
*
*
* @author Irfan Pyarali
*/
//=============================================================================
// IDL
module File
{
exception IOError
{
long error;
};
interface Descriptor
{
typedef sequence<octet> DataBuffer;
long write (in DataBuffer buffer)
raises (IOError);
// write buffer to File
DataBuffer read (in long num_bytes)
raises (IOError);
// read num_bytes to DataBuffer
unsigned long lseek (in unsigned long offset,
in long whence)
raises (IOError);
// seek to offset in File from whence
void destroy ();
// destroy the descriptor
};
interface System
{
Descriptor open (in string file_name,
in long flags)
raises (IOError);
// File open operation
};
};
|