///////////////////////////////////////////////////////////////////////////////// // // fusion\xmlparser\XMLParser.hxx // ///////////////////////////////////////////////////////////////////////////////// #ifndef _FUSION_XMLPARSER__XMLPARSER_H_INCLUDE_ #define _FUSION_XMLPARSER__XMLPARSER_H_INCLUDE_ #pragma once #include #include #include "xmlhelper.hxx" class XMLStream; typedef _reference RXMLParser; typedef _reference RNodeFactory; typedef _reference RUnknown; typedef _reference RIBindStatusCallback; #include "encodingstream.hxx" #include "_rawstack.hxx" //#define XMLFLAG_RUNBUFFERONLY 0x1000 //------------------------------------------------------------------------ // An internal Parser IID so that DTDNodeFactory can call internal methods. const IID IID_Parser = {0xa79b04fe,0x8b3c,0x11d2,{0x9c, 0xd3,0x00,0x60,0xb0,0xec,0x3d,0x30}}; class XMLParser : public _unknown { public: XMLParser(); ~XMLParser(); // ======= IUnknown override ============================ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void ** ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef(void); virtual ULONG STDMETHODCALLTYPE Release(void); // ====== IXMLNodeSource methods ======================== virtual HRESULT STDMETHODCALLTYPE SetFactory( /* [in] */ IXMLNodeFactory __RPC_FAR *pNodeFactory); virtual HRESULT STDMETHODCALLTYPE GetFactory( /* [out] */ IXMLNodeFactory** ppNodeFactory); virtual HRESULT STDMETHODCALLTYPE Abort( /* [in] */ BSTR bstrErrorInfo); virtual ULONG STDMETHODCALLTYPE GetLineNumber(void); virtual ULONG STDMETHODCALLTYPE GetLinePosition(void); virtual ULONG STDMETHODCALLTYPE GetAbsolutePosition(void); virtual HRESULT STDMETHODCALLTYPE GetLineBuffer( /* [out] */ const WCHAR **ppwcBuf, /* [out] */ ULONG *pulLen, /* [out] */ ULONG *pulStartPos); virtual HRESULT STDMETHODCALLTYPE GetLastError(void); virtual HRESULT STDMETHODCALLTYPE GetErrorInfo(/* [out] */ BSTR *pbstrErrorInfo) { ASSERT_NTC(FALSE); UNUSED(pbstrErrorInfo); return E_NOTIMPL; } virtual ULONG STDMETHODCALLTYPE GetFlags() { return 0; } virtual HRESULT STDMETHODCALLTYPE GetURL( /* [out] */ const WCHAR **ppwcBuf) { UNUSED(ppwcBuf); return E_NOTIMPL; } // ====== IXMLParser methods ============================== virtual HRESULT STDMETHODCALLTYPE SetURL( /* [in] */ const WCHAR* pszBaseUrl, /* [in] */ const WCHAR* pszRelativeUrl, /* [in] */ BOOL async) { UNUSED(pszBaseUrl); UNUSED(pszRelativeUrl); UNUSED(async); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE Load( /* [in] */ BOOL fFullyAvailable, /* [in] */ IMoniker *pimkName, /* [in] */ LPBC pibc, /* [in] */ DWORD grfMode) { UNUSED(fFullyAvailable); UNUSED(pimkName); UNUSED(pibc); UNUSED(grfMode); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE SetInput( /* [in] */ IUnknown*pStm); virtual HRESULT STDMETHODCALLTYPE PushData( /* [in] */ const char *pData, /* [in] */ ULONG ulChars, /* [in] */ BOOL bLastBuffer); virtual HRESULT STDMETHODCALLTYPE LoadEntity( /* [in] */ const WCHAR* pszBaseUrl, /* [in] */ const WCHAR* pszRelativeUrl, /* [in] */ BOOL fpe) { UNUSED(pszBaseUrl); UNUSED(pszRelativeUrl); UNUSED(fpe); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE ParseEntity( /* [in] */ const WCHAR* pwcText, /* [in] */ ULONG ulLen, /* [in] */ BOOL fpe){ UNUSED(pwcText); UNUSED(ulLen); UNUSED(fpe); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE ExpandEntity( /* [in] */ const WCHAR* pwcText, /* [in] */ ULONG ulLen) { UNUSED(pwcText); UNUSED(ulLen); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE SetRoot( /* [in] */ PVOID pRoot) { UNUSED(pRoot); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE GetRoot( /* [in] */ PVOID __RPC_FAR *ppRoot){ UNUSED(ppRoot); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE Run( /* [in] */ long lChars); virtual HRESULT STDMETHODCALLTYPE GetParserState(void) ; virtual HRESULT STDMETHODCALLTYPE Suspend(void) ; virtual HRESULT STDMETHODCALLTYPE Reset(void) ; virtual HRESULT STDMETHODCALLTYPE SetFlags( /* [in] */ ULONG iFlags) { UNUSED(iFlags); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE LoadDTD( /* [in] */ const WCHAR * pszBaseUrl, /* [in] */ const WCHAR * pszRelativeUrl){ UNUSED(pszBaseUrl); UNUSED(pszRelativeUrl); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE SetSecureBaseURL( /* [in] */ const WCHAR* pszBaseUrl){ UNUSED(pszBaseUrl); return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE GetSecureBaseURL( /* [out] */ const WCHAR ** ppwcBuf){ UNUSED(ppwcBuf); return E_NOTIMPL; } // ======= internal only methods for Parser #ifdef FUSION_USE_OLD_XML_PARSER_SOURCE HRESULT SetCurrentURL( /* [in] */ const WCHAR* pszCurrentUrl); // SRC attribute on