Bug 1700051: part 36) Reduce accessibility of `SoftText::mBegin` to `private`. r...
[gecko.git] / parser / htmlparser / CParserContext.h
blob49e50f3914275da64f754afdb119f0ac6d7f87fa
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/. */
6 /**
7 * MODULE NOTES:
8 * @update gess 4/1/98
12 #ifndef __CParserContext
13 #define __CParserContext
15 #include "mozilla/UniquePtr.h"
16 #include "nsIParser.h"
17 #include "nsIDTD.h"
18 #include "nsIRequest.h"
19 #include "nsScanner.h"
20 #include "nsString.h"
21 #include "nsCOMPtr.h"
23 /**
24 * Note that the parser is given FULL access to all
25 * data in a parsercontext. Hey, that what it's for!
28 class CParserContext {
29 public:
30 enum eContextType { eCTNone, eCTURL, eCTString, eCTStream };
32 CParserContext(CParserContext* aPrevContext, nsScanner* aScanner,
33 void* aKey = 0, eParserCommands aCommand = eViewNormal,
34 nsIRequestObserver* aListener = 0,
35 eAutoDetectResult aStatus = eUnknownDetect,
36 bool aCopyUnused = false);
38 ~CParserContext();
40 nsresult GetTokenizer(nsIDTD* aDTD, nsIContentSink* aSink,
41 nsITokenizer*& aTokenizer);
42 void SetMimeType(const nsACString& aMimeType);
44 nsCOMPtr<nsIRequest>
45 mRequest; // provided by necko to differnciate different input streams
46 // why is mRequest strongly referenced? see bug 102376.
47 nsCOMPtr<nsIRequestObserver> mListener;
48 void* const mKey;
49 nsCOMPtr<nsITokenizer> mTokenizer;
50 CParserContext* const mPrevContext;
51 mozilla::UniquePtr<nsScanner> mScanner;
53 nsCString mMimeType;
54 nsDTDMode mDTDMode;
56 eParserDocType mDocType;
57 eStreamState mStreamListenerState;
58 eContextType mContextType;
59 eAutoDetectResult mAutoDetectStatus;
60 eParserCommands mParserCommand;
62 bool mMultipart;
63 bool mCopyUnused;
66 #endif