<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<!DOCTYPE interface-description SYSTEM 'file:///usr/pkgsrc/lang/oo2c/work.macaroon/oo2c_32-2.0.11/rsrc/OOC/xml/interface-description.dtd'>
<interface-description name='IO:FileChannel' id=''>
  <import-decl name='SYSTEM' id='SYSTEM' export='no' module='SYSTEM'/>
  <import-decl name='RT0' id='RT0' export='no' module='RT0'/>
  <import-decl name='Object' id='Object' export='no' module='Object'/>
  <import-decl name='Termination' id='Termination' export='no' module='Termination'/>
  <import-decl name='Path' id='Path' export='no' module='OS:Path'/>
  <import-decl name='IO' id='IO' export='no' module='IO'/>
  <import-decl name='StdChannels' id='StdChannels' export='no' module='IO:StdChannels'/>
  <import-decl name='Buffer' id='Buffer' export='no' module='IO:Buffer'/>
  <const-decl name='read' id='read' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Open file for reading.</summary>
      <p pad-after='yes' no-indent='yes'>Open file for reading.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='write' id='write' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Open file for writing.</summary>
      <p pad-after='yes' no-indent='yes'>Open file for writing.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='create' id='create' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Create file if it does not exist.</summary>
      <p pad-after='yes' no-indent='yes'>Create file if it does not exist.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='exclusive' id='exclusive' export='yes' value='unknown'>
    <oberon-doc>
      <summary>If both <oberon-const href='#create'>create</oberon-const> and <oberon-const href='#exclusive'>exclusive</oberon-const> are set, then <oberon-proc href='#Open'>Open</oberon-proc> fails if the specified file already exists.</summary>
      <p pad-after='yes' no-indent='yes'>If both <oberon-const href='#create'>create</oberon-const> and <oberon-const href='#exclusive'>exclusive</oberon-const> are set, then <oberon-proc href='#Open'>Open</oberon-proc> fails if the specified file already exists.  This flag has no effect if <oberon-const href='#tmpFile'>tmpFile</oberon-const> is set.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='truncate' id='truncate' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Truncate file to zero length if it exists.</summary>
      <p pad-after='yes' no-indent='yes'>Truncate file to zero length if it exists.  On some systems, for this to work <oberon-const href='#write'>write</oberon-const> must be set as well.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='append' id='append' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Open file in <left-quote/>append<right-quote/> mode.</summary>
      <p pad-after='yes' no-indent='yes'>Open file in <left-quote/>append<right-quote/> mode.  All data written to this file is added to its end.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='tmpFile' id='tmpFile' export='yes' value='unknown'>
    <oberon-doc>
      <summary>A file opened with this flag is created with some unused file name, and is renamed to the file name passed to <oberon-proc href='#Open'>Open</oberon-proc> when <oberon-proc href='#ChannelDesc.CloseAndRegister'>Channel.CloseAndRegister</oberon-proc> is called.</summary>
      <p pad-after='yes' no-indent='yes'>A file opened with this flag is created with some unused file name, and is renamed to the file name passed to <oberon-proc href='#Open'>Open</oberon-proc> when <oberon-proc href='#ChannelDesc.CloseAndRegister'>Channel.CloseAndRegister</oberon-proc> is called.  If it is closed with <oberon-proc href='#ChannelDesc.Close'>Channel.Close</oberon-proc>, then the temporary file is removed.  If the program terminates, an attempt is made to close and remove all <oberon-const href='#tmpFile'>tmpFile</oberon-const> files that are still open.</p>
    </oberon-doc>
  </const-decl>
  <procedure name='Open' id='Open' export='yes'>
    <formal-parameters>
      <parameter-decl name='file' id='Open.file' export='no' variable-parameter='no'>
        <type>
          <type-name name='STRING' href='#STRING'/>
        </type>
      </parameter-decl>
      <parameter-decl name='mode' id='Open.mode' export='no' variable-parameter='no'>
        <type>
          <type-name module='#predef' name='SET'/>
        </type>
      </parameter-decl>
      <result-type>
        <type-name module='Buffer' name='Channel' href='IO:Buffer#Channel'/>
      </result-type>
      <exceptions>
        <type-name module='IO' name='Error' href='IO#Error'/>
      </exceptions>
    </formal-parameters>
  </procedure>
  <import-decl name='-RT0' id='-RT0' export='no' module='RT0'/>
  <import-decl name='-Object' id='-Object' export='no' module='Object'/>
  <import-decl name='-Exception' id='-Exception' export='no' module='Exception'/>
  <class name='Channel'>
    <type-decl name='Channel' id='Channel' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='ChannelDesc' href='#ChannelDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='ChannelDesc' id='ChannelDesc' export='no'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='OpenUnbuffered' id='OpenUnbuffered' export='yes'>
      <formal-parameters>
        <parameter-decl name='file' id='OpenUnbuffered.file' export='no' variable-parameter='no'>
          <type>
            <type-name name='STRING' href='#STRING'/>
          </type>
        </parameter-decl>
        <parameter-decl name='mode' id='OpenUnbuffered.mode' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='SET'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name name='Channel' href='#Channel'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='SetBlocking' id='ChannelDesc.SetBlocking' export='yes'>
      <doc-inherited-from module='IO' name='SetBlocking' class='Channel' href='IO#ChannelDesc.SetBlocking'/>
      <oberon-doc>
        <summary>Change the channel's blocking mode.</summary>
        <p pad-after='yes' no-indent='yes'>Change the channel's blocking mode.  Channels typically default to blocking mode on creation.</p>
        <p pad-after='yes' no-indent='no'>If a channel does not support non-blocking operation, then any call to this method is ignored.  Rider implementations from <oberon-module href='IO:BinaryRider#'>IO:BinaryRider</oberon-module> and <oberon-module href='IO:TextRider#'>IO:TextRider</oberon-module> only work with blocking channels.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.SetBlocking.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <parameter-decl name='block' id='ChannelDesc.SetBlocking.block' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='BOOLEAN'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='SetBlocking' class='Channel' href='IO#ChannelDesc.SetBlocking'/>
      <redefined-method module='IO' name='SetBlocking' class='Channel' href='IO#ChannelDesc.SetBlocking'/>
    </procedure>
    <procedure name='Read' id='ChannelDesc.Read' export='yes'>
      <doc-inherited-from module='IO' name='Read' class='ByteChannel' href='IO#ByteChannelDesc.Read'/>
      <oberon-doc>
        <summary>Read a sequence of bytes from the channel into the buffer.</summary>
        <p pad-after='yes' no-indent='yes'>Read a sequence of bytes from the channel into the buffer.</p>
        <p pad-after='yes' no-indent='no'>An attempt is made to read up to <oberon-param href='#ChannelDesc.Read.length'>length</oberon-param> bytes from the channel.  The bytes are written to <oberon-param href='#ChannelDesc.Read.buffer'>buffer</oberon-param>, starting at position <oberon-param href='#ChannelDesc.Read.start'>start</oberon-param>.  Result is the number of bytes actually read, or <samp>-1</samp> if the read position is at the end of the channel, and <oberon-param href='#ChannelDesc.Read.length'>length</oberon-param> is not zero.</p>
        <p pad-after='yes' no-indent='no'>A read operation might not read <oberon-param href='#ChannelDesc.Read.length'>length</oberon-param> bytes, and in fact it might not read any bytes at all.  Whether or not it does so depends upon the nature and state of the channel.  A socket channel in non-blocking mode, for example, cannot read any more bytes than are immediately available from the socket's input buffer; similarly, a file channel cannot read any more bytes than remain in the file.  It is guaranteed, however, that if a channel is in blocking mode and there is at least one byte remaining in the buffer then this method will block until at least one byte is read.</p>
        <pre-cond pad-after='yes'>
          <p pad-after='no' no-indent='yes'><samp>0 &lt;= <oberon-param href='#ChannelDesc.Read.start'>start</oberon-param> &lt;= <oberon-param href='#ChannelDesc.Read.start'>start</oberon-param>+<oberon-param href='#ChannelDesc.Read.length'>length</oberon-param> &lt;= LEN(<oberon-param href='#ChannelDesc.Read.buffer'>buffer</oberon-param>)</samp> and <samp><oberon-param href='#ChannelDesc.Read.length'>length</oberon-param> &gt;= 0</samp>.</p>
        </pre-cond>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.Read.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <parameter-decl name='buffer' id='ChannelDesc.Read.buffer' export='no' variable-parameter='yes'>
          <type>
            <array>
              <element-type>
                <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='start' id='ChannelDesc.Read.start' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <parameter-decl name='length' id='ChannelDesc.Read.length' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='Read' class='ByteChannel' href='IO#ByteChannelDesc.Read'/>
    </procedure>
    <procedure name='Write' id='ChannelDesc.Write' export='yes'>
      <doc-inherited-from module='IO' name='Write' class='ByteChannel' href='IO#ByteChannelDesc.Write'/>
      <oberon-doc>
        <summary>Write a sequence of bytes to this channel from the buffer.</summary>
        <p pad-after='yes' no-indent='yes'>Write a sequence of bytes to this channel from the buffer.</p>
        <p pad-after='yes' no-indent='no'>An attempt is made to write up to <oberon-param href='#ChannelDesc.Write.length'>length</oberon-param> bytes to the channel.  The bytes are taken from <oberon-param href='#ChannelDesc.Write.buffer'>buffer</oberon-param>, beginning at position <oberon-param href='#ChannelDesc.Write.start'>start</oberon-param>.</p>
        <p pad-after='yes' no-indent='no'>A write operation can return after writing less than <oberon-param href='#ChannelDesc.Write.length'>length</oberon-param> bytes.  That is, some types of channels, depending upon their state, may write only some of the bytes or possibly none at all.  A socket channel in non-blocking mode, for example, cannot write any more bytes than are free in the socket's output buffer.  Result is the number of bytes actually written.</p>
        <pre-cond pad-after='yes'>
          <p pad-after='no' no-indent='yes'><samp>0 &lt;= <oberon-param href='#ChannelDesc.Write.start'>start</oberon-param> &lt;= <oberon-param href='#ChannelDesc.Write.start'>start</oberon-param>+<oberon-param href='#ChannelDesc.Write.length'>length</oberon-param> &lt;= LEN(<oberon-param href='#ChannelDesc.Write.buffer'>buffer</oberon-param>)</samp> and <samp><oberon-param href='#ChannelDesc.Write.length'>length</oberon-param> &gt;= 0</samp>.</p>
        </pre-cond>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.Write.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <parameter-decl name='buffer' id='ChannelDesc.Write.buffer' export='no' variable-parameter='no'>
          <type>
            <array>
              <element-type>
                <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='start' id='ChannelDesc.Write.start' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <parameter-decl name='length' id='ChannelDesc.Write.length' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='Write' class='ByteChannel' href='IO#ByteChannelDesc.Write'/>
    </procedure>
    <procedure name='Close' id='ChannelDesc.Close' export='yes'>
      <oberon-doc>
        <summary>Remove the file if the channel was opened with <oberon-const href='#tmpFile'>tmpFile</oberon-const>.</summary>
        <p pad-after='yes' no-indent='yes'>Remove the file if the channel was opened with <oberon-const href='#tmpFile'>tmpFile</oberon-const>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.Close.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='Close' class='Channel' href='IO#ChannelDesc.Close'/>
      <redefined-method module='IO' name='Close' class='Channel' href='IO#ChannelDesc.Close'/>
    </procedure>
    <procedure name='CloseAndRegister' id='ChannelDesc.CloseAndRegister' export='yes'>
      <doc-inherited-from module='IO' name='CloseAndRegister' class='Channel' href='IO#ChannelDesc.CloseAndRegister'/>
      <oberon-doc>
        <summary>Like <oberon-proc href='IO#ChannelDesc.Close'>Channel.Close</oberon-proc>, but register the channel's target with its naming service once done.</summary>
        <p pad-after='yes' no-indent='yes'>Like <oberon-proc href='IO#ChannelDesc.Close'>Channel.Close</oberon-proc>, but register the channel's target with its naming service once done.  Right now, only <oberon-module href='#'>IO:FileChannel</oberon-module> supports this feature; see <oberon-const href='#tmpFile'>IO:FileChannel.tmpFile</oberon-const> for details.  By default, this method simply calls <oberon-proc href='IO#ChannelDesc.Close'>Channel.Close</oberon-proc>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.CloseAndRegister.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='CloseAndRegister' class='Channel' href='IO#ChannelDesc.CloseAndRegister'/>
      <redefined-method module='IO' name='CloseAndRegister' class='Channel' href='IO#ChannelDesc.CloseAndRegister'/>
    </procedure>
    <procedure name='SetPos' id='ChannelDesc.SetPos' export='yes'>
      <doc-inherited-from module='IO' name='SetPos' class='Channel' href='IO#ChannelDesc.SetPos'/>
      <oberon-doc>
        <summary>Change the channels position to <oberon-param href='#ChannelDesc.SetPos.pos'>pos</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Change the channels position to <oberon-param href='#ChannelDesc.SetPos.pos'>pos</oberon-param>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.SetPos.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <parameter-decl name='pos' id='ChannelDesc.SetPos.pos' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
      <redefined-method module='IO' name='SetPos' class='Channel' href='IO#ChannelDesc.SetPos'/>
      <redefined-method module='IO' name='SetPos' class='Channel' href='IO#ChannelDesc.SetPos'/>
    </procedure>
    <procedure name='Length' id='ChannelDesc.Length' export='yes'>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.Length.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='FileDescriptor' id='ChannelDesc.FileDescriptor' export='yes'>
      <doc-inherited-from module='IO' name='FileDescriptor' class='Channel' href='IO#ChannelDesc.FileDescriptor'/>
      <oberon-doc>
        <summary>Return the file descriptor of the channel.</summary>
        <p pad-after='yes' no-indent='yes'>Return the file descriptor of the channel.  This is the integer number that is used to identify the channel on the level of the C library.  If the channel is not associated with a file descriptor, result is <samp>-1</samp>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='ChannelDesc.FileDescriptor.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='Channel' href='#Channel'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='IO' name='FileDescriptor' href='IO#FileDescriptor'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='IO' name='FileDescriptor' class='Channel' href='IO#ChannelDesc.FileDescriptor'/>
      <redefined-method module='IO' name='FileDescriptor' class='Channel' href='IO#ChannelDesc.FileDescriptor'/>
    </procedure>
    <base-class module='IO' class='ByteChannel' href='IO#ByteChannel'>
      <inherited-method module='IO' name='Flush' class='ByteChannel' href='IO#ByteChannelDesc.Flush'/>
      <inherited-method module='IO' name='Read' class='ByteChannel' href='IO#ByteChannelDesc.Read'/>
      <inherited-method module='IO' name='TransferTo' class='ByteChannel' href='IO#ByteChannelDesc.TransferTo'/>
      <inherited-method module='IO' name='Write' class='ByteChannel' href='IO#ByteChannelDesc.Write'/>
      <base-class module='IO' class='Channel' href='IO#Channel'>
        <inherited-method module='IO' name='Close' class='Channel' href='IO#ChannelDesc.Close'/>
        <inherited-method module='IO' name='CloseAndRegister' class='Channel' href='IO#ChannelDesc.CloseAndRegister'/>
        <inherited-method module='IO' name='FileDescriptor' class='Channel' href='IO#ChannelDesc.FileDescriptor'/>
        <inherited-method module='IO' name='KeyForSelector' class='Channel' href='IO#ChannelDesc.KeyForSelector'/>
        <inherited-method module='IO' name='RegisterWithSelector' class='Channel' href='IO#ChannelDesc.RegisterWithSelector'/>
        <inherited-method module='IO' name='SetBlocking' class='Channel' href='IO#ChannelDesc.SetBlocking'/>
        <inherited-method module='IO' name='SetPos' class='Channel' href='IO#ChannelDesc.SetPos'/>
        <inherited-field module='IO' name='readyOps' class='Channel' href='IO#ChannelDesc.readyOps'/>
      </base-class>
    </base-class>
  </class>
  <module-ref name='IO:BinaryRider'>
    <ref-target type='html' relative-uri='BinaryRider.html'/>
  </module-ref>
  <module-ref name='IO:Buffer'>
    <ref-target type='html' relative-uri='Buffer.html'/>
  </module-ref>
  <module-ref name='IO:TextRider'>
    <ref-target type='html' relative-uri='TextRider.html'/>
  </module-ref>
  <module-ref name='IO'>
    <ref-target type='html' relative-uri='../IO.html'/>
  </module-ref>
</interface-description>
