Commit 3106cef4 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

wmvcore: Upgrade to IWMProfileManager2.

parent 2f622ac5
...@@ -87,25 +87,28 @@ HRESULT WINAPI WMCreateBackupRestorer(IUnknown *callback, IWMLicenseBackup **lic ...@@ -87,25 +87,28 @@ HRESULT WINAPI WMCreateBackupRestorer(IUnknown *callback, IWMLicenseBackup **lic
} }
typedef struct { typedef struct {
IWMProfileManager IWMProfileManager_iface; IWMProfileManager2 IWMProfileManager2_iface;
LONG ref; LONG ref;
} WMProfileManager; } WMProfileManager;
static inline WMProfileManager *impl_from_IWMProfileManager(IWMProfileManager *iface) static inline WMProfileManager *impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
{ {
return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager_iface); return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager2_iface);
} }
static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager *iface, REFIID riid, void **ppv) static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager2 *iface, REFIID riid, void **ppv)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) { if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IWMProfileManager_iface; *ppv = &This->IWMProfileManager2_iface;
}else if(IsEqualGUID(&IID_IWMProfileManager, riid)) { }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv); TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
*ppv = &This->IWMProfileManager_iface; *ppv = &This->IWMProfileManager2_iface;
}else if(IsEqualGUID(&IID_IWMProfileManager2, riid)) {
TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This, ppv);
*ppv = &This->IWMProfileManager2_iface;
}else { }else {
FIXME("Unsupported iface %s\n", debugstr_guid(riid)); FIXME("Unsupported iface %s\n", debugstr_guid(riid));
*ppv = NULL; *ppv = NULL;
...@@ -116,9 +119,9 @@ static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager *iface, ...@@ -116,9 +119,9 @@ static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager *iface,
return S_OK; return S_OK;
} }
static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager *iface) static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager2 *iface)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%d\n", This, ref);
...@@ -126,9 +129,9 @@ static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager *iface) ...@@ -126,9 +129,9 @@ static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager *iface)
return ref; return ref;
} }
static ULONG WINAPI WMProfileManager_Release(IWMProfileManager *iface) static ULONG WINAPI WMProfileManager_Release(IWMProfileManager2 *iface)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%d\n", This, ref);
...@@ -139,49 +142,63 @@ static ULONG WINAPI WMProfileManager_Release(IWMProfileManager *iface) ...@@ -139,49 +142,63 @@ static ULONG WINAPI WMProfileManager_Release(IWMProfileManager *iface)
return ref; return ref;
} }
static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager *iface, WMT_VERSION version, IWMProfile **ret) static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager2 *iface, WMT_VERSION version, IWMProfile **ret)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%x %p)\n", This, version, ret); FIXME("(%p)->(%x %p)\n", This, version, ret);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager *iface, REFGUID guid, IWMProfile **ret) static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager2 *iface, REFGUID guid, IWMProfile **ret)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret); FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager *iface, const WCHAR *profile, IWMProfile **ret) static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager2 *iface, const WCHAR *profile, IWMProfile **ret)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret); FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len) static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager2 *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len); FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager *iface, DWORD *ret) static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager2 *iface, DWORD *ret)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%p)\n", This, ret); FIXME("(%p)->(%p)\n", This, ret);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager *iface, DWORD index, IWMProfile **ret) static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager2 *iface, DWORD index, IWMProfile **ret)
{ {
WMProfileManager *This = impl_from_IWMProfileManager(iface); WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%d %p)\n", This, index, ret); FIXME("(%p)->(%d %p)\n", This, index, ret);
return E_NOTIMPL; return E_NOTIMPL;
} }
static const IWMProfileManagerVtbl WMProfileManagerVtbl = { static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION *version)
{
WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%p)\n", This, version);
return E_NOTIMPL;
}
static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION version)
{
WMProfileManager *This = impl_from_IWMProfileManager2(iface);
FIXME("(%p)->(%x)\n", This, version);
return E_NOTIMPL;
}
static const IWMProfileManager2Vtbl WMProfileManager2Vtbl = {
WMProfileManager_QueryInterface, WMProfileManager_QueryInterface,
WMProfileManager_AddRef, WMProfileManager_AddRef,
WMProfileManager_Release, WMProfileManager_Release,
...@@ -190,7 +207,9 @@ static const IWMProfileManagerVtbl WMProfileManagerVtbl = { ...@@ -190,7 +207,9 @@ static const IWMProfileManagerVtbl WMProfileManagerVtbl = {
WMProfileManager_LoadProfileByData, WMProfileManager_LoadProfileByData,
WMProfileManager_SaveProfile, WMProfileManager_SaveProfile,
WMProfileManager_GetSystemProfileCount, WMProfileManager_GetSystemProfileCount,
WMProfileManager_LoadSystemProfile WMProfileManager_LoadSystemProfile,
WMProfileManager2_GetSystemProfileVersion,
WMProfileManager2_SetSystemProfileVersion
}; };
HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret) HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
...@@ -203,9 +222,9 @@ HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret) ...@@ -203,9 +222,9 @@ HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
if(!profile_mgr) if(!profile_mgr)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
profile_mgr->IWMProfileManager_iface.lpVtbl = &WMProfileManagerVtbl; profile_mgr->IWMProfileManager2_iface.lpVtbl = &WMProfileManager2Vtbl;
profile_mgr->ref = 1; profile_mgr->ref = 1;
*ret = &profile_mgr->IWMProfileManager_iface; *ret = (IWMProfileManager *)&profile_mgr->IWMProfileManager2_iface;
return S_OK; return S_OK;
} }
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