Back to index

lightning-sunbird  0.9+nobinonly
XMLDocument.h
Go to the documentation of this file.
00001 // XMLDocument.h : Declaration of the CXMLDocument
00002 
00003 #ifndef __XMLDOCUMENT_H_
00004 #define __XMLDOCUMENT_H_
00005 
00006 #include "resource.h"       // main symbols
00007 
00009 // CXMLDocument
00010 class ATL_NO_VTABLE CXMLDocument : 
00011        public CComObjectRootEx<CComSingleThreadModel>,
00012        public CComCoClass<CXMLDocument, &CLSID_MozXMLDocument>,
00013        public ISupportErrorInfo,
00014        public IDispatchImpl<IXMLDocument, &IID_IXMLDocument, &LIBID_MozActiveXMLLib>,
00015        public IPersistMoniker,
00016        public IPersistStreamInit
00017 {
00018 public:
00019        CXMLDocument();
00020        virtual ~CXMLDocument();
00021 
00022 
00023 DECLARE_REGISTRY_RESOURCEID(IDR_XMLDOCUMENT)
00024 
00025 DECLARE_PROTECT_FINAL_CONSTRUCT()
00026 
00027 BEGIN_COM_MAP(CXMLDocument)
00028        COM_INTERFACE_ENTRY(IXMLDocument)
00029        COM_INTERFACE_ENTRY(IDispatch)
00030        COM_INTERFACE_ENTRY(IPersistMoniker)
00031        COM_INTERFACE_ENTRY(IPersistStreamInit)
00032 //     COM_INTERFACE_ENTRY(ISupportErrorInfo)
00033 END_COM_MAP()
00034 
00035        LONG m_nReadyState;
00036        std::string m_szURL;
00037        CComQIPtr<IXMLElement, &IID_IXMLElement> m_spRoot;
00038 
00039 // ISupportsErrorInfo
00040        STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
00041 
00042 // IPersistStreamInit
00043        //virtual HRESULT STDMETHODCALLTYPE IsDirty(void);
00044        HRESULT STDMETHODCALLTYPE Load(/* [in] */ LPSTREAM pStm);
00045        HRESULT STDMETHODCALLTYPE Save(/* [in] */ LPSTREAM pStm, /* [in] */ BOOL fClearDirty);
00046        HRESULT STDMETHODCALLTYPE GetSizeMax(/* [out] */ ULARGE_INTEGER __RPC_FAR *pCbSize);
00047        HRESULT STDMETHODCALLTYPE InitNew(void);
00048 
00049 // IPersistMoniker
00050        HRESULT STDMETHODCALLTYPE GetClassID(/* [out] */ CLSID __RPC_FAR *pClassID);
00051        HRESULT STDMETHODCALLTYPE IsDirty(void);
00052        HRESULT STDMETHODCALLTYPE Load(/* [in] */ BOOL fFullyAvailable, /* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc, /* [in] */ DWORD grfMode);
00053        HRESULT STDMETHODCALLTYPE Save(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pbc, /* [in] */ BOOL fRemember);
00054        HRESULT STDMETHODCALLTYPE SaveCompleted(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc);
00055        HRESULT STDMETHODCALLTYPE GetCurMoniker(/* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppimkName);
00056 
00057 // IXMLError
00058        HRESULT STDMETHODCALLTYPE GetErrorInfo(XML_ERROR __RPC_FAR *pErrorReturn);
00059 
00060 // IXMLDocument
00061        HRESULT STDMETHODCALLTYPE get_root(/* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *p);
00062        HRESULT STDMETHODCALLTYPE get_fileSize(/* [out][retval] */ BSTR __RPC_FAR *p);
00063        HRESULT STDMETHODCALLTYPE get_fileModifiedDate(/* [out][retval] */ BSTR __RPC_FAR *p);
00064        HRESULT STDMETHODCALLTYPE get_fileUpdatedDate(/* [out][retval] */ BSTR __RPC_FAR *p);
00065        HRESULT STDMETHODCALLTYPE get_URL(/* [out][retval] */ BSTR __RPC_FAR *p);
00066        HRESULT STDMETHODCALLTYPE put_URL(/* [in] */ BSTR p);
00067        HRESULT STDMETHODCALLTYPE get_mimeType(/* [out][retval] */ BSTR __RPC_FAR *p);
00068        HRESULT STDMETHODCALLTYPE get_readyState(/* [out][retval] */ long __RPC_FAR *pl);
00069        HRESULT STDMETHODCALLTYPE get_charset(/* [out][retval] */ BSTR __RPC_FAR *p);
00070        HRESULT STDMETHODCALLTYPE put_charset(/* [in] */ BSTR p);
00071        HRESULT STDMETHODCALLTYPE get_version(/* [out][retval] */ BSTR __RPC_FAR *p);
00072        HRESULT STDMETHODCALLTYPE get_doctype(/* [out][retval] */ BSTR __RPC_FAR *p);
00073        HRESULT STDMETHODCALLTYPE get_dtdURL(/* [out][retval] */ BSTR __RPC_FAR *p);
00074        HRESULT STDMETHODCALLTYPE createElement(/* [in] */ VARIANT vType, /* [in][optional] */ VARIANT var1, /* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *ppElem);
00075 public:
00076 };
00077 
00078 typedef CComObject<CXMLDocument> CXMLDocumentInstance;
00079 
00080 #endif //__XMLDOCUMENT_H_