summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/Default_Servant/File.idl
blob: eeaa55e1d7e9ab5ccd2a306733770e483b627580 (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
// $Id$

//=================================================================
//
// = FILENAME
//     File.idl
//
// = DESCRIPTION
//     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
    };        
};