gecko-dev/netwerk/protocol/ftp/public/nsIFtpListener.h

55 строки
1.8 KiB
C++

/* -*- 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.
*/
#ifndef nsIFtpListener_h___
#define nsIFtpListener_h___
// XXX maybe we should inherit from this:
#include "nsIStreamListener.h" // same error codes
#include "nscore.h"
class nsIUrl;
// {25029493-F132-11d2-9588-00805F369F95}
#define NS_IFTPLISTENER_IID \
{ 0x25029493, 0xf132, 0x11d2, { 0x95, 0x88, 0x0, 0x80, 0x5f, 0x36, 0x9f, 0x95 } }
class nsIFtpListener : public nsIFtpObserver
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFTPLISTENER_IID);
/**
* Notify the client that data is available in the input stream. This
* method is called whenver data is written into the input stream by the
* networking library...<BR><BR>
*
* @param pIStream The input stream containing the data. This stream can
* be either a blocking or non-blocking stream.
* @param length The amount of data that was just pushed into the stream.
* @return The return value is currently ignored.
*/
NS_IMETHOD OnDataAvailable(nsIURL* aURL, nsIInputStream *aIStream,
PRUint32 aLength) = 0;
};
#endif /* nsIIFtpListener_h___ */