2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-19 02:01:16 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2001-03-01 10:22:19 +03:00
|
|
|
*
|
2004-04-19 02:01:16 +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/
|
2001-03-01 10:22:19 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04: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.
|
2001-03-01 10:22:19 +03:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-19 02:01:16 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2001-03-01 10:22:19 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-19 02:01:16 +04:00
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-19 02:01:16 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-19 02:01:16 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2001-03-01 10:22:19 +03:00
|
|
|
|
|
|
|
#ifndef ____nsindexedtohtml___h___
|
|
|
|
#define ____nsindexedtohtml___h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsVoidArray.h"
|
|
|
|
#include "nsIFactory.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsIStreamConverter.h"
|
|
|
|
#include "nsXPIDLString.h"
|
2001-10-03 04:43:30 +04:00
|
|
|
#include "nsIDirIndexListener.h"
|
|
|
|
#include "nsIDateTimeFormat.h"
|
2001-10-19 07:03:30 +04:00
|
|
|
#include "nsIStringBundle.h"
|
2002-05-17 01:00:48 +04:00
|
|
|
#include "nsIStringStream.h"
|
|
|
|
#include "nsITextToSubURI.h"
|
2002-08-20 07:32:28 +04:00
|
|
|
#include "nsICharsetConverterManager.h"
|
2001-03-01 10:22:19 +03:00
|
|
|
|
|
|
|
#define NS_NSINDEXEDTOHTMLCONVERTER_CID \
|
|
|
|
{ 0xcf0f71fd, 0xfafd, 0x4e2b, {0x9f, 0xdc, 0x13, 0x4d, 0x97, 0x2e, 0x16, 0xe2} }
|
|
|
|
|
|
|
|
|
2001-10-03 04:43:30 +04:00
|
|
|
class nsIndexedToHTML : public nsIStreamConverter,
|
|
|
|
public nsIDirIndexListener
|
2001-03-01 10:22:19 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISTREAMCONVERTER
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
2001-03-01 10:22:19 +03:00
|
|
|
NS_DECL_NSISTREAMLISTENER
|
2001-10-03 04:43:30 +04:00
|
|
|
NS_DECL_NSIDIRINDEXLISTENER
|
2001-03-01 10:22:19 +03:00
|
|
|
|
|
|
|
nsIndexedToHTML();
|
|
|
|
virtual ~nsIndexedToHTML();
|
|
|
|
|
2001-10-03 04:43:30 +04:00
|
|
|
nsresult Init(nsIStreamListener *aListener);
|
|
|
|
|
2001-03-01 10:22:19 +03:00
|
|
|
static NS_METHOD
|
2002-02-05 02:23:21 +03:00
|
|
|
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
2001-03-01 10:22:19 +03:00
|
|
|
|
2001-11-06 04:46:18 +03:00
|
|
|
protected:
|
|
|
|
|
2004-04-18 17:20:54 +04:00
|
|
|
void FormatSizeString(PRInt64 inSize, nsString& outSizeString);
|
2002-05-17 01:00:48 +04:00
|
|
|
nsresult FormatInputStream(nsIRequest* aRequest, nsISupports *aContext, const nsAString &aBuffer);
|
2001-11-06 04:46:18 +03:00
|
|
|
|
2001-03-01 10:22:19 +03:00
|
|
|
protected:
|
2001-10-03 04:43:30 +04:00
|
|
|
nsCOMPtr<nsIDirIndexParser> mParser;
|
2001-03-01 10:22:19 +03:00
|
|
|
nsCOMPtr<nsIStreamListener> mListener; // final listener (consumer)
|
2001-10-03 04:43:30 +04:00
|
|
|
|
|
|
|
nsCOMPtr<nsIDateTimeFormat> mDateTime;
|
2001-10-19 07:03:30 +04:00
|
|
|
nsCOMPtr<nsIStringBundle> mBundle;
|
2002-05-17 01:00:48 +04:00
|
|
|
|
|
|
|
nsCOMPtr<nsITextToSubURI> mTextToSubURI;
|
2002-08-20 07:32:28 +04:00
|
|
|
nsCOMPtr<nsIUnicodeEncoder> mUnicodeEncoder;
|
2002-05-17 01:00:48 +04:00
|
|
|
|
2001-12-06 03:48:36 +03:00
|
|
|
private:
|
2003-04-19 23:47:28 +04:00
|
|
|
// Expecting absolute locations, given by 201 lines.
|
|
|
|
PRBool mExpectAbsLoc;
|
2001-03-01 10:22:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|