1999-09-15 13:51:46 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
|
|
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* NPL.
|
|
|
|
*
|
|
|
|
* The Initial Developer of this code under the NPL is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
|
|
* Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
%{C++
|
|
|
|
#include "nsFileSpec.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
interface nsIChannel;
|
|
|
|
interface nsIEventSinkGetter;
|
|
|
|
interface nsIInputStream;
|
|
|
|
interface nsIRunnable;
|
|
|
|
native nsFileSpec(nsFileSpec&);
|
|
|
|
|
|
|
|
[scriptable, uuid(d4ced500-6882-11d3-9382-00104ba0fd40)]
|
|
|
|
interface nsIFileTransportService : nsISupports
|
|
|
|
{
|
|
|
|
[noscript] nsIChannel CreateTransport(in nsFileSpec spec, // XXX change to nsIFile later
|
|
|
|
in string command,
|
|
|
|
in nsIEventSinkGetter getter);
|
|
|
|
|
|
|
|
// This version can be used with an existing input stream to serve
|
|
|
|
// as a data pump:
|
|
|
|
nsIChannel CreateTransportFromStream(in nsIInputStream fromStream,
|
1999-10-06 12:26:01 +04:00
|
|
|
in string contentType,
|
|
|
|
in long contentLength,
|
1999-09-15 13:51:46 +04:00
|
|
|
in string command,
|
|
|
|
in nsIEventSinkGetter getter);
|
|
|
|
|
|
|
|
void DispatchRequest(in nsIRunnable runnable);
|
|
|
|
void Suspend(in nsIRunnable trans);
|
|
|
|
void Resume(in nsIRunnable trans);
|
|
|
|
void ProcessPendingRequests();
|
|
|
|
void Shutdown();
|
|
|
|
};
|
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define NS_FILETRANSPORTSERVICE_CID \
|
|
|
|
{ /* 2bb2b250-ea35-11d2-931b-00104ba0fd40 */ \
|
|
|
|
0x2bb2b250, \
|
|
|
|
0xea35, \
|
|
|
|
0x11d2, \
|
|
|
|
{0x93, 0x1b, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
|
|
|
|
}
|
|
|
|
%}
|