Commit 9cc5cdc1 authored by Daniel Jelinski's avatar Daniel Jelinski Committed by Alexandre Julliard

xolehlp: Implement ITransactionImport.

parent 79d7e395
...@@ -153,6 +153,7 @@ typedef struct { ...@@ -153,6 +153,7 @@ typedef struct {
LONG ref; LONG ref;
IResourceManagerFactory2 IResourceManagerFactory2_iface; IResourceManagerFactory2 IResourceManagerFactory2_iface;
ITransactionImportWhereabouts ITransactionImportWhereabouts_iface; ITransactionImportWhereabouts ITransactionImportWhereabouts_iface;
ITransactionImport ITransactionImport_iface;
} TransactionManager; } TransactionManager;
static inline TransactionManager *impl_from_ITransactionDispenser(ITransactionDispenser *iface) static inline TransactionManager *impl_from_ITransactionDispenser(ITransactionDispenser *iface)
...@@ -182,6 +183,10 @@ static HRESULT WINAPI TransactionDispenser_QueryInterface(ITransactionDispenser ...@@ -182,6 +183,10 @@ static HRESULT WINAPI TransactionDispenser_QueryInterface(ITransactionDispenser
{ {
*ppv = &This->ITransactionImportWhereabouts_iface; *ppv = &This->ITransactionImportWhereabouts_iface;
} }
else if (IsEqualIID(&IID_ITransactionImport, iid))
{
*ppv = &This->ITransactionImport_iface;
}
else else
{ {
FIXME("(%s): not implemented\n", debugstr_guid(iid)); FIXME("(%s): not implemented\n", debugstr_guid(iid));
...@@ -345,6 +350,44 @@ static const ITransactionImportWhereaboutsVtbl TransactionImportWhereabouts_Vtbl ...@@ -345,6 +350,44 @@ static const ITransactionImportWhereaboutsVtbl TransactionImportWhereabouts_Vtbl
TransactionImportWhereabouts_GetWhereabouts TransactionImportWhereabouts_GetWhereabouts
}; };
static inline TransactionManager *impl_from_ITransactionImport(ITransactionImport *iface)
{
return CONTAINING_RECORD(iface, TransactionManager, ITransactionImport_iface);
}
static HRESULT WINAPI TransactionImport_QueryInterface(ITransactionImport *iface, REFIID iid,
void **ppv)
{
TransactionManager *This = impl_from_ITransactionImport(iface);
return TransactionDispenser_QueryInterface(&This->ITransactionDispenser_iface, iid, ppv);
}
static ULONG WINAPI TransactionImport_AddRef(ITransactionImport *iface)
{
TransactionManager *This = impl_from_ITransactionImport(iface);
return TransactionDispenser_AddRef(&This->ITransactionDispenser_iface);
}
static ULONG WINAPI TransactionImport_Release(ITransactionImport *iface)
{
TransactionManager *This = impl_from_ITransactionImport(iface);
return TransactionDispenser_Release(&This->ITransactionDispenser_iface);
}
static HRESULT WINAPI TransactionImport_Import(ITransactionImport *iface,
ULONG cbTransactionCookie, byte *rgbTransactionCookie, IID *piid, void **ppvTransaction)
{
FIXME("(%p, %u, %p, %s, %p): stub\n", iface, cbTransactionCookie, rgbTransactionCookie, debugstr_guid(piid), ppvTransaction);
if (!rgbTransactionCookie || !piid || !ppvTransaction) return E_INVALIDARG;
return E_NOTIMPL;
}
static const ITransactionImportVtbl TransactionImport_Vtbl = {
TransactionImport_QueryInterface,
TransactionImport_AddRef,
TransactionImport_Release,
TransactionImport_Import
};
static HRESULT TransactionManager_Create(REFIID riid, void **ppv) static HRESULT TransactionManager_Create(REFIID riid, void **ppv)
{ {
TransactionManager *This; TransactionManager *This;
...@@ -356,6 +399,7 @@ static HRESULT TransactionManager_Create(REFIID riid, void **ppv) ...@@ -356,6 +399,7 @@ static HRESULT TransactionManager_Create(REFIID riid, void **ppv)
This->ITransactionDispenser_iface.lpVtbl = &TransactionDispenser_Vtbl; This->ITransactionDispenser_iface.lpVtbl = &TransactionDispenser_Vtbl;
This->IResourceManagerFactory2_iface.lpVtbl = &ResourceManagerFactory2_Vtbl; This->IResourceManagerFactory2_iface.lpVtbl = &ResourceManagerFactory2_Vtbl;
This->ITransactionImportWhereabouts_iface.lpVtbl = &TransactionImportWhereabouts_Vtbl; This->ITransactionImportWhereabouts_iface.lpVtbl = &TransactionImportWhereabouts_Vtbl;
This->ITransactionImport_iface.lpVtbl = &TransactionImport_Vtbl;
This->ref = 1; This->ref = 1;
ret = ITransactionDispenser_QueryInterface(&This->ITransactionDispenser_iface, riid, ppv); ret = ITransactionDispenser_QueryInterface(&This->ITransactionDispenser_iface, riid, ppv);
......
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