summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/Default_Servant/File.idl
blob: 0caa3792c23ca9fcf02c9ce9b59633690f57a7c9 (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
// $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;
      
	// write buffer to File
      long write (in DataBuffer buffer)
        raises (IOError);

	// read num_bytes to DataBuffer
      DataBuffer read (in long num_bytes)
        raises (IOError);

	// seek to offset in File from whence
      unsigned long lseek (in unsigned long offset,
                           in long whence)
        raises (IOError);

	// destroy the descriptor
      void destroy ();
    };

  interface System 
    {
	// File open operation
      Descriptor open (in string file_name, in long flags)
        raises (IOError);
    };        
};