blob: f94bf938d2b087c8c2ae6615dd4775a869ac9717 (
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
52
53
|
//=============================================================================
/**
* @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
{
/// File open operation
Descriptor open (in string file_name,
in long flags)
raises (IOError);
oneway void shutdown ();
};
};
|