1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12 #ifndef __CParserContext
13 #define __CParserContext
15 #include "mozilla/UniquePtr.h"
16 #include "nsIParser.h"
18 #include "nsIRequest.h"
19 #include "nsScanner.h"
26 * Note that the parser is given FULL access to all
27 * data in a parsercontext. Hey, that what it's for!
30 class CParserContext
{
32 enum eContextType
{ eCTURL
, eCTString
};
34 CParserContext(nsIURI
* aURI
, eParserCommands aCommand
);
35 CParserContext(const nsAString
& aBuffer
, eParserCommands aCommand
,
40 void SetMimeType(const nsACString
& aMimeType
);
43 mRequest
; // provided by necko to differnciate different input streams
44 // why is mRequest strongly referenced? see bug 102376.
50 eParserDocType mDocType
;
51 eStreamState mStreamListenerState
;
52 eContextType mContextType
;
53 eAutoDetectResult mAutoDetectStatus
= eUnknownDetect
;
54 eParserCommands mParserCommand
;