extra: import at 3.0.1 beta 1
[mozilla-extra.git] / extensions / finger / nsFingerChannel.h
blob0f95480f3056fa11cb09854bdce52c2cb8364f2a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is
19 * Brian Ryner.
20 * Portions created by the Initial Developer are Copyright (C) 2000
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Brian Ryner <bryner@brianryner.com>
25 * Darin Fisher <darin@netscape.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #ifndef nsFingerChannel_h__
42 #define nsFingerChannel_h__
44 #include "nsFingerHandler.h"
45 #include "nsString.h"
46 #include "nsCOMPtr.h"
48 #include "nsILoadGroup.h"
49 #include "nsIInputStream.h"
50 #include "nsIInterfaceRequestor.h"
51 #include "nsIInterfaceRequestorUtils.h"
52 #include "nsIProgressEventSink.h"
53 #include "nsIInputStreamPump.h"
54 #include "nsIChannel.h"
55 #include "nsIURI.h"
56 #include "nsIStreamListener.h"
57 #include "nsISocketTransport.h"
58 #include "nsIProxyInfo.h"
59 #include "nsIProxiedChannel.h"
61 //-----------------------------------------------------------------------------
63 class nsFingerChannel : public nsIChannel
64 , public nsIStreamListener
65 , public nsITransportEventSink
66 , public nsIProxiedChannel
68 public:
69 NS_DECL_ISUPPORTS
70 NS_DECL_NSIREQUEST
71 NS_DECL_NSICHANNEL
72 NS_DECL_NSISTREAMLISTENER
73 NS_DECL_NSIREQUESTOBSERVER
74 NS_DECL_NSITRANSPORTEVENTSINK
75 NS_DECL_NSIPROXIEDCHANNEL
77 // nsFingerChannel methods:
78 nsFingerChannel();
79 virtual ~nsFingerChannel();
81 nsresult Init(nsIURI *uri, nsIProxyInfo *proxyInfo);
83 protected:
85 nsresult WriteRequest(nsITransport *transport);
87 nsCOMPtr<nsIURI> mURI;
88 nsCOMPtr<nsIURI> mOriginalURI;
89 nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
90 nsCOMPtr<nsIProgressEventSink> mProgressSink;
91 nsCOMPtr<nsISupports> mOwner;
92 nsCOMPtr<nsILoadGroup> mLoadGroup;
93 nsCOMPtr<nsIStreamListener> mListener;
94 nsCOMPtr<nsISupports> mListenerContext;
95 nsCString mContentType;
96 nsCString mContentCharset;
97 PRUint32 mLoadFlags;
98 nsresult mStatus;
100 nsCOMPtr<nsIInputStreamPump> mPump;
101 nsCOMPtr<nsISocketTransport> mTransport;
102 nsCOMPtr<nsIProxyInfo> mProxyInfo;
104 PRInt32 mPort;
105 nsCString mHost;
106 nsCString mUser;
109 #endif // !nsFingerChannel_h__