2003-01-18 05:15:14 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
1999-12-21 00:48:15 +03:00
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-12-21 00:48:15 +03:00
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
|
|
*
|
|
|
|
* 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.
|
1999-12-21 00:48:15 +03:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Brian Ryner.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2000
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-12-21 00:48:15 +03:00
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* Contributor(s):
|
2003-01-18 05:15:14 +03:00
|
|
|
* Darin Fisher <darin@netscape.com>
|
2004-04-19 02:14:17 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-12-21 00:48:15 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#ifndef nsDateTimeChannel_h__
|
|
|
|
#define nsDateTimeChannel_h__
|
1999-12-21 00:48:15 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsDateTimeHandler.h"
|
2000-03-31 14:13:22 +04:00
|
|
|
#include "nsString.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
1999-12-21 00:48:15 +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"
|
1999-12-21 00:48:15 +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"
|
1999-12-21 00:48:15 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
//-----------------------------------------------------------------------------
|
2001-02-21 23:38:08 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
class nsDateTimeChannel : public nsIChannel
|
|
|
|
, public nsIStreamListener
|
|
|
|
, public nsITransportEventSink
|
|
|
|
{
|
1999-12-21 00:48:15 +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
|
1999-12-21 00:48:15 +03:00
|
|
|
|
|
|
|
// nsDateTimeChannel methods:
|
|
|
|
nsDateTimeChannel();
|
|
|
|
virtual ~nsDateTimeChannel();
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
nsresult Init(nsIURI *uri, nsIProxyInfo *proxyInfo);
|
1999-12-21 00:48:15 +03:00
|
|
|
|
|
|
|
protected:
|
2003-01-18 05:15:14 +03:00
|
|
|
|
|
|
|
nsCOMPtr<nsIURI> mURI;
|
1999-12-21 00:48:15 +03:00
|
|
|
nsCOMPtr<nsIURI> mOriginalURI;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
|
|
|
nsCOMPtr<nsIProgressEventSink> mProgressSink;
|
|
|
|
nsCOMPtr<nsISupports> mOwner;
|
1999-12-21 00:48:15 +03:00
|
|
|
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCOMPtr<nsIStreamListener> mListener;
|
|
|
|
nsCOMPtr<nsISupports> mListenerContext;
|
1999-12-21 00:48:15 +03:00
|
|
|
nsCString mContentType;
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCString mContentCharset;
|
|
|
|
PRUint32 mLoadFlags;
|
|
|
|
nsresult mStatus;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIInputStreamPump> mPump;
|
|
|
|
nsCOMPtr<nsISocketTransport> mTransport;
|
2001-09-13 06:21:05 +04:00
|
|
|
nsCOMPtr<nsIProxyInfo> mProxyInfo;
|
1999-12-21 00:48:15 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
nsCString mHost;
|
1999-12-21 00:48:15 +03:00
|
|
|
PRInt32 mPort;
|
|
|
|
};
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#endif // !nsDateTimeChannel_h__
|