2000-02-03 01:48:55 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
2000-09-08 01:26:29 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public
|
2000-02-03 01:48:55 +03:00
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
2000-09-08 01:26:29 +04:00
|
|
|
* the License at http://www.mozilla.org/MPL/
|
2000-02-03 01:48:55 +03:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2000-09-08 01:26:29 +04:00
|
|
|
* The Initial Developer of the Original Code is Brian Ryner.
|
|
|
|
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
|
|
|
|
* All Rights Reserved.
|
2000-02-03 01:48:55 +03:00
|
|
|
*
|
|
|
|
* Contributor(s):
|
2003-09-29 09:35:34 +04:00
|
|
|
* Brian Ryner <bryner@brianryner.com>
|
2003-01-18 05:15:14 +03:00
|
|
|
* Darin Fisher <darin@netscape.com>
|
2000-02-03 01:48:55 +03:00
|
|
|
*/
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#ifndef nsFingerChannel_h__
|
|
|
|
#define nsFingerChannel_h__
|
2000-02-03 01:48:55 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsFingerHandler.h"
|
2000-03-31 14:13:22 +04:00
|
|
|
#include "nsString.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
2000-02-03 01:48:55 +03:00
|
|
|
#include "nsILoadGroup.h"
|
|
|
|
#include "nsIInputStream.h"
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
2001-09-06 01:28:38 +04:00
|
|
|
#include "nsIInterfaceRequestorUtils.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsIProgressEventSink.h"
|
|
|
|
#include "nsIInputStreamPump.h"
|
2000-02-03 01:48:55 +03:00
|
|
|
#include "nsIChannel.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsIStreamListener.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsISocketTransport.h"
|
2001-09-13 06:21:05 +04:00
|
|
|
#include "nsIProxyInfo.h"
|
2000-02-03 01:48:55 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
//-----------------------------------------------------------------------------
|
2000-02-03 01:48:55 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
class nsFingerChannel : public nsIChannel
|
|
|
|
, public nsIStreamListener
|
|
|
|
, public nsITransportEventSink
|
|
|
|
{
|
2000-02-03 01:48:55 +03:00
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREQUEST
|
|
|
|
NS_DECL_NSICHANNEL
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
2003-01-18 05:15:14 +03:00
|
|
|
NS_DECL_NSITRANSPORTEVENTSINK
|
2000-02-03 01:48:55 +03:00
|
|
|
|
|
|
|
// nsFingerChannel methods:
|
|
|
|
nsFingerChannel();
|
|
|
|
virtual ~nsFingerChannel();
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
nsresult Init(nsIURI *uri, nsIProxyInfo *proxyInfo);
|
2000-02-03 01:48:55 +03:00
|
|
|
|
|
|
|
protected:
|
2003-01-18 05:15:14 +03:00
|
|
|
|
|
|
|
nsresult WriteRequest(nsITransport *transport);
|
|
|
|
|
|
|
|
nsCOMPtr<nsIURI> mURI;
|
2000-02-03 01:48:55 +03:00
|
|
|
nsCOMPtr<nsIURI> mOriginalURI;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
|
|
|
nsCOMPtr<nsIProgressEventSink> mProgressSink;
|
|
|
|
nsCOMPtr<nsISupports> mOwner;
|
2000-02-03 01:48:55 +03:00
|
|
|
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCOMPtr<nsIStreamListener> mListener;
|
|
|
|
nsCOMPtr<nsISupports> mListenerContext;
|
2000-02-03 01:48:55 +03:00
|
|
|
nsCString mContentType;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCString mContentCharset;
|
|
|
|
PRUint32 mLoadFlags;
|
|
|
|
nsresult mStatus;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIInputStreamPump> mPump;
|
|
|
|
nsCOMPtr<nsISocketTransport> mTransport;
|
|
|
|
nsCOMPtr<nsIProxyInfo> mProxyInfo;
|
2000-02-03 01:48:55 +03:00
|
|
|
|
|
|
|
PRInt32 mPort;
|
2001-03-14 05:51:01 +03:00
|
|
|
nsCString mHost;
|
|
|
|
nsCString mUser;
|
2000-02-03 01:48:55 +03:00
|
|
|
};
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#endif // !nsFingerChannel_h__
|