From 24b218fc677b2b14f30061bacef2b4fb8c63305c Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Mariusz=20Pluci=C5=84ski?= Date: Mon, 7 Jun 2010 23:20:27 +0200 Subject: gameux: Add IGameExplorer2 implementation stub --- dlls/gameux/gameexplorer.c | 69 +++++++++++++++++++++++++++++++------------ 1 files changed, 50 insertions(+), 19 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index 39c8cde..206f80b 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -1,5 +1,5 @@ /* - * gameux: IGameExplorer interfaces implementation + * gameux: IGameExplorer and IGameExplorer2 interfaces implementation * * Copyright (C) 2008 Alistair Leslie-Hughes * Copyright (C) 2010 Mariusz PluciƄski @@ -36,31 +36,32 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); /* - * IGameExplorer implementation + * GameExplorer implementation */ typedef struct _GameExplorerImpl { - const struct IGameExplorerVtbl *lpVtbl; + const struct IGameExplorer2Vtbl *lpVtbl; LONG ref; } GameExplorerImpl; -static inline GameExplorerImpl *impl_from_IGameExplorer( IGameExplorer *iface ) +static inline GameExplorerImpl *impl_from_IGameExplorer2( IGameExplorer2 *iface ) { return (GameExplorerImpl *)((char*)iface - FIELD_OFFSET(GameExplorerImpl, lpVtbl)); } -static HRESULT WINAPI GameExplorerImpl_QueryInterface(IGameExplorer *iface, REFIID riid, void **ppvObject) +static HRESULT WINAPI GameExplorerImpl_QueryInterface(IGameExplorer2 *iface, REFIID riid, void **ppvObject) { - GameExplorerImpl *This = impl_from_IGameExplorer( iface ); + GameExplorerImpl *This = impl_from_IGameExplorer2( iface ); TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject ); *ppvObject = NULL; if ( IsEqualGUID( riid, &IID_IUnknown ) || - IsEqualGUID( riid, &IID_IGameExplorer ) ) + IsEqualGUID( riid, &IID_IGameExplorer ) || + IsEqualGUID( riid, &IID_IGameExplorer2) ) { *ppvObject = iface; } @@ -70,21 +71,21 @@ static HRESULT WINAPI GameExplorerImpl_QueryInterface(IGameExplorer *iface, REFI return E_NOINTERFACE; } - IGameExplorer_AddRef( iface ); + IGameExplorer2_AddRef( iface ); return S_OK; } -static ULONG WINAPI GameExplorerImpl_AddRef(IGameExplorer *iface) +static ULONG WINAPI GameExplorerImpl_AddRef(IGameExplorer2 *iface) { - GameExplorerImpl *This = impl_from_IGameExplorer( iface ); + GameExplorerImpl *This = impl_from_IGameExplorer2( iface ); TRACE("%p\n", This ); return InterlockedIncrement( &This->ref ); } -static ULONG WINAPI GameExplorerImpl_Release(IGameExplorer *iface) +static ULONG WINAPI GameExplorerImpl_Release(IGameExplorer2 *iface) { - GameExplorerImpl *This = impl_from_IGameExplorer( iface ); + GameExplorerImpl *This = impl_from_IGameExplorer2( iface ); LONG ref; TRACE("%p\n", This ); @@ -98,7 +99,7 @@ static ULONG WINAPI GameExplorerImpl_Release(IGameExplorer *iface) return ref; } -static HRESULT WINAPI GameExplorerImpl_AddGame(IGameExplorer *iface, +static HRESULT WINAPI GameExplorerImpl_AddGame(IGameExplorer2 *iface, BSTR bstrGDFBinaryPath, BSTR sGameInstallDirectory, GAME_INSTALL_SCOPE installScope, @@ -109,7 +110,7 @@ static HRESULT WINAPI GameExplorerImpl_AddGame(IGameExplorer *iface, return E_NOTIMPL; } -static HRESULT WINAPI GameExplorerImpl_RemoveGame(IGameExplorer *iface, +static HRESULT WINAPI GameExplorerImpl_RemoveGame(IGameExplorer2 *iface, GUID instanceID) { TRACE("(%p, %s)\n", iface, debugstr_guid(&instanceID)); @@ -117,7 +118,7 @@ static HRESULT WINAPI GameExplorerImpl_RemoveGame(IGameExplorer *iface, return E_NOTIMPL; } -static HRESULT WINAPI GameExplorerImpl_UpdateGame(IGameExplorer *iface, +static HRESULT WINAPI GameExplorerImpl_UpdateGame(IGameExplorer2 *iface, GUID instanceID) { TRACE("(%p, %s)\n", iface, debugstr_guid(&instanceID)); @@ -125,7 +126,7 @@ static HRESULT WINAPI GameExplorerImpl_UpdateGame(IGameExplorer *iface, return E_NOTIMPL; } -static HRESULT WINAPI GameExplorerImpl_VerifyAccess(IGameExplorer *iface, +static HRESULT WINAPI GameExplorerImpl_VerifyAccess(IGameExplorer2 *iface, BSTR sGDFBinaryPath, BOOL *pHasAccess) { TRACE("(%p, %s, %p)\n", iface, debugstr_w(sGDFBinaryPath), pHasAccess); @@ -136,7 +137,34 @@ static HRESULT WINAPI GameExplorerImpl_VerifyAccess(IGameExplorer *iface, return S_OK; } -static const struct IGameExplorerVtbl GameExplorerImplVtbl = +static HRESULT STDMETHODCALLTYPE GameExplorerImpl_CheckAccess(IGameExplorer2* iface, + LPCWSTR binaryGDFPath, + BOOL *pHasAccess) +{ + TRACE("(%p, %s, %p)\n", iface, debugstr_w(binaryGDFPath), pHasAccess); + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE GameExplorerImpl_InstallGame(IGameExplorer2* iface, + LPCWSTR binaryGDFPath, + LPCWSTR installDirectory, + GAME_INSTALL_SCOPE installScope) +{ + TRACE("(%p, %s, %s, 0x%x)\n", iface, debugstr_w(binaryGDFPath), debugstr_w(installDirectory), installScope); + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE GameExplorerImpl_UninstallGame(IGameExplorer2* iface, + LPCWSTR binaryGDFPath) +{ + TRACE("(%p, %s)\n", iface, debugstr_w(binaryGDFPath)); + FIXME("stub\n"); + return E_NOTIMPL; +} + +static const struct IGameExplorer2Vtbl GameExplorer2ImplVtbl = { GameExplorerImpl_QueryInterface, GameExplorerImpl_AddRef, @@ -144,7 +172,10 @@ static const struct IGameExplorerVtbl GameExplorerImplVtbl = GameExplorerImpl_AddGame, GameExplorerImpl_RemoveGame, GameExplorerImpl_UpdateGame, - GameExplorerImpl_VerifyAccess + GameExplorerImpl_VerifyAccess, + GameExplorerImpl_InstallGame, + GameExplorerImpl_UninstallGame, + GameExplorerImpl_CheckAccess, }; /* @@ -161,7 +192,7 @@ HRESULT GameExplorer_create(IUnknown *pUnkOuter, LPVOID *ppObj) if( !pGameExplorer ) return E_OUTOFMEMORY; - pGameExplorer->lpVtbl = &GameExplorerImplVtbl; + pGameExplorer->lpVtbl = &GameExplorer2ImplVtbl; pGameExplorer->ref = 0; *ppObj = &pGameExplorer->lpVtbl; -- 1.6.2.5