add other interfaces
Josef Reidinger
josef.reidinger at seznam.cz
Sat Jan 12 05:07:24 CST 2008
---
dlls/msxml3/domdoc.c | 127 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 89 insertions(+), 38 deletions(-)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 88aa511..83eb590 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -169,7 +169,7 @@ typedef struct _domdoc
{
const struct IXMLDOMDocument2Vtbl *lpVtbl;
const struct IPersistStreamVtbl *lpvtblIPersistStream;
- const struct IStreamVtbl *lpvtblIStream;
+ const struct IStreamVtbl *lpvtblIStream;
LONG ref;
VARIANT_BOOL async;
VARIANT_BOOL validating;
@@ -183,8 +183,8 @@ typedef struct _domdoc
/* IPersistStream */
IStream *stream;
- /* for istrem chunk */
- xmlParserCtxtPtr chunkParser;
+ /* for istrem chunk */
+ xmlParserCtxtPtr chunkParser;
} domdoc;
LONG xmldoc_add_ref(xmlDocPtr doc)
@@ -375,68 +375,119 @@ static ULONG WINAPI xmldoc_IStream_Release(
static HRESULT WINAPI xmldoc_IStream_Read(
IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
{
- domdoc *This = impl_from_IStream(iface);
- FIXME("(%p, %p, %lu, %p): stub!\n", iface, pv, cb, pcbRead);
- return E_NOTIMPL;
+ FIXME("(%p, %p, %u, %p): stub!\n", iface, pv, cb, pcbRead);
+ return E_NOTIMPL;
}
static HRESULT WINAPI xmldoc_IStream_Write(
IStream *iface, void const *pv, ULONG cb, ULONG *pcbRead)
{
- TRACE("\n");
- domdoc *This = impl_from_IStream(iface);
+ domdoc *This = impl_from_IStream(iface);
if (!This->chunkParser){
- TRACE("1");
- This->chunkParser = xmlCreatePushParserCtxt (NULL, NULL,pv, cb, NULL);
- } else {
- TRACE("2");
- int res = xmlParseChunk (This->chunkParser, pv,cb, 0);
- if (res)
- ERR("Parse chunk failed (%p,%p,%lu,%p)",This->chunkParser,pv,cb,pcbRead);
- if (This->chunkParser->wellFormed){
- xmlDocPtr xmldoc = This->chunkParser->myDoc;
- attach_xmlnode(This->node, (xmlNodePtr) xmldoc);
- xmlClearParserCtxt(This->chunkParser);
- This->chunkParser = NULL;
- }
- }
- return S_OK;
+ TRACE("first chunk\n");
+ This->chunkParser = xmlCreatePushParserCtxt (NULL, NULL,pv, cb, NULL);
+ } else {
+ int res;
+ TRACE("continue with some parsing chunks\n");
+ res = xmlParseChunk (This->chunkParser, pv,cb, 0);
+ if (res)
+ ERR("Parse chunk failed (%p,%p,%u) with error %i\n",This->chunkParser,
+ pv,cb,res);
+ if (This->chunkParser->wellFormed){
+ xmlDocPtr xmldoc = This->chunkParser->myDoc;
+ attach_xmlnode(This->node, (xmlNodePtr) xmldoc);
+ xmlClearParserCtxt(This->chunkParser);
+ This->chunkParser = NULL;
+ }
+ }
+ FIXME("not set correctly readed chars");
+ *pcbRead = cb;
+
+ return S_OK;
}
static HRESULT WINAPI xmldoc_IStream_Seek(
- IStream *iface, LARGE_INTEGER dlibMove,
- DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition)
+ IStream *iface, LARGE_INTEGER dlibMove,
+ DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition)
{
- TRACE("(%p, %lli, %li, %p): stub!\n", iface, dlibMove,
- dwOrigin, plibNewPosition);
+ /* this call can be used only for read,
+ * call on write break reading chunks */
+ FIXME("(%p ): stub!\n", iface);
return E_NOTIMPL;
}
static HRESULT WINAPI xmldoc_IStream_SetSize(
- IStream *iface, ULARGE_INTEGER libNewSize)
+ IStream *iface, ULARGE_INTEGER libNewSize)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_CopyTo( IStream *iface, IStream *target,
+ ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_Commit( IStream *iface,
+ DWORD grfCommitFlags)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_Revert(IStream* iface)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+
+static HRESULT WINAPI xmldoc_IStream_LockRegion(IStream* iface,
+ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_UnlockRegion(IStream* iface,
+ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
+{
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_Stat(IStream* iface, STATSTG *pstatstg,
+ DWORD grfStatFlag)
+{
+ FIXME("(%p): stub.\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI xmldoc_IStream_Clone(IStream* iface, IStream **ppstm)
{
- TRACE("(%p, %llu): stub!\n", iface, libNewSize);
+ ERR("(%p): this call doesn't allow on xml stream.\n", iface);
return E_NOTIMPL;
}
-
static const IStreamVtbl xmldoc_IStream_VTable =
{
- xmldoc_IStream_QueryInterface,
- xmldoc_IStream_AddRef,
- xmldoc_IStream_Release,
+ xmldoc_IStream_QueryInterface,
+ xmldoc_IStream_AddRef,
+ xmldoc_IStream_Release,
xmldoc_IStream_Read,
xmldoc_IStream_Write,
xmldoc_IStream_Seek,
- xmldoc_IStream_SetSize
-/* xmldoc_IStream_CopyTo,
+ xmldoc_IStream_SetSize,
+ xmldoc_IStream_CopyTo,
xmldoc_IStream_Commit,
xmldoc_IStream_Revert,
xmldoc_IStream_LockRegion,
xmldoc_IStream_UnlockRegion,
xmldoc_IStream_Stat,
- xmldoc_IStream_Clone*/
+ xmldoc_IStream_Clone
};
static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID riid, void** ppvObject )
@@ -1912,7 +1963,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
doc->lpVtbl = &domdoc_vtbl;
doc->lpvtblIPersistStream = &xmldoc_IPersistStream_VTable;
- doc->lpvtblIStream = &xmldoc_IStream_VTable;
+ doc->lpvtblIStream = &xmldoc_IStream_VTable;
doc->ref = 1;
doc->async = 0;
doc->validating = 0;
@@ -1922,7 +1973,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
doc->error = S_OK;
doc->schema = NULL;
doc->stream = NULL;
- doc->chunkParser = NULL;
+ doc->chunkParser = NULL;
xmldoc = xmlNewDoc(NULL);
if(!xmldoc)
--
1.5.3.7
--------------040106040909070706090504
Content-Type: text/x-patch;
name="0004-fix-whitespaces.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="0004-fix-whitespaces.patch"
More information about the wine-patches
mailing list