no longer used as part of FTP proxy changes

This commit is contained in:
valeski%netscape.com 2000-02-15 22:25:33 +00:00
Родитель aa90de6972
Коммит 19107265e4
4 изменённых файлов: 0 добавлений и 150 удалений

Просмотреть файл

@ -35,7 +35,6 @@ CPPSRCS = \
nsFTPChannel.cpp \
nsFtpConnectionThread.cpp \
nsFtpModule.cpp \
nsFTPListener.cpp \
nsAsyncEvent.cpp \
$(NULL)

Просмотреть файл

@ -36,7 +36,6 @@ CPP_OBJS = \
.\$(OBJDIR)\nsFTPChannel.obj \
.\$(OBJDIR)\nsFtpConnectionThread.obj \
.\$(OBJDIR)\nsFtpModule.obj \
.\$(OBJDIR)\nsFTPListener.obj \
.\$(OBJDIR)\nsAsyncEvent.obj \
$(NULL)

Просмотреть файл

@ -1,93 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsFTPListener.h"
NS_IMPL_ISUPPORTS2(nsFTPListener, nsIStreamListener, nsIStreamObserver);
// nsFTPListener methods
nsFTPListener::nsFTPListener(nsIStreamListener *aListener, nsIChannel *aChannel) {
NS_INIT_REFCNT();
NS_ASSERTION(aListener && aChannel, "null ptr");
mListener = aListener;
mFTPChannel = aChannel;
}
nsFTPListener::~nsFTPListener() {
mListener = 0;
mFTPChannel = 0;
}
// nsIStreamObserver methods.
NS_IMETHODIMP
nsFTPListener::OnStopRequest(nsIChannel* aChannel, nsISupports* aContext,
nsresult aStatus, const PRUnichar* aMsg) {
return mListener->OnStopRequest(mFTPChannel, aContext, aStatus, aMsg);
}
NS_IMETHODIMP
nsFTPListener::OnStartRequest(nsIChannel *aChannel, nsISupports *aContext) {
return mListener->OnStartRequest(mFTPChannel, aContext);
}
// nsIStreamListener methods
NS_IMETHODIMP
nsFTPListener::OnDataAvailable(nsIChannel* aChannel, nsISupports* aContext,
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
PRUint32 aLength) {
return mListener->OnDataAvailable(mFTPChannel, aContext, aInputStream, aSourceOffset, aLength);
}
NS_IMPL_ISUPPORTS(nsFTPObserver, NS_GET_IID(nsIStreamObserver));
// nsFTPListener methods
nsFTPObserver::nsFTPObserver(nsIStreamObserver *aObserver, nsIChannel *aChannel) {
NS_INIT_REFCNT();
NS_ASSERTION(aObserver && aChannel, "null ptr");
mObserver = aObserver;
mFTPChannel = aChannel;
}
nsFTPObserver::~nsFTPObserver() {
mObserver = 0;
mFTPChannel = 0;
}
// nsIStreamObserver methods.
NS_IMETHODIMP
nsFTPObserver::OnStopRequest(nsIChannel* aChannel, nsISupports* aContext,
nsresult aStatus, const PRUnichar* aMsg) {
return mObserver->OnStopRequest(mFTPChannel, aContext, aStatus, aMsg);
}
NS_IMETHODIMP
nsFTPObserver::OnStartRequest(nsIChannel *aChannel, nsISupports *aContext) {
return mObserver->OnStartRequest(mFTPChannel, aContext);
}

Просмотреть файл

@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef ___nsftplistener_h___
#define ___nsftplistener_h___
#include "nsIStreamListener.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
class nsFTPListener : public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSISTREAMOBSERVER
nsFTPListener(nsIStreamListener* aListener, nsIChannel *aChannel);
virtual ~nsFTPListener();
nsCOMPtr<nsIStreamListener> mListener;
nsCOMPtr<nsIChannel> mFTPChannel;
};
class nsFTPObserver : public nsIStreamObserver {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISTREAMOBSERVER
nsFTPObserver(nsIStreamObserver* aObserver, nsIChannel *aChannel);
virtual ~nsFTPObserver();
nsCOMPtr<nsIStreamObserver> mObserver;
nsCOMPtr<nsIChannel> mFTPChannel;
};
#endif // ___nsftplistener_h___