Commit 882c1026 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: Add a stubbed out IWICMetadataBlockReader interface.

parent 4f392d53
......@@ -39,6 +39,7 @@ typedef struct MetadataHandler {
IWICMetadataWriter IWICMetadataWriter_iface;
LONG ref;
IWICPersistStream IWICPersistStream_iface;
IWICMetadataBlockReader IWICMetadataBlockReader_iface;
const MetadataHandlerVtbl *vtable;
MetadataItem *items;
DWORD item_count;
......@@ -55,6 +56,11 @@ static inline MetadataHandler *impl_from_IWICPersistStream(IWICPersistStream *if
return CONTAINING_RECORD(iface, MetadataHandler, IWICPersistStream_iface);
}
static inline MetadataHandler *impl_from_IWICMetadataBlockReader(IWICMetadataBlockReader *iface)
{
return CONTAINING_RECORD(iface, MetadataHandler, IWICMetadataBlockReader_iface);
}
static void MetadataHandler_FreeItems(MetadataHandler *This)
{
int i;
......@@ -92,6 +98,10 @@ static HRESULT WINAPI MetadataHandler_QueryInterface(IWICMetadataWriter *iface,
{
*ppv = &This->IWICPersistStream_iface;
}
else if (IsEqualIID(&IID_IWICMetadataBlockReader, iid))
{
*ppv = &This->IWICMetadataBlockReader_iface;
}
else
{
*ppv = NULL;
......@@ -317,6 +327,64 @@ static const IWICPersistStreamVtbl MetadataHandler_PersistStream_Vtbl = {
MetadataHandler_SaveEx
};
static HRESULT WINAPI MetadataHandler_MetadataBlockReader_QueryInterface(IWICMetadataBlockReader *iface,
REFIID iid, void **ppv)
{
MetadataHandler *This = impl_from_IWICMetadataBlockReader(iface);
return IWICMetadataWriter_QueryInterface(&This->IWICMetadataWriter_iface, iid, ppv);
}
static ULONG WINAPI MetadataHandler_MetadataBlockReader_AddRef(IWICMetadataBlockReader *iface)
{
MetadataHandler *This = impl_from_IWICMetadataBlockReader(iface);
return IWICMetadataWriter_AddRef(&This->IWICMetadataWriter_iface);
}
static ULONG WINAPI MetadataHandler_MetadataBlockReader_Release(IWICMetadataBlockReader *iface)
{
MetadataHandler *This = impl_from_IWICMetadataBlockReader(iface);
return IWICMetadataWriter_Release(&This->IWICMetadataWriter_iface);
}
static HRESULT WINAPI MetadataHandler_MetadataBlockReader_GetContainerFormat(
IWICMetadataBlockReader *iface, GUID *guid)
{
FIXME("(%p,%p): stub\n", iface, guid);
return E_NOTIMPL;
}
static HRESULT WINAPI MetadataHandler_MetadataBlockReader_GetCount(
IWICMetadataBlockReader *iface, UINT *count)
{
FIXME("(%p,%p): stub\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI MetadataHandler_MetadataBlockReader_GetReaderByIndex(
IWICMetadataBlockReader *iface, UINT index, IWICMetadataReader **reader)
{
FIXME("(%p,%u,%p): stub\n", iface, index, reader);
return E_NOTIMPL;
}
static HRESULT WINAPI MetadataHandler_MetadataBlockReader_GetEnumerator(
IWICMetadataBlockReader *iface, IEnumUnknown **enum_metadata)
{
FIXME("(%p,%p): stub\n", iface, enum_metadata);
return E_NOTIMPL;
}
static const IWICMetadataBlockReaderVtbl MetadataHandler_MetadataBlockReader_Vtbl =
{
MetadataHandler_MetadataBlockReader_QueryInterface,
MetadataHandler_MetadataBlockReader_AddRef,
MetadataHandler_MetadataBlockReader_Release,
MetadataHandler_MetadataBlockReader_GetContainerFormat,
MetadataHandler_MetadataBlockReader_GetCount,
MetadataHandler_MetadataBlockReader_GetReaderByIndex,
MetadataHandler_MetadataBlockReader_GetEnumerator
};
HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv)
{
MetadataHandler *This;
......@@ -333,6 +401,7 @@ HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkO
This->IWICMetadataWriter_iface.lpVtbl = &MetadataHandler_Vtbl;
This->IWICPersistStream_iface.lpVtbl = &MetadataHandler_PersistStream_Vtbl;
This->IWICMetadataBlockReader_iface.lpVtbl = &MetadataHandler_MetadataBlockReader_Vtbl;
This->ref = 1;
This->vtable = vtable;
This->items = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment