/* Copyright (c) 2000-2006 ActiveState Software Inc.
   See the file LICENSE.txt for licensing information. */

#include "nsISupports.idl"
#include "nsIURI.idl"
#include "nsIFile.idl"

/**
 * All of these interfaces are ** DEPRECATED ** since Komodo 7.0.0.
 */

// Avoid including IDL for interfaces where internal knowledge of
// the structure is not required.  This avoids having to change
// every IDL file that includes us to get around our recusive
// dependancy problem.
interface koIRemoteFileInfo;
   
// A simple file.
[deprecated, scriptable, uuid(BA0E1CF0-F56D-4679-B609-AA4B02C53CE8)]
interface koIFile : nsISupports {
  [deprecated] void init(in wstring fileName, in string mode);
  [deprecated] void read(in unsigned long aCount, out unsigned long count, [array, size_is(count), retval] out octet text);
  [deprecated] void write([array, size_is(count)] in octet text, in unsigned long count);
  [deprecated] void puts(in AString text); // get around xpconnect limitations
  [deprecated] void readline(in unsigned long aCount, out unsigned long count, [array, size_is(count), retval] out octet text);
  [deprecated] void flush();
  [deprecated] void close();
  [deprecated] readonly attribute nsIFile file;
};

// A file addressed by URI.
[deprecated, scriptable, uuid(332BE465-8120-43a8-8C32-02FD9F24F7B0)]
interface koIURIFile : koIFile {
  // just like the parent 'init' function, but accepting a URI object instead of string.
  [deprecated] void initURI(in nsIURI uri, in string mode);
};

// A local file.
[deprecated, scriptable, uuid(9C1A72FB-002F-43de-9E45-BD8C23C07076)]
interface koILocalFile : koIFile {
};

// A FTP file.
[deprecated, scriptable, uuid(6130195E-4B6C-4214-BF2C-B04C6264440F)]
interface koIFTPFile : koIFile {
    [deprecated] void initServer(in wstring fileName, in string mode, in wstring server_alias);
    [deprecated] void refreshStats();
    [deprecated] readonly attribute boolean isWritable;
    [deprecated] readonly attribute boolean isReadable;
    [deprecated] readonly attribute koIRemoteFileInfo rfinfo;
};

// A temp-file factory.
[deprecated, scriptable, uuid(783a25f1-f23c-4773-97cc-832fcae944f6)]
interface koITempFileFactory : nsISupports {
    [deprecated] wstring MakeTempName(in wstring suffix);
    [deprecated] koIFile MakeTempFile(in wstring suffix, in string mode);
    [deprecated] koIFile MakeTempFileInDir(in wstring dir, in wstring suffix, in string mode);
};
