diff --git a/dlls/xgameruntime/GDKComponent/InitInternalGDKC.c b/dlls/xgameruntime/GDKComponent/InitInternalGDKC.c index 9def3524b9a..4c2005a2143 100644 --- a/dlls/xgameruntime/GDKComponent/InitInternalGDKC.c +++ b/dlls/xgameruntime/GDKComponent/InitInternalGDKC.c @@ -48,7 +48,7 @@ HRESULT WINAPI GDKC_InitAPI( ULONG gdkVer, ULONG gsVer, CHAR mode, - INITIALIZE_OPTIONS *options + const XGameRuntimeOptions *options ) { HRESULT status = S_OK; diff --git a/dlls/xgameruntime/GDKComponent/InitInternalGDKC.h b/dlls/xgameruntime/GDKComponent/InitInternalGDKC.h index a1594764030..3bd349dd970 100644 --- a/dlls/xgameruntime/GDKComponent/InitInternalGDKC.h +++ b/dlls/xgameruntime/GDKComponent/InitInternalGDKC.h @@ -24,6 +24,6 @@ #include "../private.h" -HRESULT WINAPI GDKC_InitAPI( ULONG gdkVer, ULONG gsVer, CHAR mode, INITIALIZE_OPTIONS *options ); +HRESULT WINAPI GDKC_InitAPI( ULONG gdkVer, ULONG gsVer, CHAR mode, const XGameRuntimeOptions *options ); #endif \ No newline at end of file diff --git a/dlls/xgameruntime/GDKComponent/System/Networking/HTTPClient.c b/dlls/xgameruntime/GDKComponent/System/Networking/HTTPClient.c index bdcae8241b5..55de7f7da37 100644 --- a/dlls/xgameruntime/GDKComponent/System/Networking/HTTPClient.c +++ b/dlls/xgameruntime/GDKComponent/System/Networking/HTTPClient.c @@ -198,22 +198,22 @@ static HRESULT httpclient_ObtainThumbprints( HINTERNET inetRequest, SIZE_T *thum if ( numElements >= 1 ) { // leaf = element[0] - TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[0]->pCertContext, ThumbprintType_Leaf ); + TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[0]->pCertContext, XNetworkingThumbprintType_Leaf ); } if ( numElements >= 2 ) { // issuer = element[1] (immediate issuer of leaf) - TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[1]->pCertContext, ThumbprintType_Issuer ); + TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[1]->pCertContext, XNetworkingThumbprintType_Issuer ); } if ( numElements >= 1 ) { // root = last element - TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[numElements - 1]->pCertContext, ThumbprintType_Root ); + TRY_ADD_THUMBPRINT_FROM_CERT( simple->rgpElement[numElements - 1]->pCertContext, XNetworkingThumbprintType_Root ); } } else { // chain not available: at least try server cert (leaf) - TRY_ADD_THUMBPRINT_FROM_CERT( certContext, ThumbprintType_Leaf ); + TRY_ADD_THUMBPRINT_FROM_CERT( certContext, XNetworkingThumbprintType_Leaf ); } if (idx > 0) diff --git a/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.c b/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.c index 0782099574e..3787cd633ac 100644 --- a/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.c +++ b/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.c @@ -38,12 +38,12 @@ static HRESULT CALLBACK HTTPClientProvider( XAsyncOp operation, const XAsyncProv switch ( operation ) { - case Begin: + case XAsyncOp_Begin: { return IXThreadingImpl_XAsyncSchedule( threadingImpl, data->async, 100 ); } - case DoWork: + case XAsyncOp_DoWork: { status = httpclient_ObtainSecurityInformationForUrl( context->url, &context->securityInformationBuffer, &context->securityInformationBufferCount, &context->securityInformation ); @@ -52,7 +52,7 @@ static HRESULT CALLBACK HTTPClientProvider( XAsyncOp operation, const XAsyncProv return status; } - case GetResult: + case XAsyncOp_GetResult: { if ( data->buffer && data->bufferSize >= context->securityInformationBufferCount ) { @@ -62,13 +62,13 @@ static HRESULT CALLBACK HTTPClientProvider( XAsyncOp operation, const XAsyncProv return E_BOUNDS; } - case Cancel: + case XAsyncOp_Cancel: { IXThreadingImpl_XAsyncComplete( threadingImpl, data->async, E_ABORT, 0 ); return S_OK; } - case Cleanup: + case XAsyncOp_Cleanup: { free( context ); return S_OK; @@ -78,26 +78,23 @@ static HRESULT CALLBACK HTTPClientProvider( XAsyncOp operation, const XAsyncProv return E_NOTIMPL; } -static inline struct x_networking *impl_from_IXNetworkingImpl( IXNetworkingImpl *iface ) +static inline struct x_networking *impl_from_IXNetworkingImpl2( IXNetworkingImpl2 *iface ) { - return CONTAINING_RECORD( iface, struct x_networking, IXNetworkingImpl_iface ); + return CONTAINING_RECORD( iface, struct x_networking, IXNetworkingImpl2_iface ); } -static HRESULT WINAPI x_networking_QueryInterface( IXNetworkingImpl *iface, REFIID iid, void **out ) +static HRESULT WINAPI x_networking_QueryInterface( IXNetworkingImpl2 *iface, REFIID iid, void **out ) { - struct x_networking *impl = impl_from_IXNetworkingImpl( iface ); + struct x_networking *impl = impl_from_IXNetworkingImpl2( iface ); TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); if (IsEqualGUID( iid, &IID_IUnknown ) || IsEqualGUID( iid, &IID_IXNetworkingImpl ) || - // For some strange, unexplainable reason, the xgameruntime.lib library shipped with - // PlayFabMultiplayerGDK has the GUID of IXNetworkingImpl of the class Id of XNetworking. - // This is for compatibility reasons only. - IsEqualGUID( iid, &CLSID_XNetworkingImpl )) + IsEqualGUID( iid, &IID_IXNetworkingImpl2 )) { - *out = &impl->IXNetworkingImpl_iface; - impl->IXNetworkingImpl_iface.lpVtbl->AddRef( *out ); + *out = &impl->IXNetworkingImpl2_iface; + impl->IXNetworkingImpl2_iface.lpVtbl->AddRef( *out ); return S_OK; } @@ -106,74 +103,75 @@ static HRESULT WINAPI x_networking_QueryInterface( IXNetworkingImpl *iface, REFI return E_NOINTERFACE; } -static ULONG WINAPI x_networking_AddRef( IXNetworkingImpl *iface ) +static ULONG WINAPI x_networking_AddRef( IXNetworkingImpl2 *iface ) { - struct x_networking *impl = impl_from_IXNetworkingImpl( iface ); + struct x_networking *impl = impl_from_IXNetworkingImpl2( iface ); ULONG ref = InterlockedIncrement( &impl->ref ); TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); return ref; } -static ULONG WINAPI x_networking_Release( IXNetworkingImpl *iface ) +static ULONG WINAPI x_networking_Release( IXNetworkingImpl2 *iface ) { - struct x_networking *impl = impl_from_IXNetworkingImpl( iface ); + struct x_networking *impl = impl_from_IXNetworkingImpl2( iface ); ULONG ref = InterlockedDecrement( &impl->ref ); TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); return ref; } -static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPort( IXNetworkingImpl *iface, UINT16 *preferredLocalUdpMultiplayerPort ) +static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPort( IXNetworkingImpl2 *iface, UINT16 *preferredLocalUdpMultiplayerPort ) { FIXME( "iface %p, preferredLocalUdpMultiplayerPort %p stub!\n", iface, preferredLocalUdpMultiplayerPort ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock ) +static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock ) { FIXME( "iface %p, asyncBlock %p stub!\n", iface, asyncBlock ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock, UINT16 *preferredLocalUdpMultiplayerPort ) +static HRESULT WINAPI x_networking_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock, UINT16 *preferredLocalUdpMultiplayerPort ) { FIXME( "iface %p, asyncBlock %p, preferredLocalUdpMultiplayerPort %p stub!\n", iface, asyncBlock, preferredLocalUdpMultiplayerPort ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged( IXNetworkingImpl *iface, XTaskQueueHandle queue, PVOID context, XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback *callback, XTaskQueueRegistrationToken *token ) +static HRESULT WINAPI x_networking_XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged( IXNetworkingImpl2 *iface, XTaskQueueHandle queue, PVOID context, XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback *callback, XTaskQueueRegistrationToken *token ) { FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); return E_NOTIMPL; } -static BOOLEAN WINAPI x_networking_XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged( IXNetworkingImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +static BOOLEAN WINAPI x_networking_XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged( IXNetworkingImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) { FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); return FALSE; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsync( IXNetworkingImpl *iface, LPCSTR url, XAsyncBlock *asyncBlock ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsync( IXNetworkingImpl2 *iface, LPCSTR url, XAsyncBlock *asyncBlock ) { FIXME( "iface %p, url %p, asyncBlock %p stub!\n", iface, url, asyncBlock ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsyncResultSize( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock, SIZE_T *securityInformationBufferByteCount ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsyncResultSize( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock, SIZE_T *securityInformationBufferByteCount ) { FIXME( "iface %p, asyncBlock %p, securityInformationBufferByteCount %p stub!\n", iface, asyncBlock, securityInformationBufferByteCount ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsyncResult( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T *securityInformationBufferByteCountUsed, UINT8 *securityInformationBuffer, XNetworkingSecurityInformation **securityInformation ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlAsyncResult( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T *securityInformationBufferByteCountUsed, UINT8 *securityInformationBuffer, XNetworkingSecurityInformation **securityInformation ) { - FIXME( "iface %p, asyncBlock %p, securityInformationBufferByteCount %lld, securityInformationBufferByteCountUsed %p, securityInformationBuffer %p, securityInformation %p stub!\n", iface, asyncBlock, securityInformationBufferByteCount, securityInformationBufferByteCountUsed, securityInformationBuffer, securityInformation ); + FIXME( "iface %p, asyncBlock %p, securityInformationBufferByteCount %Iu, securityInformationBufferByteCountUsed %p, securityInformationBuffer %p, securityInformation %p stub!\n", iface, asyncBlock, securityInformationBufferByteCount, securityInformationBufferByteCountUsed, securityInformationBuffer, securityInformation ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16Async( IXNetworkingImpl *iface, LPCWSTR url, XAsyncBlock *asyncBlock ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16Async( IXNetworkingImpl2 *iface, LPCWSTR url, XAsyncBlock *asyncBlock ) { HRESULT status; IXThreadingImpl *threadingImpl; + struct UrlSecurityInfoContext *context; TRACE( "iface %p, url %p, asyncBlock %p.\n", iface, url, asyncBlock ); @@ -181,7 +179,7 @@ static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf1 status = QueryApiImpl( &CLSID_XThreadingImpl, &IID_IXThreadingImpl, (void **)&threadingImpl ); if ( FAILED( status ) ) return status; - struct UrlSecurityInfoContext *context = (struct UrlSecurityInfoContext *)malloc( sizeof( struct UrlSecurityInfoContext ) ); + context = (struct UrlSecurityInfoContext *)malloc( sizeof( struct UrlSecurityInfoContext ) ); if ( !context ) return E_OUTOFMEMORY; context->url = url; @@ -196,7 +194,7 @@ static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf1 return status; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock, SIZE_T *securityInformationBufferByteCount ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock, SIZE_T *securityInformationBufferByteCount ) { HRESULT status; IXThreadingImpl *threadingImpl; @@ -212,12 +210,12 @@ static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf1 return status; } -static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult( IXNetworkingImpl *iface, XAsyncBlock *asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T *securityInformationBufferByteCountUsed, UINT8 *securityInformationBuffer, XNetworkingSecurityInformation **securityInformation ) +static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult( IXNetworkingImpl2 *iface, XAsyncBlock *asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T *securityInformationBufferByteCountUsed, UINT8 *securityInformationBuffer, XNetworkingSecurityInformation **securityInformation ) { HRESULT status; IXThreadingImpl *threadingImpl; - TRACE( "iface %p, asyncBlock %p, securityInformationBufferByteCount %lld, securityInformationBufferByteCountUsed %p, securityInformationBuffer %p, securityInformation %p.\n", iface, asyncBlock, securityInformationBufferByteCount, securityInformationBufferByteCountUsed, securityInformationBuffer, securityInformation ); + TRACE( "iface %p, asyncBlock %p, securityInformationBufferByteCount %Iu, securityInformationBufferByteCountUsed %p, securityInformationBuffer %p, securityInformation %p.\n", iface, asyncBlock, securityInformationBufferByteCount, securityInformationBufferByteCountUsed, securityInformationBuffer, securityInformation ); // Threading module may be obtained from another binary. status = QueryApiImpl( &CLSID_XThreadingImpl, &IID_IXThreadingImpl, (void **)&threadingImpl ); @@ -232,13 +230,13 @@ static HRESULT WINAPI x_networking_XNetworkingQuerySecurityInformationForUrlUtf1 return S_OK; } -static HRESULT WINAPI x_networking_XNetworkingVerifyServerCertificate( IXNetworkingImpl *iface, PVOID requestHandle, const XNetworkingSecurityInformation *securityInformation ) +static HRESULT WINAPI x_networking_XNetworkingVerifyServerCertificate( IXNetworkingImpl2 *iface, PVOID requestHandle, const XNetworkingSecurityInformation *securityInformation ) { FIXME( "iface %p, requestHandle %p, securityInformation %p stub!\n", iface, requestHandle, securityInformation ); return S_OK; } -static HRESULT WINAPI x_networking_XNetworkingGetConnectivityHint( IXNetworkingImpl *iface, XNetworkingConnectivityHint *connectivityHint ) +static HRESULT WINAPI x_networking_XNetworkingGetConnectivityHint( IXNetworkingImpl2 *iface, XNetworkingConnectivityHint *connectivityHint ) { XNetworkingConnectivityHint hint; @@ -249,15 +247,15 @@ static HRESULT WINAPI x_networking_XNetworkingGetConnectivityHint( IXNetworkingI hint.overDataLimit = FALSE; hint.networkInitialized = TRUE; hint.approachingDataLimit = FALSE; - hint.connectivityLevel = ConnectivityLevelHintInternetAccess; - hint.connectivityCost = ConnectivityCostHintUnrestricted; + hint.connectivityLevel = XNetworkingConnectivityLevelHint_InternetAccess; + hint.connectivityCost = XNetworkingConnectivityCostHint_Unrestricted; *connectivityHint = hint; return S_OK; } -static HRESULT WINAPI x_networking_XNetworkingRegisterConnectivityHintChanged( IXNetworkingImpl *iface, XTaskQueueHandle queue, PVOID context, XNetworkingConnectivityHintChangedCallback *callback, XTaskQueueRegistrationToken *token ) +static HRESULT WINAPI x_networking_XNetworkingRegisterConnectivityHintChanged( IXNetworkingImpl2 *iface, XTaskQueueHandle queue, PVOID context, XNetworkingConnectivityHintChangedCallback *callback, XTaskQueueRegistrationToken *token ) { XNetworkingConnectivityHint hint; FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); @@ -266,31 +264,31 @@ static HRESULT WINAPI x_networking_XNetworkingRegisterConnectivityHintChanged( I return S_OK; } -static BOOLEAN WINAPI x_networking_XNetworkingUnregisterConnectivityHintChanged( IXNetworkingImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +static BOOLEAN WINAPI x_networking_XNetworkingUnregisterConnectivityHintChanged( IXNetworkingImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) { FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); return FALSE; } -static HRESULT WINAPI x_networking_XNetworkingQueryConfigurationSetting( IXNetworkingImpl *iface, XNetworkingConfigurationSetting configurationSetting, UINT64 *value ) +static HRESULT WINAPI x_networking_XNetworkingQueryConfigurationSetting( IXNetworkingImpl2 *iface, XNetworkingConfigurationSetting configurationSetting, UINT64 *value ) { FIXME( "iface %p, configurationSetting %d, value %p stub!\n", iface, configurationSetting, value ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingSetConfigurationSetting( IXNetworkingImpl *iface, XNetworkingConfigurationSetting configurationParameter, UINT64 value ) +static HRESULT WINAPI x_networking_XNetworkingSetConfigurationSetting( IXNetworkingImpl2 *iface, XNetworkingConfigurationSetting configurationParameter, UINT64 value ) { FIXME( "iface %p, configurationParameter %d, value %llu stub!\n", iface, configurationParameter, value ); return E_NOTIMPL; } -static HRESULT WINAPI x_networking_XNetworkingQueryStatistics( IXNetworkingImpl *iface, XNetworkingStatisticsBuffer *statisticsBuffer ) +static HRESULT WINAPI x_networking_XNetworkingQueryStatistics( IXNetworkingImpl2 *iface, XNetworkingStatisticsType statisticsType, XNetworkingStatisticsBuffer *statisticsBuffer ) { - FIXME( "iface %p, statisticsBuffer %p stub!\n", iface, statisticsBuffer ); + FIXME( "iface %p, statisticsType %d, statisticsBuffer %p stub!\n", iface, statisticsType, statisticsBuffer ); return E_NOTIMPL; } -static const struct IXNetworkingImplVtbl x_networking_vtbl = +static const struct IXNetworkingImpl2Vtbl x_networking_vtbl = { x_networking_QueryInterface, x_networking_AddRef, @@ -311,6 +309,7 @@ static const struct IXNetworkingImplVtbl x_networking_vtbl = x_networking_XNetworkingGetConnectivityHint, x_networking_XNetworkingRegisterConnectivityHintChanged, x_networking_XNetworkingUnregisterConnectivityHintChanged, + /* IXNetworkingImpl2 methods */ x_networking_XNetworkingQueryConfigurationSetting, x_networking_XNetworkingSetConfigurationSetting, x_networking_XNetworkingQueryStatistics, @@ -322,4 +321,4 @@ static struct x_networking x_networking = 0, }; -IXNetworkingImpl *x_networking_impl = &x_networking.IXNetworkingImpl_iface; \ No newline at end of file +IXNetworkingImpl2 *x_networking_impl = &x_networking.IXNetworkingImpl2_iface; \ No newline at end of file diff --git a/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.h b/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.h index 158394722c3..aab94b5c278 100644 --- a/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.h +++ b/dlls/xgameruntime/GDKComponent/System/Networking/XNetworking.h @@ -29,7 +29,7 @@ struct x_networking { - IXNetworkingImpl IXNetworkingImpl_iface; + IXNetworkingImpl2 IXNetworkingImpl2_iface; LONG ref; }; diff --git a/dlls/xgameruntime/GDKComponent/System/Threading/AtomicVector.c b/dlls/xgameruntime/GDKComponent/System/Threading/AtomicVector.c index d06b0f2311a..29a21640a63 100644 --- a/dlls/xgameruntime/GDKComponent/System/Threading/AtomicVector.c +++ b/dlls/xgameruntime/GDKComponent/System/Threading/AtomicVector.c @@ -144,7 +144,7 @@ static VOID STDMETHODCALLTYPE atomic_vector_Visit( IAtomicVector* iface, AtomicV PVOID element; struct atomic_vector *impl = impl_from_IAtomicVector( iface ); - TRACE( "iface %p, visitor %p, impl->size is %lld.\n", iface, visitor, impl->size ); + TRACE( "iface %p, visitor %p, impl->size is %Iu.\n", iface, visitor, impl->size ); AcquireSRWLockShared( &impl->lock ); diff --git a/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.c b/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.c index 13c5a2e8ea9..465a9bbb1a7 100644 --- a/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.c +++ b/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.c @@ -41,18 +41,18 @@ static HRESULT WINAPI selfProviderOperation( XAsyncOp op, const XAsyncProviderDa switch ( op ) { - case Begin: + case XAsyncOp_Begin: return XAsyncSchedule(data->async, 0); - case DoWork: + case XAsyncOp_DoWork: work = (XAsyncWork *)data->context; hr = work( data->async ); XAsyncComplete( data->async, hr, 0 ); break; - case Cancel: - case Cleanup: - case GetResult: + case XAsyncOp_Cancel: + case XAsyncOp_Cleanup: + case XAsyncOp_GetResult: break; } @@ -334,7 +334,7 @@ static HRESULT AllocStateNoCompletion( XAsyncBlock* asyncBlock, AsyncBlockIntern XTaskQueueHandle queue; - TRACE( "asyncBlock %p, internal %p, contextSize %lld.\n", asyncBlock, internal, contextSize ); + TRACE( "asyncBlock %p, internal %p, contextSize %Iu.\n", asyncBlock, internal, contextSize ); if (!(stateImpl = calloc( 1, sizeof(*stateImpl) ))) return E_OUTOFMEMORY; @@ -392,7 +392,7 @@ static HRESULT AllocState( XAsyncBlock* asyncBlock, SIZE_T contextSize ) HRESULT hr; AsyncBlockInternal* internal; - TRACE( "asyncBlock %p, contextSize %lld.\n", asyncBlock, contextSize ); + TRACE( "asyncBlock %p, contextSize %Iu.\n", asyncBlock, contextSize ); if ( !asyncBlock ) return E_INVALIDARG; @@ -441,7 +441,7 @@ static void CleanupProviderForLocation( IAsyncState *state, ProviderCleanupLocat if ( InterlockedCompareExchange( &stateImpl->providerCleanup, 0, 0 ) == InterlockedCompareExchange( &stateImpl->providerCleanup, location, CleanupLocation_CleanedUp ) ) { - stateImpl->providerCallback( Cleanup, &stateImpl->providerData ); + stateImpl->providerCallback( XAsyncOp_Cleanup, &stateImpl->providerData ); } return; @@ -495,7 +495,7 @@ static void SignalWait( IAsyncState* state ) } } -static void CALLBACK CompletionCallback( void* context, BOOL canceled ) +static void CALLBACK CompletionCallback( void* context, BOOLEAN canceled ) { IAsyncState *state = (IAsyncState *)context; XAsyncBlock* asyncBlock; @@ -527,7 +527,7 @@ static HRESULT SignalCompletion( IAsyncState *state ) if ( stateImpl->providerData.async->callback != NULL ) { state->lpVtbl->AddRef( state ); - hr = XTaskQueueSubmitDelayedCallback( stateImpl->queue, Completion, 0, (PVOID)state, CompletionCallback ); + hr = XTaskQueueSubmitDelayedCallback( stateImpl->queue, XTaskQueuePort_Completion, 0, (PVOID)state, CompletionCallback ); if ( SUCCEEDED( hr ) ) { @@ -556,7 +556,7 @@ static void CleanupState( IAsyncState *state) } -static void CALLBACK WorkerCallback( PVOID context, BOOL canceled ) +static void CALLBACK WorkerCallback( PVOID context, BOOLEAN canceled ) { HRESULT callStatus; IAsyncState *state = (IAsyncState *)context; @@ -608,7 +608,7 @@ static void CALLBACK WorkerCallback( PVOID context, BOOL canceled ) } else { - callStatus = stateImpl->providerCallback( DoWork, &stateImpl->providerData ); + callStatus = stateImpl->providerCallback( XAsyncOp_DoWork, &stateImpl->providerData ); // Work routine can return E_PENDING if there is more work to do. Otherwise // it either needs to be a failure or it should have called XAsyncComplete, which @@ -767,7 +767,7 @@ VOID XAsyncCancel( XAsyncBlock* asyncBlock ) if ( TrySetProviderCleanup( state, CleanupLocation_InCancel ) ) { - stateImpl->providerCallback( Cancel, &stateImpl->providerData ); + stateImpl->providerCallback( XAsyncOp_Cancel, &stateImpl->providerData ); RevertProviderCleanup( state, CleanupLocation_InCancel ); } } @@ -795,7 +795,7 @@ HRESULT XAsyncRun( XAsyncBlock* asyncBlock, XAsyncWork* work ) return hr; } -HRESULT XAsyncBegin( XAsyncBlock* asyncBlock, PVOID context, PVOID identity, LPCSTR identityName, XAsyncProviderCallback* provider ) +HRESULT XAsyncBegin( XAsyncBlock* asyncBlock, PVOID context, const void *identity, LPCSTR identityName, XAsyncProvider* provider ) { HRESULT hr; IAsyncState *state; @@ -825,7 +825,7 @@ HRESULT XAsyncBegin( XAsyncBlock* asyncBlock, PVOID context, PVOID identity, LPC stateImpl->identityName = identityName; stateImpl->providerData.context = context; - hr = stateImpl->providerCallback( Begin, &stateImpl->providerData ); + hr = stateImpl->providerCallback( XAsyncOp_Begin, &stateImpl->providerData ); if ( FAILED( hr ) ) { XAsyncComplete( asyncBlock, hr, 0 ); @@ -875,7 +875,7 @@ HRESULT XAsyncSchedule( XAsyncBlock* asyncBlock, UINT32 delayInMs ) state->lpVtbl->AddRef( state ); - hr = XTaskQueueSubmitDelayedCallback( stateImpl->queue, Work, delayInMs, (PVOID)state, WorkerCallback ); + hr = XTaskQueueSubmitDelayedCallback( stateImpl->queue, XTaskQueuePort_Work, delayInMs, (PVOID)state, WorkerCallback ); state->lpVtbl->Release( state ); @@ -895,7 +895,7 @@ VOID XAsyncComplete( XAsyncBlock* asyncBlock, HRESULT result, SIZE_T requiredBuf struct x_async_block_guard *impl; struct async_state *stateImpl = NULL; - TRACE( "asyncBlock %p, result %#lx, requiredBufferSize %lld.\n", asyncBlock, result, requiredBufferSize ); + TRACE( "asyncBlock %p, result %#lx, requiredBufferSize %Iu.\n", asyncBlock, result, requiredBufferSize ); if ( result == E_PENDING ) { diff --git a/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.h b/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.h index 41709cdb751..8fa0dce7426 100644 --- a/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.h +++ b/dlls/xgameruntime/GDKComponent/System/Threading/XAsync.h @@ -111,7 +111,7 @@ struct async_state LONG /* ProviderCleanupLocation */ providerCleanup; LONG workScheduled; BOOLEAN valid; - XAsyncProviderCallback *providerCallback; + XAsyncProvider *providerCallback; XAsyncProviderData providerData; XAsyncBlock providerAsyncBlock; XAsyncBlock* userAsyncBlock; @@ -136,7 +136,7 @@ HRESULT XAsyncGetStatus( XAsyncBlock* asyncBlock, BOOLEAN wait ); HRESULT XAsyncGetResultSize( XAsyncBlock* asyncBlock, SIZE_T* bufferSize ); VOID XAsyncCancel( XAsyncBlock* asyncBlock ); HRESULT XAsyncRun( XAsyncBlock* asyncBlock, XAsyncWork* work ); -HRESULT XAsyncBegin( XAsyncBlock* asyncBlock, PVOID context, PVOID identity, LPCSTR identityName, XAsyncProviderCallback* provider ); +HRESULT XAsyncBegin( XAsyncBlock* asyncBlock, PVOID context, const void *identity, LPCSTR identityName, XAsyncProvider* provider ); HRESULT XAsyncSchedule( XAsyncBlock* asyncBlock, UINT32 delayInMs ); VOID XAsyncComplete( XAsyncBlock* asyncBlock, HRESULT result, SIZE_T requiredBufferSize ); diff --git a/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.c b/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.c index 63310d7c587..3fecdaa9292 100644 --- a/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.c +++ b/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.c @@ -433,17 +433,17 @@ static HRESULT WINAPI x_task_queue_port_Initialize( IXTaskQueuePort *iface, XTas switch (mode) { - case Manual: + case XTaskQueueDispatchMode_Manual: // nothing break; - case ThreadPool: - case SerializedThreadPool: + case XTaskQueueDispatchMode_ThreadPool: + case XTaskQueueDispatchMode_SerializedThreadPool: hr = impl->threadPool->lpVtbl->Initialize( impl->threadPool, iface, x_task_queue_port_ThreadPoolOperation ); if ( FAILED( hr ) ) return hr; break; - case Immediate: + case XTaskQueueDispatchMode_Immediate: // nothing break; } @@ -694,7 +694,7 @@ static BOOLEAN x_task_queue_port_DrainOneItem( IXTaskQueuePort *iface ) TRACE( "iface %p.\n", iface ); - if ( impl->suspended && impl->dispatchMode != Immediate ) + if ( impl->suspended && impl->dispatchMode != XTaskQueueDispatchMode_Immediate ) { return FALSE; } @@ -1191,7 +1191,7 @@ static VOID x_task_queue_port_ProcessThreadPoolCallback( IXTaskQueuePort *iface, InterlockedIncrement( &impl->processingCallback ); wasProcessing = InterlockedCompareExchange( &impl->processingCallback, 0, 0 ); - if ( impl->dispatchMode == SerializedThreadPool ) + if ( impl->dispatchMode == XTaskQueueDispatchMode_SerializedThreadPool ) { if ( wasProcessing == 0 ) { @@ -1241,16 +1241,16 @@ static VOID x_task_queue_port_NotifyItemQueued( IXTaskQueuePort *iface ) TRACE( "iface %p.\n", iface ); - if ( !impl->suspended || impl->dispatchMode == Immediate) + if ( !impl->suspended || impl->dispatchMode == XTaskQueueDispatchMode_Immediate) { switch (impl->dispatchMode) { - case Manual: + case XTaskQueueDispatchMode_Manual: // nothing break; - case SerializedThreadPool: - case ThreadPool: + case XTaskQueueDispatchMode_SerializedThreadPool: + case XTaskQueueDispatchMode_ThreadPool: // Addref before submitting to the thread pool in case we // are released while there there are outstanding threadpool // items. The threadpool does not cancel outstanding callbacks @@ -1260,7 +1260,7 @@ static VOID x_task_queue_port_NotifyItemQueued( IXTaskQueuePort *iface ) impl->threadPool->lpVtbl->Submit( impl->threadPool ); break; - case Immediate: + case XTaskQueueDispatchMode_Immediate: // We will handle this after we invoke // callback submitted. break; @@ -1270,7 +1270,7 @@ static VOID x_task_queue_port_NotifyItemQueued( IXTaskQueuePort *iface ) // If the queue is immediate, drain the newly queued item // now. - if (impl->dispatchMode == Immediate) + if (impl->dispatchMode == XTaskQueueDispatchMode_Immediate) { iface->lpVtbl->DrainOneItem( iface ); } @@ -1530,12 +1530,12 @@ static HRESULT WINAPI x_task_queue_GetPortContext( IXTaskQueue *iface, XTaskQueu switch( port ) { - case Work: + case XTaskQueuePort_Work: *portContext = &workContext->IXTaskQueuePortContext_iface; IUnknown_AddRef( *portContext ); break; - case Completion: + case XTaskQueuePort_Completion: *portContext = &completionContext->IXTaskQueuePortContext_iface; IUnknown_AddRef( *portContext ); break; @@ -1842,7 +1842,7 @@ HRESULT XTaskQueueCreate( XTaskQueueDispatchMode workDispatchMode, XTaskQueueDis workContext->IXTaskQueuePortContext_iface.lpVtbl = &x_task_queue_port_context_vtbl; workContext->callbackSubmitted = impl->callbackSubmitted; workContext->queue = &impl->IXTaskQueue_iface; - workContext->type = Work; + workContext->type = XTaskQueuePort_Work; workContext->ref = 1; impl->workPort = &workContext->IXTaskQueuePortContext_iface; @@ -1850,7 +1850,7 @@ HRESULT XTaskQueueCreate( XTaskQueueDispatchMode workDispatchMode, XTaskQueueDis completionContext->IXTaskQueuePortContext_iface.lpVtbl = &x_task_queue_port_context_vtbl; completionContext->callbackSubmitted = impl->callbackSubmitted; completionContext->queue = &impl->IXTaskQueue_iface; - completionContext->type = Completion; + completionContext->type = XTaskQueuePort_Completion; completionContext->ref = 1; impl->completionPort = &completionContext->IXTaskQueuePortContext_iface; @@ -1923,7 +1923,7 @@ HRESULT XTaskQueueCreateComposite( XTaskQueuePortHandle workPort, XTaskQueuePort workContext->IXTaskQueuePortContext_iface.lpVtbl = &x_task_queue_port_context_vtbl; workContext->callbackSubmitted = impl->callbackSubmitted; workContext->queue = &impl->IXTaskQueue_iface; - workContext->type = Work; + workContext->type = XTaskQueuePort_Work; workContext->ref = 1; impl->workPort = &workContext->IXTaskQueuePortContext_iface; @@ -1931,7 +1931,7 @@ HRESULT XTaskQueueCreateComposite( XTaskQueuePortHandle workPort, XTaskQueuePort completionContext->IXTaskQueuePortContext_iface.lpVtbl = &x_task_queue_port_context_vtbl; completionContext->callbackSubmitted = impl->callbackSubmitted; completionContext->queue = &impl->IXTaskQueue_iface; - completionContext->type = Completion; + completionContext->type = XTaskQueuePort_Completion; completionContext->ref = 1; impl->completionPort = &completionContext->IXTaskQueuePortContext_iface; @@ -2082,7 +2082,7 @@ VOID XTaskQueueResumeTermination( XTaskQueueHandle queue ) impl = queue->headQueue; - hr = impl->lpVtbl->GetPortContext( impl, Work, &portContext ); + hr = impl->lpVtbl->GetPortContext( impl, XTaskQueuePort_Work, &portContext ); if ( FAILED( hr ) ) return; queuePort = portContext->lpVtbl->get_Port( portContext ); diff --git a/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.h b/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.h index a205c57e049..e3177997260 100644 --- a/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.h +++ b/dlls/xgameruntime/GDKComponent/System/Threading/XTaskQueue.h @@ -37,6 +37,14 @@ typedef struct IXTaskQueueWaitCallback IXTaskQueueWaitCallback; static const UINT32 TASK_QUEUE_SIGNATURE = 0x41515545; static const UINT32 TASK_QUEUE_PORT_SIGNATURE = 0x41515553; +typedef enum XTaskQueuePortStatus +{ + PortStatus_Active, + PortStatus_Canceled, + PortStatus_Terminating, + PortStatus_Terminated +} XTaskQueuePortStatus; + typedef enum TerminationLevel { TerminationLevel_None, diff --git a/dlls/xgameruntime/GDKComponent/System/XAccessibility.c b/dlls/xgameruntime/GDKComponent/System/XAccessibility.c new file mode 100644 index 00000000000..455838d0ba2 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XAccessibility.c @@ -0,0 +1,219 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XAccessibility and XSpeechSynthesis + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +struct x_accessibility +{ + IXAccessibilityImpl2 IXAccessibilityImpl2_iface; + LONG ref; +}; + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +static inline struct x_accessibility *impl_from_IXAccessibilityImpl2( IXAccessibilityImpl2 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_accessibility, IXAccessibilityImpl2_iface ); +} + +static HRESULT WINAPI x_accessibility_QueryInterface( IXAccessibilityImpl2 *iface, REFIID iid, void **out ) +{ + struct x_accessibility *impl = impl_from_IXAccessibilityImpl2( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXAccessibilityImpl ) || + IsEqualGUID( iid, &IID_IXAccessibilityImpl2 )) + { + IXAccessibilityImpl2_AddRef( *out = &impl->IXAccessibilityImpl2_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_accessibility_AddRef( IXAccessibilityImpl2 *iface ) +{ + struct x_accessibility *impl = impl_from_IXAccessibilityImpl2( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_accessibility_Release( IXAccessibilityImpl2 *iface ) +{ + struct x_accessibility *impl = impl_from_IXAccessibilityImpl2( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_accessibility_XClosedCaptionGetProperties( IXAccessibilityImpl2 *iface, XClosedCaptionProperties *properties ) +{ + FIXME( "iface %p, properties %p stub!\n", iface, properties ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XClosedCaptionSetEnabled( IXAccessibilityImpl2 *iface, BOOLEAN enabled ) +{ + FIXME( "iface %p, enabled %d stub!\n", iface, enabled ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XHighContrastGetMode( IXAccessibilityImpl2 *iface, XHighContrastMode *mode ) +{ + FIXME( "iface %p, mode %p stub!\n", iface, mode ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextSetPositionHint( IXAccessibilityImpl2 *iface, XSpeechToTextPositionHint position ) +{ + FIXME( "iface %p, position %d stub!\n", iface, position ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextSendString( IXAccessibilityImpl2 *iface, const char *speakerName, const char *content, XSpeechToTextType type ) +{ + FIXME( "iface %p, speakerName %s, content %s, type %d stub!\n", iface, debugstr_a( speakerName ), debugstr_a( content ), type ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerEnumerateInstalledVoices( IXAccessibilityImpl2 *iface, void *context, XSpeechSynthesizerInstalledVoicesCallback *callback ) +{ + FIXME( "iface %p, context %p, callback %p stub!\n", iface, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerCreate( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle *speechSynthesizer ) +{ + FIXME( "iface %p, speechSynthesizer %p stub!\n", iface, speechSynthesizer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerCloseHandle( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle speechSynthesizer ) +{ + FIXME( "iface %p, speechSynthesizer %p stub!\n", iface, speechSynthesizer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerSetDefaultVoice( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle speechSynthesizer ) +{ + FIXME( "iface %p, speechSynthesizer %p stub!\n", iface, speechSynthesizer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerSetCustomVoice( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle speechSynthesizer, const char *voiceId ) +{ + FIXME( "iface %p, speechSynthesizer %p, voiceId %s stub!\n", iface, speechSynthesizer, debugstr_a( voiceId ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerCreateStreamFromText( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle speechSynthesizer, const char *text, XSpeechSynthesizerStreamHandle *speechSynthesisStream ) +{ + FIXME( "iface %p, speechSynthesizer %p, text %s, speechSynthesisStream %p stub!\n", iface, speechSynthesizer, debugstr_a( text ), speechSynthesisStream ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerCloseStreamHandle( IXAccessibilityImpl2 *iface, XSpeechSynthesizerStreamHandle speechSynthesisStream ) +{ + FIXME( "iface %p, speechSynthesisStream %p stub!\n", iface, speechSynthesisStream ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerGetStreamDataSize( IXAccessibilityImpl2 *iface, XSpeechSynthesizerStreamHandle speechSynthesisStream, SIZE_T *bufferSize ) +{ + FIXME( "iface %p, speechSynthesisStream %p, bufferSize %p stub!\n", iface, speechSynthesisStream, bufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerGetStreamData( IXAccessibilityImpl2 *iface, XSpeechSynthesizerStreamHandle speechSynthesisStream, SIZE_T bufferSize, void *buffer, SIZE_T *bufferUsed ) +{ + FIXME( "iface %p, speechSynthesisStream %p, bufferSize %Iu, buffer %p, bufferUsed %p stub!\n", iface, speechSynthesisStream, bufferSize, buffer, bufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextBeginHypothesisString( IXAccessibilityImpl2 *iface, const char *speakerName, const char *content, XSpeechToTextType type, UINT32 *hypothesisId ) +{ + FIXME( "iface %p, speakerName %s, content %s, type %d, hypothesisId %p stub!\n", iface, debugstr_a( speakerName ), debugstr_a( content ), type, hypothesisId ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextUpdateHypothesisString( IXAccessibilityImpl2 *iface, UINT32 hypothesisId, const char *content ) +{ + FIXME( "iface %p, hypothesisId %u, content %s stub!\n", iface, hypothesisId, debugstr_a( content ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextFinalizeHypothesisString( IXAccessibilityImpl2 *iface, UINT32 hypothesisId, const char *content ) +{ + FIXME( "iface %p, hypothesisId %u, content %s stub!\n", iface, hypothesisId, debugstr_a( content ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechToTextCancelHypothesisString( IXAccessibilityImpl2 *iface, UINT32 hypothesisId ) +{ + FIXME( "iface %p, hypothesisId %u stub!\n", iface, hypothesisId ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_accessibility_XSpeechSynthesizerCreateStreamFromSsml( IXAccessibilityImpl2 *iface, XSpeechSynthesizerHandle speechSynthesizer, const char *ssml, XSpeechSynthesizerStreamHandle *speechSynthesisStream ) +{ + FIXME( "iface %p, speechSynthesizer %p, ssml %s, speechSynthesisStream %p stub!\n", iface, speechSynthesizer, debugstr_a( ssml ), speechSynthesisStream ); + return E_NOTIMPL; +} + +static const struct IXAccessibilityImpl2Vtbl x_accessibility_vtbl = +{ + x_accessibility_QueryInterface, + x_accessibility_AddRef, + x_accessibility_Release, + /* IXAccessibilityImpl/IXAccessibilityImpl2 methods */ + x_accessibility_XClosedCaptionGetProperties, + x_accessibility_XClosedCaptionSetEnabled, + x_accessibility_XHighContrastGetMode, + x_accessibility_XSpeechToTextSetPositionHint, + x_accessibility_XSpeechToTextSendString, + x_accessibility_XSpeechSynthesizerEnumerateInstalledVoices, + x_accessibility_XSpeechSynthesizerCreate, + x_accessibility_XSpeechSynthesizerCloseHandle, + x_accessibility_XSpeechSynthesizerSetDefaultVoice, + x_accessibility_XSpeechSynthesizerSetCustomVoice, + x_accessibility_XSpeechSynthesizerCreateStreamFromText, + x_accessibility_XSpeechSynthesizerCloseStreamHandle, + x_accessibility_XSpeechSynthesizerGetStreamDataSize, + x_accessibility_XSpeechSynthesizerGetStreamData, + x_accessibility_XSpeechToTextBeginHypothesisString, + x_accessibility_XSpeechToTextUpdateHypothesisString, + x_accessibility_XSpeechToTextFinalizeHypothesisString, + x_accessibility_XSpeechToTextCancelHypothesisString, + x_accessibility_XSpeechSynthesizerCreateStreamFromSsml, +}; + +static struct x_accessibility x_accessibility = +{ + {&x_accessibility_vtbl}, + 0, +}; + +IXAccessibilityImpl2 *x_accessibility_impl = &x_accessibility.IXAccessibilityImpl2_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XAppCapture.c b/dlls/xgameruntime/GDKComponent/System/XAppCapture.c new file mode 100644 index 00000000000..2de120a3b20 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XAppCapture.c @@ -0,0 +1,358 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XAppCapture + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_app_capture +{ + IXAppCaptureImpl IXAppCaptureImpl_iface; + IXAppCaptureImpl5 IXAppCaptureImpl5_iface; + LONG ref; +}; + +static inline struct x_app_capture *impl_from_IXAppCaptureImpl( IXAppCaptureImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_app_capture, IXAppCaptureImpl_iface ); +} + +static HRESULT WINAPI x_app_capture_QueryInterface( IXAppCaptureImpl *iface, REFIID iid, void **out ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXAppCaptureImpl )) + { + IXAppCaptureImpl_AddRef( *out = &impl->IXAppCaptureImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_app_capture_AddRef( IXAppCaptureImpl *iface ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_app_capture_Release( IXAppCaptureImpl *iface ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static BOOLEAN WINAPI x_app_capture_XAppBroadcastIsAppBroadcasting( IXAppCaptureImpl *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return FALSE; +} + +static HRESULT WINAPI x_app_capture_XAppBroadcastShowUI( IXAppCaptureImpl *iface, XUserHandle requestingUser ) +{ + FIXME( "iface %p requestingUser %p stub!\n", iface, requestingUser ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppBroadcastGetStatus( IXAppCaptureImpl *iface, XUserHandle requestingUser, XAppBroadcastStatus *appBroadcastStatus ) +{ + FIXME( "iface %p, requestingUser %p, appBroadcastStatus %p stub!\n", iface, requestingUser, appBroadcastStatus ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppBroadcastRegisterIsAppBroadcastingChanged( IXAppCaptureImpl *iface, XTaskQueueHandle queue, void *context, XAppBroadcastMonitorCallback *appBroadcastMonitorCallback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, appBroadcastMonitorCallback %p, token %p stub!\n", iface, queue, context, appBroadcastMonitorCallback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_app_capture_XAppBroadcastUnregisterIsAppBroadcastingChanged( IXAppCaptureImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return TRUE; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataAddStringEvent( IXAppCaptureImpl *iface, const char *name, const char *value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %s, priority %d stub!\n", iface, debugstr_a( name ), debugstr_a( value ), priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataAddInt32Event( IXAppCaptureImpl *iface, const char *name, INT32 value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %d, priority %d stub!\n", iface, debugstr_a( name ), value, priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataAddDoubleEvent( IXAppCaptureImpl *iface, const char *name, double value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %e, priority %d stub!\n", iface, debugstr_a( name ), value, priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataStartStringState( IXAppCaptureImpl *iface, const char *name, const char *value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %s, priority %d stub!\n", iface, debugstr_a( name ), debugstr_a( value ), priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataStartInt32State( IXAppCaptureImpl *iface, const char *name, INT32 value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %d, priority %d stub!\n", iface, debugstr_a( name ), value, priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataStartDoubleState( IXAppCaptureImpl *iface, const char *name, double value, XAppCaptureMetadataPriority priority ) +{ + FIXME( "iface %p, name %s, value %e, priority %d stub!\n", iface, debugstr_a( name ), value, priority ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataStopState( IXAppCaptureImpl *iface, const char *name ) +{ + FIXME( "iface %p, name %s stub!\n", iface, debugstr_a( name ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataStopAllStates( IXAppCaptureImpl *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureMetadataRemainingStorageBytesAvailable( IXAppCaptureImpl *iface, UINT64 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture_XAppCaptureRegisterMetadataPurged( IXAppCaptureImpl *iface, XTaskQueueHandle queue, void *context, XAppCaptureMetadataPurgedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_app_capture_XAppCaptureUnRegisterMetadataPurged( IXAppCaptureImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return TRUE; +} + +static const struct IXAppCaptureImplVtbl x_app_capture_vtbl = +{ + x_app_capture_QueryInterface, + x_app_capture_AddRef, + x_app_capture_Release, + /* IXAppCaptureImpl methods */ + x_app_capture_XAppBroadcastIsAppBroadcasting, + x_app_capture_XAppBroadcastShowUI, + x_app_capture_XAppBroadcastGetStatus, + x_app_capture_XAppBroadcastRegisterIsAppBroadcastingChanged, + x_app_capture_XAppBroadcastUnregisterIsAppBroadcastingChanged, + x_app_capture_XAppCaptureMetadataAddStringEvent, + x_app_capture_XAppCaptureMetadataAddInt32Event, + x_app_capture_XAppCaptureMetadataAddDoubleEvent, + x_app_capture_XAppCaptureMetadataStartStringState, + x_app_capture_XAppCaptureMetadataStartInt32State, + x_app_capture_XAppCaptureMetadataStartDoubleState, + x_app_capture_XAppCaptureMetadataStopState, + x_app_capture_XAppCaptureMetadataStopAllStates, + x_app_capture_XAppCaptureMetadataRemainingStorageBytesAvailable, + x_app_capture_XAppCaptureRegisterMetadataPurged, + x_app_capture_XAppCaptureUnRegisterMetadataPurged, +}; + +static inline struct x_app_capture *impl_from_IXAppCaptureImpl5( IXAppCaptureImpl5 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_app_capture, IXAppCaptureImpl5_iface ); +} + +static HRESULT WINAPI x_app_capture2_QueryInterface( IXAppCaptureImpl5 *iface, REFIID iid, void **out ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl5( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXAppCaptureImpl2 ) || + IsEqualGUID( iid, &IID_IXAppCaptureImpl3 ) || + IsEqualGUID( iid, &IID_IXAppCaptureImpl4 ) || + IsEqualGUID( iid, &IID_IXAppCaptureImpl5 )) + { + IXAppCaptureImpl3_AddRef( *out = &impl->IXAppCaptureImpl5_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_app_capture2_AddRef( IXAppCaptureImpl5 *iface ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl5( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_app_capture2_Release( IXAppCaptureImpl5 *iface ) +{ + struct x_app_capture *impl = impl_from_IXAppCaptureImpl5( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureTakeDiagnosticScreenshot( IXAppCaptureImpl5 *iface, BOOLEAN gamescreenOnly, XAppCaptureScreenshotFormatFlag x_app_captureFlags, const char *filenamePrefix, XAppCaptureDiagnosticScreenshotResult *result ) +{ + FIXME( "iface %p, gamescreenOnly %d, x_app_captureFlags %x, filenamePrefix %s, result %p stub!\n", iface, gamescreenOnly, x_app_captureFlags, debugstr_a( filenamePrefix ), result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureRecordDiagnosticClip( IXAppCaptureImpl5 *iface, time_t startTime, UINT32 durationInMs, const char *filenamePrefix, XAppCaptureRecordClipResult *result ) +{ + FIXME( "iface %p, startTime %Iu, durationInMs %u, filenamePrefix %s, result %p stub!\n", iface, startTime, durationInMs, debugstr_a( filenamePrefix ), result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureTakeScreenshot( IXAppCaptureImpl5 *iface, XUserHandle requestingUser, XAppCaptureTakeScreenshotResult *result ) +{ + FIXME( "iface %p, requestingUser %p, result %p stub!\n", iface, requestingUser, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureOpenScreenshotStream( IXAppCaptureImpl5 *iface, const char *localId, XAppCaptureScreenshotFormatFlag screenshotFormat, XAppCaptureScreenshotStreamHandle *handle, UINT64 *totalBytes ) +{ + FIXME( "iface %p, localId %s, screenshotFormat %d, handle %p, totalBytes %p stub!\n", iface, debugstr_a( localId ), screenshotFormat, handle, totalBytes ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureReadScreenshotStream( IXAppCaptureImpl5 *iface, XAppCaptureScreenshotStreamHandle handle, UINT64 startPosition, UINT32 bytesToRead, UINT8 *bytes, UINT32 *bytesWritten ) +{ + FIXME( "iface %p, handle %p, startPosition %llu, bytesToRead %u, bytes %p, bytesWritten %p stub!\n", iface, handle, startPosition, bytesToRead, bytes, bytesWritten ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureCloseScreenshotStream( IXAppCaptureImpl5 *iface, XAppCaptureScreenshotStreamHandle handle ) +{ + FIXME( "iface %p, handle %p stub!\n", iface, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureEnableRecord( IXAppCaptureImpl5 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureDisableRecord( IXAppCaptureImpl5 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureGetVideoCaptureSettings( IXAppCaptureImpl5 *iface, XAppCaptureVideoCaptureSettings *userCaptureSettings ) +{ + FIXME( "iface %p, userCaptureSettings %p stub!\n", iface, userCaptureSettings ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureRecordTimespan( IXAppCaptureImpl5 *iface, const SYSTEMTIME *startTimestamp, UINT64 durationInMilliseconds, XAppCaptureLocalResult *result ) +{ + FIXME( "iface %p, startTimestamp %p, durationInMilliseconds %llu, result %p stub!\n", iface, startTimestamp, durationInMilliseconds, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureReadLocalStream( IXAppCaptureImpl5 *iface, XAppCaptureLocalStreamHandle handle, SIZE_T startPosition, UINT32 bytesToRead, UINT8 *bytes, UINT32 *bytesWritten ) +{ + FIXME( "iface %p, handle %p, startPosition %Iu, bytesToRead %u, bytes %p, bytesWritten %p stub!\n", iface, handle, startPosition, bytesToRead, bytes, bytesWritten ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureCloseLocalStream( IXAppCaptureImpl5 *iface, XAppCaptureLocalStreamHandle handle ) +{ + FIXME( "iface %p, handle %p stub!\n", iface, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureStartUserRecord( IXAppCaptureImpl5 *iface, XUserHandle requestingUser, UINT32 localIdBufferLength, char *localIdBuffer ) +{ + FIXME( "iface %p, requestingUser %p, localIdBufferLength %u, localIdBuffer %p stub!\n", iface, requestingUser, localIdBufferLength, localIdBuffer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureStopUserRecord( IXAppCaptureImpl5 *iface, const char *localId, XAppCaptureUserRecordingResult *result ) +{ + FIXME( "iface %p, localId %s, result %p stub!\n", iface, debugstr_a( localId ), result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_app_capture2_XAppCaptureCancelUserRecord( IXAppCaptureImpl5 *iface, const char *localId ) +{ + FIXME( "iface %p, localId %s stub!\n", iface, debugstr_a( localId ) ); + return E_NOTIMPL; +} + +static const struct IXAppCaptureImpl5Vtbl x_app_capture2_vtbl = +{ + x_app_capture2_QueryInterface, + x_app_capture2_AddRef, + x_app_capture2_Release, + /* IXAppCaptureImpl2 methods */ + x_app_capture2_XAppCaptureTakeDiagnosticScreenshot, + x_app_capture2_XAppCaptureRecordDiagnosticClip, + x_app_capture2_XAppCaptureTakeScreenshot, + x_app_capture2_XAppCaptureOpenScreenshotStream, + x_app_capture2_XAppCaptureReadScreenshotStream, + x_app_capture2_XAppCaptureCloseScreenshotStream, + x_app_capture2_XAppCaptureEnableRecord, + x_app_capture2_XAppCaptureDisableRecord, + /* IXAppCaptureImpl3 methods */ + x_app_capture2_XAppCaptureGetVideoCaptureSettings, + x_app_capture2_XAppCaptureRecordTimespan, + x_app_capture2_XAppCaptureReadLocalStream, + x_app_capture2_XAppCaptureCloseLocalStream, + /* IXAppCaptureImpl4 methods */ + x_app_capture2_XAppCaptureStartUserRecord, + x_app_capture2_XAppCaptureStopUserRecord, + /* IXAppCaptureImpl5 methods */ + x_app_capture2_XAppCaptureCancelUserRecord, +}; + +static struct x_app_capture x_app_capture = +{ + {&x_app_capture_vtbl}, + {&x_app_capture2_vtbl}, + 0, +}; + +IXAppCaptureImpl *x_app_capture_impl = &x_app_capture.IXAppCaptureImpl_iface; +IXAppCaptureImpl5 *x_app_capture2_impl = &x_app_capture.IXAppCaptureImpl5_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XError.c b/dlls/xgameruntime/GDKComponent/System/XError.c new file mode 100644 index 00000000000..39cc358467e --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XError.c @@ -0,0 +1,104 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XError + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_error +{ + IXErrorImpl IXErrorImpl_iface; + LONG ref; +}; + +static inline struct x_error *impl_from_IXErrorImpl( IXErrorImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_error, IXErrorImpl_iface ); +} + +static HRESULT WINAPI x_error_QueryInterface( IXErrorImpl *iface, REFIID iid, void **out ) +{ + struct x_error *impl = impl_from_IXErrorImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXErrorImpl )) + { + IXErrorImpl_AddRef( *out = &impl->IXErrorImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_error_AddRef( IXErrorImpl *iface ) +{ + struct x_error *impl = impl_from_IXErrorImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_error_Release( IXErrorImpl *iface ) +{ + struct x_error *impl = impl_from_IXErrorImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI __PADDING__( IXErrorImpl *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static void WINAPI x_error_XErrorSetCallback( IXErrorImpl *iface, XErrorCallback *callback, void *context ) +{ + FIXME( "iface %p, callback %p, context %p stub!\n", iface, callback, context ); +} + +static void WINAPI x_error_XErrorSetOptions( IXErrorImpl *iface, XErrorOptions optionsDebuggerPresent, XErrorOptions optionsDebuggerNotPresent ) +{ + FIXME( "iface %p, optionsDebuggerPresent %#x, optionsDebuggerNotPresent %#x stub!\n", iface, optionsDebuggerPresent, optionsDebuggerNotPresent ); +} + +static const struct IXErrorImplVtbl x_error_vtbl = +{ + x_error_QueryInterface, + x_error_AddRef, + x_error_Release, + /* IXErrorImpl methods */ + __PADDING__, + x_error_XErrorSetCallback, + x_error_XErrorSetOptions, +}; + +static struct x_error x_error = +{ + {&x_error_vtbl}, + 0, +}; + +IXErrorImpl *x_error_impl = &x_error.IXErrorImpl_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGame.c b/dlls/xgameruntime/GDKComponent/System/XGame.c new file mode 100644 index 00000000000..50f322864f8 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGame.c @@ -0,0 +1,109 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGame + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game +{ + IXGameImpl3 IXGameImpl3_iface; + LONG ref; +}; + +static inline struct x_game *impl_from_IXGameImpl3( IXGameImpl3 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game, IXGameImpl3_iface ); +} + +static HRESULT WINAPI x_game_QueryInterface( IXGameImpl3 *iface, REFIID iid, void **out ) +{ + struct x_game *impl = impl_from_IXGameImpl3( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameImpl ) || + IsEqualGUID( iid, &IID_IXGameImpl2 ) || + IsEqualGUID( iid, &IID_IXGameImpl3 )) + { + IXGameImpl3_AddRef( *out = &impl->IXGameImpl3_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_AddRef( IXGameImpl3 *iface ) +{ + struct x_game *impl = impl_from_IXGameImpl3( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_Release( IXGameImpl3 *iface ) +{ + struct x_game *impl = impl_from_IXGameImpl3( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_XGameGetXboxTitleId( IXGameImpl3 *iface, UINT32 *titleId ) +{ + FIXME( "iface %p, titleId %p stub!\n", iface, titleId ); + return E_NOTIMPL; +} + +static void WINAPI x_game_XLaunchNewGame( IXGameImpl3 *iface, const char *exePath, const char *args, XUserHandle defaultUser ) +{ + FIXME( "iface %p exePath %s, args %s, defaultUser %p stub!\n", iface, debugstr_a( exePath ), debugstr_a( args ), defaultUser ); +} + +static HRESULT WINAPI x_game_XLaunchRestartOnCrash( IXGameImpl3 *iface, const char *args, UINT32 reserved ) +{ + FIXME( "iface %p, args %s, reserved %u stub!\n", iface, debugstr_a( args ), reserved ); + return E_NOTIMPL; +} + +static const struct IXGameImpl3Vtbl x_game_vtbl = +{ + x_game_QueryInterface, + x_game_AddRef, + x_game_Release, + /* IXGameImpl methods */ + x_game_XGameGetXboxTitleId, + /* IXGameImpl2 methods */ + x_game_XLaunchNewGame, + /* IXGameImpl3 methods */ + x_game_XLaunchRestartOnCrash, +}; + +static struct x_game x_game = +{ + {&x_game_vtbl}, + 0, +}; + +IXGameImpl3 *x_game_impl = &x_game.IXGameImpl3_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameActivation.c b/dlls/xgameruntime/GDKComponent/System/XGameActivation.c new file mode 100644 index 00000000000..21b2afcb097 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameActivation.c @@ -0,0 +1,106 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameActivation + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game_activation +{ + IXGameActivationImpl IXGameActivationImpl_iface; + LONG ref; +}; + +static inline struct x_game_activation *impl_from_IXGameActivationImpl( IXGameActivationImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_activation, IXGameActivationImpl_iface ); +} + +static HRESULT WINAPI x_game_activation_QueryInterface( IXGameActivationImpl *iface, REFIID iid, void **out ) +{ + struct x_game_activation *impl = impl_from_IXGameActivationImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameActivationImpl )) + { + IXGameActivationImpl_AddRef( *out = &impl->IXGameActivationImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_activation_AddRef( IXGameActivationImpl *iface ) +{ + struct x_game_activation *impl = impl_from_IXGameActivationImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_activation_Release( IXGameActivationImpl *iface ) +{ + struct x_game_activation *impl = impl_from_IXGameActivationImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_activation_XGameActivationRegisterForEvent( IXGameActivationImpl *iface, XTaskQueueHandle queue, void *context, XGameActivationCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_activation_XGameActivationUnregisterForEvent( IXGameActivationImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_game_activation_XGameActivationAcceptPendingInvite( IXGameActivationImpl *iface, const char *inviteUri ) +{ + FIXME( "iface %p, inviteUri %s stub!\n", iface, debugstr_a( inviteUri ) ); + return E_NOTIMPL; +} + +static const struct IXGameActivationImplVtbl x_game_activation_vtbl = +{ + x_game_activation_QueryInterface, + x_game_activation_AddRef, + x_game_activation_Release, + /* IXGameActivationImpl methods */ + x_game_activation_XGameActivationRegisterForEvent, + x_game_activation_XGameActivationUnregisterForEvent, + x_game_activation_XGameActivationAcceptPendingInvite, +}; + +static struct x_game_activation x_game_activation = +{ + {&x_game_activation_vtbl}, + 0, +}; + +IXGameActivationImpl *x_game_activation_impl = &x_game_activation.IXGameActivationImpl_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameEvent.c b/dlls/xgameruntime/GDKComponent/System/XGameEvent.c new file mode 100644 index 00000000000..ed46589b296 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameEvent.c @@ -0,0 +1,92 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameEvent + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game_event +{ + IXGameEventImpl IXGameEventImpl_iface; + LONG ref; +}; + +static inline struct x_game_event *impl_from_IXGameEventImpl( IXGameEventImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_event, IXGameEventImpl_iface ); +} + +static HRESULT WINAPI x_game_event_QueryInterface( IXGameEventImpl *iface, REFIID iid, void **out ) +{ + struct x_game_event *impl = impl_from_IXGameEventImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameEventImpl )) + { + IXGameEventImpl_AddRef( *out = &impl->IXGameEventImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_event_AddRef( IXGameEventImpl *iface ) +{ + struct x_game_event *impl = impl_from_IXGameEventImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_event_Release( IXGameEventImpl *iface ) +{ + struct x_game_event *impl = impl_from_IXGameEventImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_event_XGameEventWrite( IXGameEventImpl *iface, XUserHandle user, const char *serviceConfigId, const char *playSessionId, const char *eventName, const char *dimensionsJson, const char *measurementsJson ) +{ + FIXME( "iface %p, user %p, serviceConfigId %s, playSessionId %s, eventName %s, dimensionsJson %s, measurementsJson %s stub!\n", iface, user, debugstr_a( serviceConfigId ), debugstr_a( playSessionId ), debugstr_a( eventName ), debugstr_a( dimensionsJson ), debugstr_a( measurementsJson ) ); + return E_NOTIMPL; +} + +static const struct IXGameEventImplVtbl x_game_event_vtbl = +{ + x_game_event_QueryInterface, + x_game_event_AddRef, + x_game_event_Release, + /* IXGameEventImpl methods */ + x_game_event_XGameEventWrite, +}; + +static struct x_game_event x_game_event = +{ + {&x_game_event_vtbl}, + 0, +}; + +IXGameEventImpl *x_game_event_impl = &x_game_event.IXGameEventImpl_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameInvite.c b/dlls/xgameruntime/GDKComponent/System/XGameInvite.c new file mode 100644 index 00000000000..2bbfb9e933c --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameInvite.c @@ -0,0 +1,122 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameInvite + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game_invite +{ + IXGameInviteImpl2 IXGameInviteImpl2_iface; + LONG ref; +}; + +static inline struct x_game_invite *impl_from_IXGameInviteImpl2( IXGameInviteImpl2 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_invite, IXGameInviteImpl2_iface ); +} + +static HRESULT WINAPI x_game_invite_QueryInterface( IXGameInviteImpl2 *iface, REFIID iid, void **out ) +{ + struct x_game_invite *impl = impl_from_IXGameInviteImpl2( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameInviteImpl ) || + IsEqualGUID( iid, &IID_IXGameInviteImpl2 )) + { + IXGameInviteImpl_AddRef( *out = &impl->IXGameInviteImpl2_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_invite_AddRef( IXGameInviteImpl2 *iface ) +{ + struct x_game_invite *impl = impl_from_IXGameInviteImpl2( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_invite_Release( IXGameInviteImpl2 *iface ) +{ + struct x_game_invite *impl = impl_from_IXGameInviteImpl2( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_invite_XGameInviteRegisterForEvent( IXGameInviteImpl2 *iface, XTaskQueueHandle queue, void *context, XGameInviteEventCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_invite_XGameInviteUnregisterForEvent( IXGameInviteImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return TRUE; +} + +static HRESULT WINAPI x_game_invite_XGameInviteRegisterForPendingEvent( IXGameInviteImpl2 *iface, XTaskQueueHandle queue, void *context, XGameInviteEventCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_invite_XGameInviteUnregisterForPendingEvent( IXGameInviteImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_game_invite_XGameInviteAcceptPendingInvite( IXGameInviteImpl2 *iface, const char *inviteUri ) +{ + FIXME( "iface %p, inviteUri %s stub!\n", iface, debugstr_a( inviteUri ) ); + return E_NOTIMPL; +} + +static const struct IXGameInviteImpl2Vtbl x_game_invite_vtbl = +{ + x_game_invite_QueryInterface, + x_game_invite_AddRef, + x_game_invite_Release, + /* IXGameInviteImpl methods */ + x_game_invite_XGameInviteRegisterForEvent, + x_game_invite_XGameInviteUnregisterForEvent, + /* IXGameInviteImpl2 methods */ + x_game_invite_XGameInviteRegisterForPendingEvent, + x_game_invite_XGameInviteUnregisterForPendingEvent, + x_game_invite_XGameInviteAcceptPendingInvite, +}; + +static struct x_game_invite x_game_invite = +{ + {&x_game_invite_vtbl}, + 0, +}; + +IXGameInviteImpl2 *x_game_invite_impl = &x_game_invite.IXGameInviteImpl2_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameProtocol.c b/dlls/xgameruntime/GDKComponent/System/XGameProtocol.c new file mode 100644 index 00000000000..0b23003e959 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameProtocol.c @@ -0,0 +1,99 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameProtocol + * + * Written by LukasPAH + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game_protocol +{ + IXGameProtocolImpl IXGameProtocolImpl_iface; + LONG ref; +}; + +static inline struct x_game_protocol *impl_from_IXGameProtocolImpl( IXGameProtocolImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_protocol, IXGameProtocolImpl_iface ); +} + +static HRESULT WINAPI x_game_protocol_QueryInterface( IXGameProtocolImpl *iface, REFIID iid, void **out ) +{ + struct x_game_protocol *impl = impl_from_IXGameProtocolImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameProtocolImpl )) + { + IXGameProtocolImpl_AddRef( *out = &impl->IXGameProtocolImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_protocol_AddRef( IXGameProtocolImpl *iface ) +{ + struct x_game_protocol *impl = impl_from_IXGameProtocolImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_protocol_Release( IXGameProtocolImpl *iface ) +{ + struct x_game_protocol *impl = impl_from_IXGameProtocolImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_protocol_XGameProtocolRegisterForActivation( IXGameProtocolImpl *iface, XTaskQueueHandle queue, void *context, XGameProtocolActivationCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_protocol_XGameProtocolUnregisterForActivation( IXGameProtocolImpl *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return TRUE; +} + +static const struct IXGameProtocolImplVtbl x_game_protocol_vtbl = +{ + x_game_protocol_QueryInterface, + x_game_protocol_AddRef, + x_game_protocol_Release, + /* IXGameProtocolImpl methods */ + x_game_protocol_XGameProtocolRegisterForActivation, + x_game_protocol_XGameProtocolUnregisterForActivation, +}; + +static struct x_game_protocol x_game_protocol = +{ + {&x_game_protocol_vtbl}, + 0, +}; + +IXGameProtocolImpl *x_game_protocol_impl = &x_game_protocol.IXGameProtocolImpl_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameSave.c b/dlls/xgameruntime/GDKComponent/System/XGameSave.c new file mode 100644 index 00000000000..76206089b3a --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameSave.c @@ -0,0 +1,295 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameSave and XGameSaveFiles + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +struct x_game_save +{ + IXGameSaveImpl3 IXGameSaveImpl3_iface; + LONG ref; +}; + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +static inline struct x_game_save *impl_from_IXGameSaveImpl3( IXGameSaveImpl3 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_save, IXGameSaveImpl3_iface ); +} + +static HRESULT WINAPI x_game_save_QueryInterface( IXGameSaveImpl3 *iface, REFIID iid, void **out ) +{ + struct x_game_save *impl = impl_from_IXGameSaveImpl3( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameSaveImpl ) || + IsEqualGUID( iid, &IID_IXGameSaveImpl2 ) || + IsEqualGUID( iid, &IID_IXGameSaveImpl3 )) + { + IXGameSaveImpl_AddRef( *out = &impl->IXGameSaveImpl3_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_save_AddRef( IXGameSaveImpl3 *iface ) +{ + struct x_game_save *impl = impl_from_IXGameSaveImpl3( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_save_Release( IXGameSaveImpl3 *iface ) +{ + struct x_game_save *impl = impl_from_IXGameSaveImpl3( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_save_XGameSaveInitializeProvider( IXGameSaveImpl3 *iface, XUserHandle requestingUser, const char *configurationId, BOOLEAN syncOnDemand, XGameSaveProviderHandle *provider ) +{ + FIXME( "iface %p, requestingUser %p, configurationId %s, syncOnDemand %d, provider %p stub!\n", iface, requestingUser, debugstr_a( configurationId ), syncOnDemand, provider ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveInitializeProviderAsync( IXGameSaveImpl3 *iface, XUserHandle requestingUser, const char *configurationId, BOOLEAN syncOnDemand, XAsyncBlock *async ) +{ + FIXME( "iface %p, requestingUser %p, configurationId %s, syncOnDemand %d, async %p stub!\n", iface, requestingUser, debugstr_a( configurationId ), syncOnDemand, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveInitializeProviderResult( IXGameSaveImpl3 *iface, XAsyncBlock *async, XGameSaveProviderHandle *provider ) +{ + FIXME( "iface %p, async %p, provider %p stub!\n", iface, async, provider ); + return E_NOTIMPL; +} + +static void WINAPI x_game_save_XGameSaveCloseProvider( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider ) +{ + FIXME( "iface %p, provider %p stub!\n", iface, provider ); +} + +static HRESULT WINAPI x_game_save_XGameSaveGetRemainingQuota( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, INT64 *remainingQuota ) +{ + FIXME( "iface %p, provider %p, remainingQuota %p stub!\n", iface, provider, remainingQuota ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveGetRemainingQuotaAsync( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, XAsyncBlock *async ) +{ + FIXME( "iface %p, provider %p, async %p stub!\n", iface, provider, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveGetRemainingQuotaResult( IXGameSaveImpl3 *iface, XAsyncBlock *async, INT64 *remainingQuota ) +{ + FIXME( "iface %p, async %p, remainingQuota %p stub!\n", iface, async, remainingQuota ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveDeleteContainer( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, const char *containerName ) +{ + FIXME( "iface %p, provider %p, containerName %s stub!\n", iface, provider, debugstr_a( containerName ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveDeleteContainerAsync( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, const char *containerName, XAsyncBlock *async ) +{ + FIXME( "iface %p, provider %p, containerName %s, async %p stub!\n", iface, provider, debugstr_a( containerName ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveDeleteContainerResult( IXGameSaveImpl3 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveGetContainerInfo( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, const char *containerName, void *context, XGameSaveContainerInfoCallback *callback ) +{ + FIXME( "iface %p, provider %p, containerName %s, context %p, callback %p stub!\n", iface, provider, debugstr_a( containerName ), context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveEnumerateContainerInfo( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, void *context, XGameSaveContainerInfoCallback *callback ) +{ + FIXME( "iface %p, provider %p, context %p, callback %p stub!\n", iface, provider, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveEnumerateContainerInfoByName( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, const char *containerNamePrefix, void *context, XGameSaveContainerInfoCallback *callback ) +{ + FIXME( "iface %p, provider %p, containerNamePrefix %s, context %p, callback %p stub!\n", iface, provider, debugstr_a( containerNamePrefix ), context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveCreateContainer( IXGameSaveImpl3 *iface, XGameSaveProviderHandle provider, const char *containerName, XGameSaveContainerHandle *containerContext ) +{ + FIXME( "iface %p, provider %p, containerName %s, containerContext %p stub!\n", iface, provider, debugstr_a( containerName ), containerContext ); + return E_NOTIMPL; +} + +static void WINAPI x_game_save_XGameSaveCloseContainer( IXGameSaveImpl3 *iface, XGameSaveContainerHandle context ) +{ + FIXME( "iface %p, context %p stub!\n", iface, context ); +} + +static HRESULT WINAPI x_game_save_XGameSaveEnumerateBlobInfo( IXGameSaveImpl3 *iface, XGameSaveContainerHandle container, void *context, XGameSaveBlobInfoCallback *callback ) +{ + FIXME( "iface %p, container %p, context %p, callback %p stub!\n", iface, container, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveEnumerateBlobInfoByName( IXGameSaveImpl3 *iface, XGameSaveContainerHandle container, const char *blobNamePrefix, void *context, XGameSaveBlobInfoCallback *callback ) +{ + FIXME( "iface %p, container %p, blobNamePrefix %s, context %p, callback %p stub!\n", iface, container, debugstr_a( blobNamePrefix ), context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveReadBlobData( IXGameSaveImpl3 *iface, XGameSaveContainerHandle container, const char **blobNames, UINT32 *countOfBlobs, SIZE_T blobsSize, XGameSaveBlob *blobData ) +{ + FIXME( "iface %p, container %p, blobNames %p, countOfBlobs %p, blobsSize %Iu, provider %p stub!\n", iface, container, blobNames, countOfBlobs, blobsSize, blobData ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveReadBlobDataAsync( IXGameSaveImpl3 *iface, XGameSaveContainerHandle container, const char **blobNames, UINT32 countOfBlobs, XAsyncBlock *async ) +{ + FIXME( "iface %p, container %p, blobNames %p, countOfBlobs %u, async %p stub!\n", iface, container, blobNames, countOfBlobs, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveReadBlobDataResult( IXGameSaveImpl3 *iface, XAsyncBlock *async, SIZE_T blobsSize, XGameSaveBlob *blobData, UINT32 *countOfBlobs ) +{ + FIXME( "iface %p, async %p, blobsSize %Iu, blobData %p, countOfBlobs %p stub!\n", iface, async, blobsSize, blobData, countOfBlobs ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveCreateUpdate( IXGameSaveImpl3 *iface, XGameSaveContainerHandle container, const char *containerDisplayName, XGameSaveUpdateHandle *updateContext ) +{ + FIXME( "iface %p, container %p, containerDisplayName %s, updateContext %p stub!\n", iface, container, debugstr_a( containerDisplayName ), updateContext ); + return E_NOTIMPL; +} + +static void WINAPI x_game_save_XGameSaveCloseUpdate( IXGameSaveImpl3 *iface, XGameSaveUpdateHandle context ) +{ + FIXME( "iface %p, context %p stub!\n", iface, context ); +} + +static HRESULT WINAPI x_game_save_XGameSaveSubmitBlobWrite( IXGameSaveImpl3 *iface, XGameSaveUpdateHandle updateContext, const char *blobName, UINT8 *data, SIZE_T byteCount ) +{ + FIXME( "iface %p, updateContext %p, blobName %s, data %p, byteCount %Iu stub!\n", iface, updateContext, debugstr_a( blobName ), data, byteCount ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveSubmitBlobDelete( IXGameSaveImpl3 *iface, XGameSaveUpdateHandle updateContext, const char *blobName ) +{ + FIXME( "iface %p, updateContext %p, blobName %s stub!\n", iface, updateContext, debugstr_a( blobName ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveSubmitUpdate( IXGameSaveImpl3 *iface, XGameSaveUpdateHandle updateContext ) +{ + FIXME( "iface %p, updateContext %p stub!\n", iface, updateContext ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveSubmitUpdateAsync( IXGameSaveImpl3 *iface, XGameSaveUpdateHandle updateContext, XAsyncBlock *async ) +{ + FIXME( "iface %p, updateContext %p, async %p stub!\n", iface, updateContext, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveSubmitUpdateResult( IXGameSaveImpl3 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveFilesGetFolderWithUiAsync( IXGameSaveImpl3 *iface, XUserHandle requestingUser, const char *configurationId, XAsyncBlock *async ) +{ + FIXME( "iface %p, requestingUser %p, configurationId %s, async %p stub!\n", iface, requestingUser, debugstr_a( configurationId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveFilesGetFolderWithUiResult( IXGameSaveImpl3 *iface, XAsyncBlock *async, SIZE_T folderSize, char *folderResult ) +{ + FIXME( "iface %p, async %p, folderSize %Iu, folderResult %p stub!\n", iface, async, folderSize, folderResult ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_save_XGameSaveFilesGetRemainingQuota( IXGameSaveImpl3 *iface, XUserHandle userContext, const char *configurationId, INT64 *remainingQuota ) +{ + FIXME( "iface %p, userContext %p, configurationId %s, remainingQuota %p stub!\n", iface, userContext, debugstr_a( configurationId ), remainingQuota ); + return E_NOTIMPL; +} + +static const struct IXGameSaveImpl3Vtbl x_game_save_vtbl = +{ + x_game_save_QueryInterface, + x_game_save_AddRef, + x_game_save_Release, + /* IXGameSaveImpl methods */ + x_game_save_XGameSaveInitializeProvider, + x_game_save_XGameSaveInitializeProviderAsync, + x_game_save_XGameSaveInitializeProviderResult, + x_game_save_XGameSaveCloseProvider, + x_game_save_XGameSaveGetRemainingQuota, + x_game_save_XGameSaveGetRemainingQuotaAsync, + x_game_save_XGameSaveGetRemainingQuotaResult, + x_game_save_XGameSaveDeleteContainer, + x_game_save_XGameSaveDeleteContainerAsync, + x_game_save_XGameSaveDeleteContainerResult, + x_game_save_XGameSaveGetContainerInfo, + x_game_save_XGameSaveEnumerateContainerInfo, + x_game_save_XGameSaveEnumerateContainerInfoByName, + x_game_save_XGameSaveCreateContainer, + x_game_save_XGameSaveCloseContainer, + x_game_save_XGameSaveEnumerateBlobInfo, + x_game_save_XGameSaveEnumerateBlobInfoByName, + x_game_save_XGameSaveReadBlobData, + x_game_save_XGameSaveReadBlobDataAsync, + x_game_save_XGameSaveReadBlobDataResult, + x_game_save_XGameSaveCreateUpdate, + x_game_save_XGameSaveCloseUpdate, + x_game_save_XGameSaveSubmitBlobWrite, + x_game_save_XGameSaveSubmitBlobDelete, + x_game_save_XGameSaveSubmitUpdate, + x_game_save_XGameSaveSubmitUpdateAsync, + x_game_save_XGameSaveSubmitUpdateResult, + /* IXGameSaveImpl2 methods */ + x_game_save_XGameSaveFilesGetFolderWithUiAsync, + x_game_save_XGameSaveFilesGetFolderWithUiResult, + x_game_save_XGameSaveFilesGetRemainingQuota, +}; + +static struct x_game_save x_game_save = +{ + {&x_game_save_vtbl}, + 0, +}; + +IXGameSaveImpl3 *x_game_save_impl = &x_game_save.IXGameSaveImpl3_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameStreaming.c b/dlls/xgameruntime/GDKComponent/System/XGameStreaming.c new file mode 100644 index 00000000000..b829b30cb2b --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameStreaming.c @@ -0,0 +1,308 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameStreaming + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +struct x_game_streaming +{ + IXGameStreamingImpl3 IXGameStreamingImpl3_iface; + LONG ref; +}; + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +static inline struct x_game_streaming *impl_from_IXGameStreamingImpl3( IXGameStreamingImpl3 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_streaming, IXGameStreamingImpl3_iface ); +} + +static HRESULT WINAPI x_game_streaming_QueryInterface( IXGameStreamingImpl3 *iface, REFIID iid, void **out ) +{ + struct x_game_streaming *impl = impl_from_IXGameStreamingImpl3( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameStreamingImpl ) || + IsEqualGUID( iid, &IID_IXGameStreamingImpl2 ) || + IsEqualGUID( iid, &IID_IXGameStreamingImpl3 )) + { + IXGameStreamingImpl3_AddRef( *out = &impl->IXGameStreamingImpl3_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_streaming_AddRef( IXGameStreamingImpl3 *iface ) +{ + struct x_game_streaming *impl = impl_from_IXGameStreamingImpl3( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_streaming_Release( IXGameStreamingImpl3 *iface ) +{ + struct x_game_streaming *impl = impl_from_IXGameStreamingImpl3( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingInitialize( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return E_NOTIMPL; +} + +static void WINAPI x_game_streaming_XGameStreamingUninitialize( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); +} + +static BOOLEAN WINAPI x_game_streaming_XGameStreamingIsStreaming( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return FALSE; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingRegisterClientPropertiesChanged( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, XTaskQueueHandle queue, void *context, XGameStreamingClientPropertiesChangedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, client %llu, queue %p, context %p, callback %p, token %p stub!\n", iface, client, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_streaming_XGameStreamingUnregisterClientPropertiesChanged( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, client %llu, token %p, wait %d stub!\n", iface, client, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetStreamPhysicalDimensions( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, UINT32 *horizontalMm, UINT32 *verticalMm ) +{ + FIXME( "iface %p, client %llu, horizontalMm %p, verticalMm %p stub!\n", iface, client, horizontalMm, verticalMm ); + return E_NOTIMPL; +} + +static UINT32 WINAPI x_game_streaming_XGameStreamingGetClientCount( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return 0; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetClients( IXGameStreamingImpl3 *iface, UINT32 clientCount, XGameStreamingClientId *clients, UINT32 *clientsUsed ) +{ + FIXME( "iface %p, clientCount %u, clients %p, clientsUsed %p stub!\n", iface, clientCount, clients, clientsUsed ); + return E_NOTIMPL; +} + +static XGameStreamingConnectionState WINAPI x_game_streaming_XGameStreamingGetConnectionState( IXGameStreamingImpl3 *iface, XGameStreamingClientId client ) +{ + FIXME( "iface %p, client %llu stub!\n", iface, client ); + return XGameStreamingConnectionState_Disconnected; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingRegisterConnectionStateChanged( IXGameStreamingImpl3 *iface, XTaskQueueHandle queue, void *context, XGameStreamingConnectionStateChangedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_game_streaming_XGameStreamingUnregisterConnectionStateChanged( IXGameStreamingImpl3 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetStreamAddedLatency( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, UINT32 *averageInputLatencyUs, UINT32 *averageOutputLatencyUs, UINT32 *standardDeviationUs ) +{ + FIXME( "iface %p, client %llu, averageInputLatencyUs %p, averageOutputLatencyUs %p, standardDeviationUs %p stub!\n", iface, client, averageInputLatencyUs, averageOutputLatencyUs, standardDeviationUs ); + return E_NOTIMPL; +} + +static SIZE_T WINAPI x_game_streaming_XGameStreamingGetServerLocationNameSize( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return 0; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetServerLocationName( IXGameStreamingImpl3 *iface, SIZE_T serverLocationNameSize, char *serverLocationName ) +{ + FIXME( "iface %p, serverLocationNameSize %Iu, serverLocationName %p stub!\n", iface, serverLocationNameSize, serverLocationName ); + return E_NOTIMPL; +} + +static void WINAPI x_game_streaming_XGameStreamingHideTouchControls( IXGameStreamingImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); +} + +static void WINAPI x_game_streaming_XGameStreamingShowTouchControlLayout( IXGameStreamingImpl3 *iface, const char *layout ) +{ + FIXME( "iface %p, layout %s stub!\n", iface, debugstr_a( layout ) ); +} + +static void WINAPI x_game_streaming_XGameStreamingHideTouchControlsOnClient( IXGameStreamingImpl3 *iface, XGameStreamingClientId client ) +{ + FIXME( "iface %p, client %llu stub!\n", iface, client ); +} + +static void WINAPI x_game_streaming_XGameStreamingShowTouchControlLayoutOnClient( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, const char *layout ) +{ + FIXME( "iface %p, client %llu, layout %s stub!\n", iface, client, debugstr_a( layout ) ); +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingIsTouchInputEnabled( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, BOOLEAN *touchInputEnabled ) +{ + FIXME( "iface %p, client %llu, touchInputEnabled %p stub!\n", iface, client, touchInputEnabled ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetLastFrameDisplayed( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, D3D12XBOX_FRAME_PIPELINE_TOKEN *framePipelineToken ) +{ + FIXME( "iface %p, client %llu, framePipelineToken %p stub!\n", iface, client, framePipelineToken ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetAssociatedFrame( IXGameStreamingImpl3 *iface, IGameInputReading *gamepadReading, D3D12XBOX_FRAME_PIPELINE_TOKEN *framePipelineToken ) +{ + FIXME( "iface %p, gamepadReading %p, framePipelineToken %p stub!\n", iface, gamepadReading, framePipelineToken ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetGamepadPhysicality( IXGameStreamingImpl3 *iface, IGameInputReading *gamepadReading, XGameStreamingGamepadPhysicality *gamepadPhysicality ) +{ + FIXME( "iface %p, gamepadReading %p, gamepadPhysicality %p stub!\n", iface, gamepadReading, gamepadPhysicality ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingUpdateTouchControlsState( IXGameStreamingImpl3 *iface, SIZE_T operationCount, const XGameStreamingTouchControlsStateOperation *operations ) +{ + FIXME( "iface %p, operationCount %Iu, operations %p stub!\n", iface, operationCount, operations ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingUpdateTouchControlsStateOnClient( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, SIZE_T operationCount, const XGameStreamingTouchControlsStateOperation *operations ) +{ + FIXME( "iface %p, client %llu, operationCount %Iu, operations %p stub!\n", iface, client, operationCount, operations ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingShowTouchControlsWithStateUpdate( IXGameStreamingImpl3 *iface, const char *layout, SIZE_T operationCount, const XGameStreamingTouchControlsStateOperation *operations ) +{ + FIXME( "iface %p, layout %s, operationCount %Iu, operations %p stub!\n", iface, debugstr_a( layout ), operationCount, operations ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingShowTouchControlsWithStateUpdateOnClient( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, const char *layout, SIZE_T operationCount, const XGameStreamingTouchControlsStateOperation *operations ) +{ + FIXME( "iface %p, client %llu, layout %s, operationCount %Iu, operations %p stub!\n", iface, client, debugstr_a( layout ), operationCount, operations ); + return E_NOTIMPL; +} + +static SIZE_T WINAPI x_game_streaming_XGameStreamingGetTouchBundleVersionNameSize( IXGameStreamingImpl3 *iface, XGameStreamingClientId client ) +{ + FIXME( "iface %p, client %llu stub!\n", iface, client ); + return 0; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetTouchBundleVersion( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, XVersion *version, SIZE_T versionNameSize, char *versionName ) +{ + FIXME( "iface %p, client %llu, version %p, versionNameSize %Iu, versionName %p stub!\n", iface, client, version, versionNameSize, versionName ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetClientIPAddress( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, SIZE_T ipAddressSize, char *ipAddress ) +{ + FIXME( "iface %p, client %llu, ipAddressSize %Iu, ipAddress %p stub!\n", iface, client, ipAddressSize, ipAddress ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetSessionId( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, SIZE_T sessionIdSize, char *sessionId, SIZE_T *sessionIdUsed ) +{ + FIXME( "iface %p, client %llu, sessionIdSize %Iu, sessionId %p, sessionIdUsed %p stub!\n", iface, client, sessionIdSize, sessionId, sessionIdUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingGetDisplayDetails( IXGameStreamingImpl3 *iface, XGameStreamingClientId client, UINT32 maxSupportedPixels, float widestSupportedAspectRatio, float tallestSupportedAspectRatio, XGameStreamingDisplayDetails *displayDetails ) +{ + FIXME( "iface %p, client %llu, maxSupportedPixels %u, widestSupportedAspectRatio %a, tallestSupportedAspectRatio %a, displayDetails %p stub!\n", iface, client, maxSupportedPixels, widestSupportedAspectRatio, tallestSupportedAspectRatio, displayDetails ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_streaming_XGameStreamingSetResolution( IXGameStreamingImpl3 *iface, UINT32 width, UINT32 height ) +{ + FIXME( "iface %p, width %u, height %u stub!\n", iface, width, height ); + return E_NOTIMPL; +} + +static const struct IXGameStreamingImpl3Vtbl x_game_streaming_vtbl = +{ + x_game_streaming_QueryInterface, + x_game_streaming_AddRef, + x_game_streaming_Release, + /* IXGameStreamingImpl methods */ + x_game_streaming_XGameStreamingInitialize, + x_game_streaming_XGameStreamingUninitialize, + x_game_streaming_XGameStreamingIsStreaming, + x_game_streaming_XGameStreamingRegisterClientPropertiesChanged, + x_game_streaming_XGameStreamingUnregisterClientPropertiesChanged, + x_game_streaming_XGameStreamingGetStreamPhysicalDimensions, + x_game_streaming_XGameStreamingGetClientCount, + x_game_streaming_XGameStreamingGetClients, + x_game_streaming_XGameStreamingGetConnectionState, + x_game_streaming_XGameStreamingRegisterConnectionStateChanged, + x_game_streaming_XGameStreamingUnregisterConnectionStateChanged, + x_game_streaming_XGameStreamingGetStreamAddedLatency, + x_game_streaming_XGameStreamingGetServerLocationNameSize, + x_game_streaming_XGameStreamingGetServerLocationName, + x_game_streaming_XGameStreamingHideTouchControls, + x_game_streaming_XGameStreamingShowTouchControlLayout, + x_game_streaming_XGameStreamingHideTouchControlsOnClient, + x_game_streaming_XGameStreamingShowTouchControlLayoutOnClient, + x_game_streaming_XGameStreamingIsTouchInputEnabled, + x_game_streaming_XGameStreamingGetLastFrameDisplayed, + x_game_streaming_XGameStreamingGetAssociatedFrame, + x_game_streaming_XGameStreamingGetGamepadPhysicality, + x_game_streaming_XGameStreamingUpdateTouchControlsState, + x_game_streaming_XGameStreamingUpdateTouchControlsStateOnClient, + x_game_streaming_XGameStreamingShowTouchControlsWithStateUpdate, + x_game_streaming_XGameStreamingShowTouchControlsWithStateUpdateOnClient, + x_game_streaming_XGameStreamingGetTouchBundleVersionNameSize, + x_game_streaming_XGameStreamingGetTouchBundleVersion, + x_game_streaming_XGameStreamingGetClientIPAddress, + /* IXGameStreamingImpl2 methods */ + x_game_streaming_XGameStreamingGetSessionId, + /* IXGameStreamingImpl3 methods */ + x_game_streaming_XGameStreamingGetDisplayDetails, + x_game_streaming_XGameStreamingSetResolution, +}; + +static struct x_game_streaming x_game_streaming = +{ + {&x_game_streaming_vtbl}, + 0, +}; + +IXGameStreamingImpl3 *x_game_streaming_impl = &x_game_streaming.IXGameStreamingImpl3_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XGameUi.c b/dlls/xgameruntime/GDKComponent/System/XGameUi.c new file mode 100644 index 00000000000..ff1b2630fe9 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XGameUi.c @@ -0,0 +1,427 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XGameUI + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_game_ui +{ + IXGameUiImpl4 IXGameUiImpl4_iface; + LONG ref; +}; + +static inline struct x_game_ui *impl_from_IXGameUiImpl4( IXGameUiImpl4 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_game_ui, IXGameUiImpl4_iface ); +} + +static HRESULT WINAPI x_game_ui_QueryInterface( IXGameUiImpl4 *iface, REFIID iid, void **out ) +{ + struct x_game_ui *impl = impl_from_IXGameUiImpl4( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXGameUiImpl ) || + IsEqualGUID( iid, &IID_IXGameUiImpl2 ) || + IsEqualGUID( iid, &IID_IXGameUiImpl3 ) || + IsEqualGUID( iid, &IID_IXGameUiImpl4 )) + { + IXGameUiImpl4_AddRef( *out = &impl->IXGameUiImpl4_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_game_ui_AddRef( IXGameUiImpl4 *iface ) +{ + struct x_game_ui *impl = impl_from_IXGameUiImpl4( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_game_ui_Release( IXGameUiImpl4 *iface ) +{ + struct x_game_ui *impl = impl_from_IXGameUiImpl4( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowMessageDialogAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, const char *titleText, const char *contentText, const char *firstButtonText, const char *secondButtonText, const char *thirdButtonText, XGameUiMessageDialogButton defaultButton, XGameUiMessageDialogButton cancelButton ) +{ + FIXME( "iface %p, async %p, titleText %s, contentText %s, firstButtonText %s, secondButtonText %s, thirdButtonText %s, defaultButton %d, cancelButton %d stub!\n", iface, async, debugstr_a( titleText ), debugstr_a( contentText ), debugstr_a( firstButtonText ), debugstr_a( secondButtonText ), debugstr_a( thirdButtonText ), defaultButton, cancelButton ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowMessageDialogResult( IXGameUiImpl4 *iface, XAsyncBlock *async, XGameUiMessageDialogButton *resultButton ) +{ + FIXME( "iface %p, async %p, resultButton %p stub!\n", iface, async, resultButton ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowSendGameInviteAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, const char *sessionConfigurationId, const char *sessionTemplateName, const char *sessionId, const char *invitationText, const char *customActivationContext ) +{ + FIXME( "iface %p, async %p, requestingUser %p, sessionConfigurationId %s, sessionTemplateName %s, sessionId %s, invitationText %s, customActivationContext %s stub!\n", iface, async, requestingUser, debugstr_a( sessionConfigurationId ), debugstr_a( sessionTemplateName ), debugstr_a( sessionId ), debugstr_a( invitationText ), debugstr_a( customActivationContext ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowSendGameInviteResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowPlayerProfileCardAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, UINT64 targetPlayer ) +{ + FIXME( "iface %p, async %p, requestingUser %p, targetPlayer %llu stub!\n", iface, async, requestingUser, targetPlayer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowPlayerProfileCardResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowAchievementsAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, UINT32 titleId ) +{ + FIXME( "iface %p, async %p, requestingUser %p, titleId %u stub!\n", iface, async, requestingUser, titleId ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowAchievementsResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowPlayerPickerAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, const char *promptText, UINT32 selectFromPlayersCount, const UINT64 *selectFromPlayers, UINT32 preSelectedPlayersCount, UINT64 *preSelectedPlayers, UINT32 minSelectionCount, UINT32 maxSelectionCount ) +{ + FIXME( "iface %p, async %p, requestingUser %p, promptText %s, selectFromPlayersCount %u, selectFromPlayers %p, preSelectedPlayersCount %u, preSelectedPlayers %p, minSelectionCount %u, maxSelectionCount %u stub!\n", iface, async, requestingUser, debugstr_a( promptText ), selectFromPlayersCount, selectFromPlayers, preSelectedPlayersCount, preSelectedPlayers, minSelectionCount, maxSelectionCount ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowPlayerPickerResultCount( IXGameUiImpl4 *iface, XAsyncBlock *async, UINT32 *resultPlayersCount ) +{ + FIXME( "iface %p, async %p, resultPlayersCount %p stub!\n", iface, async, resultPlayersCount ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowPlayerPickerResult( IXGameUiImpl4 *iface, XAsyncBlock *async, UINT32 resultPlayersCount, UINT64 *resultPlayers, UINT32 *resultPlayersUsed ) +{ + FIXME( "iface %p, async %p, resultPlayersCount %u, resultPlayers %p, resultPlayersUsed %p stub!\n", iface, async, resultPlayersCount, resultPlayers, resultPlayersUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowErrorDialogAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, HRESULT errorCode, const char *context ) +{ + FIXME( "iface %p, async %p, errorCode %#lx, context %s stub!\n", iface, async, errorCode, debugstr_a( context ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowErrorDialogResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetNotificationPositionHint( IXGameUiImpl4 *iface, XGameUiNotificationPositionHint position ) +{ + FIXME( "iface %p, position %d stub!\n", iface, position ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowTextEntryAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, const char *titleText, const char *descriptionText, const char *defaultText, XGameUiTextEntryInputScope inputScope, UINT32 maxTextLength ) +{ + FIXME( "iface %p, async %p, titleText %s, descriptionText %s, defaultText %s, inputScope %d, maxTextLength %u stub!\n", iface, async, debugstr_a( titleText ), debugstr_a( descriptionText ), debugstr_a( defaultText ), inputScope, maxTextLength ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowTextEntryResultSize( IXGameUiImpl4 *iface, XAsyncBlock *async, UINT32 *resultTextBufferSize ) +{ + FIXME( "iface %p, async %p, resultTextBufferSize %p stub!\n", iface, async, resultTextBufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowTextEntryResult( IXGameUiImpl4 *iface, XAsyncBlock *async, UINT32 resultTextBufferSize, char *resultTextBuffer, UINT32 *resultTextBufferUsed ) +{ + FIXME( "iface %p, async %p, resultTextBufferSize %u, resultTextBuffer %p, resultTextBufferUsed %p stub!\n", iface, async, resultTextBufferSize, resultTextBuffer, resultTextBufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_2__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_3__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_4__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowWebAuthenticationAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, const char *requestUri, const char *completionUri ) +{ + FIXME( "iface %p, async %p, requestingUser %p, requestUri %s, completionUri %s stub!\n", iface, async, requestingUser, debugstr_a( requestUri ), debugstr_a( completionUri ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowWebAuthenticationResultSize( IXGameUiImpl4 *iface, XAsyncBlock *async, SIZE_T *bufferSize ) +{ + FIXME( "iface %p, async %p, bufferSize %p stub!\n", iface, async, bufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowWebAuthenticationResult( IXGameUiImpl4 *iface, XAsyncBlock *async, SIZE_T bufferSize, void *buffer, XGameUiWebAuthenticationResultData **ptrToBuffer, SIZE_T *bufferUsed ) +{ + FIXME( "iface %p, async %p, bufferSize %Iu, buffer %p, ptrToBuffer %p, bufferUsed %p stub!\n", iface, async, bufferSize, buffer, ptrToBuffer, bufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowWebAuthenticationWithOptionsAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, const char *requestUri, const char *completionUri, XGameUiWebAuthenticationOptions options ) +{ + FIXME( "iface %p, async %p, requestingUser %p, requestUri %s, completionUri %s, options %d stub!\n", iface, async, requestingUser, debugstr_a( requestUri ), debugstr_a( completionUri ), options ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_5__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_6__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowMultiplayerActivityGameInviteAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser ) +{ + FIXME( "iface %p, async %p, requestingUser %p stub!\n", iface, async, requestingUser ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowMultiplayerActivityGameInviteResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_7__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_8__( IXGameUiImpl4 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryOpen( IXGameUiImpl4 *iface, const XGameUiTextEntryOptions *options, UINT32 maxLength, const char *initialText, UINT32 initialCursorIndex, XGameUiTextEntryHandle *handle ) +{ + FIXME( "iface %p, options %p, maxLength %u, initialText %s, initialCursorIndex %u, handle %p stub!\n", iface, options, maxLength, debugstr_a( initialText ), initialCursorIndex, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryClose( IXGameUiImpl4 *iface, XGameUiTextEntryHandle handle ) +{ + FIXME( "iface %p, handle %p stub!\n", iface, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryGetState( IXGameUiImpl4 *iface, XGameUiTextEntryHandle handle, XGameUiTextEntryChangeTypeFlags *changeType, UINT32 *cursorIndex, UINT32 *imeClauseStartIndex, UINT32 *imeClauseEndIndex, UINT32 bufferSize, char *buffer ) +{ + FIXME( "iface %p, handle %p, changeType %p, cursorIndex %p, imeClauseStartIndex %p, imeClauseEndIndex %p, bufferSize %u, buffer %p stub!\n", iface, handle, changeType, cursorIndex, imeClauseStartIndex, imeClauseEndIndex, bufferSize, buffer ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryGetExtents( IXGameUiImpl4 *iface, XGameUiTextEntryHandle handle, XGameUiTextEntryExtents *extents ) +{ + FIXME( "iface %p, handle %p, extents %p stub!\n", iface, handle, extents ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryUpdatePositionHint( IXGameUiImpl4 *iface, XGameUiTextEntryHandle handle, XGameUiTextEntryPositionHint positionHint ) +{ + FIXME( "iface %p, handle %p, positionHint %d stub!\n", iface, handle, positionHint ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiTextEntryUpdateVisibility( IXGameUiImpl4 *iface, XGameUiTextEntryHandle handle, XGameUiTextEntryVisibilityFlags visibilityFlags ) +{ + FIXME( "iface %p, handle %p, visibilityFlags %d stub!\n", iface, handle, visibilityFlags ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowStateShareAsync( IXGameUiImpl4 *iface, XAsyncBlock *async, XUserHandle requestingUser, const char *linkToken ) +{ + FIXME( "iface %p, async %p, requestingUser %p, linkToken %s stub!\n", iface, async, requestingUser, debugstr_a( linkToken ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiShowStateShareResult( IXGameUiImpl4 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetUiCallbacks( IXGameUiImpl4 *iface, const XGameUiUiCallbacks *callbacks, BOOLEAN useSystemUiIfAvailable ) +{ + FIXME( "iface %p, callbacks %p, useSystemUiIfAvailable %d stub!\n", iface, callbacks, useSystemUiIfAvailable ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetMessageDialogUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle, XGameUiMessageDialogButton response ) +{ + FIXME( "iface %p, callbackHandle %p, response %d stub!\n", iface, callbackHandle, response ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetPlayerPickerUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle, UINT32 playerCount, const UINT64 *players ) +{ + FIXME( "iface %p, callbackHandle %p, playerCount %u, players %p stub!\n", iface, callbackHandle, playerCount, players ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetTextEntryUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle, const char *response ) +{ + FIXME( "iface %p, callbackHandle %p, response %s stub!\n", iface, callbackHandle, debugstr_a( response ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetPlayerProfileCardUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle ) +{ + FIXME( "iface %p, callbackHandle %p stub!\n", iface, callbackHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetSendGameInviteUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle ) +{ + FIXME( "iface %p, callbackHandle %p stub!\n", iface, callbackHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetAchievementsUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle ) +{ + FIXME( "iface %p, callbackHandle %p stub!\n", iface, callbackHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetMultiplayerActivityGameInviteUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle ) +{ + FIXME( "iface %p, callbackHandle %p stub!\n", iface, callbackHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_game_ui_XGameUiSetErrorDialogUiResponse( IXGameUiImpl4 *iface, XGameUiCallbackHandle callbackHandle ) +{ + FIXME( "iface %p, callbackHandle %p stub!\n", iface, callbackHandle ); + return E_NOTIMPL; +} + +static const struct IXGameUiImpl4Vtbl x_game_ui_vtbl = +{ + x_game_ui_QueryInterface, + x_game_ui_AddRef, + x_game_ui_Release, + /* IXGameUiImpl methods */ + x_game_ui_XGameUiShowMessageDialogAsync, + x_game_ui_XGameUiShowMessageDialogResult, + x_game_ui_XGameUiShowSendGameInviteAsync, + x_game_ui_XGameUiShowSendGameInviteResult, + x_game_ui_XGameUiShowPlayerProfileCardAsync, + x_game_ui_XGameUiShowPlayerProfileCardResult, + x_game_ui_XGameUiShowAchievementsAsync, + x_game_ui_XGameUiShowAchievementsResult, + x_game_ui_XGameUiShowPlayerPickerAsync, + x_game_ui_XGameUiShowPlayerPickerResultCount, + x_game_ui_XGameUiShowPlayerPickerResult, + x_game_ui_XGameUiShowErrorDialogAsync, + x_game_ui_XGameUiShowErrorDialogResult, + x_game_ui_XGameUiSetNotificationPositionHint, + x_game_ui_XGameUiShowTextEntryAsync, + x_game_ui_XGameUiShowTextEntryResultSize, + x_game_ui_XGameUiShowTextEntryResult, + __PADDING__, + __PADDING_2__, + __PADDING_3__, + __PADDING_4__, + x_game_ui_XGameUiShowWebAuthenticationAsync, + x_game_ui_XGameUiShowWebAuthenticationResultSize, + x_game_ui_XGameUiShowWebAuthenticationResult, + x_game_ui_XGameUiShowWebAuthenticationWithOptionsAsync, + __PADDING_5__, + __PADDING_6__, + /* IXGameUiImpl2 methods */ + x_game_ui_XGameUiShowMultiplayerActivityGameInviteAsync, + x_game_ui_XGameUiShowMultiplayerActivityGameInviteResult, + __PADDING_7__, + __PADDING_8__, + x_game_ui_XGameUiTextEntryOpen, + x_game_ui_XGameUiTextEntryClose, + x_game_ui_XGameUiTextEntryGetState, + x_game_ui_XGameUiTextEntryGetExtents, + x_game_ui_XGameUiTextEntryUpdatePositionHint, + x_game_ui_XGameUiTextEntryUpdateVisibility, + /* IXGameUiImpl3 methods */ + x_game_ui_XGameUiShowStateShareAsync, + x_game_ui_XGameUiShowStateShareResult, + /* IXGameUiImpl4 methods */ + x_game_ui_XGameUiSetUiCallbacks, + x_game_ui_XGameUiSetMessageDialogUiResponse, + x_game_ui_XGameUiSetPlayerPickerUiResponse, + x_game_ui_XGameUiSetTextEntryUiResponse, + x_game_ui_XGameUiSetPlayerProfileCardUiResponse, + x_game_ui_XGameUiSetSendGameInviteUiResponse, + x_game_ui_XGameUiSetAchievementsUiResponse, + x_game_ui_XGameUiSetMultiplayerActivityGameInviteUiResponse, + x_game_ui_XGameUiSetErrorDialogUiResponse, +}; + +static struct x_game_ui x_game_ui = +{ + {&x_game_ui_vtbl}, + 0, +}; + +IXGameUiImpl4 *x_game_ui_impl = &x_game_ui.IXGameUiImpl4_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XLauncher.c b/dlls/xgameruntime/GDKComponent/System/XLauncher.c new file mode 100644 index 00000000000..94a26f3d73a --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XLauncher.c @@ -0,0 +1,181 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XDisplay and XLauncher + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +#include + +struct x_launcher +{ + IXLauncherImpl IXLauncherImpl_iface; + LONG ref; +}; + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +static inline struct x_launcher *impl_from_IXLauncherImpl( IXLauncherImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_launcher, IXLauncherImpl_iface ); +} + +static HRESULT WINAPI x_launcher_QueryInterface( IXLauncherImpl *iface, REFIID iid, void **out ) +{ + struct x_launcher *impl = impl_from_IXLauncherImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXLauncherImpl )) + { + IXLauncherImpl_AddRef( *out = &impl->IXLauncherImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_launcher_AddRef( IXLauncherImpl *iface ) +{ + struct x_launcher *impl = impl_from_IXLauncherImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_launcher_Release( IXLauncherImpl *iface ) +{ + struct x_launcher *impl = impl_from_IXLauncherImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_launcher_XLaunchUri( IXLauncherImpl *iface, XUserHandle user, const char *uri ) +{ + TRACE( "iface %p, user %p uri %s.\n", iface, user, debugstr_a( uri ) ); + return (SIZE_T)ShellExecuteA( NULL, "open", uri, NULL, NULL, SW_SHOW ) > 32 ? S_OK : E_GAMEPACKAGE_NO_PACKAGE_IDENTIFIER; +} + +static HRESULT WINAPI x_launcher_XDisplayAcquireTimeoutDeferral( IXLauncherImpl *iface, XDisplayTimeoutDeferralHandle *handle ) +{ + FIXME( "iface %p, handle %p stub!\n", iface, handle ); + return E_NOTIMPL; +} + +static void WINAPI x_launcher_XDisplayCloseTimeoutDeferralHandle( IXLauncherImpl *iface, XDisplayTimeoutDeferralHandle handle ) +{ + FIXME( "iface %p, handle %p stub!\n", iface, handle ); +} + +static const struct IXLauncherImplVtbl x_launcher_vtbl = +{ + x_launcher_QueryInterface, + x_launcher_AddRef, + x_launcher_Release, + /* IXLauncherImpl methods */ + x_launcher_XLaunchUri, + x_launcher_XDisplayAcquireTimeoutDeferral, + x_launcher_XDisplayCloseTimeoutDeferralHandle, +}; + +struct x_display +{ + IXDisplayImpl IXDisplayImpl_iface; + LONG ref; +}; + +static inline struct x_display *impl_from_IXDisplayImpl( IXDisplayImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_display, IXDisplayImpl_iface ); +} + +static HRESULT WINAPI x_display_QueryInterface( IXDisplayImpl *iface, REFIID iid, void **out ) +{ + struct x_display *impl = impl_from_IXDisplayImpl( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXDisplayImpl )) + { + IXDisplayImpl_AddRef( *out = &impl->IXDisplayImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_display_AddRef( IXDisplayImpl *iface ) +{ + struct x_display *impl = impl_from_IXDisplayImpl( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_display_Release( IXDisplayImpl *iface ) +{ + struct x_display *impl = impl_from_IXDisplayImpl( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI __PADDING__( IXDisplayImpl *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static XDisplayHdrModeResult WINAPI x_display_XDisplayTryEnableHdrMode( IXDisplayImpl *iface, XDisplayHdrModePreference displayModePreference, XDisplayHdrModeInfo *displayHdrModeInfo ) +{ + FIXME( "iface %p, displayModePreference %d, displayHdrModeInfo %p stub!\n", iface, displayModePreference, displayHdrModeInfo ); + return XDisplayHdrModeResult_Unknown; +} + +static const struct IXDisplayImplVtbl x_display_vtbl = +{ + x_display_QueryInterface, + x_display_AddRef, + x_display_Release, + /* IXDisplayImpl methods */ + __PADDING__, + x_display_XDisplayTryEnableHdrMode, +}; + +static struct x_launcher x_launcher = +{ + {&x_launcher_vtbl}, + 0, +}; + +static struct x_display x_display = +{ + {&x_display_vtbl}, + 0, +}; + +IXLauncherImpl *x_launcher_impl = &x_launcher.IXLauncherImpl_iface; +IXDisplayImpl *x_display_impl = &x_display.IXDisplayImpl_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XPackage.c b/dlls/xgameruntime/GDKComponent/System/XPackage.c new file mode 100644 index 00000000000..16be70b5071 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XPackage.c @@ -0,0 +1,352 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XPackage + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_package +{ + IXPackageImpl3 IXPackageImpl3_iface; + LONG ref; +}; + +static inline struct x_package *impl_from_IXPackageImpl3( IXPackageImpl3 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_package, IXPackageImpl3_iface ); +} + +static HRESULT WINAPI x_package_QueryInterface( IXPackageImpl3 *iface, REFIID iid, void **out ) +{ + struct x_package *impl = impl_from_IXPackageImpl3( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXPackageImpl ) || + IsEqualGUID( iid, &IID_IXPackageImpl2 ) || + IsEqualGUID( iid, &IID_IXPackageImpl3 )) + { + IXPackageImpl_AddRef( *out = &impl->IXPackageImpl3_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_package_AddRef( IXPackageImpl3 *iface ) +{ + struct x_package *impl = impl_from_IXPackageImpl3( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_package_Release( IXPackageImpl3 *iface ) +{ + struct x_package *impl = impl_from_IXPackageImpl3( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_package_XPackageGetCurrentProcessPackageIdentifier( IXPackageImpl3 *iface, SIZE_T bufferSize, char *buffer ) +{ + FIXME( "iface %p, bufferSize %Iu, buffer %p stub!\n", iface, bufferSize, buffer ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_package_XPackageIsPackagedProcess( IXPackageImpl3 *iface ) +{ + FIXME( "iface %p stub!\n", iface ); + return FALSE; +} + +static HRESULT WINAPI x_package_XPackageCreateInstallationMonitor( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors, UINT32 minimumUpdateIntervalMs, XTaskQueueHandle queue, XPackageInstallationMonitorHandle *installationMonitor ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p, minimumUpdateIntervalMs %u, queue %p, installationMonitor %p stub!\n", iface, debugstr_a( packageIdentifier ), selectorCount, selectors, minimumUpdateIntervalMs, queue, installationMonitor ); + return E_NOTIMPL; +} + +static void WINAPI x_package_XPackageCloseInstallationMonitorHandle( IXPackageImpl3 *iface, XPackageInstallationMonitorHandle installationMonitor ) +{ + FIXME( "iface %p, installationMonitor %p stub!\n", iface, installationMonitor ); +} + +static void WINAPI x_package_XPackageGetInstallationProgress( IXPackageImpl3 *iface, XPackageInstallationMonitorHandle installationMonitor, XPackageInstallationProgress *progress ) +{ + FIXME( "iface %p, installationMonitor %p, progress %p stub!\n", iface, installationMonitor, progress ); +} + +static BOOLEAN WINAPI x_package_XPackageUpdateInstallationMonitor( IXPackageImpl3 *iface, XPackageInstallationMonitorHandle installationMonitor ) +{ + FIXME( "iface %p, installationMonitor %p stub!\n", iface, installationMonitor ); + return TRUE; +} + +static HRESULT WINAPI x_package_XPackageRegisterInstallationProgressChanged( IXPackageImpl3 *iface, XPackageInstallationMonitorHandle installationMonitor, void *context, XPackageInstallationProgressCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, installationMonitor %p, context %p, callback %p, token %p stub!\n", iface, installationMonitor, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_package_XPackageUnregisterInstallationProgressChanged( IXPackageImpl3 *iface, XPackageInstallationMonitorHandle installationMonitor, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, installationMonitor %p, token %p, wait %d stub!\n", iface, installationMonitor, &token, wait ); + return TRUE; +} + +static HRESULT WINAPI x_package_XPackageGetUserLocale( IXPackageImpl3 *iface, SIZE_T localeSize, char *locale ) +{ + FIXME( "iface %p, localeSize %Iu, locale %p stub!\n", iface, localeSize, locale ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageFindChunkAvailability( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors, XPackageChunkAvailability *availability ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p, availability %p stub!\n", iface, packageIdentifier, selectorCount, selectors, availability ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageEnumerateChunkAvailability( IXPackageImpl3 *iface, const char *packageIdentifier, XPackageChunkSelectorType type, void *context, XPackageChunkAvailabilityCallback *callback ) +{ + FIXME( "iface %p, packageIdentifier %s, type %d, context %p, callback %p stub!\n", iface, debugstr_a( packageIdentifier ), type, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageChangeChunkInstallOrder( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p stub!\n", iface, debugstr_a( packageIdentifier ), selectorCount, selectors ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageInstallChunks( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors, UINT32 minimumUpdateIntervalMs, BOOLEAN suppressUserConfirmation, XTaskQueueHandle queue, XPackageInstallationMonitorHandle *installationMonitor ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p, minimumUpdateIntervalMs %u, suppressUserConfirmation %d, queue %p, installationMonitor %p stub!\n", iface, debugstr_a( packageIdentifier ), selectorCount, selectors, minimumUpdateIntervalMs, suppressUserConfirmation, queue, installationMonitor ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageInstallChunksAsync( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors, UINT32 minimumUpdateIntervalMs, BOOLEAN suppressUserConfirmation, XAsyncBlock *asyncBlock ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p, minimumUpdateIntervalMs %u, suppressUserConfirmation %d, asyncBlock %p stub!\n", iface, packageIdentifier, selectorCount, selectors, minimumUpdateIntervalMs, suppressUserConfirmation, asyncBlock ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageInstallChunksResult( IXPackageImpl3 *iface, XAsyncBlock *asyncBlock, XPackageInstallationMonitorHandle *installationMonitor ) +{ + FIXME( "iface %p, asyncBlock %p, installationMonitor %p stub!\n", iface, asyncBlock, installationMonitor ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageEstimateDownloadSize( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors, UINT64 *downloadSize, BOOLEAN *shouldPresentUserConfirmation ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectors %p, downloadSize %p, shouldPresentUserConfirmation %p stub!\n", iface, packageIdentifier, selectorCount, selectors, downloadSize, shouldPresentUserConfirmation ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageUninstallChunks( IXPackageImpl3 *iface, const char *packageIdentifier, UINT32 selectorCount, XPackageChunkSelector *selectors ) +{ + FIXME( "iface %p, packageIdentifier %s, selectorCount %u, selectores %p stub!\n", iface, packageIdentifier, selectorCount, selectors ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING__( IXPackageImpl3 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_2__( IXPackageImpl3 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_package_XPackageUnregisterPackageInstalled( IXPackageImpl3 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return TRUE; +} + +static HRESULT WINAPI __PADDING_3__( IXPackageImpl3 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageGetMountPathSize( IXPackageImpl3 *iface, XPackageMountHandle mount, SIZE_T *pathSize ) +{ + FIXME( "iface %p, mount %p, pathSize %p stub!\n", iface, mount, pathSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageGetMountPath( IXPackageImpl3 *iface, XPackageMountHandle mount, SIZE_T pathSize, char *path ) +{ + FIXME( "iface %p, mount %p, pathSize %Iu, path %p stub!\n", iface, mount, pathSize, path ); + return E_NOTIMPL; +} + +static void WINAPI x_package_XPackageCloseMountHandle( IXPackageImpl3 *iface, XPackageMountHandle mount ) +{ + FIXME( "iface %p, mount %p stub!\n", iface, mount ); +} + +static HRESULT WINAPI __PADDING_4__( IXPackageImpl3 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageEnumeratePackages( IXPackageImpl3 *iface, XPackageKind kind, XPackageEnumerationScope scope, void *context, XPackageEnumerationCallback *callback ) +{ + FIXME( "iface %p, kind %d, scope %d, context %p, callback %p stub!\n", iface, kind, scope, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageRegisterPackageInstalled( IXPackageImpl3 *iface, XTaskQueueHandle queue, void *context, XPackageInstalledCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageGetWriteStats( IXPackageImpl3 *iface, XPackageWriteStats *writeStats ) +{ + FIXME( "iface %p, writeStats %p stub!\n", iface, writeStats ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_5__( IXPackageImpl3 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageUninstallUWPInstance( IXPackageImpl3 *iface, const char *packageName ) +{ + FIXME( "iface %p, packageName %s stub!\n", iface, debugstr_a( packageName ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageEnumerateFeatures( IXPackageImpl3 *iface, const char *packageIdentifier, void *context, XPackageFeatureEnumerationCallback *callback ) +{ + FIXME( "iface %p, packageIdentifier %s, context %p, callback %p stub!\n", iface, packageIdentifier, context, callback ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_package_XPackageUninstallPackage( IXPackageImpl3 *iface, const char *packageIdentifier ) +{ + FIXME( "iface %p, packageIdentifier %s", iface, debugstr_a( packageIdentifier ) ); + return FALSE; +} + +static HRESULT WINAPI x_package_XPackageEnumeratePackages2( IXPackageImpl3 *iface, XPackageKind kind, XPackageEnumerationScope scope, void *context, XPackageEnumerationCallback *callback ) +{ + FIXME( "iface %p, kind %d, scope %d, context %p, callback %p stub!\n", iface, kind, scope, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageRegisterPackageInstalled2( IXPackageImpl3 *iface, XTaskQueueHandle queue, void *context, XPackageInstalledCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageMountWithUiAsync( IXPackageImpl3 *iface, const char *packageIdentifier, XAsyncBlock *async ) +{ + FIXME( "iface %p, packageIdentifier %s, async %p stub!\n", iface, debugstr_a( packageIdentifier ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageMountWithUiResult( IXPackageImpl3 *iface, XAsyncBlock *async, XPackageMountHandle *mount ) +{ + FIXME( "iface %p, async %p, mount %p stub!\n", iface, async, mount ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageEnumeratePackages3( IXPackageImpl3 *iface, XPackageKind kind, XPackageEnumerationScope scope, void *context, XPackageEnumerationCallback *callback ) +{ + FIXME( "iface %p, kind %d, scope %d, context %p, callback %p stub!\n", iface, kind, scope, context, callback ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_package_XPackageRegisterPackageInstalled3( IXPackageImpl3 *iface, XTaskQueueHandle queue, void *context, XPackageInstalledCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static const struct IXPackageImpl3Vtbl x_package_vtbl = +{ + x_package_QueryInterface, + x_package_AddRef, + x_package_Release, + /* IXPackageImpl methods */ + x_package_XPackageGetCurrentProcessPackageIdentifier, + x_package_XPackageIsPackagedProcess, + x_package_XPackageCreateInstallationMonitor, + x_package_XPackageCloseInstallationMonitorHandle, + x_package_XPackageGetInstallationProgress, + x_package_XPackageUpdateInstallationMonitor, + x_package_XPackageRegisterInstallationProgressChanged, + x_package_XPackageUnregisterInstallationProgressChanged, + x_package_XPackageGetUserLocale, + x_package_XPackageFindChunkAvailability, + x_package_XPackageEnumerateChunkAvailability, + x_package_XPackageChangeChunkInstallOrder, + x_package_XPackageInstallChunks, + x_package_XPackageInstallChunksAsync, + x_package_XPackageInstallChunksResult, + x_package_XPackageEstimateDownloadSize, + x_package_XPackageUninstallChunks, + __PADDING__, + __PADDING_2__, + x_package_XPackageUnregisterPackageInstalled, + __PADDING_3__, + x_package_XPackageGetMountPathSize, + x_package_XPackageGetMountPath, + x_package_XPackageCloseMountHandle, + __PADDING_4__, + x_package_XPackageEnumeratePackages, + x_package_XPackageRegisterPackageInstalled, + x_package_XPackageGetWriteStats, + __PADDING_5__, + x_package_XPackageUninstallUWPInstance, + x_package_XPackageEnumerateFeatures, + x_package_XPackageUninstallPackage, + /* IXPackageImpl2 methods */ + x_package_XPackageEnumeratePackages2, + x_package_XPackageRegisterPackageInstalled2, + x_package_XPackageMountWithUiAsync, + x_package_XPackageMountWithUiResult, + /* IXPackageImpl3 methods */ + x_package_XPackageEnumeratePackages3, + x_package_XPackageRegisterPackageInstalled3, +}; + +static struct x_package x_package = +{ + {&x_package_vtbl}, + 0, +}; + +IXPackageImpl3 *x_package_impl = &x_package.IXPackageImpl3_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XPersistentLocalStorage.c b/dlls/xgameruntime/GDKComponent/System/XPersistentLocalStorage.c new file mode 100644 index 00000000000..64eedc2a9b2 --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XPersistentLocalStorage.c @@ -0,0 +1,130 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XPersistentLocalStorage + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +struct x_persistent_local_storage +{ + IXPersistentLocalStorageImpl3 IXPersistentLocalStorageImpl3_iface; + LONG ref; +}; + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +static inline struct x_persistent_local_storage *impl_from_IXPersistentLocalStorageImpl3( IXPersistentLocalStorageImpl3 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_persistent_local_storage, IXPersistentLocalStorageImpl3_iface ); +} + +static HRESULT WINAPI x_persistent_local_storage_QueryInterface( IXPersistentLocalStorageImpl3 *iface, REFIID iid, void **out ) +{ + struct x_persistent_local_storage *impl = impl_from_IXPersistentLocalStorageImpl3( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXPersistentLocalStorageImpl ) || + IsEqualGUID( iid, &IID_IXPersistentLocalStorageImpl2 ) || + IsEqualGUID( iid, &IID_IXPersistentLocalStorageImpl3 )) + { + IXPersistentLocalStorageImpl_AddRef( *out = &impl->IXPersistentLocalStorageImpl3_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_persistent_local_storage_AddRef( IXPersistentLocalStorageImpl3 *iface ) +{ + struct x_persistent_local_storage *impl = impl_from_IXPersistentLocalStorageImpl3( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_persistent_local_storage_Release( IXPersistentLocalStorageImpl3 *iface ) +{ + struct x_persistent_local_storage *impl = impl_from_IXPersistentLocalStorageImpl3( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStorageGetPath( IXPersistentLocalStorageImpl3 *iface, SIZE_T pathSize, char *path, SIZE_T *pathUsed ) +{ + FIXME( "iface %p, pathSize %Iu, path %p, pathUsed %p stub!\n", iface, pathSize, path, pathUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStorageGetPathSize( IXPersistentLocalStorageImpl3 *iface, SIZE_T *pathSize ) +{ + FIXME( "iface %p, pathSize %p stub!\n", iface, pathSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStorageGetSpaceInfo( IXPersistentLocalStorageImpl3 *iface, XPersistentLocalStorageSpaceInfo *info ) +{ + FIXME( "iface %p, info %p stub!\n", iface, info ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStorageMountForPackage( IXPersistentLocalStorageImpl3 *iface, const char *packageIdentifier, XPackageMountHandle *mountHandle ) +{ + FIXME( "iface %p, packageIdentifier %s, mountHandle %p stub!\n", iface, debugstr_a( packageIdentifier ), mountHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStoragePromptUserForSpaceAsync( IXPersistentLocalStorageImpl3 *iface, UINT64 requestedBytes, XAsyncBlock *asyncBlock ) +{ + FIXME( "iface %p, requestedBytes %llu, asyncBlock %p stub!\n", iface, requestedBytes, asyncBlock ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_persistent_local_storage_XPersistentLocalStoragePromptUserForSpaceResult( IXPersistentLocalStorageImpl3 *iface, XAsyncBlock *asyncBlock ) +{ + FIXME( "iface %p, asyncBlock %p stub!\n", iface, asyncBlock ); + return E_NOTIMPL; +} + +static const struct IXPersistentLocalStorageImpl3Vtbl x_persistent_local_storage_vtbl = +{ + x_persistent_local_storage_QueryInterface, + x_persistent_local_storage_AddRef, + x_persistent_local_storage_Release, + /* IXPersistentLocalStorageImpl/IXPersistentLocalStorageImpl2 methods */ + x_persistent_local_storage_XPersistentLocalStorageGetPathSize, + x_persistent_local_storage_XPersistentLocalStorageGetPath, + x_persistent_local_storage_XPersistentLocalStorageGetSpaceInfo, + x_persistent_local_storage_XPersistentLocalStoragePromptUserForSpaceAsync, + x_persistent_local_storage_XPersistentLocalStoragePromptUserForSpaceResult, + /* IXPersistentLocalStorageImpl3 methods */ + x_persistent_local_storage_XPersistentLocalStorageMountForPackage, +}; + +static struct x_persistent_local_storage x_persistent_local_storage = +{ + {&x_persistent_local_storage_vtbl}, + 0, +}; + +IXPersistentLocalStorageImpl3 *x_persistent_local_storage_impl = &x_persistent_local_storage.IXPersistentLocalStorageImpl3_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XStore.c b/dlls/xgameruntime/GDKComponent/System/XStore.c new file mode 100644 index 00000000000..853e5b59eff --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XStore.c @@ -0,0 +1,659 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XStore + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_store +{ + IXStoreImpl6 IXStoreImpl6_iface; + LONG ref; +}; + +static inline struct x_store *impl_from_IXStoreImpl6( IXStoreImpl6 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_store, IXStoreImpl6_iface ); +} + +static HRESULT WINAPI x_store_QueryInterface( IXStoreImpl6 *iface, REFIID iid, void **out ) +{ + struct x_store *impl = impl_from_IXStoreImpl6( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXStoreImpl ) || + IsEqualGUID( iid, &IID_IXStoreImpl2 ) || + IsEqualGUID( iid, &IID_IXStoreImpl3 ) || + IsEqualGUID( iid, &IID_IXStoreImpl4 ) || + IsEqualGUID( iid, &IID_IXStoreImpl5 ) || + IsEqualGUID( iid, &IID_IXStoreImpl6 )) + { + IXStoreImpl6_AddRef( *out = &impl->IXStoreImpl6_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_store_AddRef( IXStoreImpl6 *iface ) +{ + struct x_store *impl = impl_from_IXStoreImpl6( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_store_Release( IXStoreImpl6 *iface ) +{ + struct x_store *impl = impl_from_IXStoreImpl6( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_store_XStoreCreateContext( IXStoreImpl6 *iface, const XUserHandle user, XStoreContextHandle *storeContextHandle ) +{ + FIXME( "iface %p, user %p, storeContextHandle %p stub!\n", iface, user, storeContextHandle ); + return E_NOTIMPL; +} + +static void WINAPI x_store_XStoreCloseContextHandle( IXStoreImpl6 *iface, XStoreContextHandle storeContextHandle ) +{ + FIXME( "iface %p, storeContextHandle %p stub!\n", iface, storeContextHandle ); +} + +static HRESULT WINAPI x_store_XStoreQueryAssociatedProductsAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XStoreProductKind productKinds, UINT32 maxItemsToRetrievePerPage, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, productKinds %#x, maxItemsToRetrievePerPage %u, async %p stub!\n", iface, storeContextHandle, productKinds, maxItemsToRetrievePerPage, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAssociatedProductsResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductsAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XStoreProductKind productKinds, const char **storeIds, SIZE_T storeIdsCount, const char **actionFilters, SIZE_T actionFiltersCount, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, productKinds %#x, storeIds %p, storeIdsCount %Iu, actionFilters %p, actionFiltersCount %Iu, async %p stub!\n", iface, storeContextHandle, productKinds, storeIds, storeIdsCount, actionFilters, actionFiltersCount, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductsResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryEntitledProductsAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XStoreProductKind productKinds, UINT32 maxItemsToRetrievePerPage, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, productKinds %#x, maxItemsToRetrievePerPage, %u, async %p stub!\n", iface, storeContextHandle, productKinds, maxItemsToRetrievePerPage, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryEntitledProductsResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductForCurrentGameAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, async %p stub!\n", iface, storeContextHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductForCurrentGameResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductForPackageAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XStoreProductKind productKinds, const char *packageIdentifier, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, productKinds %#x, packageIdentifier %s, async %p stub!\n", iface, storeContextHandle, productKinds, debugstr_a( packageIdentifier ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryProductForPackageResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreEnumerateProductsQuery( IXStoreImpl6 *iface, const XStoreProductQueryHandle productQueryHandle, void *context, XStoreProductQueryCallback *callback ) +{ + FIXME( "iface %p, productQueryHandle %p, context %p, callback %p stub!\n", iface, productQueryHandle, context, callback ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_store_XStoreProductsQueryHasMorePages( IXStoreImpl6 *iface, const XStoreProductQueryHandle productQueryHandle ) +{ + FIXME( "iface %p, productQueryHandle %p stub!\n", iface, productQueryHandle ); + return FALSE; +} + +static HRESULT WINAPI x_store_XStoreProductsQueryNextPageAsync( IXStoreImpl6 *iface, const XStoreProductQueryHandle productQueryHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, productQueryHandle %p, async %p stub!\n", iface, productQueryHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreProductsQueryNextPageResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static void WINAPI x_store_XStoreCloseProductsQueryHandle( IXStoreImpl6 *iface, XStoreProductQueryHandle productQueryHandle ) +{ + FIXME( "iface %p, productQueryHandle %p stub!\n", iface, productQueryHandle ); +} + +static HRESULT WINAPI x_store_XStoreAcquireLicenseForPackageAsync( IXStoreImpl6 *iface, const XStoreProductQueryHandle productQueryHandle, const char *packageIdentifier, XAsyncBlock *async ) +{ + FIXME( "iface %p, productQueryHandle %p, packageIdentifier %s, async %p stub!\n", iface, productQueryHandle, debugstr_a( packageIdentifier ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreAcquireLicenseForPackageResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreLicenseHandle *storeLicenseHandle ) +{ + FIXME( "iface %p, async %p, storeLicenseHandle %p stub!\n", iface, async, storeLicenseHandle ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_store_XStoreIsLicenseValid( IXStoreImpl6 *iface, const XStoreLicenseHandle storeLicenseHandle ) +{ + FIXME( "iface %p, storeLicenseHandle %p stub!\n", iface, storeLicenseHandle ); + return FALSE; +} + +static void WINAPI x_store_XStoreCloseLicenseHandle( IXStoreImpl6 *iface, XStoreLicenseHandle storeLicenseHandle ) +{ + FIXME( "iface %p, storeLicenseHandle %p stub!\n", iface, storeLicenseHandle ); +} + +static HRESULT WINAPI x_store_XStoreCanAcquireLicenseForStoreIdAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeProductId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeProductId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeProductId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreCanAcquireLicenseForStoreIdResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreCanAcquireLicenseResult *storeCanAcquireLicense ) +{ + FIXME( "iface %p, async %p, storeCanAcquireLicense %p stub!\n", iface, async, storeCanAcquireLicense ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreCanAcquireLicenseForPackageAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *packageIdentifier, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, packageIdentifier %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( packageIdentifier ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreCanAcquireLicenseForPackageResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreCanAcquireLicenseResult *storeCanAcquireLicense ) +{ + FIXME( "iface %p, async %p, storeCanAcquireLicense %p stub!\n", iface, async, storeCanAcquireLicense ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryGameLicenseAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, async %p stub!\n", iface, storeContextHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryGameLicenseResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreGameLicense *license ) +{ + FIXME( "iface %p, async %p, license %p stub!\n", iface, async, license ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAddOnLicensesAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, async %p stub!\n", iface, storeContextHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAddOnLicensesResultCount( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 *count ) +{ + FIXME( "iface %p, async %p, count %p stub!\n", iface, async, count ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAddOnLicensesResult( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 count, XStoreAddonLicense *addOnLicenses ) +{ + FIXME( "iface %p, async %p, count %u, addOnLicenses %p stub!\n", iface, async, count, addOnLicenses ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryConsumableBalanceRemainingAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeProductId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeProductId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeProductId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryConsumableBalanceRemainingResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreConsumableResult *consumableResult ) +{ + FIXME( "iface %p, async %p, consumableResult %p stub!\n", iface, async, consumableResult ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreReportConsumableFulfillmentAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeProductId, UINT32 quantity, GUID trackingId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeProductId %s, quantity %u, trackingId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeProductId ), quantity, debugstr_guid( &trackingId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreReportConsumableFulfillmentResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreConsumableResult *consumableResult ) +{ + FIXME( "iface %p, async %p, consumableResult %p stub!\n", iface, async, consumableResult ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserCollectionsIdAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *serviceTicket, const char *publisherUserId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, serviceTicket %s, userId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( serviceTicket ), debugstr_a( publisherUserId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserCollectionsIdResultSize( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T *size ) +{ + FIXME( "iface %p, async %p, size %p stub!\n", iface, async, size ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserCollectionsIdResult( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T size, char *result ) +{ + FIXME( "iface %p, async %p, size %Iu, result %p stub!\n", iface, async, size, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserPurchaseIdAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *serviceTicket, const char *publisherUserId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, serviceTicket %s, publisherUserId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( serviceTicket ), debugstr_a( publisherUserId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserPurchaseIdResultSize( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T *size ) +{ + FIXME( "iface %p, async %p, size %p stub!\n", iface, async, size ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreGetUserPurchaseIdResult( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T size, char *result ) +{ + FIXME( "iface %p, async %p, size %Iu, result %p stub!\n", iface, async, size, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryLicenseTokenAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char **productIds, SIZE_T productIdsCount, const char *customDeveloperString, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, productIdsCount %p, idsCount %Iu, custom %s, async %p stub!\n", iface, storeContextHandle, productIds, productIdsCount, debugstr_a( customDeveloperString ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryLicenseTokenResultSize( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T *size ) +{ + FIXME( "iface %p, async %p, size %p stub!\n", iface, async, size ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryLicenseTokenResult( IXStoreImpl6 *iface, XAsyncBlock *async, SIZE_T size, char *result ) +{ + FIXME( "iface %p, async %p, size %Iu, result %p stub!\n", iface, async, size, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING__( IXStoreImpl6 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_2__( IXStoreImpl6 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING_3__( IXStoreImpl6 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowPurchaseUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, const char *name, const char *extendedJsonData, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, name %s, extendedJsonData %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), debugstr_a( name ), debugstr_a( extendedJsonData ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowPurchaseUIResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowRateAndReviewUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, async %p stub!\n", iface, storeContextHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowRateAndReviewUIResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreRateAndReviewResult *result ) +{ + FIXME( "iface %p, async %p, result %p stub!\n", iface, async, result ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowRedeemTokenUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *token, const char **allowedStoreIds, SIZE_T allowedStoreIdsCount, BOOLEAN disallowCsvRedemption, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, token %s, allowedStoreIds %p, allowedStoreIdsCount %Iu, disallowCsvRedemption %d, async %p stub!\n", iface, storeContextHandle, debugstr_a( token ), allowedStoreIds, allowedStoreIdsCount, disallowCsvRedemption, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowRedeemTokenUIResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryGameAndDlcPackageUpdatesAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, async %p stub!\n", iface, storeContextHandle, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryGameAndDlcPackageUpdatesResultCount( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 *count ) +{ + FIXME( "iface %p, async %p, count %p stub!\n", iface, async, count ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryGameAndDlcPackageUpdatesResult( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 count, XStorePackageUpdate *packageUpdates ) +{ + FIXME( "iface %p, async %p, count %u, packageUpdates %p stub!\n", iface, async, count, packageUpdates ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadPackageUpdatesAsync( IXStoreImpl6 *iface, XStoreContextHandle storeContextHandle, const char **packageIdentifiers, SIZE_T packageIdentifiersCount, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, packageIdentifiers %p, packageIdentifiersCount %Iu, async %p stub!\n", iface, storeContextHandle, packageIdentifiers, packageIdentifiersCount, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadPackageUpdatesResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadAndInstallPackageUpdatesAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char **packageIdentifiers, SIZE_T packageIdentifiersCount, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, packageIdentifiers %p, packageIdentifiersCount %Iu, async %p stub!\n", iface, storeContextHandle, packageIdentifiers, packageIdentifiersCount, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadAndInstallPackageUpdatesResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadAndInstallPackagesAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char **storeIds, SIZE_T storeIdsCount, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeIds %p, storeIdsCount %Iu, async %p stub!\n", iface, storeContextHandle, storeIds, storeIdsCount, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadAndInstallPackagesResultCount( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 *count ) +{ + FIXME( "iface %p, async %p, count %p stub!\n", iface, async, count ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreDownloadAndInstallPackagesResult( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 count, char **packageIdentifiers ) +{ + FIXME( "iface %p, async %p, count %u, packageIdentifiers %p stub!\n", iface, async, count, packageIdentifiers ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryPackageIdentifier( IXStoreImpl6 *iface, const char *storeId, SIZE_T size, char *packageIdentifier ) +{ + FIXME( "iface %p, storeId %s, size %Iu, packageIdentifier %p stub!\n", iface, debugstr_a( storeId ), size, packageIdentifier ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreRegisterGameLicenseChanged( IXStoreImpl6 *iface, XStoreContextHandle storeContextHandle, XTaskQueueHandle queue, void *context, XStoreGameLicenseChangedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, storeContextHandle %p, queue %p, context %p, callback %p, token %p stub!\n", iface, storeContextHandle, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_store_XStoreUnregisterGameLicenseChanged( IXStoreImpl6 *iface, XStoreContextHandle storeContextHandle, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, storeContextHandle %p, token %p, wait %d stub!\n", iface, storeContextHandle, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_store_XStoreRegisterPackageLicenseLost( IXStoreImpl6 *iface, XStoreLicenseHandle storeLicenseHandle, XTaskQueueHandle queue, void *context, XStorePackageLicenseLostCallback *callback, XTaskQueueRegistrationToken *token) +{ + FIXME( "iface %p, storeLicenseHandle %p, queue %p, context %p, callback %p, token %p stub!\n", iface, storeLicenseHandle, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_store_XStoreUnregisterPackageLicenseLost( IXStoreImpl6 *iface, XStoreLicenseHandle licenseHandle, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, licenseHandle %p, token %p, wait %d stub!\n", iface, licenseHandle, &token, wait ); + return FALSE; +} + +static BOOLEAN WINAPI x_store_XStoreIsAvailabilityPurchasable( IXStoreImpl6 *iface, const XStoreAvailability availability ) +{ + FIXME( "iface %p, availability %p stub!\n", iface, &availability ); + return FALSE; +} + +static HRESULT WINAPI x_store_XStoreAcquireLicenseForDurablesAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreAcquireLicenseForDurablesResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreLicenseHandle *storeLicenseHandle ) +{ + FIXME( "iface %p, async %p, storeLicenseHandle %p stub!\n", iface, async, storeLicenseHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowAssociatedProductsUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, XStoreProductKind productKinds, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, productKinds %#x, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), productKinds, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowAssociatedProductsUIResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowProductPageUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowProductPageUIResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAssociatedProductsForStoreIdAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, XStoreProductKind productKinds, UINT32 maxItemsToRetrievePerPage, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, productKinds %#x, maxItemsToRetrievePerPage %u, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), productKinds, maxItemsToRetrievePerPage, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryAssociatedProductsForStoreIdResult( IXStoreImpl6 *iface, XAsyncBlock *async, XStoreProductQueryHandle *productQueryHandle ) +{ + FIXME( "iface %p, async %p, productQueryHandle %p stub!\n", iface, async, productQueryHandle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryPackageUpdatesAsync( IXStoreImpl6 *iface, XStoreContextHandle storeContextHandle, const char **packageIdentifiers, SIZE_T packageIdentifiersCount, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, packageIdentifiers %p, packageIdentifiersCount %Iu, async %p stub!\n", iface, storeContextHandle, packageIdentifiers, packageIdentifiersCount, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryPackageUpdatesResultCount( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 *count ) +{ + FIXME( "iface %p, async %p, count %p stub!\n", iface, async, count ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreQueryPackageUpdatesResult( IXStoreImpl6 *iface, XAsyncBlock *async, UINT32 count, XStorePackageUpdate *packageUpdates ) +{ + FIXME( "iface %p, async %p, count %u, packageUpdates %p stub!\n", iface, async, count, packageUpdates ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowGiftingUIAsync( IXStoreImpl6 *iface, const XStoreContextHandle storeContextHandle, const char *storeId, const char *name, const char *extendedJsonData, XAsyncBlock *async ) +{ + FIXME( "iface %p, storeContextHandle %p, storeId %s, name %s, extendedJsonData %s, async %p stub!\n", iface, storeContextHandle, debugstr_a( storeId ), debugstr_a( name ), debugstr_a( extendedJsonData ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_store_XStoreShowGiftingUIResult( IXStoreImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static const struct IXStoreImpl6Vtbl x_store_vtbl = +{ + x_store_QueryInterface, + x_store_AddRef, + x_store_Release, + /* IXStoreImpl methods */ + x_store_XStoreCreateContext, + x_store_XStoreCloseContextHandle, + x_store_XStoreQueryAssociatedProductsAsync, + x_store_XStoreQueryAssociatedProductsResult, + x_store_XStoreQueryProductsAsync, + x_store_XStoreQueryProductsResult, + x_store_XStoreQueryEntitledProductsAsync, + x_store_XStoreQueryEntitledProductsResult, + x_store_XStoreQueryProductForCurrentGameAsync, + x_store_XStoreQueryProductForCurrentGameResult, + x_store_XStoreQueryProductForPackageAsync, + x_store_XStoreQueryProductForPackageResult, + x_store_XStoreEnumerateProductsQuery, + x_store_XStoreProductsQueryHasMorePages, + x_store_XStoreProductsQueryNextPageAsync, + x_store_XStoreProductsQueryNextPageResult, + x_store_XStoreCloseProductsQueryHandle, + x_store_XStoreAcquireLicenseForPackageAsync, + x_store_XStoreAcquireLicenseForPackageResult, + x_store_XStoreIsLicenseValid, + x_store_XStoreCloseLicenseHandle, + x_store_XStoreCanAcquireLicenseForStoreIdAsync, + x_store_XStoreCanAcquireLicenseForStoreIdResult, + x_store_XStoreCanAcquireLicenseForPackageAsync, + x_store_XStoreCanAcquireLicenseForPackageResult, + x_store_XStoreQueryGameLicenseAsync, + x_store_XStoreQueryGameLicenseResult, + x_store_XStoreQueryAddOnLicensesAsync, + x_store_XStoreQueryAddOnLicensesResultCount, + x_store_XStoreQueryAddOnLicensesResult, + x_store_XStoreQueryConsumableBalanceRemainingAsync, + x_store_XStoreQueryConsumableBalanceRemainingResult, + x_store_XStoreReportConsumableFulfillmentAsync, + x_store_XStoreReportConsumableFulfillmentResult, + x_store_XStoreGetUserCollectionsIdAsync, + x_store_XStoreGetUserCollectionsIdResultSize, + x_store_XStoreGetUserCollectionsIdResult, + x_store_XStoreGetUserPurchaseIdAsync, + x_store_XStoreGetUserPurchaseIdResultSize, + x_store_XStoreGetUserPurchaseIdResult, + x_store_XStoreQueryLicenseTokenAsync, + x_store_XStoreQueryLicenseTokenResultSize, + x_store_XStoreQueryLicenseTokenResult, + __PADDING__, + __PADDING_2__, + __PADDING_3__, + x_store_XStoreShowPurchaseUIAsync, + x_store_XStoreShowPurchaseUIResult, + x_store_XStoreShowRateAndReviewUIAsync, + x_store_XStoreShowRateAndReviewUIResult, + x_store_XStoreShowRedeemTokenUIAsync, + x_store_XStoreShowRedeemTokenUIResult, + x_store_XStoreQueryGameAndDlcPackageUpdatesAsync, + x_store_XStoreQueryGameAndDlcPackageUpdatesResultCount, + x_store_XStoreQueryGameAndDlcPackageUpdatesResult, + x_store_XStoreDownloadPackageUpdatesAsync, + x_store_XStoreDownloadPackageUpdatesResult, + x_store_XStoreDownloadAndInstallPackageUpdatesAsync, + x_store_XStoreDownloadAndInstallPackageUpdatesResult, + x_store_XStoreDownloadAndInstallPackagesAsync, + x_store_XStoreDownloadAndInstallPackagesResultCount, + x_store_XStoreDownloadAndInstallPackagesResult, + x_store_XStoreQueryPackageIdentifier, + x_store_XStoreRegisterGameLicenseChanged, + x_store_XStoreUnregisterGameLicenseChanged, + x_store_XStoreRegisterPackageLicenseLost, + x_store_XStoreUnregisterPackageLicenseLost, + /* IXStoreImpl2 methods */ + x_store_XStoreIsAvailabilityPurchasable, + /* IXStoreImpl3 methods */ + x_store_XStoreAcquireLicenseForDurablesAsync, + x_store_XStoreAcquireLicenseForDurablesResult, + /* IXStoreImpl4 methods */ + x_store_XStoreShowAssociatedProductsUIAsync, + x_store_XStoreShowAssociatedProductsUIResult, + x_store_XStoreShowProductPageUIAsync, + x_store_XStoreShowProductPageUIResult, + /* IXStoreImpl5 methods */ + x_store_XStoreQueryAssociatedProductsForStoreIdAsync, + x_store_XStoreQueryAssociatedProductsForStoreIdResult, + x_store_XStoreQueryPackageUpdatesAsync, + x_store_XStoreQueryPackageUpdatesResultCount, + x_store_XStoreQueryPackageUpdatesResult, + /* IXStoreImpl6 methods */ + x_store_XStoreShowGiftingUIAsync, + x_store_XStoreShowGiftingUIResult, +}; + +static struct x_store x_store = +{ + {&x_store_vtbl}, + 0, +}; + +IXStoreImpl6 *x_store_impl = &x_store.IXStoreImpl6_iface; diff --git a/dlls/xgameruntime/GDKComponent/System/XSystem.c b/dlls/xgameruntime/GDKComponent/System/XSystem.c index a7f0a603e2b..2df0997f8b6 100644 --- a/dlls/xgameruntime/GDKComponent/System/XSystem.c +++ b/dlls/xgameruntime/GDKComponent/System/XSystem.c @@ -23,22 +23,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdkc); -static inline struct x_system *impl_from_IXSystemImpl( IXSystemImpl *iface ) +static inline struct x_system *impl_from_IXSystemImpl5( IXSystemImpl5 *iface ) { - return CONTAINING_RECORD( iface, struct x_system, IXSystemImpl_iface ); + return CONTAINING_RECORD( iface, struct x_system, IXSystemImpl5_iface ); } -static HRESULT WINAPI x_system_QueryInterface( IXSystemImpl *iface, REFIID iid, void **out ) +static HRESULT WINAPI x_system_QueryInterface( IXSystemImpl5 *iface, REFIID iid, void **out ) { - struct x_system *impl = impl_from_IXSystemImpl( iface ); + struct x_system *impl = impl_from_IXSystemImpl5( iface ); TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); if (IsEqualGUID( iid, &IID_IUnknown ) || - IsEqualGUID( iid, &IID_IXSystemImpl )) + IsEqualGUID( iid, &IID_IXSystemImpl ) || + IsEqualGUID( iid, &IID_IXSystemImpl2 ) || + IsEqualGUID( iid, &IID_IXSystemImpl3 ) || + IsEqualGUID( iid, &IID_IXSystemImpl4 ) || + IsEqualGUID( iid, &IID_IXSystemImpl5 )) { - *out = &impl->IXSystemImpl_iface; - impl->IXSystemImpl_iface.lpVtbl->AddRef( *out ); + *out = &impl->IXSystemImpl5_iface; + impl->IXSystemImpl5_iface.lpVtbl->AddRef( *out ); return S_OK; } @@ -47,23 +51,23 @@ static HRESULT WINAPI x_system_QueryInterface( IXSystemImpl *iface, REFIID iid, return E_NOINTERFACE; } -static ULONG WINAPI x_system_AddRef( IXSystemImpl *iface ) +static ULONG WINAPI x_system_AddRef( IXSystemImpl5 *iface ) { - struct x_system *impl = impl_from_IXSystemImpl( iface ); + struct x_system *impl = impl_from_IXSystemImpl5( iface ); ULONG ref = InterlockedIncrement( &impl->ref ); TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); return ref; } -static ULONG WINAPI x_system_Release( IXSystemImpl *iface ) +static ULONG WINAPI x_system_Release( IXSystemImpl5 *iface ) { - struct x_system *impl = impl_from_IXSystemImpl( iface ); + struct x_system *impl = impl_from_IXSystemImpl5( iface ); ULONG ref = InterlockedDecrement( &impl->ref ); TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); return ref; } -static HRESULT WINAPI x_system_XSystemGetConsoleId( IXSystemImpl *iface, INT32 consoleIdSize, LPSTR consoleId, SIZE_T *consoleIdUsed ) +static HRESULT WINAPI x_system_XSystemGetConsoleId( IXSystemImpl5 *iface, INT32 consoleIdSize, LPSTR consoleId, SIZE_T *consoleIdUsed ) { // For Windows, Console ID is always `00000000.00000000.00000000.00000000.00 LPCSTR Id = "00000000.00000000.00000000.00000000.00"; @@ -81,7 +85,7 @@ static HRESULT WINAPI x_system_XSystemGetConsoleId( IXSystemImpl *iface, INT32 c return S_OK; } -static HRESULT WINAPI x_system_XSystemGetXboxLiveSandboxId( IXSystemImpl *iface, INT32 sandboxIdSize, LPSTR sandboxId, SIZE_T *sandboxIdUsed ) +static HRESULT WINAPI x_system_XSystemGetXboxLiveSandboxId( IXSystemImpl5 *iface, INT32 sandboxIdSize, LPSTR sandboxId, SIZE_T *sandboxIdUsed ) { // Always assume RETAIL environment for Wine LPCSTR Id = "RETAIL"; @@ -99,42 +103,43 @@ static HRESULT WINAPI x_system_XSystemGetXboxLiveSandboxId( IXSystemImpl *iface, return S_OK; } -static HRESULT WINAPI x_system_XSystemGetAppSpecificDeviceId( IXSystemImpl *iface, INT32 appSpecificDeviceIdSize, LPSTR appSpecificDeviceId, SIZE_T *appSpecificDeviceIdUsed ) +static HRESULT WINAPI x_system_XSystemGetAppSpecificDeviceId( IXSystemImpl5 *iface, INT32 appSpecificDeviceIdSize, LPSTR appSpecificDeviceId, SIZE_T *appSpecificDeviceIdUsed ) { FIXME( "iface %p, appSpecificDeviceIdSize %d, appSpecificDeviceId %p, appSpecificDeviceIdUsed %p stub!\n", iface, appSpecificDeviceIdSize, appSpecificDeviceId, appSpecificDeviceIdUsed ); return E_NOTIMPL; } -static HRESULT WINAPI x_system_XSystemHandleTrack( IXSystemImpl *iface ) +static HRESULT WINAPI x_system_XSystemHandleTrack( IXSystemImpl5 *iface, XSystemHandleCallback *callback, void *context ) { - FIXME( "iface %p stub!\n", iface ); + FIXME( "iface %p, callback %p, context %p stub!\n", iface, callback, context ); return E_NOTIMPL; } -static BOOLEAN WINAPI x_system_XSystemIsHandleValid( IXSystemImpl *iface ) +static BOOLEAN WINAPI x_system_XSystemIsHandleValid( IXSystemImpl5 *iface, XSystemHandle handle ) { // always assume it's valid. - FIXME( "iface %p stub!\n", iface ); + FIXME( "iface %p, handle %p stub!\n", iface, handle ); return TRUE; } -static HRESULT WINAPI x_system_XSystemAllowFullDownloadBandwidth( IXSystemImpl *iface, boolean enable ) +static void WINAPI x_system_XSystemAllowFullDownloadBandwidth( IXSystemImpl5 *iface, boolean enable ) { FIXME( "iface %p, enable %d stub!\n", iface, enable ); - return E_NOTIMPL; } -static const struct IXSystemImplVtbl x_system_vtbl = +static const struct IXSystemImpl5Vtbl x_system_vtbl = { x_system_QueryInterface, x_system_AddRef, x_system_Release, - /* IXSystemImpl methods */ + /* IXSystemImpl/IXSystemImpl2 methods */ x_system_XSystemGetConsoleId, x_system_XSystemGetXboxLiveSandboxId, x_system_XSystemGetAppSpecificDeviceId, + /* IXSystemImpl3 methods */ x_system_XSystemHandleTrack, x_system_XSystemIsHandleValid, + /* IXSystemImpl4/IXSystemImpl5 methods */ x_system_XSystemAllowFullDownloadBandwidth }; @@ -144,4 +149,4 @@ static struct x_system x_system = 0, }; -IXSystemImpl *x_system_impl = &x_system.IXSystemImpl_iface; \ No newline at end of file +IXSystemImpl5 *x_system_impl = &x_system.IXSystemImpl5_iface; \ No newline at end of file diff --git a/dlls/xgameruntime/GDKComponent/System/XSystem.h b/dlls/xgameruntime/GDKComponent/System/XSystem.h index ad3ab342586..f8b24046007 100644 --- a/dlls/xgameruntime/GDKComponent/System/XSystem.h +++ b/dlls/xgameruntime/GDKComponent/System/XSystem.h @@ -28,7 +28,7 @@ struct x_system { - IXSystemImpl IXSystemImpl_iface; + IXSystemImpl5 IXSystemImpl5_iface; LONG ref; }; diff --git a/dlls/xgameruntime/GDKComponent/System/XThreading.c b/dlls/xgameruntime/GDKComponent/System/XThreading.c index ef86655a7b8..d3b11954c59 100644 --- a/dlls/xgameruntime/GDKComponent/System/XThreading.c +++ b/dlls/xgameruntime/GDKComponent/System/XThreading.c @@ -92,7 +92,7 @@ static HRESULT WINAPI x_threading_XAsyncRun( IXThreadingImpl *iface, XAsyncBlock /* --- XAsyncProvider --- */ -static HRESULT WINAPI x_threading_XAsyncBegin(IXThreadingImpl* iface, XAsyncBlock* asyncBlock, PVOID context, const PVOID identity, LPCSTR identityName, XAsyncProviderCallback* provider) +static HRESULT WINAPI x_threading_XAsyncBegin(IXThreadingImpl* iface, XAsyncBlock* asyncBlock, PVOID context, const void *identity, LPCSTR identityName, XAsyncProvider* provider) { TRACE( "iface %p, asyncBlock %p, context %p, identity %p, identityName %s, provider %p.\n", iface, asyncBlock, context, identity, identityName, provider ); return XAsyncBegin( asyncBlock, context, identity, identityName, provider ); @@ -112,12 +112,12 @@ static HRESULT WINAPI x_threading_XAsyncSchedule( IXThreadingImpl* iface, XAsync static VOID WINAPI x_threading_XAsyncComplete( IXThreadingImpl* iface, XAsyncBlock* asyncBlock, HRESULT result, SIZE_T requiredBufferSize ) { - TRACE( "iface %p, asyncBlock %p, result %#lx, requiredBufferSize %lld.\n", iface, asyncBlock, result, requiredBufferSize ); + TRACE( "iface %p, asyncBlock %p, result %#lx, requiredBufferSize %Iu.\n", iface, asyncBlock, result, requiredBufferSize ); XAsyncComplete( asyncBlock, result, requiredBufferSize ); return; } -static HRESULT WINAPI x_threading_XAsyncGetResult( IXThreadingImpl* iface, XAsyncBlock* asyncBlock, const PVOID identity, SIZE_T bufferSize, PVOID buffer, SIZE_T* bufferUsed ) +static HRESULT WINAPI x_threading_XAsyncGetResult( IXThreadingImpl* iface, XAsyncBlock* asyncBlock, const void *identity, SIZE_T bufferSize, PVOID buffer, SIZE_T* bufferUsed ) { FIXME( "iface %p stub!\n", iface ); return E_NOTIMPL; diff --git a/dlls/xgameruntime/GDKComponent/System/XUser.c b/dlls/xgameruntime/GDKComponent/System/XUser.c new file mode 100644 index 00000000000..a67c0f8effe --- /dev/null +++ b/dlls/xgameruntime/GDKComponent/System/XUser.c @@ -0,0 +1,577 @@ +/* + * Xbox Game runtime Library + * GDK Component: System API -> XUser + * + * Copyright 2026 Olivia Ryan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdkc); + +struct x_user +{ + IXUserImpl6 IXUserImpl6_iface; + IXUserGamertagImpl IXUserGamertagImpl_iface; + IXUserDeviceImpl2 IXUserDeviceImpl2_iface; + LONG ref; +}; + +static inline struct x_user *impl_from_IXUserImpl6( IXUserImpl6 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_user, IXUserImpl6_iface ); +} + +static HRESULT WINAPI x_user_QueryInterface( IXUserImpl6 *iface, REFIID iid, void **out ) +{ + struct x_user *impl = impl_from_IXUserImpl6( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXUserImpl ) || + IsEqualGUID( iid, &IID_IXUserImpl2 ) || + IsEqualGUID( iid, &IID_IXUserImpl3 ) || + IsEqualGUID( iid, &IID_IXUserImpl4 ) || + IsEqualGUID( iid, &IID_IXUserImpl5 ) || + IsEqualGUID( iid, &IID_IXUserImpl6 )) + { + IXUserImpl6_AddRef( *out = &impl->IXUserImpl6_iface ); + return S_OK; + } + + if (IsEqualGUID( iid, &IID_IXUserGamertagImpl )) + { + IXUserGamertagImpl_AddRef( *out = &impl->IXUserGamertagImpl_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_user_AddRef( IXUserImpl6 *iface ) +{ + struct x_user *impl = impl_from_IXUserImpl6( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_user_Release( IXUserImpl6 *iface ) +{ + struct x_user *impl = impl_from_IXUserImpl6( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_user_XUserDuplicateHandle( IXUserImpl6 *iface, XUserHandle handle, XUserHandle *duplicatedHandle ) +{ + FIXME( "iface %p, handle %p, duplicatedHandle %p stub!\n", iface, handle, duplicatedHandle ); + return E_NOTIMPL; +} + +static void WINAPI x_user_XUserCloseHandle( IXUserImpl6 *iface, XUserHandle user ) +{ + FIXME( "iface %p, user %p stub!\n", iface, user ); +} + +static INT32 WINAPI x_user_XUserCompare( IXUserImpl6 *iface, XUserHandle user1, XUserHandle user2 ) +{ + FIXME( "iface %p, user1 %p, user2 %p stub!\n", iface, user1, user2 ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetMaxUsers( IXUserImpl6 *iface, UINT32 *maxUsers ) +{ + TRACE( "iface %p, maxUsers %p.\n", iface, maxUsers ); + *maxUsers = 1; + return S_OK; +} + +static HRESULT WINAPI x_user_XUserAddAsync( IXUserImpl6 *iface, XUserAddOptions options, XAsyncBlock *async ) +{ + FIXME( "iface %p, options %d, async %p stub!\n", iface, options, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserAddResult( IXUserImpl6 *iface, XAsyncBlock *async, XUserHandle *newUser ) +{ + FIXME( "iface %p, async %p, newUser %p stub!\n", iface, async, newUser ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetLocalId( IXUserImpl6 *iface, XUserHandle user, XUserLocalId *userLocalId ) +{ + FIXME( "iface %p, user %p, userLocalId %p stub!\n", iface, user, userLocalId ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserFindUserByLocalId( IXUserImpl6 *iface, XUserLocalId userLocalId, XUserHandle *handle ) +{ + FIXME( "iface %p, userLocalId %p, handle %p stub!\n", iface, &userLocalId, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetId( IXUserImpl6 *iface, XUserHandle user, UINT64 *userId ) +{ + FIXME( "iface %p, user %p, userId %p stub!\n", iface, user, userId ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserFindUserById( IXUserImpl6 *iface, UINT64 userId, XUserHandle *handle ) +{ + FIXME( "iface %p, userId %llu, handle %p stub!\n", iface, userId, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetIsGuest( IXUserImpl6 *iface, XUserHandle user, BOOLEAN *isGuest ) +{ + FIXME( "iface %p, user %p, isGuest %p stub!\n", iface, user, isGuest ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetState( IXUserImpl6 *iface, XUserHandle user, XUserState *state ) +{ + FIXME( "iface %p, user %p, state %p stub!\n", iface, user, state ); + return E_NOTIMPL; +} + +static HRESULT WINAPI __PADDING__( IXUserImpl6 *iface ) +{ + WARN( "iface %p padding function called! It's unknown what this function does.\n", iface ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetGamerPictureAsync( IXUserImpl6 *iface, XUserHandle user, XUserGamerPictureSize pictureSize, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, pictureSize %d, async %p stub!\n", iface, user, pictureSize, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetGamerPictureResultSize( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T *bufferSize ) +{ + FIXME( "iface %p, async %p, bufferSize %p stub!\n", iface, async, bufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetGamerPictureResult( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T bufferSize, void *buffer, SIZE_T *bufferUsed ) +{ + FIXME( "iface %p, async %p, bufferSize %Iu, buffer %p, bufferUsed %p stub!\n", iface, async, bufferSize, buffer, bufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetAgeGroup( IXUserImpl6 *iface, XUserHandle user, XUserAgeGroup *ageGroup ) +{ + FIXME( "iface %p, user %p, ageGroup %p stub!\n", iface, user, ageGroup ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserCheckPrivilege( IXUserImpl6 *iface, XUserHandle user, XUserPrivilegeOptions options, XUserPrivilege privilege, BOOLEAN *hasPrivilege, XUserPrivilegeDenyReason *reason ) +{ + FIXME( "iface %p, user %p, options %d, privilege %d, hasPrivilege %p, reason %p stub!\n", iface, user, options, privilege, hasPrivilege, reason ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolvePrivilegeWithUiAsync( IXUserImpl6 *iface, XUserHandle user, XUserPrivilegeOptions options, XUserPrivilege privilege, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, options %d, privilege %d, async %p stub!\n", iface, user, options, privilege, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolvePrivilegeWithUiResult( IXUserImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureAsync( IXUserImpl6 *iface, XUserHandle user, XUserGetTokenAndSignatureOptions options, const char *method, const char *url, SIZE_T headerCount, const XUserGetTokenAndSignatureHttpHeader *headers, SIZE_T bodySize, const void *bodyBuffer, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, options %d, method %s, url %s, headerCount %Iu, headers %p, bodySize %Iu, bodyBuffer %p, async %p stub!\n", iface, user, options, debugstr_a( method ), debugstr_a( url ), headerCount, headers, bodySize, bodyBuffer, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureResultSize( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T *bufferSize ) +{ + FIXME( "iface %p, async %p, bufferSize %p stub!\n", iface, async, bufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureResult( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T bufferSize, void *buffer, XUserGetTokenAndSignatureData **ptrToBuffer, SIZE_T *bufferUsed ) +{ + FIXME( "iface %p, async %p, bufferSize %Iu, buffer %p, ptrToBuffer %p, bufferUsed %p stub!\n", iface, async, bufferSize, buffer, ptrToBuffer, bufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureUtf16Async( IXUserImpl6 *iface, XUserHandle user, XUserGetTokenAndSignatureOptions options, const WCHAR *method, const WCHAR *url, SIZE_T headerCount, const XUserGetTokenAndSignatureUtf16HttpHeader *headers, SIZE_T bodySize, const void *bodyBuffer, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, options %d, method %s, url %s, headerCount %Iu, headers %p, bodySize %Iu, bodyBuffer %p, async %p stub!\n", iface, user, options, debugstr_w( method ), debugstr_w( url ), headerCount, headers, bodySize, bodyBuffer, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureUtf16ResultSize( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T *bufferSize ) +{ + FIXME( "iface %p, async %p, bufferSize %p stub!\n", iface, async, bufferSize ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetTokenAndSignatureUtf16Result( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T bufferSize, void *buffer, XUserGetTokenAndSignatureUtf16Data **ptrToBuffer, SIZE_T *bufferUsed ) +{ + FIXME( "iface %p, async %p, bufferSize %Iu, buffer %p, ptrToBuffer %p, bufferUsed %p stub!\n", iface, async, bufferSize, buffer, ptrToBuffer, bufferUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolveIssueWithUiAsync( IXUserImpl6 *iface, XUserHandle user, const char *url, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, url %s, async %p stub!\n", iface, user, debugstr_a( url ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolveIssueWithUiResult( IXUserImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolveIssueWithUiUtf16Async( IXUserImpl6 *iface, XUserHandle user, const WCHAR *url, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, url %s, async %p stub!\n", iface, user, debugstr_w( url ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserResolveIssueWithUiUtf16Result( IXUserImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserRegisterForChangeEvent( IXUserImpl6 *iface, XTaskQueueHandle queue, void *context, XUserChangeEventCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_user_XUserUnregisterForChangeEvent( IXUserImpl6 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_user_XUserGetSignOutDeferral( IXUserImpl6 *iface, XUserSignOutDeferralHandle *deferral ) +{ + TRACE( "iface %p, deferral %p.\n", iface, deferral ); + *deferral = NULL; + return E_GAMEUSER_DEFERRAL_NOT_AVAILABLE; +} + +static void WINAPI x_user_XUserCloseSignOutDeferralHandle( IXUserImpl6 *iface, XUserSignOutDeferralHandle deferral ) +{ + TRACE( "iface %p, deferral %p.\n", iface, deferral ); +} + +static HRESULT WINAPI x_user_XUserAddByIdWithUiAsync( IXUserImpl6 *iface, UINT64 userId, XAsyncBlock *async ) +{ + FIXME( "iface %p, userId %llu, async %p stub!\n", iface, userId, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserAddByIdWithUiResult( IXUserImpl6 *iface, XAsyncBlock *async, XUserHandle *newUser ) +{ + FIXME( "iface %p, async %p, newUser %p stub!\n", iface, async, newUser ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetMsaTokenSilentlyAsync( IXUserImpl6 *iface, XUserHandle user, XUserGetMsaTokenSilentlyOptions options, const char *scope, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, options %u, scope %s, async %p stub!\n", iface, user, options, debugstr_a( scope ), async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetMsaTokenSilentlyResult( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T resultTokenSize, char *resultToken, SIZE_T *resultTokenUsed ) +{ + FIXME( "iface %p, async %p, resultTokenSize %Iu, resultToken %p, resultTokenUsed %p stub!\n", iface, async, resultTokenSize, resultToken, resultTokenUsed ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserGetMsaTokenSilentlyResultSize( IXUserImpl6 *iface, XAsyncBlock *async, SIZE_T *tokenSize ) +{ + FIXME( "iface %p, async %p, tokenSize %p stub!\n", iface, async, tokenSize ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_user_XUserIsStoreUser( IXUserImpl6 *iface, XUserHandle user ) +{ + FIXME( "iface %p, user %p stub!\n", iface, user ); + return TRUE; +} + +static HRESULT WINAPI x_user_XUserPlatformRemoteConnectSetEventHandlers( IXUserImpl6 *iface, XTaskQueueHandle queue, XUserPlatformRemoteConnectEventHandlers *handlers ) +{ + FIXME( "iface %p, queue %p, handlers %p stub!\n", iface, queue, handlers ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserPlatformRemoteConnectCancelPrompt( IXUserImpl6 *iface, XUserPlatformOperation operation ) +{ + FIXME( "iface %p, operation %p stub!\n", iface, operation ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserPlatformSpopPromptSetEventHandlers( IXUserImpl6 *iface, XTaskQueueHandle queue, XUserPlatformSpopPromptEventHandler *handler, void *context ) +{ + FIXME( "iface %p, queue %p, handler %p, context %p stub!\n", iface, queue, handler, context ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserPlatformSpopPromptComplete( IXUserImpl6 *iface, XUserPlatformOperation operation, XUserPlatformOperationResult result ) +{ + FIXME( "iface %p, operation %p, result %d stub!\n", iface, operation, result ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_user_XUserIsSignOutPresent( IXUserImpl6 *iface ) +{ + TRACE( "iface %p.\n", iface ); + return FALSE; +} + +static HRESULT WINAPI x_user_XUserSignOutAsync( IXUserImpl6 *iface, XUserHandle user, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, async %p stub!\n", iface, user, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_XUserSignOutResult( IXUserImpl6 *iface, XAsyncBlock *async ) +{ + FIXME( "iface %p, async %p stub!\n", iface, async ); + return E_NOTIMPL; +} + +static const struct IXUserImpl6Vtbl x_user_vtbl = +{ + x_user_QueryInterface, + x_user_AddRef, + x_user_Release, + /* IXUser methods */ + x_user_XUserDuplicateHandle, + x_user_XUserCloseHandle, + x_user_XUserCompare, + x_user_XUserGetMaxUsers, + x_user_XUserAddAsync, + x_user_XUserAddResult, + x_user_XUserGetLocalId, + x_user_XUserFindUserByLocalId, + x_user_XUserGetId, + x_user_XUserFindUserById, + x_user_XUserGetIsGuest, + x_user_XUserGetState, + __PADDING__, + x_user_XUserGetGamerPictureAsync, + x_user_XUserGetGamerPictureResultSize, + x_user_XUserGetGamerPictureResult, + x_user_XUserGetAgeGroup, + x_user_XUserCheckPrivilege, + x_user_XUserResolvePrivilegeWithUiAsync, + x_user_XUserResolvePrivilegeWithUiResult, + x_user_XUserGetTokenAndSignatureAsync, + x_user_XUserGetTokenAndSignatureResultSize, + x_user_XUserGetTokenAndSignatureResult, + x_user_XUserGetTokenAndSignatureUtf16Async, + x_user_XUserGetTokenAndSignatureUtf16ResultSize, + x_user_XUserGetTokenAndSignatureUtf16Result, + x_user_XUserResolveIssueWithUiAsync, + x_user_XUserResolveIssueWithUiResult, + x_user_XUserResolveIssueWithUiUtf16Async, + x_user_XUserResolveIssueWithUiUtf16Result, + x_user_XUserRegisterForChangeEvent, + x_user_XUserUnregisterForChangeEvent, + x_user_XUserGetSignOutDeferral, + x_user_XUserCloseSignOutDeferralHandle, + /* IXUser2 methods */ + x_user_XUserAddByIdWithUiAsync, + x_user_XUserAddByIdWithUiResult, + /* IXUser3 methods */ + x_user_XUserGetMsaTokenSilentlyAsync, + x_user_XUserGetMsaTokenSilentlyResult, + x_user_XUserGetMsaTokenSilentlyResultSize, + /* IXUser4 methods */ + x_user_XUserIsStoreUser, + /* IXUser5 methods */ + x_user_XUserPlatformRemoteConnectSetEventHandlers, + x_user_XUserPlatformRemoteConnectCancelPrompt, + x_user_XUserPlatformSpopPromptSetEventHandlers, + x_user_XUserPlatformSpopPromptComplete, + /* IXUserImpl6 methods */ + x_user_XUserIsSignOutPresent, + x_user_XUserSignOutAsync, + x_user_XUserSignOutResult, +}; + +static inline struct x_user *impl_from_IXUserGamertagImpl( IXUserGamertagImpl *iface ) +{ + return CONTAINING_RECORD( iface, struct x_user, IXUserGamertagImpl_iface ); +} + +static HRESULT WINAPI x_user_gamertag_QueryInterface( IXUserGamertagImpl *iface, REFIID riid, void **out ) +{ + struct x_user *impl = impl_from_IXUserGamertagImpl( iface ); + return IXUserImpl6_QueryInterface( &impl->IXUserImpl6_iface, riid, out ); +} + +static ULONG WINAPI x_user_gamertag_AddRef( IXUserGamertagImpl *iface ) +{ + struct x_user *impl = impl_from_IXUserGamertagImpl( iface ); + return IXUserImpl6_AddRef( &impl->IXUserImpl6_iface ); +} + +static ULONG WINAPI x_user_gamertag_Release( IXUserGamertagImpl *iface ) +{ + struct x_user *impl = impl_from_IXUserGamertagImpl( iface ); + return IXUserImpl6_Release( &impl->IXUserImpl6_iface ); +} + +static HRESULT WINAPI x_user_gamertag_XUserGetGamertag( IXUserGamertagImpl *iface, XUserHandle user, XUserGamertagComponent gamertagComponent, SIZE_T gamertagSize, char *gamertag, SIZE_T *gamertagUsed ) +{ + FIXME( "iface %p, user %p, gamertagComponent %d, gamertagSize %Iu, gamertag %p, gamertagUsed %p stub!\n", iface, user, gamertagComponent, gamertagSize, gamertag, gamertagUsed ); + return E_NOTIMPL; +} + +static const struct IXUserGamertagImplVtbl x_user_gamertag_vtbl = +{ + x_user_gamertag_QueryInterface, + x_user_gamertag_AddRef, + x_user_gamertag_Release, + /* IXUserGamertagImpl methods */ + x_user_gamertag_XUserGetGamertag, +}; + +static inline struct x_user *impl_from_IXUserDevice2( IXUserDeviceImpl2 *iface ) +{ + return CONTAINING_RECORD( iface, struct x_user, IXUserDeviceImpl2_iface ); +} + +static HRESULT WINAPI x_user_device_QueryInterface( IXUserDeviceImpl2 *iface, REFIID iid, void **out ) +{ + struct x_user *impl = impl_from_IXUserDevice2( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IXUserDeviceImpl ) || + IsEqualGUID( iid, &IID_IXUserDeviceImpl2 )) + { + IXUserDeviceImpl2_AddRef( *out = &impl->IXUserDeviceImpl2_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI x_user_device_AddRef( IXUserDeviceImpl2 *iface ) +{ + struct x_user *impl = impl_from_IXUserDevice2( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI x_user_device_Release( IXUserDeviceImpl2 *iface ) +{ + struct x_user *impl = impl_from_IXUserDevice2( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI x_user_device_XUserFindForDevice( IXUserDeviceImpl2 *iface, const APP_LOCAL_DEVICE_ID *deviceId, XUserHandle *handle ) +{ + FIXME( "iface %p, deviceId %p, handle %p stub!\n", iface, deviceId, handle ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_device_XUserRegisterForDeviceAssociationChanged( IXUserDeviceImpl2 *iface, XTaskQueueHandle queue, void *context, XUserDeviceAssociationChangedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_user_device_XUserUnregisterForDeviceAssociationChanged( IXUserDeviceImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_user_device_XUserGetDefaultAudioEndpointUtf16( IXUserDeviceImpl2 *iface, XUserLocalId user, XUserDefaultAudioEndpointKind defaultAudioEndpointKind, SIZE_T endpointIdUtf16Count, WCHAR *endpointIdUtf16, SIZE_T *endpointIdUtf16Used ) +{ + FIXME( "iface %p, user %p, defaultAudioEndpointKind %d, endpointIdUtf16Count %Iu, endpointIdUtf16 %p, endpointIdUtf16Used %p stub!\n", iface, &user, defaultAudioEndpointKind, endpointIdUtf16Count, endpointIdUtf16, endpointIdUtf16Used ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_device_XUserRegisterForDefaultAudioEndpointUtf16Changed( IXUserDeviceImpl2 *iface, XTaskQueueHandle queue, void *context, XUserDefaultAudioEndpointUtf16ChangedCallback *callback, XTaskQueueRegistrationToken *token ) +{ + FIXME( "iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token ); + return E_NOTIMPL; +} + +static BOOLEAN WINAPI x_user_device_XUserUnregisterForDefaultAudioEndpointUtf16Changed( IXUserDeviceImpl2 *iface, XTaskQueueRegistrationToken token, BOOLEAN wait ) +{ + FIXME( "iface %p, token %p, wait %d stub!\n", iface, &token, wait ); + return FALSE; +} + +static HRESULT WINAPI x_user_device_XUserFindControllerForUserWithUiAsync( IXUserDeviceImpl2 *iface, XUserHandle user, XAsyncBlock *async ) +{ + FIXME( "iface %p, user %p, async %p stub!\n", iface, user, async ); + return E_NOTIMPL; +} + +static HRESULT WINAPI x_user_device_XUserFindControllerForUserWithUiResult( IXUserDeviceImpl2 *iface, XAsyncBlock *async, APP_LOCAL_DEVICE_ID *deviceId ) +{ + FIXME( "iface %p, async %p, deviceId %p stub!\n", iface, async, deviceId ); + return E_NOTIMPL; +} + +static const struct IXUserDeviceImpl2Vtbl x_user_device_vtbl = +{ + x_user_device_QueryInterface, + x_user_device_AddRef, + x_user_device_Release, + /* IXUserDevice/IXUserDeviceImpl2 methods */ + x_user_device_XUserFindForDevice, + x_user_device_XUserRegisterForDeviceAssociationChanged, + x_user_device_XUserUnregisterForDeviceAssociationChanged, + x_user_device_XUserGetDefaultAudioEndpointUtf16, + x_user_device_XUserRegisterForDefaultAudioEndpointUtf16Changed, + x_user_device_XUserUnregisterForDefaultAudioEndpointUtf16Changed, + x_user_device_XUserFindControllerForUserWithUiAsync, + x_user_device_XUserFindControllerForUserWithUiResult, +}; + +static struct x_user x_user = +{ + {&x_user_vtbl}, + {&x_user_gamertag_vtbl}, + {&x_user_device_vtbl}, + 0, +}; + +IXUserImpl6 *x_user_impl = &x_user.IXUserImpl6_iface; +IXUserDeviceImpl2 *x_user_device_impl = &x_user.IXUserDeviceImpl2_iface; diff --git a/dlls/xgameruntime/Makefile.in b/dlls/xgameruntime/Makefile.in index b00c401eec2..6be177a13e8 100644 --- a/dlls/xgameruntime/Makefile.in +++ b/dlls/xgameruntime/Makefile.in @@ -1,21 +1,34 @@ -IMPORTS = user32 advapi32 crypt32 combase winhttp +IMPORTS = user32 advapi32 crypt32 combase shell32 winhttp MODULE = xgameruntime.dll SOURCES = \ - main.c \ - provider.idl \ - \ GDKComponent/InitInternalGDKC.c \ - \ - GDKComponent/System/XSystem.c \ - GDKComponent/System/XThreading.c \ - GDKComponent/System/Threading/XTaskQueue.c \ - GDKComponent/System/Threading/XAsync.c \ + GDKComponent/System/Networking/HTTPClient.c \ + GDKComponent/System/Networking/XNetworking.c \ GDKComponent/System/Threading/AtomicVector.c \ - GDKComponent/System/Threading/XOSThreading.c \ GDKComponent/System/Threading/ThreadPool.c \ - GDKComponent/System/XSystemAnalytics.c \ + GDKComponent/System/Threading/XAsync.c \ + GDKComponent/System/Threading/XOSThreading.c \ + GDKComponent/System/Threading/XTaskQueue.c \ + GDKComponent/System/XAccessibility.c \ + GDKComponent/System/XAppCapture.c \ + GDKComponent/System/XError.c \ + GDKComponent/System/XGame.c \ + GDKComponent/System/XGameActivation.c \ + GDKComponent/System/XGameEvent.c \ + GDKComponent/System/XGameInvite.c \ + GDKComponent/System/XGameProtocol.c \ GDKComponent/System/XGameRuntimeFeature.c \ - GDKComponent/System/Networking/HTTPClient.c \ - GDKComponent/System/Networking/XNetworking.c + GDKComponent/System/XGameSave.c \ + GDKComponent/System/XGameStreaming.c \ + GDKComponent/System/XGameUi.c \ + GDKComponent/System/XLauncher.c \ + GDKComponent/System/XPackage.c \ + GDKComponent/System/XPersistentLocalStorage.c \ + GDKComponent/System/XStore.c \ + GDKComponent/System/XSystem.c \ + GDKComponent/System/XSystemAnalytics.c \ + GDKComponent/System/XThreading.c \ + GDKComponent/System/XUser.c \ + main.c diff --git a/dlls/xgameruntime/main.c b/dlls/xgameruntime/main.c index f92911ec8c3..9de27fd2163 100644 --- a/dlls/xgameruntime/main.c +++ b/dlls/xgameruntime/main.c @@ -121,15 +121,12 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved ) return TRUE; } -typedef HRESULT (WINAPI *InitializeApiImplEx2_ext)( ULONG gdkVer, ULONG gsVer, CHAR mode, INITIALIZE_OPTIONS *options ); +typedef HRESULT (WINAPI *InitializeApiImplEx2_ext)( ULONG gdkVer, ULONG gsVer, CHAR mode, const XGameRuntimeOptions *options ); -HRESULT WINAPI InitializeApiImplEx2( ULONG gdkVer, ULONG gsVer, CHAR mode, INITIALIZE_OPTIONS *options ) +HRESULT WINAPI InitializeApiImplEx2( ULONG gdkVer, ULONG gsVer, CHAR mode, const XGameRuntimeOptions *options ) { // Initialization can be done however we want on our side. // You can choose to return `S_OK` once the full SDK is implemented. - // - // There's no documented information about what `INITIALIZE_OPTIONS` is, - // and xgameruntime.lib never utilizes this argument anyway. TRACE("gdkVer %ld, gsVer %ld, mode %d, options %p stub!\n", gdkVer, gsVer, mode, options); return GDKC_InitAPI( gdkVer, gsVer, mode, options ); } @@ -146,7 +143,7 @@ HRESULT WINAPI InitializeApiImpl( ULONG gdkVer, ULONG gsVer ) return InitializeApiImplEx2( gdkVer, gsVer, 0, NULL ); } -typedef HRESULT (WINAPI *QueryApiImpl_ext)( GUID *runtimeClassId, REFIID interfaceId, void **out ); +typedef HRESULT (WINAPI *QueryApiImpl_ext)( const GUID *runtimeClassId, REFIID interfaceId, void **out ); HRESULT WINAPI QueryApiImpl( const GUID *runtimeClassId, REFIID interfaceId, void **out ) { @@ -178,19 +175,13 @@ HRESULT WINAPI QueryApiImpl( const GUID *runtimeClassId, REFIID interfaceId, voi TRACE("runtimeClassId %s, interfaceId %s, out %p\n", debugstr_guid(runtimeClassId), debugstr_guid(interfaceId), out); - if ( IsEqualGUID( runtimeClassId, &CLSID_XSystemImpl ) ) - { - return IXSystemImpl_QueryInterface( x_system_impl, interfaceId, out ); - } - else if ( IsEqualGUID( runtimeClassId, &CLSID_XGameRuntimeFeatureImpl ) ) - { + if (IsEqualGUID( runtimeClassId, &CLSID_XSystemImpl )) + return IXSystemImpl5_QueryInterface( x_system_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameRuntimeFeatureImpl )) return IXGameRuntimeFeatureImpl_QueryInterface( x_game_runtime_feature_impl, interfaceId, out ); - } - else if ( IsEqualGUID( runtimeClassId, &CLSID_XSystemAnalyticsImpl ) ) - { + if (IsEqualGUID( runtimeClassId, &CLSID_XSystemAnalyticsImpl )) return IXSystemAnalyticsImpl_QueryInterface( x_system_analytics_impl, interfaceId, out ); - } - else if ( IsEqualGUID( runtimeClassId, &CLSID_XThreadingImpl ) ) + if (IsEqualGUID( runtimeClassId, &CLSID_XThreadingImpl )) { /** * For IXThreading, It's much better to use the native library instead. @@ -206,11 +197,47 @@ HRESULT WINAPI QueryApiImpl( const GUID *runtimeClassId, REFIID interfaceId, voi } return func( runtimeClassId, interfaceId, out ); } - else if ( IsEqualGUID( runtimeClassId, &CLSID_XNetworkingImpl ) ) - { - return IXNetworkingImpl_QueryInterface( x_networking_impl, interfaceId, out ); - } - + if (IsEqualGUID( runtimeClassId, &CLSID_XNetworkingImpl )) + return IXNetworkingImpl2_QueryInterface( x_networking_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XAccessibilityImpl )) + return IXAccessibilityImpl2_QueryInterface( x_accessibility_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XUserImpl )) + return IXUserImpl6_QueryInterface( x_user_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XUserDeviceImpl )) + return IXUserDeviceImpl2_QueryInterface( x_user_device_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XAppCaptureImpl )) + return IXAppCaptureImpl_QueryInterface( x_app_capture_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XAppCaptureImpl2 )) + return IXAppCaptureImpl5_QueryInterface( x_app_capture2_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XDisplayImpl )) + return IXDisplayImpl_QueryInterface( x_display_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XLauncherImpl )) + return IXLauncherImpl_QueryInterface( x_launcher_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XErrorImpl )) + return IXErrorImpl_QueryInterface( x_error_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameImpl )) + return IXGameImpl3_QueryInterface( x_game_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameActivationImpl )) + return IXGameActivationImpl_QueryInterface( x_game_activation_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameEventImpl )) + return IXGameEventImpl_QueryInterface( x_game_event_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameInviteImpl )) + return IXGameInviteImpl2_QueryInterface( x_game_invite_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameProtocolImpl )) + return IXGameProtocolImpl_QueryInterface( x_game_protocol_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameSaveImpl )) + return IXGameSaveImpl3_QueryInterface( x_game_save_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameStreamingImpl )) + return IXGameStreamingImpl3_QueryInterface( x_game_streaming_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XGameUiImpl )) + return IXGameUiImpl4_QueryInterface( x_game_ui_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XPackageImpl )) + return IXPackageImpl3_QueryInterface( x_package_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XPersistentLocalStorageImpl )) + return IXPersistentLocalStorageImpl3_QueryInterface( x_persistent_local_storage_impl, interfaceId, out ); + if (IsEqualGUID( runtimeClassId, &CLSID_XStoreImpl )) + return IXStoreImpl6_QueryInterface( x_store_impl, interfaceId, out ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( runtimeClassId ) ); return E_NOTIMPL; } diff --git a/dlls/xgameruntime/private.h b/dlls/xgameruntime/private.h index 2ff793affb3..8fd8f6875ed 100644 --- a/dlls/xgameruntime/private.h +++ b/dlls/xgameruntime/private.h @@ -22,19 +22,17 @@ #define __WINE_XGAMERUNTIME_PRIVATE_H #define COBJMACROS +#include #include #include #include #include #include -#include +#include #include -#include "provider.h" #include "wine/debug.h" -#include "xthread.h" -#include "xnetwork.h" #define WIDL_using_Windows_Foundation #define WIDL_using_Windows_Foundation_Collections @@ -44,20 +42,30 @@ #define WIDL_using_Windows_System_Profile #include "windows.system.profile.h" -// October 2025 Release of GDK -#define GDKC_VERSION 10002L -#define GAMING_SERVICES_VERSION 4429L - -extern IXSystemImpl *x_system_impl; +extern IXSystemImpl5 *x_system_impl; extern IXSystemAnalyticsImpl *x_system_analytics_impl; extern IXThreadingImpl *x_threading_impl; extern IXGameRuntimeFeatureImpl *x_game_runtime_feature_impl; -extern IXNetworkingImpl *x_networking_impl; - -typedef struct _INITIALIZE_OPTIONS -{ - int unused; -} INITIALIZE_OPTIONS; +extern IXNetworkingImpl2 *x_networking_impl; +extern IXAccessibilityImpl2 *x_accessibility_impl; +extern IXUserImpl6 *x_user_impl; +extern IXUserDeviceImpl2 *x_user_device_impl; +extern IXAppCaptureImpl *x_app_capture_impl; +extern IXAppCaptureImpl5 *x_app_capture2_impl; +extern IXDisplayImpl *x_display_impl; +extern IXLauncherImpl *x_launcher_impl; +extern IXErrorImpl *x_error_impl; +extern IXGameImpl3 *x_game_impl; +extern IXGameActivationImpl *x_game_activation_impl; +extern IXGameEventImpl *x_game_event_impl; +extern IXGameInviteImpl2 *x_game_invite_impl; +extern IXGameProtocolImpl *x_game_protocol_impl; +extern IXGameSaveImpl3 *x_game_save_impl; +extern IXGameStreamingImpl3 *x_game_streaming_impl; +extern IXGameUiImpl4 *x_game_ui_impl; +extern IXPackageImpl3 *x_package_impl; +extern IXPersistentLocalStorageImpl3 *x_persistent_local_storage_impl; +extern IXStoreImpl6 *x_store_impl; // Deference is for other modules to communicate with eachother through the same binary. HRESULT WINAPI QueryApiImpl( const GUID *runtimeClassId, REFIID interfaceId, void **out ); diff --git a/dlls/xgameruntime/provider.idl b/dlls/xgameruntime/provider.idl deleted file mode 100644 index 52a837fcb89..00000000000 --- a/dlls/xgameruntime/provider.idl +++ /dev/null @@ -1,188 +0,0 @@ -/* - * xgameruntime.dll implementation - * - * Written by Weather - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma makedep header - -import "propidl.idl"; - -// --- xgameruntime --- // -typedef void* XSystemHandle; - -typedef enum XSystemHandleType XSystemHandleType; -typedef enum XSystemHandleCallbackReason XSystemHandleCallbackReason; -typedef enum XGameRuntimeFeature XGameRuntimeFeature; - -typedef struct XVersion XVersion; -typedef struct XSystemAnalyticsInfo XSystemAnalyticsInfo; - -interface IWineAsyncWorkImpl; -interface IXSystemImpl; -interface IXSystemAnalyticsImpl; -interface IXGameRuntimeFeatureImpl; - -coclass XSystemImpl; -coclass XSystemAnalyticsImpl; -coclass XGameRuntimeFeatureImpl; - -enum XSystemHandleType -{ - AppCaptureScreenshotStream = 0x00, - DisplayTimeoutDeferral = 0x01, - GameSaveContainer = 0x02, - GameSaveProvider = 0x03, - GameSaveUpdate = 0x04, - PackageInstallationMonitor = 0x05, - PackageMount = 0x06, - SpeechSynthesizer = 0x07, - SpeechSynthesizerStream = 0x08, - StoreContext = 0x09, - StoreLicense = 0x0a, - StoreProductQuery = 0x0b, - TaskQueue = 0x0c, - User = 0x0d, - UserSignOutDeferral = 0x0e, - GameUiTextEntry = 0x0f -}; - -enum XGameRuntimeFeature -{ - XAccessibility = 0, - XAppCapture = 1, - XAsync = 2, - XAsyncProvider = 3, - XDisplay = 4, - XGame = 5, - XGameInvite = 6, - XGameSave = 7, - XGameUI = 8, - XLauncher = 9, - XNetworking = 10, - XPackage = 11, - XPersistentLocalStorage = 12, - XSpeechSynthesizer = 13, - XStore = 14, - XSystem = 15, - XTaskQueue = 16, - XThread = 17, - XUser = 18, - XError = 19, - XGameEvent = 20, - XGameStreaming = 21, -}; - -enum XSystemHandleCallbackReason -{ - Created = 0x00, - Destroyed = 0x01 -}; - -struct XVersion { - union - { - struct - { - UINT16 major; - UINT16 minor; - UINT16 build; - UINT16 revision; - }; - UINT64 Value; - }; -}; - -struct XSystemAnalyticsInfo -{ - XVersion osVersion; - XVersion hostingOsVersion; - CHAR family[64]; - CHAR form[64]; -}; - -[ - object, - uuid(7664288b-54e9-45f9-af0b-b4ad047fa194) -] -interface IWineAsyncWorkImpl : IUnknown -{ - -} - -[ - object, - uuid(dadc2895-34b0-4ef5-a83e-45114d629b80) -] -interface IXSystemImpl : IUnknown -{ - HRESULT XSystemGetConsoleId( [in] INT32 consoleIdSize, [out, size_is(consoleIdSize)] LPSTR consoleId, [out] SIZE_T *consoleIdUsed ); - HRESULT XSystemGetXboxLiveSandboxId( [in] INT32 sandboxIdSize, [out, size_is(sandboxIdSize)] LPSTR sandboxId, [out] SIZE_T *sandboxIdUsed ); - HRESULT XSystemGetAppSpecificDeviceId( [in] INT32 appSpecificDeviceIdSize, [out, size_is(appSpecificDeviceIdSize)] LPSTR appSpecificDeviceId, [out] SIZE_T *appSpecificDeviceIdUsed ); - /* - * BUG: You cannot have function pointer parameters within COM declared interfaces, - * yet Microsoft, in their infinite wisdom, declared function pointers within the 2 - * functions below, within a COM interface. Unfortunately no workaround can be found - * unless we transition to a WinRT codebase. - */ - HRESULT XSystemHandleTrack( /* [in] XSystemHandleCallback callback, [in] void *context */ ); - BOOLEAN XSystemIsHandleValid( /* [in] XSystemHandleCallback callback */ ); - HRESULT XSystemAllowFullDownloadBandwidth( [in] boolean enable ); -} - -[ - object, - uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) -] -interface IXSystemAnalyticsImpl : IUnknown -{ - XSystemAnalyticsInfo XSystemGetAnalyticsInfo(); -} - -[ - object, - uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) -] -interface IXGameRuntimeFeatureImpl : IUnknown -{ - BOOLEAN XGameRuntimeIsFeatureAvailable( [in] XGameRuntimeFeature feature ); -} - -[ - uuid(e349bd1a-fc20-4e40-b99c-4178cc6b409f) -] -coclass XSystemImpl -{ - [default] interface IXSystemImpl; -} - -[ - uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) -] -coclass XSystemAnalyticsImpl -{ - [default] interface IXSystemAnalyticsImpl; -} - -[ - uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) -] -coclass XGameRuntimeFeatureImpl -{ - [default] interface IXGameRuntimeFeatureImpl; -} - diff --git a/dlls/xgameruntime/tests/Makefile.in b/dlls/xgameruntime/tests/Makefile.in index 578d9b6c18e..cbcb2528449 100644 --- a/dlls/xgameruntime/tests/Makefile.in +++ b/dlls/xgameruntime/tests/Makefile.in @@ -2,5 +2,4 @@ TESTDLL = xgameruntime.dll IMPORTS = user32 advapi32 combase SOURCES = \ - provider.idl \ xgameruntime.c diff --git a/dlls/xgameruntime/tests/provider.idl b/dlls/xgameruntime/tests/provider.idl deleted file mode 100644 index 046c60d372c..00000000000 --- a/dlls/xgameruntime/tests/provider.idl +++ /dev/null @@ -1,192 +0,0 @@ -/* - * xgameruntime.dll implementation - * - * Written by Weather - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma makedep header - -import "propidl.idl"; - -cpp_quote("#include ") - -// --- xgameruntime --- // -typedef void* XSystemHandle; - -typedef enum XSystemHandleType XSystemHandleType; -typedef enum XSystemHandleCallbackReason XSystemHandleCallbackReason; -typedef enum XGameRuntimeFeature XGameRuntimeFeature; - -typedef struct XVersion XVersion; -typedef struct XSystemAnalyticsInfo XSystemAnalyticsInfo; - -/* type-pruning version of XAsyncCompletionRoutine */ - -interface IWineAsyncWorkImpl; -interface IXSystemImpl; -interface IXSystemAnalyticsImpl; -interface IXGameRuntimeFeatureImpl; - -coclass XSystemImpl; -coclass XSystemAnalyticsImpl; -coclass XGameRuntimeFeatureImpl; - -enum XSystemHandleType -{ - AppCaptureScreenshotStream = 0x00, - DisplayTimeoutDeferral = 0x01, - GameSaveContainer = 0x02, - GameSaveProvider = 0x03, - GameSaveUpdate = 0x04, - PackageInstallationMonitor = 0x05, - PackageMount = 0x06, - SpeechSynthesizer = 0x07, - SpeechSynthesizerStream = 0x08, - StoreContext = 0x09, - StoreLicense = 0x0a, - StoreProductQuery = 0x0b, - TaskQueue = 0x0c, - User = 0x0d, - UserSignOutDeferral = 0x0e, - GameUiTextEntry = 0x0f -}; - -enum XGameRuntimeFeature -{ - XAccessibility = 0, - XAppCapture = 1, - XAsync = 2, - XAsyncProvider = 3, - XDisplay = 4, - XGame = 5, - XGameInvite = 6, - XGameSave = 7, - XGameUI = 8, - XLauncher = 9, - XNetworking = 10, - XPackage = 11, - XPersistentLocalStorage = 12, - XSpeechSynthesizer = 13, - XStore = 14, - XSystem = 15, - XTaskQueue = 16, - XThread = 17, - XUser = 18, - XError = 19, - XGameEvent = 20, - XGameStreaming = 21, -}; - -enum XSystemHandleCallbackReason -{ - Created = 0x00, - Destroyed = 0x01 -}; - -struct XVersion { - union - { - struct - { - UINT16 major; - UINT16 minor; - UINT16 build; - UINT16 revision; - }; - UINT64 Value; - }; -}; - -struct XSystemAnalyticsInfo -{ - XVersion osVersion; - XVersion hostingOsVersion; - CHAR family[64]; - CHAR form[64]; -}; - -[ - object, - uuid(7664288b-54e9-45f9-af0b-b4ad047fa194) -] -interface IWineAsyncWorkImpl : IUnknown -{ - -} - -[ - object, - uuid(dadc2895-34b0-4ef5-a83e-45114d629b80) -] -interface IXSystemImpl : IUnknown -{ - HRESULT XSystemGetConsoleId( [in] INT32 consoleIdSize, [out, size_is(consoleIdSize)] LPSTR consoleId, [out] SIZE_T *consoleIdUsed ); - HRESULT XSystemGetXboxLiveSandboxId( [in] INT32 sandboxIdSize, [out, size_is(sandboxIdSize)] LPSTR sandboxId, [out] SIZE_T *sandboxIdUsed ); - HRESULT XSystemGetAppSpecificDeviceId( [in] INT32 appSpecificDeviceIdSize, [out, size_is(appSpecificDeviceIdSize)] LPSTR appSpecificDeviceId, [out] SIZE_T *appSpecificDeviceIdUsed ); - /* - * BUG: You cannot have function pointer parameters within COM declared interfaces, - * yet Microsoft, in their infinite wisdom, declared function pointers within the 2 - * functions below, within a COM interface. Unfortunately no workaround can be found - * unless we transition to a WinRT codebase. - */ - HRESULT XSystemHandleTrack( /* [in] XSystemHandleCallback callback, [in] void *context */ ); - BOOLEAN XSystemIsHandleValid( /* [in] XSystemHandleCallback callback */ ); - HRESULT XSystemAllowFullDownloadBandwidth( [in] boolean enable ); -} - -[ - object, - uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) -] -interface IXSystemAnalyticsImpl : IUnknown -{ - XSystemAnalyticsInfo XSystemGetAnalyticsInfo(); -} - -[ - object, - uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) -] -interface IXGameRuntimeFeatureImpl : IUnknown -{ - BOOLEAN XGameRuntimeIsFeatureAvailable( [in] XGameRuntimeFeature feature ); -} - -[ - uuid(e349bd1a-fc20-4e40-b99c-4178cc6b409f) -] -coclass XSystemImpl -{ - [default] interface IXSystemImpl; -} - -[ - uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) -] -coclass XSystemAnalyticsImpl -{ - [default] interface IXSystemAnalyticsImpl; -} - -[ - uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) -] -coclass XGameRuntimeFeatureImpl -{ - [default] interface IXGameRuntimeFeatureImpl; -} - diff --git a/dlls/xgameruntime/tests/xgameruntime.c b/dlls/xgameruntime/tests/xgameruntime.c index 2359364b777..eae69a01f74 100644 --- a/dlls/xgameruntime/tests/xgameruntime.c +++ b/dlls/xgameruntime/tests/xgameruntime.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #define COBJMACROS @@ -28,11 +29,9 @@ #include #include #include -#include +#include -#include "provider.h" #include "wine/test.h" -#include "xthread.h" #define WIDL_using_Windows_Foundation #define WIDL_using_Windows_Foundation_Collections @@ -42,10 +41,6 @@ #define WIDL_using_Windows_System_Profile #include "windows.system.profile.h" -// April 2025 Release of GDK -#define GDKC_VERSION 10001L -#define GAMING_SERVICES_VERSION 3181L - static HMODULE xgameruntime = NULL; typedef HRESULT (*InitializeApiImpl)( ULONG gdkVer, ULONG gsVer ); @@ -84,12 +79,12 @@ static inline HRESULT CALLBACK XAsyncProvider_testCallback( XAsyncOp op, const X switch ( op ) { - case Begin: + case XAsyncOp_Begin: trace( "Begin invoked\n" ); IXThreadingImpl_XAsyncComplete( xthreading, data->async, S_OK, 0 ); return S_OK; - case DoWork: + case XAsyncOp_DoWork: trace( "DoWork invoked\n" ); IXThreadingImpl_XAsyncComplete( xthreading, data->async, E_PENDING, 0 ); testData = (LPSTR)malloc( testDataSize * sizeof( CHAR ) ); @@ -97,17 +92,17 @@ static inline HRESULT CALLBACK XAsyncProvider_testCallback( XAsyncOp op, const X IXThreadingImpl_XAsyncComplete( xthreading, data->async, S_OK, testDataSize ); return S_OK; - case GetResult: + case XAsyncOp_GetResult: trace( "GetResult invoked\n" ); memcpy( data->buffer, (void *)testData, testDataSize); return S_OK; - case Cancel: + case XAsyncOp_Cancel: trace( "Cancel invoked\n" ); IXThreadingImpl_XAsyncComplete( xthreading, data->async, E_ABORT, 0 ); return S_OK; - case Cleanup: + case XAsyncOp_Cleanup: trace( "Cleanup invoked\n" ); free( testData ); return S_OK; @@ -146,19 +141,27 @@ static void test_GDKComponentInit(void) static void test_XSystem(void) { - IXSystemImpl *xsystem; + IXSystemImpl4 *xsystem4 = NULL; + IXSystemImpl3 *xsystem3 = NULL; + IXSystemImpl *xsystem = NULL; BOOLEAN validHandle; HRESULT hr; SIZE_T consoleIdUsed; SIZE_T sandboxIdUsed; + SIZE_T deviceIdUsed; LPSTR consoleId; LPSTR sandboxId; + LPSTR deviceId; hr = QueryApiImpl_fun( &CLSID_XSystemImpl, &IID_IXSystemImpl, (void **)&xsystem ); ok( hr == S_OK, "got hr %#lx.\n", hr ); check_interface( xsystem, &IID_IUnknown, TRUE ); check_interface( xsystem, &IID_IXSystemImpl, TRUE ); + check_interface( xsystem, &IID_IXSystemImpl2, TRUE ); + check_interface( xsystem, &IID_IXSystemImpl3, TRUE ); + check_interface( xsystem, &IID_IXSystemImpl4, TRUE ); + check_interface( xsystem, &IID_IXSystemImpl5, TRUE ); /** * xgameruntime.lib::XSystemGetConsoleId @@ -168,7 +171,8 @@ static void test_XSystem(void) hr = IXSystemImpl_XSystemGetConsoleId( xsystem, XSystemConsoleIdBytes, consoleId, &consoleIdUsed ); ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( strcmp( consoleId, "00000000.00000000.00000000.00000000.00" ) == 0, "unexpected consoleId. got %s.\n", debugstr_a( consoleId ) ); - ok( consoleIdUsed == XSystemConsoleIdBytes, "unexpected consoleIdUsed. got %lld.\n", consoleIdUsed ); + ok( consoleIdUsed == XSystemConsoleIdBytes, "unexpected consoleIdUsed. got %Iu.\n", consoleIdUsed ); + free( consoleId ); /** * xgameruntime.lib::XSystemGetXboxLiveSandboxId @@ -178,35 +182,47 @@ static void test_XSystem(void) hr = IXSystemImpl_XSystemGetXboxLiveSandboxId( xsystem, XSystemXboxLiveSandboxIdMaxBytes, sandboxId, &sandboxIdUsed ); ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( strcmp( sandboxId, "RETAIL" ) == 0, "unexpected sandboxId. got %s.\n", debugstr_a( sandboxId ) ); - ok( sandboxIdUsed == XSystemXboxLiveSandboxIdBytes, "unexpected sandboxIdUsed. got %lld.\n", sandboxIdUsed ); + ok( sandboxIdUsed == XSystemXboxLiveSandboxIdBytes, "unexpected sandboxIdUsed. got %Iu.\n", sandboxIdUsed ); + free( sandboxId ); /** * xgameruntime.lib::XSystemGetAppSpecificDeviceId */ - hr = IXSystemImpl_XSystemGetAppSpecificDeviceId( xsystem, XSystemAppSpecificDeviceIdBytes, NULL, NULL ); + deviceId = (LPSTR)malloc( XSystemAppSpecificDeviceIdBytes * sizeof(char) ); + + hr = IXSystemImpl_XSystemGetAppSpecificDeviceId( xsystem, XSystemAppSpecificDeviceIdBytes, deviceId, &deviceIdUsed ); todo_wine ok( hr == S_OK, "got error %#lx.\n", hr ); + ok( deviceIdUsed == XSystemAppSpecificDeviceIdBytes, "unexpected deviceIdUsed. got %Iu.\n", deviceIdUsed ); + free( deviceId ); + + hr = IXSystemImpl_QueryInterface( xsystem, &IID_IXSystemImpl3, (void **)&xsystem3 ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + IXSystemImpl_Release( xsystem ); + if (!xsystem3) return; /** * xgameruntime.lib::XSystemHandleTrack */ - hr = IXSystemImpl_XSystemHandleTrack( xsystem ); + hr = IXSystemImpl3_XSystemHandleTrack( xsystem3, NULL, NULL ); todo_wine ok( hr == S_OK, "got error %#lx.\n", hr ); /** * xgameruntime.lib::XSystemIsHandleValid */ - validHandle = IXSystemImpl_XSystemIsHandleValid( xsystem ); + validHandle = IXSystemImpl3_XSystemIsHandleValid( xsystem3, NULL ); ok( validHandle, "got validHandle %d\n", validHandle ); + hr = IXSystemImpl3_QueryInterface( xsystem3, &IID_IXSystemImpl4, (void **)&xsystem4 ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + IXSystemImpl3_Release( xsystem3 ); + if (!xsystem4) return; + /** * xgameruntime.lib::XSystemAllowFullDownloadBandwidth */ - hr = IXSystemImpl_XSystemAllowFullDownloadBandwidth( xsystem, TRUE ); - todo_wine ok( hr == S_OK, "got error %#lx.\n", hr ); + IXSystemImpl4_XSystemAllowFullDownloadBandwidth( xsystem4, TRUE ); IXSystemImpl_Release( xsystem ); - free( consoleId ); - free( sandboxId ); } static void test_XSystemAnalytics(void) @@ -276,7 +292,7 @@ static void test_XGameRuntimeFeature(void) /** * xgameruntime.lib::XGameRuntimeIsFeatureAvailable */ - isAvailable = IXGameRuntimeFeatureImpl_XGameRuntimeIsFeatureAvailable( xgame_runtime_feature, XGame ); + isAvailable = IXGameRuntimeFeatureImpl_XGameRuntimeIsFeatureAvailable( xgame_runtime_feature, XGameRuntimeFeature_XGame ); ok( isAvailable, "got unexpected isAvailable %d.\n", isAvailable ); IXGameRuntimeFeatureImpl_Release( xgame_runtime_feature ); @@ -309,7 +325,7 @@ static void test_XThreading(void) currentBlock.callback = NULL; currentBlock.queue = NULL; - hr = IXThreadingImpl_XTaskQueueCreate( xthreading, Manual, Manual, &taskHandle ); + hr = IXThreadingImpl_XTaskQueueCreate( xthreading, XTaskQueueDispatchMode_Manual, XTaskQueueDispatchMode_Manual, &taskHandle ); ok( hr == S_OK, "got hr %#lx.\n", hr ); IXThreadingImpl_XTaskQueueSetCurrentProcessTaskQueue( xthreading, taskHandle ); @@ -345,7 +361,7 @@ static void test_XThreading(void) */ hr = IXThreadingImpl_XAsyncGetResultSize( xthreading, ¤tBlock, &receivedBufferSize ); ok( hr == S_OK, "got hr %#lx.\n", hr ); - ok( receivedBufferSize == 7, "unexpected receivedBufferSize %lld.\b", receivedBufferSize ); + ok( receivedBufferSize == 7, "unexpected receivedBufferSize %Iu\n.\b", receivedBufferSize ); receivedBuffer = (LPSTR)malloc( receivedBufferSize ); @@ -354,11 +370,431 @@ static void test_XThreading(void) */ hr = IXThreadingImpl_XAsyncGetResult( xthreading, ¤tBlock, NULL, receivedBufferSize, (PVOID)receivedBuffer, &bufferUsed ); ok( hr == S_OK, "got hr %#lx.\n", hr ); - ok( bufferUsed == 7, "unexpected bufferUsed %lld.\b", bufferUsed ); + ok( bufferUsed == 7, "unexpected bufferUsed %Iu.\b", bufferUsed ); ok( strcmp( receivedBuffer, "foobar" ) == 0, "unexpected receivedBuffer %s.\n", debugstr_a( receivedBuffer ) ); } } +static void test_XNetworking(void) +{ + IXNetworkingImpl *xnetworking; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XNetworkingImpl, &IID_IXNetworkingImpl, (void **)&xnetworking ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + check_interface( xnetworking, &IID_IUnknown, TRUE ); + check_interface( xnetworking, &IID_IXNetworkingImpl, TRUE ); + flaky check_interface( xnetworking, &IID_IXNetworkingImpl2, TRUE ); + + IXNetworkingImpl_Release( xnetworking ); +} + +static void test_XAccessibility(void) +{ + IXAccessibilityImpl *xaccessibility = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XAccessibilityImpl, &IID_IXAccessibilityImpl, (void **)&xaccessibility ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XAccessibilityImpl ) ); + return; + } + if (!xaccessibility) return; + + check_interface( xaccessibility, &IID_IUnknown, TRUE ); + check_interface( xaccessibility, &IID_IXAccessibilityImpl, TRUE ); + flaky check_interface( xaccessibility, &IID_IXAccessibilityImpl2, TRUE ); + + IXAccessibilityImpl_Release( xaccessibility ); +} + +static void test_XUser(void) +{ + IXUserImpl *xuser = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XUserImpl, &IID_IXUserImpl, (void **)&xuser ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XUserImpl ) ); + return; + } + if (!xuser) return; + + check_interface( xuser, &IID_IUnknown, TRUE ); + check_interface( xuser, &IID_IXUserImpl, TRUE ); + flaky check_interface( xuser, &IID_IXUserImpl2, TRUE ); + flaky check_interface( xuser, &IID_IXUserImpl3, TRUE ); + flaky check_interface( xuser, &IID_IXUserImpl4, TRUE ); + flaky check_interface( xuser, &IID_IXUserImpl5, TRUE ); + flaky check_interface( xuser, &IID_IXUserImpl6, TRUE ); + flaky check_interface( xuser, &IID_IXUserGamertagImpl, TRUE ); + + IXUserImpl_Release( xuser ); +} + +static void test_XUserDevice(void) +{ + IXUserDeviceImpl *xuserdevice = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XUserDeviceImpl, &IID_IXUserDeviceImpl, (void **)&xuserdevice ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XUserDeviceImpl ) ); + return; + } + if (!xuserdevice) return; + + check_interface( xuserdevice, &IID_IUnknown, TRUE ); + check_interface( xuserdevice, &IID_IXUserDeviceImpl, TRUE ); + flaky check_interface( xuserdevice, &IID_IXUserDeviceImpl2, TRUE ); + + IXUserDeviceImpl_Release( xuserdevice ); +} + +static void test_XAppCapture( void ) +{ + IXAppCaptureImpl2 *xappcapture2 = NULL; + IXAppCaptureImpl *xappcapture = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XAppCaptureImpl, &IID_IXAppCaptureImpl, (void **)&xappcapture ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XAppCaptureImpl ) ); + return; + } + if (!xappcapture) return; + + check_interface( xappcapture, &IID_IUnknown, TRUE ); + check_interface( xappcapture, &IID_IXAppCaptureImpl, TRUE ); + + IXAppCaptureImpl_Release( xappcapture ); + + hr = QueryApiImpl_fun( &CLSID_XAppCaptureImpl2, &IID_IXAppCaptureImpl2, (void **)&xappcapture2 ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XAppCaptureImpl2 ) ); + return; + } + if (!xappcapture2) return; + + check_interface( xappcapture2, &IID_IUnknown, TRUE ); + check_interface( xappcapture2, &IID_IXAppCaptureImpl2, TRUE ); + flaky check_interface( xappcapture2, &IID_IXAppCaptureImpl3, TRUE ); + flaky check_interface( xappcapture2, &IID_IXAppCaptureImpl4, TRUE ); + flaky check_interface( xappcapture2, &IID_IXAppCaptureImpl5, TRUE ); + + IXAppCaptureImpl2_Release( xappcapture2 ); +} + +static void test_XDisplay( void ) +{ + IXDisplayImpl *xdisplay = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XDisplayImpl, &IID_IXDisplayImpl, (void **)&xdisplay ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XDisplayImpl ) ); + return; + } + if (!xdisplay) return; + + check_interface( xdisplay, &IID_IUnknown, TRUE ); + check_interface( xdisplay, &IID_IXDisplayImpl, TRUE ); + + IXDisplayImpl_Release( xdisplay ); +} + +static void test_XLauncher( void ) +{ + IXLauncherImpl *xlauncher = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XLauncherImpl, &IID_IXLauncherImpl, (void **)&xlauncher ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XLauncherImpl ) ); + return; + } + if (!xlauncher) return; + + check_interface( xlauncher, &IID_IUnknown, TRUE ); + check_interface( xlauncher, &IID_IXLauncherImpl, TRUE ); + + IXLauncherImpl_Release( xlauncher ); +} + +static void test_XError( void ) +{ + IXErrorImpl *xerror = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XErrorImpl, &IID_IXErrorImpl, (void **)&xerror ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XErrorImpl ) ); + return; + } + if (!xerror) return; + + check_interface( xerror, &IID_IUnknown, TRUE ); + check_interface( xerror, &IID_IXErrorImpl, TRUE ); + + IXErrorImpl_Release( xerror ); +} + +static void test_XGame(void) +{ + IXGameImpl *xgame = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameImpl, &IID_IXGameImpl, (void **)&xgame ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameImpl ) ); + return; + } + if (!xgame) return; + + check_interface( xgame, &IID_IUnknown, TRUE ); + check_interface( xgame, &IID_IXGameImpl, TRUE ); + flaky check_interface( xgame, &IID_IXGameImpl2, TRUE ); + flaky check_interface( xgame, &IID_IXGameImpl3, TRUE ); + + IXGameImpl_Release( xgame ); +} + +static void test_XGameActivation(void) +{ + IXGameActivationImpl *xgameactivation = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameActivationImpl, &IID_IXGameActivationImpl, (void **)&xgameactivation ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameActivationImpl ) ); + return; + } + if (!xgameactivation) return; + + check_interface( xgameactivation, &IID_IUnknown, TRUE ); + check_interface( xgameactivation, &IID_IXGameActivationImpl, TRUE ); + + IXGameActivationImpl_Release( xgameactivation ); +} + +static void test_XGameEvent(void) +{ + IXGameEventImpl *xgameevent = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameEventImpl, &IID_IXGameEventImpl, (void **)&xgameevent ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameEventImpl ) ); + return; + } + if (!xgameevent) return; + + check_interface( xgameevent, &IID_IUnknown, TRUE ); + check_interface( xgameevent, &IID_IXGameEventImpl, TRUE ); + + IXGameEventImpl_Release( xgameevent ); +} + +static void test_XGameInvite(void) +{ + IXGameInviteImpl *xgameinvite = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameInviteImpl, &IID_IXGameInviteImpl, (void **)&xgameinvite ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameInviteImpl ) ); + return; + } + if (!xgameinvite) return; + + check_interface( xgameinvite, &IID_IUnknown, TRUE ); + check_interface( xgameinvite, &IID_IXGameInviteImpl, TRUE ); + flaky check_interface( xgameinvite, &IID_IXGameInviteImpl2, TRUE ); + + IXGameInviteImpl_Release( xgameinvite ); +} + +static void test_XGameProtocol(void) +{ + IXGameProtocolImpl *xgameprotocol = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameProtocolImpl, &IID_IXGameProtocolImpl, (void **)&xgameprotocol ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameProtocolImpl ) ); + return; + } + if (!xgameprotocol) return; + + check_interface( xgameprotocol, &IID_IUnknown, TRUE ); + check_interface( xgameprotocol, &IID_IXGameProtocolImpl, TRUE ); + + IXGameProtocolImpl_Release( xgameprotocol ); +} + +static void test_XGameSave(void) +{ + IXGameSaveImpl *xgamesave = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameSaveImpl, &IID_IXGameSaveImpl, (void **)&xgamesave ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameSaveImpl ) ); + return; + } + if (!xgamesave) return; + + check_interface( xgamesave, &IID_IUnknown, TRUE ); + check_interface( xgamesave, &IID_IXGameSaveImpl, TRUE ); + flaky check_interface( xgamesave, &IID_IXGameSaveImpl2, TRUE ); + flaky check_interface( xgamesave, &IID_IXGameSaveImpl3, TRUE ); + + IXGameSaveImpl_Release( xgamesave ); +} + +static void test_XGameStreaming(void) +{ + IXGameStreamingImpl *xgamestreaming = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameStreamingImpl, &IID_IXGameStreamingImpl, (void **)&xgamestreaming ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameStreamingImpl ) ); + return; + } + if (!xgamestreaming) return; + + check_interface( xgamestreaming, &IID_IUnknown, TRUE ); + check_interface( xgamestreaming, &IID_IXGameStreamingImpl, TRUE ); + flaky check_interface( xgamestreaming, &IID_IXGameStreamingImpl2, TRUE ); + flaky check_interface( xgamestreaming, &IID_IXGameStreamingImpl3, TRUE ); + + IXGameStreamingImpl_Release( xgamestreaming ); +} + +static void test_XGameUi(void) +{ + IXGameUiImpl *xgameui = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XGameUiImpl, &IID_IXGameUiImpl, (void **)&xgameui ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XGameUiImpl ) ); + return; + } + if (!xgameui) return; + + check_interface( xgameui, &IID_IUnknown, TRUE ); + check_interface( xgameui, &IID_IXGameUiImpl, TRUE ); + flaky check_interface( xgameui, &IID_IXGameUiImpl2, TRUE ); + flaky check_interface( xgameui, &IID_IXGameUiImpl3, TRUE ); + flaky check_interface( xgameui, &IID_IXGameUiImpl4, TRUE ); + + IXGameUiImpl_Release( xgameui ); +} + +static void test_XPackage(void) +{ + IXPackageImpl *xpackage = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XPackageImpl, &IID_IXPackageImpl, (void **)&xpackage ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XPackageImpl ) ); + return; + } + if (!xpackage) return; + + check_interface( xpackage, &IID_IUnknown, TRUE ); + check_interface( xpackage, &IID_IXPackageImpl, TRUE ); + flaky check_interface( xpackage, &IID_IXPackageImpl2, TRUE ); + flaky check_interface( xpackage, &IID_IXPackageImpl3, TRUE ); + + IXPackageImpl_Release( xpackage ); +} + +static void test_XPersistentLocalStorage(void) +{ + IXPersistentLocalStorageImpl *xpersistentlocalstorage = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XPersistentLocalStorageImpl, &IID_IXPersistentLocalStorageImpl, (void **)&xpersistentlocalstorage ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XPersistentLocalStorageImpl ) ); + return; + } + if (!xpersistentlocalstorage) return; + + check_interface( xpersistentlocalstorage, &IID_IUnknown, TRUE ); + check_interface( xpersistentlocalstorage, &IID_IXPersistentLocalStorageImpl, TRUE ); + flaky check_interface( xpersistentlocalstorage, &IID_IXPersistentLocalStorageImpl2, TRUE ); + flaky check_interface( xpersistentlocalstorage, &IID_IXPersistentLocalStorageImpl3, TRUE ); + + IXPersistentLocalStorageImpl_Release( xpersistentlocalstorage ); +} + +static void test_XStore(void) +{ + IXStoreImpl *xstore = NULL; + HRESULT hr; + + hr = QueryApiImpl_fun( &CLSID_XStoreImpl, &IID_IXStoreImpl, (void **)&xstore ); + ok( hr == S_OK || broken( hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ), "got hr %#lx.\n", hr ); + if (hr == HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) ) + { + win_skip( "clsid %s not supported, skipping tests.\n", debugstr_guid( &CLSID_XStoreImpl ) ); + return; + } + if (!xstore) return; + + check_interface( xstore, &IID_IUnknown, TRUE ); + check_interface( xstore, &IID_IXStoreImpl, TRUE ); + flaky check_interface( xstore, &IID_IXStoreImpl2, TRUE ); + flaky check_interface( xstore, &IID_IXStoreImpl3, TRUE ); + flaky check_interface( xstore, &IID_IXStoreImpl4, TRUE ); + flaky check_interface( xstore, &IID_IXStoreImpl5, TRUE ); + flaky check_interface( xstore, &IID_IXStoreImpl6, TRUE ); + + IXStoreImpl_Release( xstore ); +} + START_TEST(xgameruntime) { HRESULT hr; @@ -371,6 +807,25 @@ START_TEST(xgameruntime) test_XSystemAnalytics(); test_XGameRuntimeFeature(); test_XThreading(); + test_XNetworking(); + test_XAccessibility(); + test_XUser(); + test_XUserDevice(); + test_XAppCapture(); + test_XDisplay(); + test_XLauncher(); + test_XError(); + test_XGame(); + test_XGameActivation(); + test_XGameEvent(); + test_XGameInvite(); + test_XGameProtocol(); + test_XGameSave(); + test_XGameStreaming(); + test_XGameUi(); + test_XPackage(); + test_XPersistentLocalStorage(); + test_XStore(); RoUninitialize(); } \ No newline at end of file diff --git a/dlls/xgameruntime/tests/xthread.h b/dlls/xgameruntime/tests/xthread.h deleted file mode 100644 index b4799a5701b..00000000000 --- a/dlls/xgameruntime/tests/xthread.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * xgameruntime.dll implementation - * - * Written by Weather - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __XTHREAD_H -#define __XTHREAD_H - -#include - -typedef struct IXThreadingImpl IXThreadingImpl; - -typedef struct IXThreadingImplVtbl { - HRESULT (STDMETHODCALLTYPE *QueryInterface)(IXThreadingImpl* This, REFIID riid, void** ppvObject); - ULONG (STDMETHODCALLTYPE *AddRef)(IXThreadingImpl* This); - ULONG (STDMETHODCALLTYPE *Release)(IXThreadingImpl* This); - - HRESULT (STDMETHODCALLTYPE *XAsyncGetStatus)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, boolean wait); - HRESULT (STDMETHODCALLTYPE *XAsyncGetResultSize)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, SIZE_T *bufferSize); - VOID (STDMETHODCALLTYPE *XAsyncCancel)(IXThreadingImpl* This, XAsyncBlock* asyncBlock); - HRESULT (STDMETHODCALLTYPE *XAsyncRun)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, XAsyncWork* work); - HRESULT (STDMETHODCALLTYPE *XAsyncBegin)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, PVOID context, const PVOID identity, LPCSTR identityName, XAsyncProviderCallback* provider); - HRESULT (STDMETHODCALLTYPE *__PADDING__)(IXThreadingImpl* This); - HRESULT (STDMETHODCALLTYPE *XAsyncSchedule)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, UINT32 delayInMs); - VOID (STDMETHODCALLTYPE *XAsyncComplete)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, HRESULT result, SIZE_T requiredBufferSize); - HRESULT (STDMETHODCALLTYPE *XAsyncGetResult)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, const PVOID identity, SIZE_T bufferSize, PVOID buffer, SIZE_T* bufferUsed); - HRESULT (STDMETHODCALLTYPE *XTaskQueueCreate)(IXThreadingImpl* This, XTaskQueueDispatchMode workDispatchMode, XTaskQueueDispatchMode completionDispatchMode, XTaskQueueHandle* queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueCreateComposite)(IXThreadingImpl* This, XTaskQueuePortHandle workPort, XTaskQueuePortHandle completionPort, XTaskQueueHandle* queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueGetPort)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, XTaskQueuePortHandle* portHandle); - HRESULT (STDMETHODCALLTYPE *XTaskQueueDuplicateHandle)(IXThreadingImpl* This, XTaskQueueHandle queueHandle, XTaskQueueHandle* duplicatedHandle); - BOOLEAN (STDMETHODCALLTYPE *XTaskQueueDispatch)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, uint32_t timeoutInMs); - VOID (STDMETHODCALLTYPE *XTaskQueueCloseHandle)(IXThreadingImpl* This, XTaskQueueHandle queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueSubmitCallback)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, PVOID callbackContext, XTaskQueueCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueSubmitDelayedCallback)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, uint32_t delayMs, PVOID callbackContext, XTaskQueueCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueRegisterWaiter)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, HANDLE waitHandle, PVOID callbackContext, XTaskQueueCallback* callback, XTaskQueueRegistrationToken* token); - VOID (STDMETHODCALLTYPE *XTaskQueueUnregisterWaiter)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueueRegistrationToken token); - HRESULT (STDMETHODCALLTYPE *XTaskQueueTerminate)(IXThreadingImpl* This, XTaskQueueHandle queue, BOOLEAN wait, PVOID callbackContext, XTaskQueueTerminatedCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueRegisterMonitor)(IXThreadingImpl* This, XTaskQueueHandle queue, PVOID callbackContext, XTaskQueueMonitorCallback* callback, XTaskQueueRegistrationToken* token); - VOID (STDMETHODCALLTYPE *XTaskQueueUnregisterMonitor)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueueRegistrationToken token); - BOOLEAN (STDMETHODCALLTYPE *XTaskQueueGetCurrentProcessTaskQueue)(IXThreadingImpl* This, XTaskQueueHandle* queue); - VOID (STDMETHODCALLTYPE *XTaskQueueSetCurrentProcessTaskQueue)(IXThreadingImpl* This, XTaskQueueHandle queue); - HRESULT (STDMETHODCALLTYPE *XThreadSetTimeSensitive)(IXThreadingImpl* This, BOOLEAN isTimeSensitiveThread); - HRESULT (STDMETHODCALLTYPE *__PADDING_2__)(IXThreadingImpl* This); - VOID (STDMETHODCALLTYPE *XThreadAssertNotTimeSensitive)(IXThreadingImpl* This); - BOOLEAN (STDMETHODCALLTYPE *XThreadIsTimeSensitive)(IXThreadingImpl* This); -} IXThreadingImplVtbl; - -struct IXThreadingImpl { - const IXThreadingImplVtbl* lpVtbl; -}; - -#ifdef COBJMACROS -#ifndef WIDL_C_INLINE_WRAPPERS -/*** IUnknown methods ***/ -#define IXThreadingImpl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IXThreadingImpl_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IXThreadingImpl_Release(This) (This)->lpVtbl->Release(This) -/*** IXThreadingImpl methods ***/ -#define IXThreadingImpl_XAsyncGetStatus(This,asyncBlock,wait) (This)->lpVtbl->XAsyncGetStatus(This,asyncBlock,wait) -#define IXThreadingImpl_XAsyncGetResultSize(This,asyncBlock,bufferSize) (This)->lpVtbl->XAsyncGetResultSize(This,asyncBlock,bufferSize) -#define IXThreadingImpl_XAsyncCancel(This,asyncBlock) (This)->lpVtbl->XAsyncCancel(This,asyncBlock) -#define IXThreadingImpl_XAsyncRun(This,asyncBlock,work) (This)->lpVtbl->XAsyncRun(This,asyncBlock,work) -#define IXThreadingImpl_XAsyncBegin(This,asyncBlock,context,identity,identityName,provider) (This)->lpVtbl->XAsyncBegin(This,asyncBlock,context,identity,identityName,provider) -#define IXThreadingImpl_XAsyncSchedule(This,asyncBlock,delayInMs) (This)->lpVtbl->XAsyncSchedule(This,asyncBlock,delayInMs) -#define IXThreadingImpl_XAsyncComplete(This,asyncBlock,result,requiredBufferSize) (This)->lpVtbl->XAsyncComplete(This,asyncBlock,result,requiredBufferSize) -#define IXThreadingImpl_XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed) (This)->lpVtbl->XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed) -#define IXThreadingImpl_XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue) (This)->lpVtbl->XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue) -#define IXThreadingImpl_XTaskQueueCreateComposite(This,workPort,completionPort,queue) (This)->lpVtbl->XTaskQueueCreateComposite(This,workPort,completionPort,queue) -#define IXThreadingImpl_XTaskQueueGetPort(This,queue,port,portHandle) (This)->lpVtbl->XTaskQueueGetPort(This,queue,port,portHandle) -#define IXThreadingImpl_XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle) (This)->lpVtbl->XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle) -#define IXThreadingImpl_XTaskQueueDispatch(This,queue,port,timeoutInMs) (This)->lpVtbl->XTaskQueueDispatch(This,queue,port,timeoutInMs) -#define IXThreadingImpl_XTaskQueueCloseHandle(This,queue) (This)->lpVtbl->XTaskQueueCloseHandle(This,queue) -#define IXThreadingImpl_XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback) (This)->lpVtbl->XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback) (This)->lpVtbl->XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token) (This)->lpVtbl->XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token) -#define IXThreadingImpl_XTaskQueueUnregisterWaiter(This,queue,token) (This)->lpVtbl->XTaskQueueUnregisterWaiter(This,queue,token) -#define IXThreadingImpl_XTaskQueueTerminate(This,queue,wait,callbackContext,callback) (This)->lpVtbl->XTaskQueueTerminate(This,queue,wait,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token) (This)->lpVtbl->XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token) -#define IXThreadingImpl_XTaskQueueUnregisterMonitor(This,queue,token) (This)->lpVtbl->XTaskQueueUnregisterMonitor(This,queue,token) -#define IXThreadingImpl_XTaskQueueGetCurrentProcessTaskQueue(This,queue) (This)->lpVtbl->XTaskQueueGetCurrentProcessTaskQueue(This,queue) -#define IXThreadingImpl_XTaskQueueSetCurrentProcessTaskQueue(This,queue) (This)->lpVtbl->XTaskQueueSetCurrentProcessTaskQueue(This,queue) -#define IXThreadingImpl_XThreadSetTimeSensitive(This,isTimeSensitiveThread) (This)->lpVtbl->XThreadSetTimeSensitive(This,isTimeSensitiveThread) -#define IXThreadingImpl_XThreadAssertNotTimeSensitive(This) (This)->lpVtbl->XThreadAssertNotTimeSensitive(This) -#define IXThreadingImpl_XThreadIsTimeSensitive(This) (This)->lpVtbl->XThreadIsTimeSensitive(This) - -#else -/*** IUnknown methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_QueryInterface(IXThreadingImpl* This,REFIID riid,void **ppvObject) { - return This->lpVtbl->QueryInterface(This,riid,ppvObject); -} -static inline ULONG STDMETHODCALLTYPE IXThreadingImpl_AddRef(IXThreadingImpl* This) { - return This->lpVtbl->AddRef(This); -} -static inline ULONG STDMETHODCALLTYPE IXThreadingImpl_Release(IXThreadingImpl* This) { - return This->lpVtbl->Release(This); -} -/*** IXGameRuntimeFeatureImpl methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetStatus(IXThreadingImpl* This,XAsyncBlock* asyncBlock,boolean wait) { - return This->lpVtbl->XAsyncGetStatus(This,asyncBlock,wait); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetResultSize(IXThreadingImpl* This,XAsyncBlock* asyncBlock,SIZE_T *bufferSize) { - return This->lpVtbl->XAsyncGetResultSize(This,asyncBlock,bufferSize); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XAsyncCancel(IXThreadingImpl* This,XAsyncBlock* asyncBlock) { - This->lpVtbl->XAsyncCancel(This,asyncBlock); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncRun(IXThreadingImpl* This,XAsyncBlock* asyncBlock,XAsyncWork* work) { - return This->lpVtbl->XAsyncRun(This,asyncBlock,work); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncBegin(IXThreadingImpl* This,XAsyncBlock* asyncBlock,PVOID context,const PVOID identity,LPCSTR identityName,XAsyncProviderCallback* provider) { - return This->lpVtbl->XAsyncBegin(This,asyncBlock,context,identity,identityName,provider); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncSchedule(IXThreadingImpl* This,XAsyncBlock* asyncBlock,UINT32 delayInMs) { - return This->lpVtbl->XAsyncSchedule(This,asyncBlock,delayInMs); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XAsyncComplete(IXThreadingImpl* This,XAsyncBlock* asyncBlock,HRESULT result,SIZE_T requiredBufferSize) { - This->lpVtbl->XAsyncComplete(This,asyncBlock,result,requiredBufferSize); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetResult(IXThreadingImpl* This,XAsyncBlock* asyncBlock,const PVOID identity,SIZE_T bufferSize,PVOID buffer,SIZE_T* bufferUsed) { - return This->lpVtbl->XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCreate(IXThreadingImpl* This,XTaskQueueDispatchMode workDispatchMode,XTaskQueueDispatchMode completionDispatchMode,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCreateComposite(IXThreadingImpl* This,XTaskQueuePortHandle workPort,XTaskQueuePortHandle completionPort,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueCreateComposite(This,workPort,completionPort,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueGetPort(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,XTaskQueuePortHandle* portHandle) { - return This->lpVtbl->XTaskQueueGetPort(This,queue,port,portHandle); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueDuplicateHandle(IXThreadingImpl* This,XTaskQueueHandle queueHandle,XTaskQueueHandle* duplicatedHandle) { - return This->lpVtbl->XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueDispatch(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,uint32_t timeoutInMs) { - return This->lpVtbl->XTaskQueueDispatch(This,queue,port,timeoutInMs); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCloseHandle(IXThreadingImpl* This,XTaskQueueHandle queue) { - This->lpVtbl->XTaskQueueCloseHandle(This,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSubmitCallback(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,PVOID callbackContext,XTaskQueueCallback* callback) { - return This->lpVtbl->XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSubmitDelayedCallback(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,uint32_t delayMs,PVOID callbackContext,XTaskQueueCallback* callback) { - return This->lpVtbl->XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueRegisterWaiter(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,HANDLE waitHandle,PVOID callbackContext,XTaskQueueCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueUnregisterWaiter(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueueRegistrationToken token) { - This->lpVtbl->XTaskQueueUnregisterWaiter(This,queue,token); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueTerminate(IXThreadingImpl* This,XTaskQueueHandle queue,BOOLEAN wait,PVOID callbackContext,XTaskQueueTerminatedCallback* callback) { - return This->lpVtbl->XTaskQueueTerminate(This,queue,wait,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueRegisterMonitor(IXThreadingImpl* This,XTaskQueueHandle queue,PVOID callbackContext,XTaskQueueMonitorCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueUnregisterMonitor(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueueRegistrationToken token) { - This->lpVtbl->XTaskQueueUnregisterMonitor(This,queue,token); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueGetCurrentProcessTaskQueue(IXThreadingImpl* This,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueGetCurrentProcessTaskQueue(This,queue); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSetCurrentProcessTaskQueue(IXThreadingImpl* This,XTaskQueueHandle queue) { - This->lpVtbl->XTaskQueueSetCurrentProcessTaskQueue(This,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XThreadSetTimeSensitive(IXThreadingImpl* This,BOOLEAN isTimeSensitiveThread) { - return This->lpVtbl->XThreadSetTimeSensitive(This,isTimeSensitiveThread); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XThreadAssertNotTimeSensitive(IXThreadingImpl* This) { - This->lpVtbl->XThreadAssertNotTimeSensitive(This); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XThreadIsTimeSensitive(IXThreadingImpl* This) { - return This->lpVtbl->XThreadIsTimeSensitive(This); -} -#endif -#endif - -// 073b7dcb-1fcf-4030-94be-e3c9eb623428 - -DEFINE_GUID(CLSID_XThreadingImpl, 0x073b7dcb, 0x1fcf, 0x4030, 0x94,0xbe, 0xe3,0xc9,0xeb,0x62,0x34,0x28); -DEFINE_GUID(IID_IXThreadingImpl, 0x073b7dcb, 0x1fcf, 0x4030, 0x94,0xbe, 0xe3,0xc9,0xeb,0x62,0x34,0x28); - -#endif \ No newline at end of file diff --git a/dlls/xgameruntime/xnetwork.h b/dlls/xgameruntime/xnetwork.h deleted file mode 100644 index 5953c127c30..00000000000 --- a/dlls/xgameruntime/xnetwork.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * xgameruntime.dll implementation - * - * Written by Weather - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __XNETWORK_H -#define __XNETWORK_H - -#include - -typedef struct IXNetworkingImpl IXNetworkingImpl; - -typedef struct IXNetworkingImplVtbl { - HRESULT (STDMETHODCALLTYPE *QueryInterface)(IXNetworkingImpl* This, REFIID riid, void** ppvObject); - ULONG (STDMETHODCALLTYPE *AddRef)(IXNetworkingImpl* This); - ULONG (STDMETHODCALLTYPE *Release)(IXNetworkingImpl* This); - - HRESULT (STDMETHODCALLTYPE *XNetworkingQueryPreferredLocalUdpMultiplayerPort)(IXNetworkingImpl* This, UINT16* preferredLocalUdpMultiplayerPort); - HRESULT (STDMETHODCALLTYPE *XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync)(IXNetworkingImpl* This, XAsyncBlock* asyncBlock); - HRESULT (STDMETHODCALLTYPE *XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult)(IXNetworkingImpl* This, XAsyncBlock* asyncBlock, UINT16* preferredLocalUdpMultiplayerPort); - HRESULT (STDMETHODCALLTYPE *XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged)(IXNetworkingImpl* This, XTaskQueueHandle queue, PVOID context, XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback* callback, XTaskQueueRegistrationToken* token); - BOOLEAN (STDMETHODCALLTYPE *XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged)(IXNetworkingImpl* This, XTaskQueueRegistrationToken token, BOOLEAN wait); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlAsync)(IXNetworkingImpl* This, LPCSTR url, XAsyncBlock* asyncBlock); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlAsyncResultSize)(IXNetworkingImpl *This, XAsyncBlock* asyncBlock, SIZE_T* securityInformationBufferByteCount); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlAsyncResult)(IXNetworkingImpl *This, XAsyncBlock* asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T* securityInformationBufferByteCountUsed, UINT8* securityInformationBuffer, XNetworkingSecurityInformation** securityInformation); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlUtf16Async)(IXNetworkingImpl* This, LPCWSTR url, XAsyncBlock* asyncBlock); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize)(IXNetworkingImpl *This, XAsyncBlock* asyncBlock, SIZE_T* securityInformationBufferByteCount); - HRESULT (STDMETHODCALLTYPE *XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult)(IXNetworkingImpl *This, XAsyncBlock* asyncBlock, SIZE_T securityInformationBufferByteCount, SIZE_T* securityInformationBufferByteCountUsed, UINT8* securityInformationBuffer, XNetworkingSecurityInformation** securityInformation); - HRESULT (STDMETHODCALLTYPE *XNetworkingVerifyServerCertificate)(IXNetworkingImpl *This, PVOID requestHandle, const XNetworkingSecurityInformation* securityInformation); - HRESULT (STDMETHODCALLTYPE *XNetworkingGetConnectivityHint)(IXNetworkingImpl *This, XNetworkingConnectivityHint* connectivityHint); - HRESULT (STDMETHODCALLTYPE *XNetworkingRegisterConnectivityHintChanged)(IXNetworkingImpl *This, XTaskQueueHandle queue, PVOID context, XNetworkingConnectivityHintChangedCallback* callback, XTaskQueueRegistrationToken* token); - BOOLEAN (STDMETHODCALLTYPE *XNetworkingUnregisterConnectivityHintChanged)(IXNetworkingImpl* This, XTaskQueueRegistrationToken token, BOOLEAN wait); - HRESULT (STDMETHODCALLTYPE *XNetworkingQueryConfigurationSetting)(IXNetworkingImpl* This, XNetworkingConfigurationSetting configurationSetting, UINT64* value); - HRESULT (STDMETHODCALLTYPE *XNetworkingSetConfigurationSetting)(IXNetworkingImpl* This, XNetworkingConfigurationSetting configurationParameter, UINT64 value); - HRESULT (STDMETHODCALLTYPE *XNetworkingQueryStatistics)(IXNetworkingImpl* This, XNetworkingStatisticsBuffer* statisticsBuffer); -} IXNetworkingImplVtbl; - -struct IXNetworkingImpl { - const IXNetworkingImplVtbl* lpVtbl; -}; - -#ifdef COBJMACROS -#ifndef WIDL_C_INLINE_WRAPPERS -/*** IUnknown methods ***/ -#define IXNetworkingImpl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IXNetworkingImpl_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IXNetworkingImpl_Release(This) (This)->lpVtbl->Release(This) -/*** IXNetworkingImpl methods ***/ -#define IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPort(This,preferredLocalUdpMultiplayerPort) (This)->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPort(This,preferredLocalUdpMultiplayerPort) -#define IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync(This,asyncBlock) (This)->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync(This,asyncBlock) -#define IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult(This,asyncBlock,preferredLocalUdpMultiplayerPort) (This)->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult(This,asyncBlock,preferredLocalUdpMultiplayerPort) -#define IXNetworkingImpl_XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged(This,queue,context,callback,token) (This)->lpVtbl->XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged(This,queue,context,callback,token) -#define IXNetworkingImpl_XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged(This,token,wait) (This)->lpVtbl->XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged(This,token,wait) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsync(This,url,asyncBlock) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsync(This,url,asyncBlock) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsyncResultSize(This,asyncBlock,securityInformationBufferByteCount) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsyncResultSize(This,asyncBlock,securityInformationBufferByteCount) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16Async(This,url,asyncBlock) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16Async(This,url,asyncBlock) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize(This,asyncBlock,securityInformationBufferByteCount) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize(This,asyncBlock,securityInformationBufferByteCount) -#define IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation) (This)->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation) -#define IXNetworkingImpl_XNetworkingVerifyServerCertificate(This,requestHandle,securityInformation) (This)->lpVtbl->XNetworkingVerifyServerCertificate(This,requestHandle,securityInformation) -#define IXNetworkingImpl_XNetworkingGetConnectivityHint(This,connectivityHint) (This)->lpVtbl->XNetworkingGetConnectivityHint(This,connectivityHint) -#define IXNetworkingImpl_XNetworkingRegisterConnectivityHintChanged(This,queue,context,callback,token) (This)->lpVtbl->XNetworkingRegisterConnectivityHintChanged(This,queue,context,callback,token) -#define IXNetworkingImpl_XNetworkingUnregisterConnectivityHintChanged(This,token,wait) (This)->lpVtbl->XNetworkingUnregisterConnectivityHintChanged(This,token,wait) -#define IXNetworkingImpl_XNetworkingQueryConfigurationSetting(This,configurationSetting,value) (This)->lpVtbl->XNetworkingQueryConfigurationSetting(This,configurationSetting,value) -#define IXNetworkingImpl_XNetworkingSetConfigurationSetting(This,configurationParameter,value) (This)->lpVtbl->XNetworkingSetConfigurationSetting(This,configurationParameter,value) -#define IXNetworkingImpl_XNetworkingQueryStatistics(This,statisticsBuffer) (This)->lpVtbl->XNetworkingQueryStatistics(This,statisticsBuffer) -#else -/*** IUnknown methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_QueryInterface(IXNetworkingImpl* This,REFIID riid,void **ppvObject) { - return This->lpVtbl->QueryInterface(This,riid,ppvObject); -} -static inline ULONG STDMETHODCALLTYPE IXNetworkingImpl_AddRef(IXNetworkingImpl* This) { - return This->lpVtbl->AddRef(This); -} -static inline ULONG STDMETHODCALLTYPE IXNetworkingImpl_Release(IXNetworkingImpl* This) { - return This->lpVtbl->Release(This); -} -/*** IXNetworkingImpl methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPort(IXNetworkingImpl* This,UINT16* preferredLocalUdpMultiplayerPort) { - return This->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPort(This,preferredLocalUdpMultiplayerPort); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync(IXNetworkingImpl* This,XAsyncBlock* asyncBlock) { - return This->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync(This,asyncBlock); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult(IXNetworkingImpl* This,XAsyncBlock* asyncBlock,UINT16* preferredLocalUdpMultiplayerPort) { - return This->lpVtbl->XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult(This,asyncBlock,preferredLocalUdpMultiplayerPort); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged(IXNetworkingImpl* This,XTaskQueueHandle queue,PVOID context,XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged(This,queue,context,callback,token); -} -static inline BOOLEAN STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged(IXNetworkingImpl* This,XTaskQueueRegistrationToken token,BOOLEAN wait) { - return This->lpVtbl->XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged(This,token,wait); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsync(IXNetworkingImpl* This,LPCSTR url,XAsyncBlock* asyncBlock) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsync(This,url,asyncBlock); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsyncResultSize(IXNetworkingImpl *This,XAsyncBlock* asyncBlock,SIZE_T* securityInformationBufferByteCount) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsyncResultSize(This,asyncBlock,securityInformationBufferByteCount); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlAsyncResult(IXNetworkingImpl *This,XAsyncBlock* asyncBlock,SIZE_T securityInformationBufferByteCount,SIZE_T* securityInformationBufferByteCountUsed,UINT8* securityInformationBuffer,XNetworkingSecurityInformation** securityInformation) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlAsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16Async(IXNetworkingImpl* This,LPCWSTR url,XAsyncBlock* asyncBlock) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16Async(This,url,asyncBlock); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize(IXNetworkingImpl *This,XAsyncBlock* asyncBlock,SIZE_T* securityInformationBufferByteCount) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize(This,asyncBlock,securityInformationBufferByteCount); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult(IXNetworkingImpl *This,XAsyncBlock* asyncBlock,SIZE_T securityInformationBufferByteCount,SIZE_T* securityInformationBufferByteCountUsed,UINT8* securityInformationBuffer,XNetworkingSecurityInformation** securityInformation) { - return This->lpVtbl->XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult(This,asyncBlock,securityInformationBufferByteCount,securityInformationBufferByteCountUsed,securityInformationBuffer,securityInformation); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingVerifyServerCertificate(IXNetworkingImpl *This,PVOID requestHandle,const XNetworkingSecurityInformation* securityInformation) { - return This->lpVtbl->XNetworkingVerifyServerCertificate(This,requestHandle,securityInformation); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingGetConnectivityHint(IXNetworkingImpl *This,XNetworkingConnectivityHint* connectivityHint) { - return This->lpVtbl->XNetworkingGetConnectivityHint(This,connectivityHint); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingRegisterConnectivityHintChanged(IXNetworkingImpl *This,XTaskQueueHandle queue,PVOID context,XNetworkingConnectivityHintChangedCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XNetworkingRegisterConnectivityHintChanged(This,queue,context,callback,token); -} -static inline BOOLEAN STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingUnregisterConnectivityHintChanged(IXNetworkingImpl* This,XTaskQueueRegistrationToken token,BOOLEAN wait) { - return This->lpVtbl->XNetworkingUnregisterConnectivityHintChanged(This,token,wait); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQueryConfigurationSetting(IXNetworkingImpl* This,XNetworkingConfigurationSetting configurationSetting,UINT64* value) { - return This->lpVtbl->XNetworkingQueryConfigurationSetting(This,configurationSetting,value); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingSetConfigurationSetting(IXNetworkingImpl* This,XNetworkingConfigurationSetting configurationParameter,UINT64 value) { - return This->lpVtbl->XNetworkingSetConfigurationSetting(This,configurationParameter,value); -} -static inline HRESULT STDMETHODCALLTYPE IXNetworkingImpl_XNetworkingQueryStatistics(IXNetworkingImpl* This,XNetworkingStatisticsBuffer* statisticsBuffer) { - return This->lpVtbl->XNetworkingQueryStatistics(This,statisticsBuffer); -} -#endif -#endif - -// 37e56907-2f10-41e8-b72f-36edb185331a -DEFINE_GUID(CLSID_XNetworkingImpl, 0x37e56907, 0x2f10, 0x41e8, 0xb7,0x2f, 0x36,0xed,0xb1,0x85,0x33,0x1a); - -// bf2346b2-39af-4658-b5ea-44713c7e83b3 -DEFINE_GUID(IID_IXNetworkingImpl, 0xbf2346b2, 0x39af, 0x4658, 0xb5,0xea, 0x44,0x71,0x3c,0x7e,0x83,0xb3); - -#endif \ No newline at end of file diff --git a/dlls/xgameruntime/xthread.h b/dlls/xgameruntime/xthread.h deleted file mode 100644 index b4799a5701b..00000000000 --- a/dlls/xgameruntime/xthread.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * xgameruntime.dll implementation - * - * Written by Weather - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __XTHREAD_H -#define __XTHREAD_H - -#include - -typedef struct IXThreadingImpl IXThreadingImpl; - -typedef struct IXThreadingImplVtbl { - HRESULT (STDMETHODCALLTYPE *QueryInterface)(IXThreadingImpl* This, REFIID riid, void** ppvObject); - ULONG (STDMETHODCALLTYPE *AddRef)(IXThreadingImpl* This); - ULONG (STDMETHODCALLTYPE *Release)(IXThreadingImpl* This); - - HRESULT (STDMETHODCALLTYPE *XAsyncGetStatus)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, boolean wait); - HRESULT (STDMETHODCALLTYPE *XAsyncGetResultSize)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, SIZE_T *bufferSize); - VOID (STDMETHODCALLTYPE *XAsyncCancel)(IXThreadingImpl* This, XAsyncBlock* asyncBlock); - HRESULT (STDMETHODCALLTYPE *XAsyncRun)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, XAsyncWork* work); - HRESULT (STDMETHODCALLTYPE *XAsyncBegin)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, PVOID context, const PVOID identity, LPCSTR identityName, XAsyncProviderCallback* provider); - HRESULT (STDMETHODCALLTYPE *__PADDING__)(IXThreadingImpl* This); - HRESULT (STDMETHODCALLTYPE *XAsyncSchedule)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, UINT32 delayInMs); - VOID (STDMETHODCALLTYPE *XAsyncComplete)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, HRESULT result, SIZE_T requiredBufferSize); - HRESULT (STDMETHODCALLTYPE *XAsyncGetResult)(IXThreadingImpl* This, XAsyncBlock* asyncBlock, const PVOID identity, SIZE_T bufferSize, PVOID buffer, SIZE_T* bufferUsed); - HRESULT (STDMETHODCALLTYPE *XTaskQueueCreate)(IXThreadingImpl* This, XTaskQueueDispatchMode workDispatchMode, XTaskQueueDispatchMode completionDispatchMode, XTaskQueueHandle* queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueCreateComposite)(IXThreadingImpl* This, XTaskQueuePortHandle workPort, XTaskQueuePortHandle completionPort, XTaskQueueHandle* queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueGetPort)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, XTaskQueuePortHandle* portHandle); - HRESULT (STDMETHODCALLTYPE *XTaskQueueDuplicateHandle)(IXThreadingImpl* This, XTaskQueueHandle queueHandle, XTaskQueueHandle* duplicatedHandle); - BOOLEAN (STDMETHODCALLTYPE *XTaskQueueDispatch)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, uint32_t timeoutInMs); - VOID (STDMETHODCALLTYPE *XTaskQueueCloseHandle)(IXThreadingImpl* This, XTaskQueueHandle queue); - HRESULT (STDMETHODCALLTYPE *XTaskQueueSubmitCallback)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, PVOID callbackContext, XTaskQueueCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueSubmitDelayedCallback)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, uint32_t delayMs, PVOID callbackContext, XTaskQueueCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueRegisterWaiter)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueuePort port, HANDLE waitHandle, PVOID callbackContext, XTaskQueueCallback* callback, XTaskQueueRegistrationToken* token); - VOID (STDMETHODCALLTYPE *XTaskQueueUnregisterWaiter)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueueRegistrationToken token); - HRESULT (STDMETHODCALLTYPE *XTaskQueueTerminate)(IXThreadingImpl* This, XTaskQueueHandle queue, BOOLEAN wait, PVOID callbackContext, XTaskQueueTerminatedCallback* callback); - HRESULT (STDMETHODCALLTYPE *XTaskQueueRegisterMonitor)(IXThreadingImpl* This, XTaskQueueHandle queue, PVOID callbackContext, XTaskQueueMonitorCallback* callback, XTaskQueueRegistrationToken* token); - VOID (STDMETHODCALLTYPE *XTaskQueueUnregisterMonitor)(IXThreadingImpl* This, XTaskQueueHandle queue, XTaskQueueRegistrationToken token); - BOOLEAN (STDMETHODCALLTYPE *XTaskQueueGetCurrentProcessTaskQueue)(IXThreadingImpl* This, XTaskQueueHandle* queue); - VOID (STDMETHODCALLTYPE *XTaskQueueSetCurrentProcessTaskQueue)(IXThreadingImpl* This, XTaskQueueHandle queue); - HRESULT (STDMETHODCALLTYPE *XThreadSetTimeSensitive)(IXThreadingImpl* This, BOOLEAN isTimeSensitiveThread); - HRESULT (STDMETHODCALLTYPE *__PADDING_2__)(IXThreadingImpl* This); - VOID (STDMETHODCALLTYPE *XThreadAssertNotTimeSensitive)(IXThreadingImpl* This); - BOOLEAN (STDMETHODCALLTYPE *XThreadIsTimeSensitive)(IXThreadingImpl* This); -} IXThreadingImplVtbl; - -struct IXThreadingImpl { - const IXThreadingImplVtbl* lpVtbl; -}; - -#ifdef COBJMACROS -#ifndef WIDL_C_INLINE_WRAPPERS -/*** IUnknown methods ***/ -#define IXThreadingImpl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IXThreadingImpl_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IXThreadingImpl_Release(This) (This)->lpVtbl->Release(This) -/*** IXThreadingImpl methods ***/ -#define IXThreadingImpl_XAsyncGetStatus(This,asyncBlock,wait) (This)->lpVtbl->XAsyncGetStatus(This,asyncBlock,wait) -#define IXThreadingImpl_XAsyncGetResultSize(This,asyncBlock,bufferSize) (This)->lpVtbl->XAsyncGetResultSize(This,asyncBlock,bufferSize) -#define IXThreadingImpl_XAsyncCancel(This,asyncBlock) (This)->lpVtbl->XAsyncCancel(This,asyncBlock) -#define IXThreadingImpl_XAsyncRun(This,asyncBlock,work) (This)->lpVtbl->XAsyncRun(This,asyncBlock,work) -#define IXThreadingImpl_XAsyncBegin(This,asyncBlock,context,identity,identityName,provider) (This)->lpVtbl->XAsyncBegin(This,asyncBlock,context,identity,identityName,provider) -#define IXThreadingImpl_XAsyncSchedule(This,asyncBlock,delayInMs) (This)->lpVtbl->XAsyncSchedule(This,asyncBlock,delayInMs) -#define IXThreadingImpl_XAsyncComplete(This,asyncBlock,result,requiredBufferSize) (This)->lpVtbl->XAsyncComplete(This,asyncBlock,result,requiredBufferSize) -#define IXThreadingImpl_XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed) (This)->lpVtbl->XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed) -#define IXThreadingImpl_XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue) (This)->lpVtbl->XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue) -#define IXThreadingImpl_XTaskQueueCreateComposite(This,workPort,completionPort,queue) (This)->lpVtbl->XTaskQueueCreateComposite(This,workPort,completionPort,queue) -#define IXThreadingImpl_XTaskQueueGetPort(This,queue,port,portHandle) (This)->lpVtbl->XTaskQueueGetPort(This,queue,port,portHandle) -#define IXThreadingImpl_XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle) (This)->lpVtbl->XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle) -#define IXThreadingImpl_XTaskQueueDispatch(This,queue,port,timeoutInMs) (This)->lpVtbl->XTaskQueueDispatch(This,queue,port,timeoutInMs) -#define IXThreadingImpl_XTaskQueueCloseHandle(This,queue) (This)->lpVtbl->XTaskQueueCloseHandle(This,queue) -#define IXThreadingImpl_XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback) (This)->lpVtbl->XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback) (This)->lpVtbl->XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token) (This)->lpVtbl->XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token) -#define IXThreadingImpl_XTaskQueueUnregisterWaiter(This,queue,token) (This)->lpVtbl->XTaskQueueUnregisterWaiter(This,queue,token) -#define IXThreadingImpl_XTaskQueueTerminate(This,queue,wait,callbackContext,callback) (This)->lpVtbl->XTaskQueueTerminate(This,queue,wait,callbackContext,callback) -#define IXThreadingImpl_XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token) (This)->lpVtbl->XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token) -#define IXThreadingImpl_XTaskQueueUnregisterMonitor(This,queue,token) (This)->lpVtbl->XTaskQueueUnregisterMonitor(This,queue,token) -#define IXThreadingImpl_XTaskQueueGetCurrentProcessTaskQueue(This,queue) (This)->lpVtbl->XTaskQueueGetCurrentProcessTaskQueue(This,queue) -#define IXThreadingImpl_XTaskQueueSetCurrentProcessTaskQueue(This,queue) (This)->lpVtbl->XTaskQueueSetCurrentProcessTaskQueue(This,queue) -#define IXThreadingImpl_XThreadSetTimeSensitive(This,isTimeSensitiveThread) (This)->lpVtbl->XThreadSetTimeSensitive(This,isTimeSensitiveThread) -#define IXThreadingImpl_XThreadAssertNotTimeSensitive(This) (This)->lpVtbl->XThreadAssertNotTimeSensitive(This) -#define IXThreadingImpl_XThreadIsTimeSensitive(This) (This)->lpVtbl->XThreadIsTimeSensitive(This) - -#else -/*** IUnknown methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_QueryInterface(IXThreadingImpl* This,REFIID riid,void **ppvObject) { - return This->lpVtbl->QueryInterface(This,riid,ppvObject); -} -static inline ULONG STDMETHODCALLTYPE IXThreadingImpl_AddRef(IXThreadingImpl* This) { - return This->lpVtbl->AddRef(This); -} -static inline ULONG STDMETHODCALLTYPE IXThreadingImpl_Release(IXThreadingImpl* This) { - return This->lpVtbl->Release(This); -} -/*** IXGameRuntimeFeatureImpl methods ***/ -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetStatus(IXThreadingImpl* This,XAsyncBlock* asyncBlock,boolean wait) { - return This->lpVtbl->XAsyncGetStatus(This,asyncBlock,wait); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetResultSize(IXThreadingImpl* This,XAsyncBlock* asyncBlock,SIZE_T *bufferSize) { - return This->lpVtbl->XAsyncGetResultSize(This,asyncBlock,bufferSize); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XAsyncCancel(IXThreadingImpl* This,XAsyncBlock* asyncBlock) { - This->lpVtbl->XAsyncCancel(This,asyncBlock); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncRun(IXThreadingImpl* This,XAsyncBlock* asyncBlock,XAsyncWork* work) { - return This->lpVtbl->XAsyncRun(This,asyncBlock,work); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncBegin(IXThreadingImpl* This,XAsyncBlock* asyncBlock,PVOID context,const PVOID identity,LPCSTR identityName,XAsyncProviderCallback* provider) { - return This->lpVtbl->XAsyncBegin(This,asyncBlock,context,identity,identityName,provider); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncSchedule(IXThreadingImpl* This,XAsyncBlock* asyncBlock,UINT32 delayInMs) { - return This->lpVtbl->XAsyncSchedule(This,asyncBlock,delayInMs); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XAsyncComplete(IXThreadingImpl* This,XAsyncBlock* asyncBlock,HRESULT result,SIZE_T requiredBufferSize) { - This->lpVtbl->XAsyncComplete(This,asyncBlock,result,requiredBufferSize); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XAsyncGetResult(IXThreadingImpl* This,XAsyncBlock* asyncBlock,const PVOID identity,SIZE_T bufferSize,PVOID buffer,SIZE_T* bufferUsed) { - return This->lpVtbl->XAsyncGetResult(This,asyncBlock,identity,bufferSize,buffer,bufferUsed); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCreate(IXThreadingImpl* This,XTaskQueueDispatchMode workDispatchMode,XTaskQueueDispatchMode completionDispatchMode,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueCreate(This,workDispatchMode,completionDispatchMode,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCreateComposite(IXThreadingImpl* This,XTaskQueuePortHandle workPort,XTaskQueuePortHandle completionPort,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueCreateComposite(This,workPort,completionPort,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueGetPort(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,XTaskQueuePortHandle* portHandle) { - return This->lpVtbl->XTaskQueueGetPort(This,queue,port,portHandle); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueDuplicateHandle(IXThreadingImpl* This,XTaskQueueHandle queueHandle,XTaskQueueHandle* duplicatedHandle) { - return This->lpVtbl->XTaskQueueDuplicateHandle(This,queueHandle,duplicatedHandle); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueDispatch(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,uint32_t timeoutInMs) { - return This->lpVtbl->XTaskQueueDispatch(This,queue,port,timeoutInMs); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueCloseHandle(IXThreadingImpl* This,XTaskQueueHandle queue) { - This->lpVtbl->XTaskQueueCloseHandle(This,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSubmitCallback(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,PVOID callbackContext,XTaskQueueCallback* callback) { - return This->lpVtbl->XTaskQueueSubmitCallback(This,queue,port,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSubmitDelayedCallback(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,uint32_t delayMs,PVOID callbackContext,XTaskQueueCallback* callback) { - return This->lpVtbl->XTaskQueueSubmitDelayedCallback(This,queue,port,delayMs,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueRegisterWaiter(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueuePort port,HANDLE waitHandle,PVOID callbackContext,XTaskQueueCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XTaskQueueRegisterWaiter(This,queue,port,waitHandle,callbackContext,callback,token); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueUnregisterWaiter(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueueRegistrationToken token) { - This->lpVtbl->XTaskQueueUnregisterWaiter(This,queue,token); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueTerminate(IXThreadingImpl* This,XTaskQueueHandle queue,BOOLEAN wait,PVOID callbackContext,XTaskQueueTerminatedCallback* callback) { - return This->lpVtbl->XTaskQueueTerminate(This,queue,wait,callbackContext,callback); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueRegisterMonitor(IXThreadingImpl* This,XTaskQueueHandle queue,PVOID callbackContext,XTaskQueueMonitorCallback* callback,XTaskQueueRegistrationToken* token) { - return This->lpVtbl->XTaskQueueRegisterMonitor(This,queue,callbackContext,callback,token); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueUnregisterMonitor(IXThreadingImpl* This,XTaskQueueHandle queue,XTaskQueueRegistrationToken token) { - This->lpVtbl->XTaskQueueUnregisterMonitor(This,queue,token); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueGetCurrentProcessTaskQueue(IXThreadingImpl* This,XTaskQueueHandle* queue) { - return This->lpVtbl->XTaskQueueGetCurrentProcessTaskQueue(This,queue); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XTaskQueueSetCurrentProcessTaskQueue(IXThreadingImpl* This,XTaskQueueHandle queue) { - This->lpVtbl->XTaskQueueSetCurrentProcessTaskQueue(This,queue); -} -static inline HRESULT STDMETHODCALLTYPE IXThreadingImpl_XThreadSetTimeSensitive(IXThreadingImpl* This,BOOLEAN isTimeSensitiveThread) { - return This->lpVtbl->XThreadSetTimeSensitive(This,isTimeSensitiveThread); -} -static inline VOID STDMETHODCALLTYPE IXThreadingImpl_XThreadAssertNotTimeSensitive(IXThreadingImpl* This) { - This->lpVtbl->XThreadAssertNotTimeSensitive(This); -} -static inline BOOLEAN STDMETHODCALLTYPE IXThreadingImpl_XThreadIsTimeSensitive(IXThreadingImpl* This) { - return This->lpVtbl->XThreadIsTimeSensitive(This); -} -#endif -#endif - -// 073b7dcb-1fcf-4030-94be-e3c9eb623428 - -DEFINE_GUID(CLSID_XThreadingImpl, 0x073b7dcb, 0x1fcf, 0x4030, 0x94,0xbe, 0xe3,0xc9,0xeb,0x62,0x34,0x28); -DEFINE_GUID(IID_IXThreadingImpl, 0x073b7dcb, 0x1fcf, 0x4030, 0x94,0xbe, 0xe3,0xc9,0xeb,0x62,0x34,0x28); - -#endif \ No newline at end of file diff --git a/include/Makefile.in b/include/Makefile.in index 81929ffe17a..51c7f8b5e34 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1102,7 +1102,6 @@ SOURCES = \ windows.ui.xaml.hosting.desktopwindowxamlsource.idl \ windows.ui.xaml.idl \ windows.ui.xaml.interop.idl \ - windows.ui.text.core.idl \ windowscontracts.idl \ windowsx.h \ wine/afd.h \ @@ -1228,6 +1227,7 @@ SOURCES = \ wtypesbase.idl \ wuapi.idl \ x3daudio.h \ + xaccessibility.idl \ xact.h \ xact2wb.h \ xact3.h \ @@ -1235,18 +1235,45 @@ SOURCES = \ xamlom.idl \ xapo.idl \ xapofx.h \ + xappcapture.idl \ + xasync.h \ + xasyncprovider.idl \ xaudio2.idl \ xaudio2fx.idl \ xcmc.h \ + xdisplay.idl \ + xerror.idl \ + xgame.idl \ + xgameactivation.idl \ + xgameerr.h \ + xgameevent.idl \ + xgameinvite.idl \ + xgameprotocol.idl \ + xgameruntime.h \ + xgameruntimefeature.idl \ + xgameruntimeinit.h \ + xgameruntimetypes.h \ + xgamesave.idl \ + xgamestreaming.idl \ + xgameui.idl \ xinput.h \ + xlauncher.idl \ xmldom.h \ xmldom.idl \ xmldomdid.h \ xmldso.idl \ xmldsodid.h \ xmllite.idl \ + xnetworking.idl \ + xpackage.idl \ + xpersistentlocalstorage.idl \ xpsobjectmodel.idl \ xpsobjectmodel_1.idl \ + xspeechsynthesizer.h \ + xstore.idl \ + xsystem.idl \ + xtaskqueue.h \ + xuser.idl \ zmouse.h INSTALL_LIB = \ diff --git a/include/xaccessibility.idl b/include/xaccessibility.idl new file mode 100644 index 00000000000..f7082c94e34 --- /dev/null +++ b/include/xaccessibility.idl @@ -0,0 +1,186 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xgameruntimetypes.h"; +import "xspeechsynthesizer.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XClosedCaptionFontEdgeAttribute : UINT32") +cpp_quote("{ ") +cpp_quote(" Default, ") +cpp_quote(" NoEdgeAttribute, ") +cpp_quote(" RaisedEdges, ") +cpp_quote(" DepressedEdges, ") +cpp_quote(" UniformedEdges, ") +cpp_quote(" DropShadowedEdges, ") +cpp_quote("}; ") + +cpp_quote("enum class XClosedCaptionFontStyle : UINT32") +cpp_quote("{ ") +cpp_quote(" Default, ") +cpp_quote(" MonospacedWithSerifs, ") +cpp_quote(" ProportionalWithSerifs, ") +cpp_quote(" MonospacedWithoutSerifs, ") +cpp_quote(" ProportionalWithoutSerifs, ") +cpp_quote(" Casual, ") +cpp_quote(" Cursive, ") +cpp_quote(" SmallCapitals, ") +cpp_quote("}; ") + +cpp_quote("enum class XHighContrastMode : UINT32") +cpp_quote("{ ") +cpp_quote(" Off, ") +cpp_quote(" Dark, ") +cpp_quote(" Light, ") +cpp_quote(" Other, ") +cpp_quote("}; ") + +cpp_quote("enum class XSpeechToTextPositionHint : UINT32") +cpp_quote("{ ") +cpp_quote(" BottomCenter, ") +cpp_quote(" BottomLeft, ") +cpp_quote(" BottomRight, ") +cpp_quote(" MiddleRight, ") +cpp_quote(" MiddleLeft, ") +cpp_quote(" TopCenter, ") +cpp_quote(" TopLeft, ") +cpp_quote(" TopRight, ") +cpp_quote("}; ") + +cpp_quote("enum class XSpeechToTextType : UINT32") +cpp_quote("{ ") +cpp_quote(" Voice, ") +cpp_quote(" Text, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XClosedCaptionFontEdgeAttribute +{ + XClosedCaptionFontEdgeAttribute_Default, + XClosedCaptionFontEdgeAttribute_NoEdgeAttribute, + XClosedCaptionFontEdgeAttribute_RaisedEdges, + XClosedCaptionFontEdgeAttribute_DepressedEdges, + XClosedCaptionFontEdgeAttribute_UniformedEdges, + XClosedCaptionFontEdgeAttribute_DropShadowedEdges, +} XClosedCaptionFontEdgeAttribute; + +typedef enum XClosedCaptionFontStyle +{ + XClosedCaptionFontStyle_Default, + XClosedCaptionFontStyle_MonospacedWithSerifs, + XClosedCaptionFontStyle_ProportionalWithSerifs, + XClosedCaptionFontStyle_MonospacedWithoutSerifs, + XClosedCaptionFontStyle_ProportionalWithoutSerifs, + XClosedCaptionFontStyle_Casual, + XClosedCaptionFontStyle_Cursive, + XClosedCaptionFontStyle_SmallCapitals, +} XClosedCaptionFontStyle; + +typedef enum XHighContrastMode +{ + XHighContrastMode_Off, + XHighContrastMode_Dark, + XHighContrastMode_Light, + XHighContrastMode_Other, +} XHighContrastMode; + +typedef enum XSpeechToTextPositionHint +{ + XSpeechToTextPositionHint_BottomCenter, + XSpeechToTextPositionHint_BottomLeft, + XSpeechToTextPositionHint_BottomRight, + XSpeechToTextPositionHint_MiddleRight, + XSpeechToTextPositionHint_MiddleLeft, + XSpeechToTextPositionHint_TopCenter, + XSpeechToTextPositionHint_TopLeft, + XSpeechToTextPositionHint_TopRight, +} XSpeechToTextPositionHint; + +typedef enum XSpeechToTextType +{ + XSpeechToTextType_Voice, + XSpeechToTextType_Text, +} XSpeechToTextType; + +cpp_quote("#endif") + +typedef struct XClosedCaptionProperties XClosedCaptionProperties; + +struct XClosedCaptionProperties +{ + XColor BackgroundColor; + XColor FontColor; + XColor WindowColor; + XClosedCaptionFontEdgeAttribute FontEdgeAttribute; + XClosedCaptionFontStyle FontStyle; + float FontScale; + BOOLEAN Enabled; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(3e241977-6237-41e9-8559-102c2d9983f1) +] +interface IXAccessibilityImpl : IUnknown +{ + HRESULT XClosedCaptionGetProperties( [out] XClosedCaptionProperties *props ); + HRESULT XClosedCaptionSetEnabled( [in] BOOLEAN enabled ); + HRESULT XHighContrastGetMode( [out] XHighContrastMode *mode ); + HRESULT XSpeechToTextSetPositionHint( [in] XSpeechToTextPositionHint position ); + HRESULT XSpeechToTextSendString( [in, string] const char *speakerName, [in, string] const char *content, [in] XSpeechToTextType type ); + HRESULT XSpeechSynthesizerEnumerateInstalledVoices( [in, optional] void *context, [in] XSpeechSynthesizerInstalledVoicesCallback *callback ); + HRESULT XSpeechSynthesizerCreate( [out] XSpeechSynthesizerHandle *speechSynthesizer ); + HRESULT XSpeechSynthesizerCloseHandle( [in, optional] XSpeechSynthesizerHandle speechSynthesizer ); + HRESULT XSpeechSynthesizerSetDefaultVoice( [in] XSpeechSynthesizerHandle speechSynthesizer ); + HRESULT XSpeechSynthesizerSetCustomVoice( [in] XSpeechSynthesizerHandle speechSynthesizer, [in, string] const char *voiceId ); + HRESULT XSpeechSynthesizerCreateStreamFromText( [in] XSpeechSynthesizerHandle speechSynthesizer, [in, string] const char *text, [out] XSpeechSynthesizerStreamHandle *speechSynthesisStream ); + HRESULT XSpeechSynthesizerCloseStreamHandle( [in] XSpeechSynthesizerStreamHandle speechSynthesisStream ); + HRESULT XSpeechSynthesizerGetStreamDataSize( [in] XSpeechSynthesizerStreamHandle speechSynthesisStream, [out] SIZE_T *bufferSize ); + HRESULT XSpeechSynthesizerGetStreamData( [in] XSpeechSynthesizerStreamHandle speechSynthesisStream, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XSpeechToTextBeginHypothesisString( [in, string] const char *speakerName, [in, string] const char *content, [in] XSpeechToTextType type, [out] UINT32 *hypothesisId ); + HRESULT XSpeechToTextUpdateHypothesisString( [in] UINT32 hypothesisId, [in, string] const char *content ); + HRESULT XSpeechToTextFinalizeHypothesisString( [in] UINT32 hypothesisId, [in, string] const char *content ); + HRESULT XSpeechToTextCancelHypothesisString( [in] UINT32 hypothesisId ); + HRESULT XSpeechSynthesizerCreateStreamFromSsml( [in] XSpeechSynthesizerHandle speechSynthesizer, [in, string] const char *ssml, [out] XSpeechSynthesizerStreamHandle *speechSynthesisStream ); +} + +[ + local, + object, + uuid(d722b373-8c4d-4692-9e51-d6ad9b37aa7d) +] +interface IXAccessibilityImpl2 : IXAccessibilityImpl +{ + /* Unknown which methods added here, all defined in parent for backwards compatibility */ +} + +[ + uuid(3e241977-6237-41e9-8559-102c2d9983f1) +] +coclass XAccessibilityImpl +{ + [default] interface IXAccessibilityImpl2; +} + +cpp_quote("#endif") diff --git a/include/xappcapture.idl b/include/xappcapture.idl new file mode 100644 index 00000000000..b5ba2b1b491 --- /dev/null +++ b/include/xappcapture.idl @@ -0,0 +1,269 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xuser.idl"; + +cpp_quote("#if 0") +typedef UINT64 time_t; +cpp_quote("#endif") + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XAppCaptureMetadataPriority : UINT8") +cpp_quote("{ ") +cpp_quote(" Informational, ") +cpp_quote(" Important, ") +cpp_quote("}; ") + +cpp_quote("enum class XAppCaptureScreenshotFormatFlag : UINT16") +cpp_quote("{ ") +cpp_quote(" SDR = 1, ") +cpp_quote(" HDR, ") +cpp_quote("}; ") + +cpp_quote("enum class XAppCaptureVideoColorFormat : UINT8") +cpp_quote("{ ") +cpp_quote(" SDR, ") +cpp_quote(" HDR, ") +cpp_quote("}; ") + +cpp_quote("enum class XAppCaptureVideoEncoding : UINT8") +cpp_quote("{ ") +cpp_quote(" H264, ") +cpp_quote(" HEVC, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XAppCaptureMetadataPriority +{ + XAppCaptureMetadataPriority_Informational, + XAppCaptureMetadataPriority_Important, +} XAppCaptureMetadataPriority; + +typedef enum XAppCaptureScreenshotFormatFlag +{ + XAppCaptureScreenshotFormatFlag_SDR = 1, + XAppCaptureScreenshotFormatFlag_HDR, +} XAppCaptureScreenshotFormatFlag; + +typedef enum XAppCaptureVideoColorFormat +{ + XAppCaptureVideoColorFormat_SDR, + XAppCaptureVideoColorFormat_HDR, +} XAppCaptureVideoColorFormat; + +typedef enum XAppCaptureVideoEncoding +{ + XAppCaptureVideoEncoding_H264, + XAppCaptureVideoEncoding_HEVC, +} XAppCaptureVideoEncoding; + +cpp_quote("#endif") + +typedef struct XAppCaptureLocalStream *XAppCaptureLocalStreamHandle; +typedef struct XAppCaptureScreenshotStream *XAppCaptureScreenshotStreamHandle; + +typedef struct XAppBroadcastStatus XAppBroadcastStatus; +typedef struct XAppCaptureDiagnosticScreenshotResult XAppCaptureDiagnosticScreenshotResult; +typedef struct XAppCaptureLocalResult XAppCaptureLocalResult; +typedef struct XAppCaptureRecordClipResult XAppCaptureRecordClipResult; +typedef struct XAppCaptureScreenshotFile XAppCaptureScreenshotFile; +typedef struct XAppCaptureScreenshotStream XAppCaptureScreenshotStream; +typedef struct XAppCaptureTakeScreenshotResult XAppCaptureTakeScreenshotResult; +typedef struct XAppCaptureUserRecordingResult XAppCaptureUserRecordingResult; +typedef struct XAppCaptureVideoCaptureSettings XAppCaptureVideoCaptureSettings; + +typedef void __stdcall XAppBroadcastMonitorCallback( void *context ); +typedef void __stdcall XAppCaptureMetadataPurgedCallback( void *context ); + +struct XAppBroadcastStatus +{ + BOOLEAN canStartBroadcast; + BOOLEAN isAnyAppBroadcasting; + BOOLEAN isCaptureResourceUnavailable; + BOOLEAN isGameStreamInProgress; + BOOLEAN isGpuConstrained; + BOOLEAN isAppInactive; + BOOLEAN isBlockedForApp; + BOOLEAN isDisabledByUser; + BOOLEAN isDisabledBySystem; +}; + +struct XAppCaptureScreenshotFile +{ + char path[260]; + SIZE_T fileSize; + UINT32 width; + UINT32 height; +}; + +struct XAppCaptureDiagnosticScreenshotResult +{ + SIZE_T fileCount; + XAppCaptureScreenshotFile files[10]; +}; + +struct XAppCaptureLocalResult +{ + XAppCaptureLocalStreamHandle clipHandle; + SIZE_T fileSizeInBytes; + SYSTEMTIME clipStartTimestamp; + UINT64 durationInMilliseconds; + UINT32 width; + UINT32 height; + XAppCaptureVideoEncoding encoding; + XAppCaptureVideoColorFormat colorFormat; +}; + +struct XAppCaptureRecordClipResult +{ + char path[260]; + SIZE_T fileSize; + time_t startTime; + UINT32 durationInMs; + UINT32 width; + UINT32 height; + XAppCaptureVideoEncoding encoding; +}; + +struct XAppCaptureScreenshotStream {}; + +struct XAppCaptureTakeScreenshotResult +{ + char localId[250]; + XAppCaptureScreenshotFormatFlag availableScreenshotFormats; +}; + +struct XAppCaptureUserRecordingResult +{ + SIZE_T fileSizeInBytes; + SYSTEMTIME clipStartTimestamp; + UINT64 durationInMilliseconds; + UINT32 width; + UINT32 height; + XAppCaptureVideoEncoding encoding; + XAppCaptureVideoColorFormat colorFormat; +}; + +struct XAppCaptureVideoCaptureSettings +{ + UINT32 width; + UINT32 height; + UINT64 maxRecordTimespanDurationInMs; + XAppCaptureVideoEncoding encoding; + XAppCaptureVideoColorFormat colorFormat; + BOOLEAN isCaptureByGamesAllowed; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(186d5592-a72d-45fb-9560-11aed0e6647a) +] +interface IXAppCaptureImpl : IUnknown +{ + BOOLEAN XAppBroadcastIsAppBroadcasting(); + HRESULT XAppBroadcastShowUI( [in] XUserHandle requestingUser ); + HRESULT XAppBroadcastGetStatus( [in] XUserHandle requestingUser, [out] XAppBroadcastStatus *appBroadcastStatus ); + HRESULT XAppBroadcastRegisterIsAppBroadcastingChanged( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XAppBroadcastMonitorCallback *appBroadcastMonitorCallback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XAppBroadcastUnregisterIsAppBroadcastingChanged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XAppCaptureMetadataAddStringEvent( [in, string] const char *name, [in, string] const char *value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataAddInt32Event( [in, string] const char *name, [in] INT32 value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataAddDoubleEvent( [in, string] const char *name, [in] double value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataStartStringState( [in, string] const char *name, [in, string] const char *value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataStartInt32State( [in, string] const char *name, [in] INT32 value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataStartDoubleState( [in, string] const char *name, [in] double value, [in] XAppCaptureMetadataPriority priority ); + HRESULT XAppCaptureMetadataStopState( [in, string] const char *name ); + HRESULT XAppCaptureMetadataStopAllStates(); + HRESULT XAppCaptureMetadataRemainingStorageBytesAvailable( [out] UINT64 *value ); + HRESULT XAppCaptureRegisterMetadataPurged( [in, optional] XTaskQueueHandle queue, [in] void *context, [in] XAppCaptureMetadataPurgedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XAppCaptureUnRegisterMetadataPurged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); +} + +[ + local, + object, + uuid(a4f1aee2-4bf1-4485-b008-a7c26d52ac27) +] +interface IXAppCaptureImpl2 : IUnknown +{ + HRESULT XAppCaptureTakeDiagnosticScreenshot( [in] BOOLEAN gamescreenOnly, [in] XAppCaptureScreenshotFormatFlag captureFlags, [in, optional, string] const char *filenamePrefix, [out] XAppCaptureDiagnosticScreenshotResult *result ); + HRESULT XAppCaptureRecordDiagnosticClip( [in] time_t startTime, [in] UINT32 durationInMs, [in, optional, string] const char *filenamePrefix, [out] XAppCaptureRecordClipResult *result ); + HRESULT XAppCaptureTakeScreenshot( [in] XUserHandle requestingUser, [out] XAppCaptureTakeScreenshotResult *result ); + HRESULT XAppCaptureOpenScreenshotStream( [in, string] const char *localId, [in] XAppCaptureScreenshotFormatFlag screenshotFormat, [out] XAppCaptureScreenshotStreamHandle *handle, [out, optional] UINT64 *totalBytes ); + HRESULT XAppCaptureReadScreenshotStream( [in] XAppCaptureScreenshotStreamHandle handle, [in] UINT64 startPosition, [in] UINT32 bytesToRead, [out, size_is(bytesToRead)] UINT8 *buffer, [out] UINT32 *bytesWritten ); + HRESULT XAppCaptureCloseScreenshotStream( [in] XAppCaptureScreenshotStreamHandle handle ); + HRESULT XAppCaptureEnableRecord(); + HRESULT XAppCaptureDisableRecord(); +} + +[ + local, + object, + uuid(3a949778-772e-4799-bdea-0a6639e96baa) +] +interface IXAppCaptureImpl3 : IXAppCaptureImpl2 +{ + HRESULT XAppCaptureGetVideoCaptureSettings( [out] XAppCaptureVideoCaptureSettings *userCaptureSettings ); + HRESULT XAppCaptureRecordTimespan( [in, optional] const SYSTEMTIME *startTimestamp, [in] UINT64 durationInMilliseconds, [out] XAppCaptureLocalResult *result ); + HRESULT XAppCaptureReadLocalStream( [in] XAppCaptureLocalStreamHandle handle, [in] SIZE_T startPosition, [in] UINT32 bytesToRead, [out, size_is(bytesToRead)] UINT8 *buffer, [out] UINT32 *bytesWritten ); + HRESULT XAppCaptureCloseLocalStream( [in] XAppCaptureLocalStreamHandle handle ); +} + +[ + local, + object, + uuid(2bbca60a-619c-4fe1-812e-fb5c1dbdcf51) +] +interface IXAppCaptureImpl4 : IXAppCaptureImpl3 +{ + HRESULT XAppCaptureStartUserRecord( [in] XUserHandle requestingUser, [in] UINT32 localIdBufferLength, [out, string, size_is(localIdBufferLength)] char *localIdBuffer ); + HRESULT XAppCaptureStopUserRecord( [in, string] const char *localId, [out] XAppCaptureUserRecordingResult *result ); +} + +[ + local, + object, + uuid(22e672d7-b4e3-406c-bd50-8f0d25236f9e) +] +interface IXAppCaptureImpl5 : IXAppCaptureImpl4 +{ + HRESULT XAppCaptureCancelUserRecord( [in, string] const char *localId ); +} + +[ + uuid(186d5592-a72d-45fb-9560-11aed0e6647a) +] +coclass XAppCaptureImpl +{ + [default] interface IXAppCaptureImpl; +} + +[ + uuid(a4f1aee2-4bf1-4485-b008-a7c26d52ac27) +] +coclass XAppCaptureImpl2 +{ + [default] interface IXAppCaptureImpl5; +} + +cpp_quote("#endif") diff --git a/include/xasync.h b/include/xasync.h index af27280dc1d..3564aca1a4a 100644 --- a/include/xasync.h +++ b/include/xasync.h @@ -19,20 +19,27 @@ #ifndef __WINE_XASYNC_H #define __WINE_XASYNC_H -#include "xtaskqueue.h" +#include -struct XAsyncBlock; +#ifdef __cplusplus +extern "C" { +#endif -typedef void CALLBACK XAsyncCompletionRoutine(_Inout_ struct XAsyncBlock* asyncBlock); +typedef struct XAsyncBlock XAsyncBlock; -typedef HRESULT CALLBACK XAsyncWork(_Inout_ struct XAsyncBlock* asyncBlock); +typedef void __stdcall XAsyncCompletionRoutine( XAsyncBlock *asyncBlock ); +typedef HRESULT __stdcall XAsyncWork( XAsyncBlock *asyncBlock ); -typedef struct XAsyncBlock +struct XAsyncBlock { XTaskQueueHandle queue; - void* context; - XAsyncCompletionRoutine* callback; - unsigned char internal[sizeof(void*) * 4]; -} XAsyncBlock; + void *context; + XAsyncCompletionRoutine *callback; + void *internal[4]; +}; -#endif \ No newline at end of file +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/xasyncprovider.idl b/include/xasyncprovider.idl new file mode 100644 index 00000000000..16bcade7f8e --- /dev/null +++ b/include/xasyncprovider.idl @@ -0,0 +1,105 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XAsyncOp : UINT32") +cpp_quote("{ ") +cpp_quote(" Begin, ") +cpp_quote(" DoWork, ") +cpp_quote(" GetResult, ") +cpp_quote(" Cancel, ") +cpp_quote(" Cleanup, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XAsyncOp +{ + XAsyncOp_Begin, + XAsyncOp_DoWork, + XAsyncOp_GetResult, + XAsyncOp_Cancel, + XAsyncOp_Cleanup, +} XAsyncOp; + +cpp_quote("#endif") + +typedef struct XAsyncProviderData XAsyncProviderData; + +typedef HRESULT __stdcall XAsyncProvider( XAsyncOp op, const XAsyncProviderData *data ); + +struct XAsyncProviderData +{ + XAsyncBlock *async; + SIZE_T bufferSize; + void *buffer; + void *context; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(073b7dcb-1fcf-4030-94be-e3c9eb623428) +] +interface IXThreadingImpl : IUnknown +{ + HRESULT XAsyncGetStatus( [in, out] XAsyncBlock *asyncBlock, [in] BOOLEAN wait ); + HRESULT XAsyncGetResultSize( [in, out] XAsyncBlock *asyncBlock, [out] SIZE_T *bufferSize ); + void XAsyncCancel( [in, out] XAsyncBlock *asyncBlock ); + HRESULT XAsyncRun( [in, out] XAsyncBlock *asyncBlock, [in] XAsyncWork *work ); + HRESULT XAsyncBegin( [in, out] XAsyncBlock *asyncBlock, [in, optional] void *context, [in, optional] const void *identity, [in, optional] const char *identityName, [in] XAsyncProvider *provider ); + HRESULT __PADDING__(); + HRESULT XAsyncSchedule( [in, out] XAsyncBlock *asyncBlock, [in] UINT32 delayInMs ); + void XAsyncComplete( [in, out] XAsyncBlock *asyncBlock, [in] HRESULT result, [in] SIZE_T requiredBufferSize ); + HRESULT XAsyncGetResult( [in, out] XAsyncBlock *asyncBlock, [in, optional] const void *identity, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XTaskQueueCreate( [in] XTaskQueueDispatchMode workDispatchMode, [in] XTaskQueueDispatchMode completionDispatchMode, [out] XTaskQueueHandle *queue ); + HRESULT XTaskQueueCreateComposite( [in] XTaskQueuePortHandle workPort, [in] XTaskQueuePortHandle completionPort, [out] XTaskQueueHandle *queue ); + HRESULT XTaskQueueGetPort( [in] XTaskQueueHandle queue, [in] XTaskQueuePort port, [out] XTaskQueuePortHandle *portHandle ); + HRESULT XTaskQueueDuplicateHandle( [in] XTaskQueueHandle queueHandle, [out] XTaskQueueHandle *duplicatedHandle ); + BOOLEAN XTaskQueueDispatch( [in] XTaskQueueHandle queue, [in] XTaskQueuePort port, [in] UINT32 timeoutInMs ); + void XTaskQueueCloseHandle( [in] XTaskQueueHandle queue ); + HRESULT XTaskQueueSubmitCallback( [in] XTaskQueueHandle queue, [in] XTaskQueuePort port, [in, optional] void *callbackContext, [in] XTaskQueueCallback *callback ); + HRESULT XTaskQueueSubmitDelayedCallback( [in] XTaskQueueHandle queue, [in] XTaskQueuePort port, [in] UINT32 delayMs, [in, optional] void *callbackContext, [in] XTaskQueueCallback *callback ); + HRESULT XTaskQueueRegisterWaiter( [in] XTaskQueueHandle queue, [in] XTaskQueuePort port, [in] HANDLE waitHandle, void *callbackContext, XTaskQueueCallback *callback, XTaskQueueRegistrationToken *token ); + void XTaskQueueUnregisterWaiter( [in] XTaskQueueHandle queue, [in] XTaskQueueRegistrationToken token ); + HRESULT XTaskQueueTerminate( [in] XTaskQueueHandle queue, [in] BOOLEAN wait, [in, optional] void *callbackContext, [in, optional] XTaskQueueTerminatedCallback *callback ); + HRESULT XTaskQueueRegisterMonitor( [in] XTaskQueueHandle queue, [in, optional] void *callbackContext, [in] XTaskQueueMonitorCallback *callback, [out] XTaskQueueRegistrationToken *token ); + void XTaskQueueUnregisterMonitor( [in] XTaskQueueHandle queue, [in] XTaskQueueRegistrationToken token ); + BOOLEAN XTaskQueueGetCurrentProcessTaskQueue( [out] XTaskQueueHandle *queue ); + void XTaskQueueSetCurrentProcessTaskQueue( [in] XTaskQueueHandle queue ); + HRESULT XThreadSetTimeSensitive( [in] BOOLEAN isTimeSensitiveThread ); + HRESULT __PADDING_2__(); + void XThreadAssertNotTimeSensitive(); + BOOLEAN XThreadIsTimeSensitive(); +} + +[ + uuid(073b7dcb-1fcf-4030-94be-e3c9eb623428) +] +coclass XThreadingImpl +{ + [default] interface IXThreadingImpl; +} + +cpp_quote("#endif") diff --git a/include/xdisplay.idl b/include/xdisplay.idl new file mode 100644 index 00000000000..0c744952b87 --- /dev/null +++ b/include/xdisplay.idl @@ -0,0 +1,85 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XDisplayHdrModePreference : UINT32") +cpp_quote("{ ") +cpp_quote(" PreferHdr, ") +cpp_quote(" PreferRefreshRate, ") +cpp_quote("}; ") + +cpp_quote("enum class XDisplayHdrModeResult : UINT32") +cpp_quote("{ ") +cpp_quote(" Unknown, ") +cpp_quote(" Enabled, ") +cpp_quote(" Disabled, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XDisplayHdrModePreference +{ + XDisplayHdrModePreference_PreferHdr, + XDisplayHdrModePreference_PreferRefreshRate, +} XDisplayHdrModePreference; + +typedef enum XDisplayHdrModeResult +{ + XDisplayHdrModeResult_Unknown, + XDisplayHdrModeResult_Enabled, + XDisplayHdrModeResult_Disabled, +} XDisplayHdrModeResult; + +cpp_quote("#endif") + +typedef struct XDisplayTimeoutDeferral *XDisplayTimeoutDeferralHandle; + +typedef struct XDisplayHdrModeInfo XDisplayHdrModeInfo; + +struct XDisplayHdrModeInfo +{ + float minToneMapLuminance; + float maxToneMapLuminance; + float maxFullFrameToneMapLuminance; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(35f07670-706e-4bfb-9476-090798c5ebf3) +] +interface IXDisplayImpl : IUnknown +{ + HRESULT __PADDING__(); + XDisplayHdrModeResult XDisplayTryEnableHdrMode( [in] XDisplayHdrModePreference displayModePreference, [out, optional] XDisplayHdrModeInfo *displayHdrModeInfo ); +} + +[ + uuid(03f0fe74-fdd9-4e5c-b630-f9339c47acc5) +] +coclass XDisplayImpl +{ + [default] interface IXDisplayImpl; +} + +cpp_quote("#endif") diff --git a/include/xerror.idl b/include/xerror.idl new file mode 100644 index 00000000000..fe658ba3181 --- /dev/null +++ b/include/xerror.idl @@ -0,0 +1,67 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XErrorOptions : UINT32 ") +cpp_quote("{ ") +cpp_quote(" None = 0x00,") +cpp_quote(" OutputDebugStringOnError = 0x01,") +cpp_quote(" DebugBreakOnError = 0x02,") +cpp_quote(" FailFastOnError = 0x04,") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XErrorOptions +{ + XErrorOptions_None = 0x00, + XErrorOptions_OutputDebugStringOnError = 0x01, + XErrorOptions_DebugBreakOnError = 0x02, + XErrorOptions_FailFastOnError = 0x04, +} XErrorOptions; + +cpp_quote("#endif") + +typedef void __stdcall XErrorCallback( HRESULT hr, const char *msg, void *context ); + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(8ca467f7-22e8-4096-8456-bb8aa13f79d8) +] +interface IXErrorImpl : IUnknown +{ + HRESULT __PADDING__(); + void XErrorSetCallback( [in] XErrorCallback *callback, [in] void *context ); + void XErrorSetOptions( XErrorOptions optionsDebuggerPresent, XErrorOptions optionsDebuggerNotPresent ); +} + +[ + uuid(8ca467f7-22e8-4096-8456-bb8aa13f79d8) +] +coclass XErrorImpl +{ + [default] interface IXErrorImpl; +} + +cpp_quote("#endif") diff --git a/include/xgame.idl b/include/xgame.idl new file mode 100644 index 00000000000..9026bc63f2b --- /dev/null +++ b/include/xgame.idl @@ -0,0 +1,62 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xuser.idl"; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(973a344e-24bf-4d0f-8457-56c534892b29) +] +interface IXGameImpl : IUnknown +{ + HRESULT XGameGetXboxTitleId( [out] UINT32 *titleId ); +} + +[ + local, + object, + uuid(50849859-0ad8-4f81-80e4-5bc78626f852) +] +interface IXGameImpl2 : IXGameImpl +{ + void XLaunchNewGame( [in] const char *exePath, [in, optional] const char *args, [in, optional] XUserHandle defaultUser ); +} + +[ + local, + object, + uuid(2549f142-6419-4a06-97b5-931aab7c2f34) +] +interface IXGameImpl3 : IXGameImpl2 +{ + HRESULT XLaunchRestartOnCrash( [in, optional] const char *args, [in] UINT32 reserved ); +} + +[ + uuid(973a344e-24bf-4d0f-8457-56c534892b29) +] +coclass XGameImpl +{ + [default] interface IXGameImpl3; +} + +cpp_quote("#endif") diff --git a/include/xgameactivation.idl b/include/xgameactivation.idl new file mode 100644 index 00000000000..94811654c86 --- /dev/null +++ b/include/xgameactivation.idl @@ -0,0 +1,81 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xtaskqueue.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XGameActivationType : UINT32") +cpp_quote("{ ") +cpp_quote(" Protocol, ") +cpp_quote(" File, ") +cpp_quote(" PendingGameInvite, ") +cpp_quote(" AcceptedGameInvite, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XGameActivationType +{ + XGameActivationType_Protocol, + XGameActivationType_File, + XGameActivationType_PendingGameInvite, + XGameActivationType_AcceptedGameInvite, +} XGameActivationType; + +cpp_quote("#endif") + +typedef struct XGameActivationInfo XGameActivationInfo; + +typedef void __stdcall XGameActivationCallback( void *context, const XGameActivationInfo *activationInfo ); + +struct XGameActivationInfo +{ + XGameActivationType type; + union + { + const char *protocolUri; + const char *file; + const char *inviteUri; + }; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(2e4f76fe-0fc7-461e-ab4d-a4499434c3cf) +] +interface IXGameActivationImpl : IUnknown +{ + HRESULT XGameActivationRegisterForEvent( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameActivationCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameActivationUnregisterForEvent( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XGameActivationAcceptPendingInvite( [in, string] const char *inviteUri ); +} + +[ + uuid(7f0fe8b8-e075-49ab-9aa7-a1e065489a9e) +] +coclass XGameActivationImpl +{ + [default] interface IXGameActivationImpl; +} + +cpp_quote("#endif") diff --git a/include/xgameerr.h b/include/xgameerr.h index 0ccbef6815b..8dfcd2abf9e 100644 --- a/include/xgameerr.h +++ b/include/xgameerr.h @@ -21,6 +21,7 @@ #include +#define E_GAME_MISSING_GAME_CONFIG _HRESULT_TYPEDEF_(0x87E5001FL) #define E_GAMERUNTIME_NOT_INITIALIZED _HRESULT_TYPEDEF_(0x89240100L) #define E_GAMERUNTIME_DLL_NOT_FOUND _HRESULT_TYPEDEF_(0x89240101L) #define E_GAMERUNTIME_VERSION_MISMATCH _HRESULT_TYPEDEF_(0x89240102L) @@ -63,7 +64,7 @@ #define E_GAMEPACKAGE_NO_PACKAGE_IDENTIFIER _HRESULT_TYPEDEF_(0x89245208L) #define E_GAMEPACKAGE_CONFIG_NO_ROOT_NODE _HRESULT_TYPEDEF_(0x89245209L) #define E_GAMEPACKAGE_CONFIG_ZERO_VERSION _HRESULT_TYPEDEF_(0x8924520AL) -#define E_GAMEPACKAGE_CONFIG_NO_MSAAPPID_OR_TITLEID _HRESULT_TYPEDEF_(0x8924520BL) +#define E_GAMEPACKAGE_CONFIG_NO_MSAAPPID_NOTITLEID _HRESULT_TYPEDEF_(0x8924520BL) #define E_GAMEPACKAGE_CONFIG_DEPRECATED_PC_ENTRIES _HRESULT_TYPEDEF_(0x8924520CL) #define E_GAMEPACKAGE_CONFIG_SUM_REQUIRES_MSAAPPID _HRESULT_TYPEDEF_(0x8924520DL) #define E_GAMEPACKAGE_CONFIG_NO_CODE_CLOUD_SAVES_REQUIRES_MSAAPPID _HRESULT_TYPEDEF_(0x8924520EL) @@ -89,4 +90,4 @@ #define E_GAMESTREAMING_CUSTOM_RESOLUTION_TOO_MANY_PIXELS _HRESULT_TYPEDEF_(0x8924540AL) #define E_GAMESTREAMING_INVALID_CUSTOM_RESOLUTION _HRESULT_TYPEDEF_(0x8924540BL) -#endif \ No newline at end of file +#endif diff --git a/include/xgameevent.idl b/include/xgameevent.idl new file mode 100644 index 00000000000..3752c812413 --- /dev/null +++ b/include/xgameevent.idl @@ -0,0 +1,42 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xuser.idl"; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(bbfbdcc7-bfe7-409b-a5ca-edf054960b4d) +] +interface IXGameEventImpl : IUnknown +{ + HRESULT XGameEventWrite( [in] XUserHandle user, [in, string] const char *serviceConfigId, [in, string] const char *playSessionId, [in, string] const char *eventName, [in, optional, string] const char *dimensionsJson, [in, optional, string] const char *measurementsJson ); +} + +[ + uuid(bbfbdcc7-bfe7-409b-a5ca-edf054960b4d) +] +coclass XGameEventImpl +{ + [default] interface IXGameEventImpl; +} + +cpp_quote("#endif") diff --git a/include/xgameinvite.idl b/include/xgameinvite.idl new file mode 100644 index 00000000000..afc8cb183c7 --- /dev/null +++ b/include/xgameinvite.idl @@ -0,0 +1,57 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xtaskqueue.h"; + +typedef void __stdcall XGameInviteEventCallback( void *context, const char *inviteUri ); + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(0651aae2-4012-4077-bf84-8b9097090e2c) +] +interface IXGameInviteImpl : IUnknown +{ + HRESULT XGameInviteRegisterForEvent( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameInviteEventCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameInviteUnregisterForEvent( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); +} + +[ + local, + object, + uuid(014d1cc3-bcfe-41ff-b2f0-e1ef07155828) +] +interface IXGameInviteImpl2 : IXGameInviteImpl +{ + HRESULT XGameInviteRegisterForPendingEvent( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameInviteEventCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameInviteUnregisterForPendingEvent( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XGameInviteAcceptPendingInvite( [in, string] const char *inviteUri ); +} + +[ + uuid(0651aae2-4012-4077-bf84-8b9097090e2c) +] +coclass XGameInviteImpl +{ + [default] interface IXGameInviteImpl2; +} + +cpp_quote("#endif") diff --git a/include/xgameprotocol.idl b/include/xgameprotocol.idl new file mode 100644 index 00000000000..d09ec548c23 --- /dev/null +++ b/include/xgameprotocol.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xtaskqueue.h"; + +typedef void __stdcall XGameProtocolActivationCallback( void *context, const char *protocolUri ); + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(026b010c-06c3-4cdd-bbcb-43f229db1cff) +] +interface IXGameProtocolImpl : IUnknown +{ + HRESULT XGameProtocolRegisterForActivation( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameProtocolActivationCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameProtocolUnregisterForActivation( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); +} + +[ + uuid(95fd18d2-74dd-4d7c-aa1b-0b51827665d6) +] +coclass XGameProtocolImpl +{ + [default] interface IXGameProtocolImpl; +} + +cpp_quote("#endif") diff --git a/include/xgameruntime.h b/include/xgameruntime.h new file mode 100644 index 00000000000..274cfd80d2c --- /dev/null +++ b/include/xgameruntime.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_XGAMERUNTIME_H +#define __WINE_XGAMERUNTIME_H + +/* April 2026 Release of GDK */ +#define GDKC_VERSION 10002L +#define GAMING_SERVICES_VERSION 7822L + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/xgameruntimefeature.idl b/include/xgameruntimefeature.idl new file mode 100644 index 00000000000..1fd5b3b5923 --- /dev/null +++ b/include/xgameruntimefeature.idl @@ -0,0 +1,95 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XGameRuntimeFeature : UINT32") +cpp_quote("{ ") +cpp_quote(" XAccessibility, ") +cpp_quote(" XAppCapture, ") +cpp_quote(" XAsync, ") +cpp_quote(" XAsyncProvider, ") +cpp_quote(" XDisplay, ") +cpp_quote(" XGame, ") +cpp_quote(" XGameInvite, ") +cpp_quote(" XGameSave, ") +cpp_quote(" XGameUI, ") +cpp_quote(" XLauncher, ") +cpp_quote(" XNetworking, ") +cpp_quote(" XPackage, ") +cpp_quote(" XPersistentLocalStorage, ") +cpp_quote(" XSpeechSynthesizer, ") +cpp_quote(" XStore, ") +cpp_quote(" XSystem, ") +cpp_quote(" XTaskQueue, ") +cpp_quote(" XThread, ") +cpp_quote(" XUser, ") +cpp_quote(" XError, ") +cpp_quote(" XGameEvent, ") +cpp_quote(" XGameStreaming, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XGameRuntimeFeature +{ + XGameRuntimeFeature_XAccessibility, + XGameRuntimeFeature_XAppCapture, + XGameRuntimeFeature_XAsync, + XGameRuntimeFeature_XAsyncProvider, + XGameRuntimeFeature_XDisplay, + XGameRuntimeFeature_XGame, + XGameRuntimeFeature_XGameInvite, + XGameRuntimeFeature_XGameSave, + XGameRuntimeFeature_XGameUI, + XGameRuntimeFeature_XLauncher, + XGameRuntimeFeature_XNetworking, + XGameRuntimeFeature_XPackage, + XGameRuntimeFeature_XPersistentLocalStorage, + XGameRuntimeFeature_XSpeechSynthesizer, + XGameRuntimeFeature_XStore, + XGameRuntimeFeature_XSystem, + XGameRuntimeFeature_XTaskQueue, + XGameRuntimeFeature_XThread, + XGameRuntimeFeature_XUser, + XGameRuntimeFeature_XError, + XGameRuntimeFeature_XGameEvent, + XGameRuntimeFeature_XGameStreaming, +} XGameRuntimeFeature; + +[ + local, + object, + uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) +] +interface IXGameRuntimeFeatureImpl : IUnknown +{ + BOOLEAN XGameRuntimeIsFeatureAvailable( [in] XGameRuntimeFeature feature ); +} + +[ + uuid(8836fe87-edb9-4fe3-8dad-05f0d2cd5b40) +] +coclass XGameRuntimeFeatureImpl +{ + [default] interface IXGameRuntimeFeatureImpl; +} + +cpp_quote("#endif") diff --git a/include/xgameruntimeinit.h b/include/xgameruntimeinit.h new file mode 100644 index 00000000000..1303062aa31 --- /dev/null +++ b/include/xgameruntimeinit.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_XGAMERUNTIMEINIT_H +#define __WINE_XGAMERUNTIMEINIT_H + +#ifdef __cplusplus +extern "C" { + +enum class XGameRuntimeGameConfigSource : UINT32 +{ + Default, + Inline, + File, +}; + +#elif defined(__WINESRC__) + +typedef enum XGameRuntimeGameConfigSource +{ + XGameRuntimeGameConfigSource_Default, + XGameRuntimeGameConfigSource_Inline, + XGameRuntimeGameConfigSource_File, +} XGameRuntimeGameConfigSource; + +#endif + +typedef struct XGameRuntimeOptions XGameRuntimeOptions; + +struct XGameRuntimeOptions +{ + XGameRuntimeGameConfigSource gameConfigSource; + const char *gameConfig; +}; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/xasyncprovider.h b/include/xgameruntimetypes.h similarity index 56% rename from include/xasyncprovider.h rename to include/xgameruntimetypes.h index 5db8c08fdd9..b4a84e818db 100644 --- a/include/xasyncprovider.h +++ b/include/xgameruntimetypes.h @@ -16,31 +16,48 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __WINE_XASYNCPROVIDER_H -#define __WINE_XASYNCPROVIDER_H +#ifndef __WINE_XGAMERUNTIMETYPES_H +#define __WINE_XGAMERUNTIMETYPES_H -#include -#include "xasync.h" +#ifdef __cplusplus +extern "C" { +#endif -typedef enum XAsyncOp -{ - Begin, - DoWork, - GetResult, - Cancel, - Cleanup -} XAsyncOp; +typedef struct XColor XColor; +typedef struct XVersion XVersion; -typedef struct XAsyncProviderData +struct XColor { - XAsyncBlock* async; - size_t bufferSize; - void* buffer; - void* context; -} XAsyncProviderData; + union + { + struct + { + UINT8 A; + UINT8 R; + UINT8 G; + UINT8 B; + }; + UINT32 Value; + }; +}; -typedef HRESULT CALLBACK XAsyncProviderCallback(_In_ XAsyncOp op, _Inout_ const XAsyncProviderData* data); +struct XVersion +{ + union + { + struct + { + UINT16 major; + UINT16 minor; + UINT16 build; + UINT16 revision; + }; + UINT64 Value; + }; +}; -#define XASYNC_IDENTITY(method) #method +#ifdef __cplusplus +} +#endif -#endif \ No newline at end of file +#endif diff --git a/include/xgamesave.idl b/include/xgamesave.idl new file mode 100644 index 00000000000..07cdcfc754e --- /dev/null +++ b/include/xgamesave.idl @@ -0,0 +1,127 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; +import "xuser.idl"; + +cpp_quote("#if 0") +typedef UINT64 time_t; +cpp_quote("#endif") + +typedef struct XGameSaveContainer *XGameSaveContainerHandle; +typedef struct XGameSaveProvider *XGameSaveProviderHandle; +typedef struct XGameSaveUpdate *XGameSaveUpdateHandle; + +typedef struct XGameSaveBlob XGameSaveBlob; +typedef struct XGameSaveBlobInfo XGameSaveBlobInfo; +typedef struct XGameSaveContainerInfo XGameSaveContainerInfo; + +typedef BOOLEAN __stdcall XGameSaveBlobInfoCallback( const XGameSaveBlobInfo *info, void *context ); +typedef BOOLEAN __stdcall XGameSaveContainerInfoCallback( const XGameSaveContainerInfo *info, void *context ); + +struct XGameSaveBlobInfo +{ + const char *name; + UINT32 size; +}; + +struct XGameSaveBlob +{ + XGameSaveBlobInfo info; + UINT8 *data; +}; + +struct XGameSaveContainerInfo +{ + const char *name; + const char *displayName; + UINT32 blobCount; + UINT64 totalSize; + time_t lastModifiedTime; + BOOLEAN needsSync; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(704c3f58-e629-4cc2-b197-30511b996fe2) +] +interface IXGameSaveImpl : IUnknown +{ + HRESULT XGameSaveInitializeProvider( [in] XUserHandle requestingUser, [in, string] const char *configurationId, [in] BOOLEAN syncOnDemand, [out] XGameSaveProviderHandle *provider ); + HRESULT XGameSaveInitializeProviderAsync( [in] XUserHandle requestingUser, [in, string] const char *configurationId, [in] BOOLEAN syncOnDemand, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveInitializeProviderResult( [in, out] XAsyncBlock *async, [out] XGameSaveProviderHandle *provider ); + void XGameSaveCloseProvider( [in] XGameSaveProviderHandle provider ); + HRESULT XGameSaveGetRemainingQuota( [in] XGameSaveProviderHandle provider, [out] INT64 *remainingQuota ); + HRESULT XGameSaveGetRemainingQuotaAsync( [in] XGameSaveProviderHandle provider, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveGetRemainingQuotaResult( [in, out] XAsyncBlock *async, [out] INT64 *remainingQuota ); + HRESULT XGameSaveDeleteContainer( [in] XGameSaveProviderHandle provider, [in, string] const char *containerName ); + HRESULT XGameSaveDeleteContainerAsync( [in] XGameSaveProviderHandle provider, [in, string] const char *containerName, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveDeleteContainerResult( [in, out] XAsyncBlock *async ); + HRESULT XGameSaveGetContainerInfo( [in] XGameSaveProviderHandle provider, [in, string] const char *containerName, [in, optional] void *context, [in] XGameSaveContainerInfoCallback *callback ); + HRESULT XGameSaveEnumerateContainerInfo( [in] XGameSaveProviderHandle provider, [in, optional] void *context, [in] XGameSaveContainerInfoCallback *callback ); + HRESULT XGameSaveEnumerateContainerInfoByName( [in] XGameSaveProviderHandle provider, [in, optional, string] const char *containerNamePrefix, [in, optional] void *context, [in] XGameSaveContainerInfoCallback *callback ); + HRESULT XGameSaveCreateContainer( [in] XGameSaveProviderHandle provider, [in, string] const char *containerName, [out] XGameSaveContainerHandle *containerContext ); + void XGameSaveCloseContainer( [in] XGameSaveContainerHandle context ); + HRESULT XGameSaveEnumerateBlobInfo( [in] XGameSaveContainerHandle container, [in, optional] void *context, [in] XGameSaveBlobInfoCallback *callback ); + HRESULT XGameSaveEnumerateBlobInfoByName( [in] XGameSaveContainerHandle container, [in, optional, string] const char *blobNamePrefix, [in, optional] void *context, [in] XGameSaveBlobInfoCallback *callback ); + HRESULT XGameSaveReadBlobData( [in] XGameSaveContainerHandle container, [in, optional, string, size_is(countOfBlobs,)] const char **blobNames, [in, out] UINT32 *countOfBlobs, [in] SIZE_T blobsSize, [out, size_is(blobsSize)] XGameSaveBlob *blobData ); + HRESULT XGameSaveReadBlobDataAsync( [in] XGameSaveContainerHandle container, [in, optional, string, size_is(countOfBlobs,)] const char **blobNames, [in] UINT32 countOfBlobs, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveReadBlobDataResult( [in, out] XAsyncBlock *async, [in] SIZE_T blobsSize, [out, size_is(blobsSize)] XGameSaveBlob *blobData, [out] UINT32 *countOfBlobs ); + HRESULT XGameSaveCreateUpdate( [in] XGameSaveContainerHandle container, [in, string] const char *containerDisplayName, [out] XGameSaveUpdateHandle *updateContext ); + void XGameSaveCloseUpdate( [in] XGameSaveUpdateHandle context ); + HRESULT XGameSaveSubmitBlobWrite( [in] XGameSaveUpdateHandle updateContext, [in, string] const char *blobName, [in, size_is(byteCount)] UINT8 *data, [in] SIZE_T byteCount ); + HRESULT XGameSaveSubmitBlobDelete( [in] XGameSaveUpdateHandle updateContext, [in, string] const char *blobName ); + HRESULT XGameSaveSubmitUpdate( [in] XGameSaveUpdateHandle updateContext ); + HRESULT XGameSaveSubmitUpdateAsync( [in] XGameSaveUpdateHandle updateContext, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveSubmitUpdateResult( [in, out] XAsyncBlock *async ); +} + +[ + local, + object, + uuid(704c3f58-e629-4cc2-b197-30511b996ee2) +] +interface IXGameSaveImpl2 : IXGameSaveImpl +{ + HRESULT XGameSaveFilesGetFolderWithUiAsync( [in] XUserHandle requestingUser, [in, string] const char *configurationId, [in, out] XAsyncBlock *async ); + HRESULT XGameSaveFilesGetFolderWithUiResult( [in, out] XAsyncBlock *async, [in] SIZE_T folderSize, [out, size_is(folderSize)] char *folderResult ); + HRESULT XGameSaveFilesGetRemainingQuota( [in] XUserHandle userContext, [in, string] const char *configurationId, [out] INT64 *remainingQuota ); +} + +[ + local, + object, + uuid(1bfff3af-f14a-40a3-8e35-9ada906593f9) +] +interface IXGameSaveImpl3 : IXGameSaveImpl2 +{ +} + +[ + uuid(704c3f58-e629-4cc2-b197-30511b996fe2) +] +coclass XGameSaveImpl +{ + [default] interface IXGameSaveImpl3; +} + +cpp_quote("#endif") diff --git a/include/xgamestreaming.idl b/include/xgamestreaming.idl new file mode 100644 index 00000000000..cf41e80f7d9 --- /dev/null +++ b/include/xgamestreaming.idl @@ -0,0 +1,320 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xgameruntimetypes.h"; +import "xtaskqueue.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XGameStreamingClientProperty : UINT32") +cpp_quote("{ ") +cpp_quote(" None, ") +cpp_quote(" StreamPhysicalDimensions, ") +cpp_quote(" TouchInputEnabled, ") +cpp_quote(" TouchBundleVersion, ") +cpp_quote(" IPAddress, ") +cpp_quote(" SessionId, ") +cpp_quote(" DisplayDetails, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameStreamingConnectionState : UINT32") +cpp_quote("{ ") +cpp_quote(" Disconnected, ") +cpp_quote(" Connected, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameStreamingGamepadPhysicality : UINT64") +cpp_quote("{ ") +cpp_quote(" None = 0x0000000000000000, ") +cpp_quote(" DPadUpPhysical = 0x0000000000000001, ") +cpp_quote(" DPadDownPhysical = 0x0000000000000002, ") +cpp_quote(" DPadLeftPhysical = 0x0000000000000004, ") +cpp_quote(" DPadRightPhysical = 0x0000000000000008, ") +cpp_quote(" MenuPhysical = 0x0000000000000010, ") +cpp_quote(" ViewPhysical = 0x0000000000000020, ") +cpp_quote(" LeftThumbstickPhysical = 0x0000000000000040, ") +cpp_quote(" RightThumbstickPhysical = 0x0000000000000080, ") +cpp_quote(" LeftShoulderPhysical = 0x0000000000000100, ") +cpp_quote(" RightShoulderPhysical = 0x0000000000000200, ") +cpp_quote(" APhysical = 0x0000000000001000, ") +cpp_quote(" BPhysical = 0x0000000000002000, ") +cpp_quote(" XPhysical = 0x0000000000004000, ") +cpp_quote(" YPhysical = 0x0000000000008000, ") +cpp_quote(" LeftTriggerPhysical = 0x0000000000010000, ") +cpp_quote(" RightTriggerPhysical = 0x0000000000020000, ") +cpp_quote(" LeftThumbstickXPhysical = 0x0000000000040000, ") +cpp_quote(" LeftThumbstickYPhysical = 0x0000000000080000, ") +cpp_quote(" RightThumbstickXPhysical = 0x0000000000100000, ") +cpp_quote(" RightThumbstickYPhysical = 0x0000000000200000, ") +cpp_quote(" ButtonsPhysical = 0x000000000000F3FF, ") +cpp_quote(" AnalogsPhysical = 0x00000000003F0000, ") +cpp_quote(" AllPhysical = 0x00000000003FF3FF, ") +cpp_quote(" DPadUpVirtual = 0x0000000100000000, ") +cpp_quote(" DPadDownVirtual = 0x0000000200000000, ") +cpp_quote(" DPadLeftVirtual = 0x0000000400000000, ") +cpp_quote(" DPadRightVirtual = 0x0000000800000000, ") +cpp_quote(" MenuVirtual = 0x0000001000000000, ") +cpp_quote(" ViewVirtual = 0x0000002000000000, ") +cpp_quote(" LeftThumbstickVirtual = 0x0000004000000000, ") +cpp_quote(" RightThumbstickVirtual = 0x0000008000000000, ") +cpp_quote(" LeftShoulderVirtual = 0x0000010000000000, ") +cpp_quote(" RightShoulderVirtual = 0x0000020000000000, ") +cpp_quote(" AVirtual = 0x0000100000000000, ") +cpp_quote(" BVirtual = 0x0000200000000000, ") +cpp_quote(" XVirtual = 0x0000400000000000, ") +cpp_quote(" YVirtual = 0x0000800000000000, ") +cpp_quote(" LeftTriggerVirtual = 0x0001000000000000, ") +cpp_quote(" RightTriggerVirtual = 0x0002000000000000, ") +cpp_quote(" LeftThumbstickXVirtual = 0x0004000000000000, ") +cpp_quote(" LeftThumbstickYVirtual = 0x0008000000000000, ") +cpp_quote(" RightThumbstickXVirtual = 0x0010000000000000, ") +cpp_quote(" RightThumbstickYVirtual = 0x0020000000000000, ") +cpp_quote(" ButtonsVirtual = 0x0000F3FF00000000, ") +cpp_quote(" AnalogsVirtual = 0x003F000000000000, ") +cpp_quote(" AllVirtual = 0x003FF3FF00000000, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameStreamingTouchControlsStateOperationKind : UINT32") +cpp_quote("{ ") +cpp_quote(" Replace, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameStreamingTouchControlsStateValueKind : UINT32") +cpp_quote("{ ") +cpp_quote(" Boolean, ") +cpp_quote(" Integer, ") +cpp_quote(" Double, ") +cpp_quote(" String, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameStreamingVideoFlags : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" SupportsCustomAspectRatio = 0x01, ") +cpp_quote(" SupportsPresentScaling = 0x02, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XGameStreamingClientProperty +{ + XGameStreamingClientProperty_None, + XGameStreamingClientProperty_StreamPhysicalDimensions, + XGameStreamingClientProperty_TouchInputEnabled, + XGameStreamingClientProperty_TouchBundleVersion, + XGameStreamingClientProperty_IPAddress, + XGameStreamingClientProperty_SessionId, + XGameStreamingClientProperty_DisplayDetails, +} XGameStreamingClientProperty; + +typedef enum XGameStreamingConnectionState +{ + XGameStreamingConnectionState_Disconnected, + XGameStreamingConnectionState_Connected, +} XGameStreamingConnectionState; + +#ifdef __WIDL__ +typedef UINT64 XGameStreamingGamepadPhysicality; +#else +typedef enum XGameStreamingGamepadPhysicality +{ + XGameStreamingGamepadPhysicality_None = 0x0000000000000000, + XGameStreamingGamepadPhysicality_DPadUpPhysical = 0x0000000000000001, + XGameStreamingGamepadPhysicality_DPadDownPhysical = 0x0000000000000002, + XGameStreamingGamepadPhysicality_DPadLeftPhysical = 0x0000000000000004, + XGameStreamingGamepadPhysicality_DPadRightPhysical = 0x0000000000000008, + XGameStreamingGamepadPhysicality_MenuPhysical = 0x0000000000000010, + XGameStreamingGamepadPhysicality_ViewPhysical = 0x0000000000000020, + XGameStreamingGamepadPhysicality_LeftThumbstickPhysical = 0x0000000000000040, + XGameStreamingGamepadPhysicality_RightThumbstickPhysical = 0x0000000000000080, + XGameStreamingGamepadPhysicality_LeftShoulderPhysical = 0x0000000000000100, + XGameStreamingGamepadPhysicality_RightShoulderPhysical = 0x0000000000000200, + XGameStreamingGamepadPhysicality_APhysical = 0x0000000000001000, + XGameStreamingGamepadPhysicality_BPhysical = 0x0000000000002000, + XGameStreamingGamepadPhysicality_XPhysical = 0x0000000000004000, + XGameStreamingGamepadPhysicality_YPhysical = 0x0000000000008000, + XGameStreamingGamepadPhysicality_LeftTriggerPhysical = 0x0000000000010000, + XGameStreamingGamepadPhysicality_RightTriggerPhysical = 0x0000000000020000, + XGameStreamingGamepadPhysicality_LeftThumbstickXPhysical = 0x0000000000040000, + XGameStreamingGamepadPhysicality_LeftThumbstickYPhysical = 0x0000000000080000, + XGameStreamingGamepadPhysicality_RightThumbstickXPhysical = 0x0000000000100000, + XGameStreamingGamepadPhysicality_RightThumbstickYPhysical = 0x0000000000200000, + XGameStreamingGamepadPhysicality_ButtonsPhysical = 0x000000000000F3FF, + XGameStreamingGamepadPhysicality_AnalogsPhysical = 0x00000000003F0000, + XGameStreamingGamepadPhysicality_AllPhysical = 0x00000000003FF3FF, + XGameStreamingGamepadPhysicality_DPadUpVirtual = 0x0000000100000000, + XGameStreamingGamepadPhysicality_DPadDownVirtual = 0x0000000200000000, + XGameStreamingGamepadPhysicality_DPadLeftVirtual = 0x0000000400000000, + XGameStreamingGamepadPhysicality_DPadRightVirtual = 0x0000000800000000, + XGameStreamingGamepadPhysicality_MenuVirtual = 0x0000001000000000, + XGameStreamingGamepadPhysicality_ViewVirtual = 0x0000002000000000, + XGameStreamingGamepadPhysicality_LeftThumbstickVirtual = 0x0000004000000000, + XGameStreamingGamepadPhysicality_RightThumbstickVirtual = 0x0000008000000000, + XGameStreamingGamepadPhysicality_LeftShoulderVirtual = 0x0000010000000000, + XGameStreamingGamepadPhysicality_RightShoulderVirtual = 0x0000020000000000, + XGameStreamingGamepadPhysicality_AVirtual = 0x0000100000000000, + XGameStreamingGamepadPhysicality_BVirtual = 0x0000200000000000, + XGameStreamingGamepadPhysicality_XVirtual = 0x0000400000000000, + XGameStreamingGamepadPhysicality_YVirtual = 0x0000800000000000, + XGameStreamingGamepadPhysicality_LeftTriggerVirtual = 0x0001000000000000, + XGameStreamingGamepadPhysicality_RightTriggerVirtual = 0x0002000000000000, + XGameStreamingGamepadPhysicality_LeftThumbstickXVirtual = 0x0004000000000000, + XGameStreamingGamepadPhysicality_LeftThumbstickYVirtual = 0x0008000000000000, + XGameStreamingGamepadPhysicality_RightThumbstickXVirtual = 0x0010000000000000, + XGameStreamingGamepadPhysicality_RightThumbstickYVirtual = 0x0020000000000000, + XGameStreamingGamepadPhysicality_ButtonsVirtual = 0x0000F3FF00000000, + XGameStreamingGamepadPhysicality_AnalogsVirtual = 0x003F000000000000, + XGameStreamingGamepadPhysicality_AllVirtual = 0x003FF3FF00000000, +} XGameStreamingGamepadPhysicality; +#endif + +typedef enum XGameStreamingTouchControlsStateOperationKind +{ + XGameStreamingTouchControlsStateOperationKind_Replace, +} XGameStreamingTouchControlsStateOperationKind; + +typedef enum XGameStreamingTouchControlsStateValueKind +{ + XGameStreamingTouchControlsStateValueKind_Boolean, + XGameStreamingTouchControlsStateValueKind_Integer, + XGameStreamingTouchControlsStateValueKind_Double, + XGameStreamingTouchControlsStateValueKind_String, +} XGameStreamingTouchControlsStateValueKind; + +typedef enum XGameStreamingVideoFlags +{ + XGameStreamingVideoFlags_None = 0x00, + XGameStreamingVideoFlags_SupportsCustomAspectRatio = 0x01, + XGameStreamingVideoFlags_SupportsPresentScaling = 0x02, +} XGameStreamingVideoFlags; + +cpp_quote("#endif") + +typedef UINT64 XGameStreamingClientId; +typedef UINT64 D3D12XBOX_FRAME_PIPELINE_TOKEN; + +typedef struct IGameInputReading IGameInputReading; + +typedef struct XGameStreamingDisplayDetails XGameStreamingDisplayDetails; +typedef struct XGameStreamingTouchControlsStateOperation XGameStreamingTouchControlsStateOperation; +typedef struct XGameStreamingTouchControlsStateValue XGameStreamingTouchControlsStateValue; + +typedef void __stdcall XGameStreamingClientPropertiesChangedCallback( void *context, XGameStreamingClientId client, UINT32 updatedPropertiesCount, XGameStreamingClientProperty *updatedProperties ); +typedef void __stdcall XGameStreamingConnectionStateChangedCallback( void *context, XGameStreamingClientId client, XGameStreamingConnectionState state ); + +struct XGameStreamingDisplayDetails +{ + UINT32 preferredWidth; + UINT32 preferredHeight; + RECT safeArea; + UINT32 maxPixels; + UINT32 maxWidth; + UINT32 maxHeight; + XGameStreamingVideoFlags flags; +}; + +struct XGameStreamingTouchControlsStateValue +{ + XGameStreamingTouchControlsStateValueKind valueKind; + union + { + BOOLEAN booleanValue; + INT64 integerValue; + double doubleValue; + const char *stringValue; + }; +}; + +struct XGameStreamingTouchControlsStateOperation +{ + XGameStreamingTouchControlsStateOperationKind operationKind; + const char *path; + XGameStreamingTouchControlsStateValue value; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(8aff07f5-a1bf-4db8-80a5-31cca0de51b7) +] +interface IXGameStreamingImpl : IUnknown +{ + HRESULT XGameStreamingInitialize(); + void XGameStreamingUninitialize(); + BOOLEAN XGameStreamingIsStreaming(); + HRESULT XGameStreamingRegisterClientPropertiesChanged( [in] XGameStreamingClientId client, [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameStreamingClientPropertiesChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameStreamingUnregisterClientPropertiesChanged( [in] XGameStreamingClientId client, [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XGameStreamingGetStreamPhysicalDimensions( [in] XGameStreamingClientId client, [out] UINT32 *horizontalMm, [out] UINT32 *verticalMm ); + UINT32 XGameStreamingGetClientCount(); + HRESULT XGameStreamingGetClients( [in] UINT32 clientCount, [out, length_is(clientCount)] XGameStreamingClientId clients[*], [out, optional] UINT32 *clientsUsed ); + XGameStreamingConnectionState XGameStreamingGetConnectionState( [in] XGameStreamingClientId client ); + HRESULT XGameStreamingRegisterConnectionStateChanged( [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XGameStreamingConnectionStateChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XGameStreamingUnregisterConnectionStateChanged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XGameStreamingGetStreamAddedLatency( [in] XGameStreamingClientId client, [out] UINT32 *averageInputLatencyUs, [out] UINT32 *averageOutputLatencyUs, [out] UINT32 *standardDeviationUs ); + SIZE_T XGameStreamingGetServerLocationNameSize(); + HRESULT XGameStreamingGetServerLocationName( [in] SIZE_T serverLocationNameSize, [out, string, size_is(serverLocationNameSize)] char *serverLocationName ); + void XGameStreamingHideTouchControls(); + void XGameStreamingShowTouchControlLayout( [in, optional, string] const char *layout ); + void XGameStreamingHideTouchControlsOnClient( [in] XGameStreamingClientId client ); + void XGameStreamingShowTouchControlLayoutOnClient( [in] XGameStreamingClientId client, [in, optional, string] const char *layout ); + HRESULT XGameStreamingIsTouchInputEnabled( [in] XGameStreamingClientId client, [out] BOOLEAN *touchInputEnabled ); + HRESULT XGameStreamingGetLastFrameDisplayed( [in] XGameStreamingClientId client, [out] D3D12XBOX_FRAME_PIPELINE_TOKEN *framePipelineToken ); + HRESULT XGameStreamingGetAssociatedFrame( [in] IGameInputReading *gamepadReading, [out] D3D12XBOX_FRAME_PIPELINE_TOKEN *framePipelineToken ); + HRESULT XGameStreamingGetGamepadPhysicality( [in] IGameInputReading *gamepadReading, [out] XGameStreamingGamepadPhysicality *gamepadPhysicality ); + HRESULT XGameStreamingUpdateTouchControlsState( [in] SIZE_T operationCount, [in, optional, length_is(operationCount)] const XGameStreamingTouchControlsStateOperation operations[*] ); + HRESULT XGameStreamingUpdateTouchControlsStateOnClient( [in] XGameStreamingClientId client, [in] SIZE_T operationCount, [in, optional, length_is(operationCount)] const XGameStreamingTouchControlsStateOperation operations[*] ); + HRESULT XGameStreamingShowTouchControlsWithStateUpdate( [in, optional, string] const char *layout, [in] SIZE_T operationCount, [in, optional, length_is(operationCount)] const XGameStreamingTouchControlsStateOperation operations[*] ); + HRESULT XGameStreamingShowTouchControlsWithStateUpdateOnClient( [in] XGameStreamingClientId client, [in, optional, string] const char *layout, [in] SIZE_T operationCount, [in, optional, length_is(operationCount)] const XGameStreamingTouchControlsStateOperation operations[*] ); + SIZE_T XGameStreamingGetTouchBundleVersionNameSize( [in] XGameStreamingClientId client ); + HRESULT XGameStreamingGetTouchBundleVersion( [in] XGameStreamingClientId client, [out, optional] XVersion *version, [in] SIZE_T versionNameSize, [out, optional, string, size_is(versionNameSize)] char *versionName ); + HRESULT XGameStreamingGetClientIPAddress( [in] XGameStreamingClientId client, [in] SIZE_T ipAddressSize, [out, string, size_is(ipAddressSize)] char *ipAddress ); +} + +[ + local, + object, + uuid(5f5e5169-746c-4001-ad1c-da728d01c9eb) +] +interface IXGameStreamingImpl2 : IXGameStreamingImpl +{ + HRESULT XGameStreamingGetSessionId( [in] XGameStreamingClientId client, [in] SIZE_T sessionIdSize, [out, string, size_is(sessionIdSize)] char *sessionId, [out, optional] SIZE_T *sessionIdUsed ); +} + +[ + local, + object, + uuid(57786622-6605-46d0-b917-0f22bbcd9c52) +] +interface IXGameStreamingImpl3 : IXGameStreamingImpl2 +{ + HRESULT XGameStreamingGetDisplayDetails( [in] XGameStreamingClientId client, [in] UINT32 maxSupportedPixels, [in] float widestSupportedAspectRatio, [in] float tallestSupportedAspectRatio, [out] XGameStreamingDisplayDetails *displayDetails ); + HRESULT XGameStreamingSetResolution( [in] UINT32 width, [in] UINT32 height ); +} + +[ + uuid(0a2192aa-b2d5-4d58-83be-383b6d80799e) +] +coclass XGameStreamingImpl +{ + [default] interface IXGameStreamingImpl3; +} + +cpp_quote("#endif") diff --git a/include/xgameui.idl b/include/xgameui.idl new file mode 100644 index 00000000000..89ff5a27432 --- /dev/null +++ b/include/xgameui.idl @@ -0,0 +1,298 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; +import "xuser.idl"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XGameUiMessageDialogButton : UINT32") +cpp_quote("{ ") +cpp_quote(" First, ") +cpp_quote(" Second, ") +cpp_quote(" Third, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiNotificationPositionHint : UINT32") +cpp_quote("{ ") +cpp_quote(" BottomCenter, ") +cpp_quote(" BottomLeft, ") +cpp_quote(" BottomRight, ") +cpp_quote(" TopCenter, ") +cpp_quote(" TopLeft, ") +cpp_quote(" TopRight, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiTextEntryChangeTypeFlags : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" TextChanged = 0x01, ") +cpp_quote(" Dismissed = 0x02, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiTextEntryInputScope : UINT32") +cpp_quote("{ ") +cpp_quote(" Default = 0, ") +cpp_quote(" Url = 1, ") +cpp_quote(" EmailSmtpAddress = 5, ") +cpp_quote(" Number = 29, ") +cpp_quote(" Password = 31, ") +cpp_quote(" TelephoneNumber = 32, ") +cpp_quote(" Alphanumeric = 40, ") +cpp_quote(" Search = 50, ") +cpp_quote(" ChatWithoutEmoji = 68, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiTextEntryPositionHint : UINT32") +cpp_quote("{ ") +cpp_quote(" Bottom, ") +cpp_quote(" Top, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiTextEntryVisibilityFlags : UINT32") +cpp_quote("{ ") +cpp_quote(" Default = 0x00, ") +cpp_quote(" OnlyShowCandidates = 0x01, ") +cpp_quote("}; ") + +cpp_quote("enum class XGameUiWebAuthenticationOptions : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" PreferFullscreen = 0x01, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XGameUiMessageDialogButton +{ + XGameUiMessageDialogButton_First, + XGameUiMessageDialogButton_Second, + XGameUiMessageDialogButton_Third, +} XGameUiMessageDialogButton; + +typedef enum XGameUiNotificationPositionHint +{ + XGameUiNotificationPositionHint_BottomCenter, + XGameUiNotificationPositionHint_BottomLeft, + XGameUiNotificationPositionHint_BottomRight, + XGameUiNotificationPositionHint_TopCenter, + XGameUiNotificationPositionHint_TopLeft, + XGameUiNotificationPositionHint_TopRight, +} XGameUiNotificationPositionHint; + +typedef enum XGameUiTextEntryChangeTypeFlags +{ + XGameUiTextEntryChangeTypeFlags_None = 0x00, + XGameUiTextEntryChangeTypeFlags_TextChanged = 0x01, + XGameUiTextEntryChangeTypeFlags_Dismissed = 0x02, +} XGameUiTextEntryChangeTypeFlags; + +typedef enum XGameUiTextEntryInputScope +{ + XGameUiTextEntryInputScope_Default = 0, + XGameUiTextEntryInputScope_Url = 1, + XGameUiTextEntryInputScope_EmailSmtpAddress = 5, + XGameUiTextEntryInputScope_Number = 29, + XGameUiTextEntryInputScope_Password = 31, + XGameUiTextEntryInputScope_TelephoneNumber = 32, + XGameUiTextEntryInputScope_Alphanumeric = 40, + XGameUiTextEntryInputScope_Search = 50, + XGameUiTextEntryInputScope_ChatWithoutEmoji = 68, +} XGameUiTextEntryInputScope; + +typedef enum XGameUiTextEntryPositionHint +{ + XGameUiTextEntryPositionHint_Bottom, + XGameUiTextEntryPositionHint_Top, +} XGameUiTextEntryPositionHint; + +typedef enum XGameUiTextEntryVisibilityFlags +{ + XGameUiTextEntryVisibilityFlags_Default = 0x00, + XGameUiTextEntryVisibilityFlags_OnlyShowCandidates = 0x01, +} XGameUiTextEntryVisibilityFlags; + +typedef enum XGameUiWebAuthenticationOptions +{ + XGameUiWebAuthenticationOptions_None = 0x00, + XGameUiWebAuthenticationOptions_PreferFullscreen = 0x01, +} XGameUiWebAuthenticationOptions; + +cpp_quote("#endif") + +typedef struct XGameUiCallbackObject *XGameUiCallbackHandle; +typedef struct XGameUiTextEntry *XGameUiTextEntryHandle; + +typedef struct XGameUiPlayerPickerInfo XGameUiPlayerPickerInfo; +typedef struct XGameUiTextEntryExtents XGameUiTextEntryExtents; +typedef struct XGameUiTextEntryOptions XGameUiTextEntryOptions; +typedef struct XGameUiUiCallbacks XGameUiUiCallbacks; +typedef struct XGameUiWebAuthenticationResultData XGameUiWebAuthenticationResultData; + +typedef void __stdcall XGameUiShowPlayerProfileCardUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, XUserHandle requestingUser, UINT64 targetPlayer, void *context ); +typedef void __stdcall XGameUiShowPlayerPickerUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, XGameUiPlayerPickerInfo *info, void *context ); +typedef void __stdcall XGameUiShowSendGameInviteUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, XUserHandle requestingUser, const char *sessionConfigurationId, const char *sessionTemplateName, const char *sessionId, const char *invitationText, const char *customActivationContext, void *context ); +typedef void __stdcall XGameUiShowAchievementsUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, XUserHandle requestingUser, UINT32 titleId, void *context ); +typedef void __stdcall XGameUiShowMultiplayerActivityGameInviteUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, XUserHandle requestingUser, void *context ); +typedef void __stdcall XGameUiShowMessageDialogUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, const char *titleText, const char *contentText, const char *firstButtonText, const char *secondButtonText, const char *thirdButtonText, XGameUiMessageDialogButton defaultButton, XGameUiMessageDialogButton cancelButton, void *context ); +typedef void __stdcall XGameUiShowErrorDialogUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, HRESULT errorCode, const char *serviceContext, void *context ); +typedef void __stdcall XGameUiShowTextEntryUiCallback( XGameUiCallbackHandle callbackHandle, XTaskQueueHandle queue, const char *titleText, const char *descriptionText, const char *defaultText, XGameUiTextEntryInputScope inputScope, UINT32 maxTextLength, void *context ); + +struct XGameUiPlayerPickerInfo +{ + XUserHandle requestingUser; + const char *promptText; + UINT32 selectFromPlayersCount; + const UINT64 *selectFromPlayers; + UINT32 preSelectedPlayersCount; + const UINT64 *preSelectedPlayers; + UINT32 minSelectionCount; + UINT32 maxSelectionCount; +}; + +struct XGameUiTextEntryExtents +{ + float left; + float top; + float right; + float bottom; +}; + +struct XGameUiTextEntryOptions +{ + XGameUiTextEntryInputScope inputScope; + XGameUiTextEntryPositionHint positionHint; + XGameUiTextEntryVisibilityFlags visibilityFlags; +}; + +struct XGameUiUiCallbacks +{ + void *context; + XGameUiShowPlayerProfileCardUiCallback *showPlayerProfileCardCallback; + XGameUiShowPlayerPickerUiCallback *showPlayerPickerCallback; + XGameUiShowSendGameInviteUiCallback *showSendGameInviteCallback; + XGameUiShowAchievementsUiCallback *showAchievementsCallback; + XGameUiShowMultiplayerActivityGameInviteUiCallback *showMultiplayerActivityGameInviteCallback; + XGameUiShowMessageDialogUiCallback *showMessageDialogCallback; + XGameUiShowErrorDialogUiCallback *showErrorDialogCallback; + XGameUiShowTextEntryUiCallback *showTextEntryCallback; +}; + +struct XGameUiWebAuthenticationResultData +{ + HRESULT responseStatus; + SIZE_T responseCompletionUriSize; + const char *responseCompletionUri; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(6eeaa73e-9669-43ad-a2c7-d0da4e1f50a1) +] +interface IXGameUiImpl : IUnknown +{ + HRESULT XGameUiShowMessageDialogAsync( [in, out] XAsyncBlock *async, [in, string] const char *titleText, [in, string] const char *contentText, [in, optional, string] const char *firstButtonText, [in, optional, string] const char *secondButtonText, [in, optional, string] const char *thirdButtonText, [in] XGameUiMessageDialogButton defaultButton, [in] XGameUiMessageDialogButton cancelButton ); + HRESULT XGameUiShowMessageDialogResult( [in, out] XAsyncBlock *async, [out] XGameUiMessageDialogButton *resultButton ); + HRESULT XGameUiShowSendGameInviteAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in, string] const char *sessionConfigurationId, [in, string] const char *sessionTemplateName, [in, string] const char *sessionId, [in, optional, string] const char *invitationText, [in, optional, string] const char *customActivationContext ); + HRESULT XGameUiShowSendGameInviteResult( [in, out] XAsyncBlock *async ); + HRESULT XGameUiShowPlayerProfileCardAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in] UINT64 targetPlayer ); + HRESULT XGameUiShowPlayerProfileCardResult( [in, out] XAsyncBlock *async ); + HRESULT XGameUiShowAchievementsAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in] UINT32 titleId ); + HRESULT XGameUiShowAchievementsResult( [in, out] XAsyncBlock *async ); + HRESULT XGameUiShowPlayerPickerAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in, string] const char *promptText, [in] UINT32 selectFromPlayersCount, [in, length_is(selectFromPlayersCount)] const UINT64 selectFromPlayers[*], [in] UINT32 preSelectedPlayersCount, [in, optional, length_is(preSelectedPlayersCount)] UINT64 preSelectedPlayers[*], [in] UINT32 minSelectionCount, [in] UINT32 maxSelectionCount ); + HRESULT XGameUiShowPlayerPickerResultCount( [in, out] XAsyncBlock *async, [out] UINT32 *resultPlayersCount ); + HRESULT XGameUiShowPlayerPickerResult( [in, out] XAsyncBlock *async, [in] UINT32 resultPlayersCount, [out, length_is(resultPlayersCount)] UINT64 resultPlayers[*], [out, optional] UINT32 *resultPlayersUsed ); + HRESULT XGameUiShowErrorDialogAsync( [in, out] XAsyncBlock *async, [in] HRESULT errorCode, [in, optional, string] const char *context ); + HRESULT XGameUiShowErrorDialogResult( [in, out] XAsyncBlock *async ); + HRESULT XGameUiSetNotificationPositionHint( [in] XGameUiNotificationPositionHint position ); + HRESULT XGameUiShowTextEntryAsync( [in, out] XAsyncBlock *async, [in, optional, string] const char *titleText, [in, optional, string] const char *descriptionText, [in, optional, string] const char *defaultText, [in] XGameUiTextEntryInputScope inputScope, [in] UINT32 maxTextLength ); + HRESULT XGameUiShowTextEntryResultSize( [in, out] XAsyncBlock *async, [out] UINT32 *resultTextBufferSize ); + HRESULT XGameUiShowTextEntryResult( [in, out] XAsyncBlock *async, [in] UINT32 resultTextBufferSize, [out, size_is(resultTextBufferSize)] char *resultTextBuffer, [out, optional] UINT32 *resultTextBufferUsed ); + HRESULT __PADDING__(); + HRESULT __PADDING_2__(); + HRESULT __PADDING_3__(); + HRESULT __PADDING_4__(); + HRESULT XGameUiShowWebAuthenticationAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in, string] const char *requestUri, [in, string] const char *completionUri ); + HRESULT XGameUiShowWebAuthenticationResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *bufferSize ); + HRESULT XGameUiShowWebAuthenticationResult( [in, out] XAsyncBlock *async, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, ptr] XGameUiWebAuthenticationResultData **ptrToBuffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XGameUiShowWebAuthenticationWithOptionsAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in, string] const char *requestUri, [in, string] const char *completionUri, [in] XGameUiWebAuthenticationOptions options ); + HRESULT __PADDING_5__(); + HRESULT __PADDING_6__(); +} + +[ + local, + object, + uuid(36a03122-9ea3-4a3a-a8a4-899cfd85d7db) +] +interface IXGameUiImpl2 : IXGameUiImpl +{ + HRESULT XGameUiShowMultiplayerActivityGameInviteAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser ); + HRESULT XGameUiShowMultiplayerActivityGameInviteResult( [in, out] XAsyncBlock *async ); + HRESULT __PADDING_7__(); + HRESULT __PADDING_8__(); + HRESULT XGameUiTextEntryOpen( [in] const XGameUiTextEntryOptions *options, [in] UINT32 maxLength, [in, optional, string] const char *initialText, [in] UINT32 initialCursorIndex, [out] XGameUiTextEntryHandle *handle ); + HRESULT XGameUiTextEntryClose( [in] XGameUiTextEntryHandle handle ); + HRESULT XGameUiTextEntryGetState( [in] XGameUiTextEntryHandle handle, [out] XGameUiTextEntryChangeTypeFlags *changeType, [out, optional] UINT32 *cursorIndex, [out, optional] UINT32 *imeClauseStartIndex, [out, optional] UINT32 *imeClauseEndIndex, [in] UINT32 bufferSize, [out, size_is(bufferSize)] char *buffer ); + HRESULT XGameUiTextEntryGetExtents( [in] XGameUiTextEntryHandle handle, [out] XGameUiTextEntryExtents *extents ); + HRESULT XGameUiTextEntryUpdatePositionHint( [in] XGameUiTextEntryHandle handle, [in] XGameUiTextEntryPositionHint positionHint ); + HRESULT XGameUiTextEntryUpdateVisibility( [in] XGameUiTextEntryHandle handle, [in] XGameUiTextEntryVisibilityFlags visibilityFlags ); +} + +[ + local, + object, + uuid(ade7eba1-2093-42ce-a544-a523a66790e0) +] +interface IXGameUiImpl3 : IXGameUiImpl2 +{ + HRESULT XGameUiShowStateShareAsync( [in, out] XAsyncBlock *async, [in] XUserHandle requestingUser, [in, string] const char *linkToken ); + HRESULT XGameUiShowStateShareResult( [in, out] XAsyncBlock *async ); +} + +[ + local, + object, + uuid(eaf669df-5542-4590-99a3-8dc061f837cc) +] +interface IXGameUiImpl4 : IXGameUiImpl3 +{ + HRESULT XGameUiSetUiCallbacks( [in] const XGameUiUiCallbacks *callbacks, [in] BOOLEAN useSystemUiIfAvailable ); + HRESULT XGameUiSetMessageDialogUiResponse( [in] XGameUiCallbackHandle callbackHandle, [in] XGameUiMessageDialogButton response ); + HRESULT XGameUiSetPlayerPickerUiResponse( [in] XGameUiCallbackHandle callbackHandle, [in] UINT32 playerCount, [in, length_is(playerCount)] const UINT64 players[*] ); + HRESULT XGameUiSetTextEntryUiResponse( [in] XGameUiCallbackHandle callbackHandle, [in, string] const char *response ); + HRESULT XGameUiSetPlayerProfileCardUiResponse( [in] XGameUiCallbackHandle callbackHandle ); + HRESULT XGameUiSetSendGameInviteUiResponse( [in] XGameUiCallbackHandle callbackHandle ); + HRESULT XGameUiSetAchievementsUiResponse( [in] XGameUiCallbackHandle callbackHandle ); + HRESULT XGameUiSetMultiplayerActivityGameInviteUiResponse( [in] XGameUiCallbackHandle callbackHandle ); + HRESULT XGameUiSetErrorDialogUiResponse( [in] XGameUiCallbackHandle callbackHandle ); +} + +[ + uuid(dfcd4649-4ff8-4043-ba07-35d607df98b0) +] +coclass XGameUiImpl +{ + [default] interface IXGameUiImpl4; +} + +cpp_quote("#endif") diff --git a/include/xlauncher.idl b/include/xlauncher.idl new file mode 100644 index 00000000000..532dc0889ea --- /dev/null +++ b/include/xlauncher.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xdisplay.idl"; +import "xuser.idl"; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(1b339674-328d-4283-a200-3171f18d3639) +] +interface IXLauncherImpl : IUnknown +{ + HRESULT XLaunchUri( [in, optional] XUserHandle user, [in, string] const char *uri ); + HRESULT XDisplayAcquireTimeoutDeferral( [out] XDisplayTimeoutDeferralHandle *handle ); + void XDisplayCloseTimeoutDeferralHandle( [in] XDisplayTimeoutDeferralHandle handle ); +} + +[ + uuid(1b339674-328d-4283-a200-3171f18d3639) +] +coclass XLauncherImpl +{ + [default] interface IXLauncherImpl; +} + +cpp_quote("#endif") diff --git a/include/xnetworking.h b/include/xnetworking.h deleted file mode 100644 index 35cb15a16cb..00000000000 --- a/include/xnetworking.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) the Wine project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __WINE_XNETWORKING_H -#define __WINE_XNETWORKING_H - -#include "xasync.h" - -typedef enum XNetworkingThumbprintType -{ - ThumbprintType_Leaf = 0, - ThumbprintType_Issuer = 1, - ThumbprintType_Root = 2, -} XNetworkingThumbprintType; - -typedef enum XNetworkingConnectivityLevelHint -{ - ConnectivityLevelHintUnknown = 0, - ConnectivityLevelHintNone = 1, - ConnectivityLevelHintLocalAccess = 2, - ConnectivityLevelHintInternetAccess = 3, - ConnectivityLevelHintConstrainedInternetAccess = 4, -} XNetworkingConnectivityLevelHint; - -typedef enum XNetworkingConnectivityCostHint -{ - ConnectivityCostHintUnknown = 0, - ConnectivityCostHintUnrestricted = 1, - ConnectivityCostHintFixed = 2, - ConnectivityCostHintVariable = 3, -} XNetworkingConnectivityCostHint; - -typedef struct XNetworkingThumbprint -{ - XNetworkingThumbprintType thumbprintType; - SIZE_T thumbprintBufferByteCount; - UINT8* thumbprintBuffer; -} XNetworkingThumbprint; - -typedef struct XNetworkingSecurityInformation -{ - UINT32 enabledHttpSecurityProtocolFlags; - SIZE_T thumbprintCount; - XNetworkingThumbprint* thumbprints; -} XNetworkingSecurityInformation; - -typedef struct XNetworkingConnectivityHint -{ - XNetworkingConnectivityLevelHint connectivityLevel; - XNetworkingConnectivityCostHint connectivityCost; - UINT32 ianaInterfaceType; - BOOLEAN networkInitialized; - BOOLEAN approachingDataLimit; - BOOLEAN overDataLimit; - BOOLEAN roaming; -} XNetworkingConnectivityHint; - -typedef enum XNetworkingConfigurationSetting -{ - MaxTitleTcpQueuedReceiveBufferSize = 0, - MaxSystemTcpQueuedReceiveBufferSize = 1, - MaxToolsTcpQueuedReceiveBufferSize = 2, -} XNetworkingConfigurationSetting; - -typedef enum XNetworkingStatisticsType -{ - TitleTcpQueuedReceivedBufferUsage = 0, - SystemTcpQueuedReceivedBufferUsage = 1, - ToolsTcpQueuedReceivedBufferUsage = 2, -} XNetworkingStatisticsType; - -typedef struct XNetworkingTcpQueuedReceivedBufferUsageStatistics -{ - UINT64 numBytesCurrentlyQueued; - UINT64 peakNumBytesEverQueued; - UINT64 totalNumBytesQueued; - UINT64 numBytesDroppedForExceedingConfiguredMax; - UINT64 numBytesDroppedDueToAnyFailure; -} XNetworkingTcpQueuedReceivedBufferUsageStatistics; - -typedef union XNetworkingStatisticsBuffer -{ - XNetworkingTcpQueuedReceivedBufferUsageStatistics tcpQueuedReceiveBufferUsage; -} XNetworkingStatisticsBuffer; - -typedef void CALLBACK XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback(_In_opt_ PVOID context, _In_ UINT16 preferredLocalUdpMultiplayerPort); -typedef void CALLBACK XNetworkingConnectivityHintChangedCallback(_In_opt_ PVOID context, _In_ const XNetworkingConnectivityHint* connectivityHint); -#endif \ No newline at end of file diff --git a/include/xnetworking.idl b/include/xnetworking.idl new file mode 100644 index 00000000000..adf86b29751 --- /dev/null +++ b/include/xnetworking.idl @@ -0,0 +1,199 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XNetworkingConfigurationSetting : UINT32") +cpp_quote("{ ") +cpp_quote(" MaxTitleTcpQueuedReceiveBufferSize, ") +cpp_quote(" MaxSystemTcpQueuedReceiveBufferSize, ") +cpp_quote(" MaxToolsTcpQueuedReceiveBufferSize, ") +cpp_quote("}; ") + +cpp_quote("enum class XNetworkingConnectivityCostHint : UINT32") +cpp_quote("{ ") +cpp_quote(" Unknown ") +cpp_quote(" Unrestricted ") +cpp_quote(" Fixed ") +cpp_quote(" Varialbe ") +cpp_quote("}; ") + +cpp_quote("enum class XNetworkingConnectivityLevelHint : UINT32") +cpp_quote("{ ") +cpp_quote(" Unknown ") +cpp_quote(" None ") +cpp_quote(" LocalAccess ") +cpp_quote(" InternetAccess ") +cpp_quote(" ConstrainedInternetAccess ") +cpp_quote("}; ") + +cpp_quote("enum class XNetworkingStatisticsType : UINT32") +cpp_quote("{ ") +cpp_quote(" TitleTcpQueuedReceivedBufferUsage ") +cpp_quote(" SystemTcpQueuedReceivedBufferUsage ") +cpp_quote(" ToolsTcpQueuedReceivedBufferUsage ") +cpp_quote("}; ") + +cpp_quote("enum class XNetworkingThumbprintType : UINT32") +cpp_quote("{ ") +cpp_quote(" Leaf ") +cpp_quote(" Issuer ") +cpp_quote(" Root ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XNetworkingConfigurationSetting +{ + XNetworkingConfigurationSetting_MaxTitleTcpQueuedReceiveBufferSize, + XNetworkingConfigurationSetting_MaxSystemTcpQueuedReceiveBufferSize, + XNetworkingConfigurationSetting_MaxToolsTcpQueuedReceiveBufferSize, +} XNetworkingConfigurationSetting; + +typedef enum XNetworkingConnectivityCostHint +{ + XNetworkingConnectivityCostHint_Unknown, + XNetworkingConnectivityCostHint_Unrestricted, + XNetworkingConnectivityCostHint_Fixed, + XNetworkingConnectivityCostHint_Varialbe, +} XNetworkingConnectivityCostHint; + +typedef enum XNetworkingConnectivityLevelHint +{ + XNetworkingConnectivityLevelHint_Unknown, + XNetworkingConnectivityLevelHint_None, + XNetworkingConnectivityLevelHint_LocalAccess, + XNetworkingConnectivityLevelHint_InternetAccess, + XNetworkingConnectivityLevelHint_ConstrainedInternetAccess, +} XNetworkingConnectivityLevelHint; + +typedef enum XNetworkingStatisticsType +{ + XNetworkingStatisticsType_TitleTcpQueuedReceivedBufferUsage, + XNetworkingStatisticsType_SystemTcpQueuedReceivedBufferUsage, + XNetworkingStatisticsType_ToolsTcpQueuedReceivedBufferUsage, +} XNetworkingStatisticsType; + +typedef enum XNetworkingThumbprintType +{ + XNetworkingThumbprintType_Leaf, + XNetworkingThumbprintType_Issuer, + XNetworkingThumbprintType_Root, +} XNetworkingThumbprintType; + +cpp_quote("#endif") + +typedef struct XNetworkingConnectivityHint XNetworkingConnectivityHint; +typedef struct XNetworkingSecurityInformation XNetworkingSecurityInformation; +typedef struct XNetworkingTcpQueuedReceivedBufferUsageStatistics XNetworkingTcpQueuedReceivedBufferUsageStatistics; +typedef struct XNetworkingThumbprint XNetworkingThumbprint; + +typedef union XNetworkingStatisticsBuffer XNetworkingStatisticsBuffer; + +typedef void __stdcall XNetworkingConnectivityHintChangedCallback( void *context, const XNetworkingConnectivityHint *connectivityHint ); +typedef void __stdcall XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback( void *context, UINT64 preferredLocalUdpMultiplayerPort ); + +struct XNetworkingConnectivityHint +{ + XNetworkingConnectivityLevelHint connectivityLevel; + XNetworkingConnectivityCostHint connectivityCost; + UINT32 ianaInterfaceType; + BOOLEAN networkInitialized; + BOOLEAN approachingDataLimit; + BOOLEAN overDataLimit; + BOOLEAN roaming; +}; + +struct XNetworkingSecurityInformation +{ + UINT32 enabledHttpSecurityProtocolFlags; + SIZE_T thumbprintCount; + XNetworkingThumbprint *thumbprints; +}; + +struct XNetworkingTcpQueuedReceivedBufferUsageStatistics +{ + UINT64 numBytesCurrentlyQueued; + UINT64 peakNumBytesEverQueued; + UINT64 totalNumBytesQueued; + UINT64 numBytesDroppedForExceedingConfiguredMax; + UINT64 numBytesDroppedDueToAnyFailure; +}; + +struct XNetworkingThumbprint +{ + XNetworkingThumbprintType thumbprintType; + SIZE_T thumbprintBufferByteCount; + UINT8 *thumbprintBuffer; +}; + +union XNetworkingStatisticsBuffer +{ + XNetworkingTcpQueuedReceivedBufferUsageStatistics tcpQueuedReceiveBufferUsage; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(37e56907-2f10-41e8-b72f-36edb185331a) +] +interface IXNetworkingImpl : IUnknown +{ + HRESULT XNetworkingQueryPreferredLocalUdpMultiplayerPort( [out] UINT16 *preferredLocalUdpMultiplayerPort ); + HRESULT XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync( [in, out] XAsyncBlock *asyncBlock ); + HRESULT XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult( [in, out] XAsyncBlock *asyncBlock, [out] UINT16 *preferredLocalUdpMultiplayerPort ); + HRESULT XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XNetworkingQuerySecurityInformationForUrlAsync( [in, string] const char *url, [in, out] XAsyncBlock *asyncBlock ); + HRESULT XNetworkingQuerySecurityInformationForUrlAsyncResultSize( [in, out] XAsyncBlock *asyncBlock, [out] SIZE_T *securityInformationBufferByteCount ); + HRESULT XNetworkingQuerySecurityInformationForUrlAsyncResult( [in, out] XAsyncBlock *asyncBlock, [in] SIZE_T securityInformationBufferByteCount, [out, optional] SIZE_T *securityInformationBufferByteCountUsed, [out] UINT8 *securityInformationBuffer, [out, ptr] XNetworkingSecurityInformation **securityInformation ); + HRESULT XNetworkingQuerySecurityInformationForUrlUtf16Async( [in, string] const WCHAR *url, [in, out] XAsyncBlock *asyncBlock ); + HRESULT XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize( [in, out] XAsyncBlock *asyncBlock, [out] SIZE_T *securityInformationBufferByteCount ); + HRESULT XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult( [in, out] XAsyncBlock *asyncBlock, [in] SIZE_T securityInformationBufferByteCount, [out, optional] SIZE_T *securityInformationBufferByteCountUsed, [out] UINT8 *securityInformationBuffer, [out, ptr] XNetworkingSecurityInformation **securityInformation ); + HRESULT XNetworkingVerifyServerCertificate( [in] void *requestHandle, [in] const XNetworkingSecurityInformation *securityInformation ); + HRESULT XNetworkingGetConnectivityHint( [out] XNetworkingConnectivityHint *connectivityHint ); + HRESULT XNetworkingRegisterConnectivityHintChanged( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XNetworkingConnectivityHintChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XNetworkingUnregisterConnectivityHintChanged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); +} + +[ + local, + object, + uuid(bf2346b2-39af-4658-b5ea-44713c7e83b3) +] +interface IXNetworkingImpl2 : IXNetworkingImpl +{ + HRESULT XNetworkingQueryConfigurationSetting( [in] XNetworkingConfigurationSetting configurationSetting, [out] UINT64 *value ); + HRESULT XNetworkingSetConfigurationSetting( [in] XNetworkingConfigurationSetting configurationParameter, [in] UINT64 value ); + HRESULT XNetworkingQueryStatistics( [in] XNetworkingStatisticsType statisticsType, [out] XNetworkingStatisticsBuffer *statisticsBuffer ); +} + +[ + uuid(37e56907-2f10-41e8-b72f-36edb185331a) +] +coclass XNetworkingImpl +{ + [default] interface IXNetworkingImpl2; +} + +cpp_quote("#endif") diff --git a/include/xpackage.idl b/include/xpackage.idl new file mode 100644 index 00000000000..0a69c55835e --- /dev/null +++ b/include/xpackage.idl @@ -0,0 +1,232 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; +import "xgameruntimetypes.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XPackageChunkAvailability : UINT32") +cpp_quote("{ ") +cpp_quote(" Ready, ") +cpp_quote(" Pending, ") +cpp_quote(" Installable, ") +cpp_quote(" Unavailable, ") +cpp_quote("}; ") + +cpp_quote("enum class XPackageChunkSelectorType : UINT32") +cpp_quote("{ ") +cpp_quote(" Language, ") +cpp_quote(" Tag, ") +cpp_quote(" Chunk, ") +cpp_quote(" Feature, ") +cpp_quote("}; ") + +cpp_quote("enum class XPackageEnumerationScope : UINT32") +cpp_quote("{ ") +cpp_quote(" ThisOnly, ") +cpp_quote(" ThisAndRelated, ") +cpp_quote(" ThisPublisher, ") +cpp_quote("}; ") + +cpp_quote("enum class XPackageKind : UINT32") +cpp_quote("{ ") +cpp_quote(" Game, ") +cpp_quote(" Content, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XPackageChunkAvailability +{ + XPackageChunkAvailability_Ready, + XPackageChunkAvailability_Pending, + XPackageChunkAvailability_Installable, + XPackageChunkAvailability_Unavailable, +} XPackageChunkAvailability; + +typedef enum XPackageChunkSelectorType +{ + XPackageChunkSelectorType_Language, + XPackageChunkSelectorType_Tag, + XPackageChunkSelectorType_Chunk, + XPackageChunkSelectorType_Feature, +} XPackageChunkSelectorType; + +typedef enum XPackageEnumerationScope +{ + XPackageEnumerationScope_ThisOnly, + XPackageEnumerationScope_ThisAndRelated, + XPackageEnumerationScope_ThisPublisher, +} XPackageEnumerationScope; + +typedef enum XPackageKind +{ + XPackageKind_Game, + XPackageKind_Content, +} XPackageKind; + +cpp_quote("#endif") + +typedef struct XPackageInstallationMonitor *XPackageInstallationMonitorHandle; +typedef struct XPackageMountInstance *XPackageMountHandle; + +typedef struct XPackageChunkSelector XPackageChunkSelector; +typedef struct XPackageDetails XPackageDetails; +typedef struct XPackageFeature XPackageFeature; +typedef struct XPackageInstallationProgress XPackageInstallationProgress; +typedef struct XPackageWriteStats XPackageWriteStats; + +typedef BOOLEAN __stdcall XPackageChunkAvailabilityCallback( void *context, const XPackageChunkSelector *selector, XPackageChunkAvailability availability ); +typedef BOOLEAN __stdcall XPackageEnumerationCallback( void *context, const XPackageDetails *details ); +typedef BOOLEAN __stdcall XPackageFeatureEnumerationCallback( void *context, const XPackageFeature *details ); +typedef void __stdcall XPackageInstallationProgressCallback( void *context, XPackageInstallationMonitorHandle monitor ); +typedef void __stdcall XPackageInstalledCallback( void *context, const XPackageDetails *details ); + +struct XPackageChunkSelector +{ + XPackageChunkSelectorType type; + union + { + const char *language; + const char *tag; + const char *feature; + UINT32 chunkId; + }; +}; + +struct XPackageDetails +{ + const char *packageIdentifier; + XVersion version; + XPackageKind kind; + const char *displayName; + const char *description; + const char *publisher; + const char *storeId; + BOOLEAN installing; + UINT32 index; + UINT32 count; + BOOLEAN ageRestricted; + const char *titleID; +}; + +struct XPackageFeature +{ + const char *id; + const char *displayName; + const char *tags; + BOOLEAN hidden; + UINT32 storeIdCount; + const char **storeIds; +}; + +struct XPackageInstallationProgress +{ + UINT64 totalBytes; + UINT64 installedBytes; + UINT64 launchBytes; + BOOLEAN launchable; + BOOLEAN completed; +}; + +struct XPackageWriteStats +{ + UINT64 interval; + UINT64 budget; + UINT64 elapsed; + UINT64 bytesWritten; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(3720de07-e8e4-44a3-ad32-b359e8adbe55) +] +interface IXPackageImpl : IUnknown +{ + HRESULT XPackageGetCurrentProcessPackageIdentifier( [in] SIZE_T bufferSize, [out, size_is(bufferSize)] char *buffer ); + BOOLEAN XPackageIsPackagedProcess(); + HRESULT XPackageCreateInstallationMonitor( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, optional, length_is(selectorCount)] XPackageChunkSelector selectors[*], [in] UINT32 minimumUpdateIntervalMs, [in, optional] XTaskQueueHandle queue, [out] XPackageInstallationMonitorHandle *installationMonitor ); + void XPackageCloseInstallationMonitorHandle( [in] XPackageInstallationMonitorHandle installationMonitor ); + void XPackageGetInstallationProgress( [in] XPackageInstallationMonitorHandle installationMonitor, [out] XPackageInstallationProgress *progress ); + BOOLEAN XPackageUpdateInstallationMonitor( [in] XPackageInstallationMonitorHandle installationMonitor ); + HRESULT XPackageRegisterInstallationProgressChanged( [in] XPackageInstallationMonitorHandle installationMonitor, [in, optional] void *context, [in] XPackageInstallationProgressCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XPackageUnregisterInstallationProgressChanged( [in] XPackageInstallationMonitorHandle installationMonitor, [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XPackageGetUserLocale( [in] SIZE_T localeSize, [out, size_is(localSize)] char *locale ); + HRESULT XPackageFindChunkAvailability( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, optional, length_is(selectorCount)] XPackageChunkSelector selectors[*], [out] XPackageChunkAvailability *availability ); + HRESULT XPackageEnumerateChunkAvailability( [in, string] const char *packageIdentifier, [in] XPackageChunkSelectorType type, [in] void *context, [in] XPackageChunkAvailabilityCallback *callback ); + HRESULT XPackageChangeChunkInstallOrder( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, length_is(selectorCount)] XPackageChunkSelector selectors[*] ); + HRESULT XPackageInstallChunks( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, size_is(selectorCount)] XPackageChunkSelector *selectors, [in] UINT32 minimumUpdateIntervalMs, [in] BOOLEAN suppressUserConfirmation, [in, optional] XTaskQueueHandle queue, [out] XPackageInstallationMonitorHandle *installationMonitor ); + HRESULT XPackageInstallChunksAsync( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, length_is(selectorCount)] XPackageChunkSelector selectors[*], [in] UINT32 minimumUpdateIntervalMs, [in] BOOLEAN suppressUserConfirmation, [in, out] XAsyncBlock *asyncBlock ); + HRESULT XPackageInstallChunksResult( [in, out] XAsyncBlock *asyncBlock, [out] XPackageInstallationMonitorHandle *installationMonitor ); + HRESULT XPackageEstimateDownloadSize( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, length_is(selectorCount)] XPackageChunkSelector selectors[*], [out] UINT64 *downloadSize, [out, optional] BOOLEAN *shouldPresentUserConfirmation ); + HRESULT XPackageUninstallChunks( [in, string] const char *packageIdentifier, [in] UINT32 selectorCount, [in, length_is(selectorCount)] XPackageChunkSelector selectors[*] ); + HRESULT __PADDING__(); + HRESULT __PADDING_2__(); + BOOLEAN XPackageUnregisterPackageInstalled( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT __PADDING_3__(); + HRESULT XPackageGetMountPathSize( [in] XPackageMountHandle mount, [out] SIZE_T *pathSize ); + HRESULT XPackageGetMountPath( [in] XPackageMountHandle mount, [in] SIZE_T pathSize, [out, size_is(pathSize)] char *path ); + void XPackageCloseMountHandle( [in] XPackageMountHandle mount ); + HRESULT __PADDING_4__(); + HRESULT XPackageEnumeratePackages( [in] XPackageKind kind, [in] XPackageEnumerationScope scope, [in, optional] void *context, [in] XPackageEnumerationCallback *callback ); + HRESULT XPackageRegisterPackageInstalled( [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XPackageInstalledCallback *callback, [out] XTaskQueueRegistrationToken *token ); + HRESULT XPackageGetWriteStats( [out] XPackageWriteStats *writeStats ); + HRESULT __PADDING_5__(); + HRESULT XPackageUninstallUWPInstance( [in, string] const char *packageName ); + HRESULT XPackageEnumerateFeatures( [in, string] const char *packageIdentifier, [in, optional] void *context, [in] XPackageFeatureEnumerationCallback *callback ); + BOOLEAN XPackageUninstallPackage( [in, string] const char *packageIdentifier ); +} + +[ + local, + object, + uuid(f92d8712-2b27-4d8a-bf01-11a6f8e3eb42) +] +interface IXPackageImpl2 : IXPackageImpl +{ + HRESULT XPackageEnumeratePackages( [in] XPackageKind kind, [in] XPackageEnumerationScope scope, [in, optional] void *context, [in] XPackageEnumerationCallback *callback ); + HRESULT XPackageRegisterPackageInstalled( [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XPackageInstalledCallback *callback, [out] XTaskQueueRegistrationToken *token ); + HRESULT XPackageMountWithUiAsync( [in, string] const char *packageIdentifier, [in, out] XAsyncBlock *async ); + HRESULT XPackageMountWithUiResult( [in, out] XAsyncBlock *async, [out] XPackageMountHandle *mount ); +} + +[ + local, + object, + uuid(e2a4734b-2f4a-456d-aa8f-d065e04fb209) +] +interface IXPackageImpl3 : IXPackageImpl2 +{ + HRESULT XPackageEnumeratePackages( [in] XPackageKind kind, [in] XPackageEnumerationScope scope, [in, optional] void *context, [in] XPackageEnumerationCallback *callback ); + HRESULT XPackageRegisterPackageInstalled( [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XPackageInstalledCallback *callback, [out] XTaskQueueRegistrationToken *token ); +} + +[ + uuid(af406016-e850-4aa8-a88d-2f3dcb9dac7e) +] +coclass XPackageImpl +{ + [default] interface IXPackageImpl3; +} + +cpp_quote("#endif") diff --git a/include/xpersistentlocalstorage.idl b/include/xpersistentlocalstorage.idl new file mode 100644 index 00000000000..59eec92417f --- /dev/null +++ b/include/xpersistentlocalstorage.idl @@ -0,0 +1,77 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; +import "xpackage.idl"; + +typedef struct XPersistentLocalStorageSpaceInfo XPersistentLocalStorageSpaceInfo; + +struct XPersistentLocalStorageSpaceInfo +{ + UINT64 availableFreeBytes; + UINT64 totalFreeBytes; + UINT64 usedBytes; + UINT64 totalBytes; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(f4faf4d4-2d04-4fce-b3e0-474a713a3e84) +] +interface IXPersistentLocalStorageImpl : IUnknown +{ + HRESULT XPersistentLocalStorageGetPathSize( [out] SIZE_T *pathSize ); + HRESULT XPersistentLocalStorageGetPath( [in] SIZE_T pathSize, [out, string, size_is(pathSize)] char *path, [out, optional] SIZE_T *pathUsed ); + HRESULT XPersistentLocalStorageGetSpaceInfo( [out] XPersistentLocalStorageSpaceInfo *info ); + HRESULT XPersistentLocalStoragePromptUserForSpaceAsync( [in] UINT64 requestedBytes, [in, out] XAsyncBlock *asyncBlock ); + HRESULT XPersistentLocalStoragePromptUserForSpaceResult( [in, out] XAsyncBlock *asyncBlock ); +} + +[ + local, + object, + uuid(d29411df-0794-4553-8b27-95fc02d0f75d) +] +interface IXPersistentLocalStorageImpl2 : IXPersistentLocalStorageImpl +{ + /* Unknown which methods added here, all defined in parent for backwards compatibility */ +} + +[ + local, + object, + uuid(41a4e10c-5a7e-41d9-8c37-37bde62a07d6) +] +interface IXPersistentLocalStorageImpl3 : IXPersistentLocalStorageImpl2 +{ + HRESULT XPersistentLocalStorageMountForPackage( [in, string] const char *packageIdentifier, [out] XPackageMountHandle *mountHandle ); +} + +[ + uuid(f4faf4d4-2d04-4fce-b3e0-474a713a3e84) +] +coclass XPersistentLocalStorageImpl +{ + [default] interface IXPersistentLocalStorageImpl3; +} + +cpp_quote("#endif") diff --git a/include/xspeechsynthesizer.h b/include/xspeechsynthesizer.h new file mode 100644 index 00000000000..4f95f3893c0 --- /dev/null +++ b/include/xspeechsynthesizer.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_XSPEECHSYNTHESIZER_H +#define __WINE_XSPEECHSYNTHESIZER_H + +#ifdef __cplusplus +extern "C" { + +enum class XSpeechSynthesizerVoiceGender : UINT32 +{ + Female, + Male, +}; + +#elif defined(__WINESRC__) + +typedef enum XSpeechSynthesizerVoiceGender +{ + XSpeechSynthesizerVoiceGender_Female, + XSpeechSynthesizerVoiceGender_Male, +} XSpeechSynthesizerVoiceGender; + +#endif + +typedef struct XSpeechSynthesizer *XSpeechSynthesizerHandle; +typedef struct XSpeechSynthesizerStream *XSpeechSynthesizerStreamHandle; + +typedef struct XSpeechSynthesizerVoiceInformation XSpeechSynthesizerVoiceInformation; + +typedef BOOLEAN __stdcall XSpeechSynthesizerInstalledVoicesCallback( const XSpeechSynthesizerVoiceInformation *information, void *context ); + +struct XSpeechSynthesizerVoiceInformation +{ + const char *Description; + const char *DisplayName; + XSpeechSynthesizerVoiceGender Gender; + const char *VoiceId; + const char *Language; +}; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/xstore.idl b/include/xstore.idl new file mode 100644 index 00000000000..d7fe90fd960 --- /dev/null +++ b/include/xstore.idl @@ -0,0 +1,401 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; +import "xuser.idl"; + +cpp_quote("#if 0") +typedef UINT64 time_t; +cpp_quote("#endif") + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XStoreCanLicenseStatus : UINT32") +cpp_quote("{ ") +cpp_quote(" NotLicensableToUser, ") +cpp_quote(" Licensable, ") +cpp_quote(" LicenseActionNotApplicableToProduct, ") +cpp_quote("}; ") + +cpp_quote("enum class XStoreDurationUnit : UINT32") +cpp_quote("{ ") +cpp_quote(" Minute, ") +cpp_quote(" Hour, ") +cpp_quote(" Day, ") +cpp_quote(" Week, ") +cpp_quote(" Month, ") +cpp_quote(" Year, ") +cpp_quote("}; ") + +cpp_quote("enum class XStoreProductKind : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" Consumable = 0x01, ") +cpp_quote(" Durable = 0x02, ") +cpp_quote(" Game = 0x04, ") +cpp_quote(" Pass = 0x08, ") +cpp_quote(" UnmanagedConsumable = 0x10, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XStoreCanLicenseStatus +{ + XStoreCanLicenseStatus_NotLicensableToUser, + XStoreCanLicenseStatus_Licensable, + XStoreCanLicenseStatus_LicenseActionNotApplicableToProduct, +} XStoreCanLicenseStatus; + +typedef enum XStoreDurationUnit +{ + XStoreDurationUnit_Minute, + XStoreDurationUnit_Hour, + XStoreDurationUnit_Day, + XStoreDurationUnit_Week, + XStoreDurationUnit_Month, + XStoreDurationUnit_Year, +} XStoreDurationUnit; + +typedef enum XStoreProductKind +{ + XStoreProductKind_None = 0x00, + XStoreProductKind_Consumable = 0x01, + XStoreProductKind_Durable = 0x02, + XStoreProductKind_Game = 0x04, + XStoreProductKind_Pass = 0x08, + XStoreProductKind_UnmanagedConsumable = 0x10, +} XStoreProductKind; + +cpp_quote("#endif") + +typedef void *XStoreContextHandle; +typedef void *XStoreLicenseHandle; +typedef void *XStoreProductQueryHandle; + +typedef struct XStoreAddonLicense XStoreAddonLicense; +typedef struct XStoreAvailability XStoreAvailability; +typedef struct XStoreCanAcquireLicenseResult XStoreCanAcquireLicenseResult; +typedef struct XStoreCollectionData XStoreCollectionData; +typedef struct XStoreConsumableResult XStoreConsumableResult; +typedef struct XStoreGameLicense XStoreGameLicense; +typedef struct XStoreImage XStoreImage; +typedef struct XStorePackageUpdate XStorePackageUpdate; +typedef struct XStorePrice XStorePrice; +typedef struct XStoreProduct XStoreProduct; +typedef struct XStoreRateAndReviewResult XStoreRateAndReviewResult; +typedef struct XStoreSku XStoreSku; +typedef struct XStoreSubscriptionInfo XStoreSubscriptionInfo; +typedef struct XStoreVideo XStoreVideo; + +typedef void __stdcall XStoreGameLicenseChangedCallback( void *context ); +typedef void __stdcall XStorePackageLicenseLostCallback( void *context ); +typedef BOOLEAN __stdcall XStoreProductQueryCallback( const XStoreProduct *product, void *context ); + +struct XStoreAddonLicense +{ + char skuStoreId[18]; + char inAppOfferToken[64]; + BOOLEAN isActive; + time_t expirationDate; +}; + +struct XStorePrice +{ + float basePrice; + float price; + float recurrencePrice; + const char *currencyCode; + char formattedBasePrice[16]; + char formattedPrice[16]; + char formattedRecurrencePrice[16]; + BOOLEAN isOnSale; + time_t saleEndDate; +}; + +struct XStoreAvailability +{ + const char *availabilityId; + XStorePrice price; + time_t endDate; +}; + +struct XStoreCanAcquireLicenseResult +{ + char licensableSku[5]; + XStoreCanLicenseStatus status; +}; + +struct XStoreCollectionData +{ + time_t acquiredDate; + time_t startDate; + time_t endDate; + BOOLEAN isTrial; + UINT32 trialTimeRemainingInSeconds; + UINT32 quantity; + const char *campaignId; + const char *developerOfferId; +}; + +struct XStoreConsumableResult +{ + UINT32 quantity; +}; + +struct XStoreGameLicense +{ + char skuStoreId[18]; + BOOLEAN isActive; + BOOLEAN isTrialOwnedByThisUser; + BOOLEAN isDiscLicense; + BOOLEAN isTrial; + UINT32 trialTimeRemainingInSeconds; + char trialUniqueId[64]; + time_t expirationDate; +}; + +struct XStoreImage +{ + const char *uri; + UINT32 height; + UINT32 width; + const char *caption; + const char *imagePurposeTag; +}; + +struct XStorePackageUpdate +{ + char packageIdentifier[33]; + BOOLEAN isMandatory; +}; + +struct XStoreProduct +{ + const char *storeId; + const char *title; + const char *description; + const char *language; + const char *inAppOfferToken; + char *linkUri; + XStoreProductKind productKind; + XStorePrice price; + BOOLEAN hasDigitalDownload; + BOOLEAN isInUserCollection; + UINT32 keywordsCount; + const char **keywords; + UINT32 skusCount; + XStoreSku *skus; + UINT32 imagesCount; + XStoreImage *images; + UINT32 videosCount; + XStoreVideo *videos; +}; + +struct XStoreRateAndReviewResult +{ + BOOLEAN wasUpdated; +}; + +struct XStoreSubscriptionInfo +{ + BOOLEAN hasTrialPeriod; + XStoreDurationUnit trialPeriodUnit; + UINT32 trialPeriod; + XStoreDurationUnit billingPeriodUnit; + UINT32 billingPeriod; +}; + +struct XStoreSku +{ + const char *skuId; + const char *title; + const char *description; + const char *language; + XStorePrice price; + BOOLEAN isTrial; + BOOLEAN isInUserCollection; + XStoreCollectionData collectionData; + BOOLEAN isSubscription; + XStoreSubscriptionInfo subscriptionInfo; + UINT32 bundledSkusCount; + const char **bundledSkus; + UINT32 imagesCount; + XStoreImage *images; + UINT32 videosCount; + XStoreVideo *videos; + UINT32 availabilitiesCount; + XStoreAvailability *availabilities; +}; + +struct XStoreVideo +{ + const char *uri; + UINT32 height; + UINT32 width; + const char *caption; + const char *videoPurposeTag; + XStoreImage previewImage; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(0dd112ac-7c24-448c-b92b-3960fb5bd30c) +] +interface IXStoreImpl : IUnknown +{ + HRESULT XStoreCreateContext( [in, optional] const XUserHandle user, [out] XStoreContextHandle *storeContextHandle ); + void XStoreCloseContextHandle( [in] XStoreContextHandle storeContextHandle ); + HRESULT XStoreQueryAssociatedProductsAsync( [in] const XStoreContextHandle storeContextHandle, [in] XStoreProductKind productKinds, [in] UINT32 maxItemsToRetrievePerPage, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryAssociatedProductsResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreQueryProductsAsync( [in] const XStoreContextHandle storeContextHandle, [in] XStoreProductKind productKinds, [in, string, size_is(storeIdsCount,)] const char **storeIds, [in] SIZE_T storeIdsCount, [in, optional, string, size_is(actionFiltersCount,)] const char **actionFilters, [in] SIZE_T actionFiltersCount, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryProductsResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreQueryEntitledProductsAsync( [in] const XStoreContextHandle storeContextHandle, [in] XStoreProductKind productKinds, [in] UINT32 maxItemsToRetrievePerPage, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryEntitledProductsResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreQueryProductForCurrentGameAsync( [in] const XStoreContextHandle storeContextHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryProductForCurrentGameResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreQueryProductForPackageAsync( [in] const XStoreContextHandle storeContextHandle, [in] XStoreProductKind productKinds, [in, string] const char *packageIdentifier, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryProductForPackageResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreEnumerateProductsQuery( [in] const XStoreProductQueryHandle productQueryHandle, [in, optional] void *context, [in] XStoreProductQueryCallback *callback ); + BOOLEAN XStoreProductsQueryHasMorePages( [in] const XStoreProductQueryHandle productQueryHandle ); + HRESULT XStoreProductsQueryNextPageAsync( [in] const XStoreProductQueryHandle productQueryHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreProductsQueryNextPageResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + void XStoreCloseProductsQueryHandle( [in] XStoreProductQueryHandle productQueryHandle ); + HRESULT XStoreAcquireLicenseForPackageAsync( [in] const XStoreProductQueryHandle productQueryHandle, [in, string] const char *packageIdentifier, [in, out] XAsyncBlock *async ); + HRESULT XStoreAcquireLicenseForPackageResult( [in, out] XAsyncBlock *async, [out] XStoreLicenseHandle *storeLicenseHandle ); + BOOLEAN XStoreIsLicenseValid( [in] const XStoreLicenseHandle storeLicenseHandle ); + void XStoreCloseLicenseHandle( [in] XStoreLicenseHandle storeLicenseHandle ); + HRESULT XStoreCanAcquireLicenseForStoreIdAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeProductId, [in, out] XAsyncBlock *async ); + HRESULT XStoreCanAcquireLicenseForStoreIdResult( [in, out] XAsyncBlock *async, [out] XStoreCanAcquireLicenseResult *storeCanAcquireLicense ); + HRESULT XStoreCanAcquireLicenseForPackageAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *packageIdentifier, [in, out] XAsyncBlock *async ); + HRESULT XStoreCanAcquireLicenseForPackageResult( [in, out] XAsyncBlock *async, [out] XStoreCanAcquireLicenseResult *storeCanAcquireLicense ); + HRESULT XStoreQueryGameLicenseAsync( [in] const XStoreContextHandle storeContextHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryGameLicenseResult( [in, out] XAsyncBlock *async, [out] XStoreGameLicense *license ); + HRESULT XStoreQueryAddOnLicensesAsync( [in] const XStoreContextHandle storeContextHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryAddOnLicensesResultCount( [in, out] XAsyncBlock *async, [out] UINT32 *count ); + HRESULT XStoreQueryAddOnLicensesResult( [in, out] XAsyncBlock *async, [in] UINT32 count, [out, length_is(count)] XStoreAddonLicense addOnLicenses[*] ); + HRESULT XStoreQueryConsumableBalanceRemainingAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeProductId, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryConsumableBalanceRemainingResult( [in, out] XAsyncBlock *async, [out] XStoreConsumableResult *consumableResult ); + HRESULT XStoreReportConsumableFulfillmentAsync( [in, out] const XStoreContextHandle storeContextHandle, [in, string] const char *storeProductId, [in] UINT32 quantity, [in] GUID trackingId, [in, out] XAsyncBlock *async ); + HRESULT XStoreReportConsumableFulfillmentResult( [in, out] XAsyncBlock *async, [out] XStoreConsumableResult *consumableResult ); + HRESULT XStoreGetUserCollectionsIdAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *serviceTicket, [in, string] const char *publisherUserId, [in, out] XAsyncBlock *async ); + HRESULT XStoreGetUserCollectionsIdResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *size ); + HRESULT XStoreGetUserCollectionsIdResult( [in, out] XAsyncBlock *async, [in] SIZE_T size, [out, string, size_is(size)] char *result ); + HRESULT XStoreGetUserPurchaseIdAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *serviceTicket, [in, string] const char *publisherUserId, [in, out] XAsyncBlock *async ); + HRESULT XStoreGetUserPurchaseIdResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *size ); + HRESULT XStoreGetUserPurchaseIdResult( [in, out] XAsyncBlock *async, [in] SIZE_T size, [out, string, size_is(size)] char *result ); + HRESULT XStoreQueryLicenseTokenAsync( [in] const XStoreContextHandle storeContextHandle, [in, string, size_is(productIdsCount,)] const char **productIds, [in] SIZE_T productIdsCount, [in, string] const char *customDeveloperString, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryLicenseTokenResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *size ); + HRESULT XStoreQueryLicenseTokenResult( [in, out] XAsyncBlock *async, [in] SIZE_T size, [out, string, size_is(size)] char *result ); + HRESULT __PADDING__(); + HRESULT __PADDING_2__(); + HRESULT __PADDING_3__(); + HRESULT XStoreShowPurchaseUIAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in, optional, string] const char *name, [in, optional, string] const char *extendedJsonData, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowPurchaseUIResult( [in, out] XAsyncBlock *async ); + HRESULT XStoreShowRateAndReviewUIAsync( [in] const XStoreContextHandle storeContextHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowRateAndReviewUIResult( [in, out] XAsyncBlock *async, [out] XStoreRateAndReviewResult *result ); + HRESULT XStoreShowRedeemTokenUIAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *token, [in, string, size_is(allowedStoreIdsCount,)] const char **allowedStoreIds, [in] SIZE_T allowedStoreIdsCount, [in] BOOLEAN disallowCsvRedemption, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowRedeemTokenUIResult( [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryGameAndDlcPackageUpdatesAsync( [in] const XStoreContextHandle storeContextHandle, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryGameAndDlcPackageUpdatesResultCount( [in, out] XAsyncBlock *async, [out] UINT32 *count ); + HRESULT XStoreQueryGameAndDlcPackageUpdatesResult( [in, out] XAsyncBlock *async, [in] UINT32 count, [out, length_is(count)] XStorePackageUpdate packageUpdates[*] ); + HRESULT XStoreDownloadPackageUpdatesAsync( [in] const XStoreContextHandle storeContextHandle, [in, string, size_is(packageIdentifiersCount,)] const char **packageIdentifiers, [in] SIZE_T packageIdentifiersCount, [in, out] XAsyncBlock *async ); + HRESULT XStoreDownloadPackageUpdatesResult( [in, out] XAsyncBlock *async ); + HRESULT XStoreDownloadAndInstallPackageUpdatesAsync( [in] const XStoreContextHandle storeContextHandle, [in, string, size_is(packageIdentifiersCount,)] const char **packageIdentifiers, [in] SIZE_T packageIdentifiersCount, [in, out] XAsyncBlock *async ); + HRESULT XStoreDownloadAndInstallPackageUpdatesResult( [in, out] XAsyncBlock *async ); + HRESULT XStoreDownloadAndInstallPackagesAsync( [in] const XStoreContextHandle storeContextHandle, [in, string, size_is(storeIdsCount,)] const char **storeIds, [in] SIZE_T storeIdsCount, [in, out] XAsyncBlock *async ); + HRESULT XStoreDownloadAndInstallPackagesResultCount( [in, out] XAsyncBlock *async, [out] UINT32 *count ); + HRESULT XStoreDownloadAndInstallPackagesResult( [in, out] XAsyncBlock *async, [in] UINT32 count, [out, string, size_is(count,33)] char **packageIdentifiers ); + HRESULT XStoreQueryPackageIdentifier( [in, string] const char *storeId, [in] SIZE_T size, [out, string, size_is(size)] char *packageIdentifier ); + HRESULT XStoreRegisterGameLicenseChanged( [in] XStoreContextHandle storeContextHandle, [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XStoreGameLicenseChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XStoreUnregisterGameLicenseChanged( [in] XStoreContextHandle storeContextHandle, [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XStoreRegisterPackageLicenseLost( [in] XStoreLicenseHandle licenseHandle, [in] XTaskQueueHandle queue, [in, optional] void *context, [in] XStorePackageLicenseLostCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XStoreUnregisterPackageLicenseLost( [in] XStoreLicenseHandle licenseHandle, [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); +} + +[ + local, + object, + uuid(60b09f4e-1b85-45b1-826c-169118e230e1) +] +interface IXStoreImpl2 : IXStoreImpl +{ + BOOLEAN XStoreIsAvailabilityPurchasable( [in] const XStoreAvailability availability ); +} + +[ + local, + object, + uuid(2d42fea5-e71d-4b76-97cd-c50afbb3ae5d) +] +interface IXStoreImpl3 : IXStoreImpl2 +{ + HRESULT XStoreAcquireLicenseForDurablesAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in, out] XAsyncBlock *async ); + HRESULT XStoreAcquireLicenseForDurablesResult( [in, out] XAsyncBlock *async, [out] XStoreLicenseHandle *storeLicenseHandle ); +} + +[ + local, + object, + uuid(de3dbdd4-0b37-4bdb-a10e-acf3a354d06a) +] +interface IXStoreImpl4 : IXStoreImpl3 +{ + HRESULT XStoreShowAssociatedProductsUIAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in] XStoreProductKind productKinds, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowAssociatedProductsUIResult( [in, out] XAsyncBlock *async ); + HRESULT XStoreShowProductPageUIAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowProductPageUIResult( [in, out] XAsyncBlock *async ); +} + +[ + local, + object, + uuid(5c48dedf-0b67-4492-a4b5-6829b8e796e1) +] +interface IXStoreImpl5 : IXStoreImpl4 +{ + HRESULT XStoreQueryAssociatedProductsForStoreIdAsync( [in] const XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in] XStoreProductKind productKinds, [in] UINT32 maxItemsToRetrievePerPage, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryAssociatedProductsForStoreIdResult( [in, out] XAsyncBlock *async, [out] XStoreProductQueryHandle *productQueryHandle ); + HRESULT XStoreQueryPackageUpdatesAsync( [in] XStoreContextHandle storeContextHandle, [in, string, size_is(packageIdentifiersCount,)] const char **packageIdentifiers, [in] SIZE_T packageIdentifiersCount, [in, out] XAsyncBlock *async ); + HRESULT XStoreQueryPackageUpdatesResultCount( [in, out] XAsyncBlock *async, [out] UINT32 *count ); + HRESULT XStoreQueryPackageUpdatesResult( [in, out] XAsyncBlock *async, [in] UINT32 count, [out, length_is(count)] XStorePackageUpdate packageUpdates[*] ); +} + +[ + local, + object, + uuid(b09d803c-2414-4a05-82c6-66dfdc9e9a44) +] +interface IXStoreImpl6 : IXStoreImpl5 +{ + HRESULT XStoreShowGiftingUIAsync( [in] XStoreContextHandle storeContextHandle, [in, string] const char *storeId, [in, optional, string] const char *name, [in, optional, string] const char *extendedJsonData, [in, out] XAsyncBlock *async ); + HRESULT XStoreShowGiftingUIResult( [in, out] XAsyncBlock *async ); +} + +[ + uuid(0dd112ac-7c24-448c-b92b-3960fb5bd30c) +] +coclass XStoreImpl +{ + [default] interface IXStoreImpl6; +} + +cpp_quote("#endif") diff --git a/include/xsystem.idl b/include/xsystem.idl new file mode 100644 index 00000000000..2d87c0fbb3e --- /dev/null +++ b/include/xsystem.idl @@ -0,0 +1,208 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xgameruntimetypes.h"; + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XSystemDeviceType : UINT32") +cpp_quote("{ ") +cpp_quote(" Unknown, ") +cpp_quote(" Pc, ") +cpp_quote(" XboxOne, ") +cpp_quote(" XboxOneS, ") +cpp_quote(" XboxOneX, ") +cpp_quote(" XboxOneXDevkit, ") +cpp_quote(" XboxScarlettLockhart, ") +cpp_quote(" XboxScarlettAnaconda, ") +cpp_quote(" XboxScarlettDevkit, ") +cpp_quote("}; ") + +cpp_quote("enum class XSystemHandleCallbackReason : UINT32") +cpp_quote("{ ") +cpp_quote(" Created, ") +cpp_quote(" Destroyed, ") +cpp_quote("}; ") + +cpp_quote("enum class XSystemHandleType : UINT32") +cpp_quote("{ ") +cpp_quote(" AppCaptureScreenshotStream, ") +cpp_quote(" DisplayTimeoutDeferral, ") +cpp_quote(" GameSaveContainer, ") +cpp_quote(" GameSaveProvider, ") +cpp_quote(" GameSaveUpdate, ") +cpp_quote(" PackageInstallationMonitor, ") +cpp_quote(" PackageMount, ") +cpp_quote(" SpeechSynthesizer, ") +cpp_quote(" SpeechSynthesizerStream, ") +cpp_quote(" StoreContext, ") +cpp_quote(" StoreLicense, ") +cpp_quote(" StoreProductQuery, ") +cpp_quote(" TaskQueue, ") +cpp_quote(" User, ") +cpp_quote(" UserSignOutDeferral, ") +cpp_quote(" GameUiTextEntry, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XSystemDeviceType +{ + XSystemDeviceType_Unknown, + XSystemDeviceType_Pc, + XSystemDeviceType_XboxOne, + XSystemDeviceType_XboxOneS, + XSystemDeviceType_XboxOneX, + XSystemDeviceType_XboxOneXDevkit, + XSystemDeviceType_XboxScarlettLockhart, + XSystemDeviceType_XboxScarlettAnaconda, + XSystemDeviceType_XboxScarlettDevkit, +} XSystemDeviceType; + +typedef enum XSystemHandleCallbackReason +{ + XSystemHandleCallbackReason_Created, + XSystemHandleCallbackReason_Destroyed, +} XSystemHandleCallbackReason; + +typedef enum XSystemHandleType +{ + XSystemHandleType_AppCaptureScreenshotStream, + XSystemHandleType_DisplayTimeoutDeferral, + XSystemHandleType_GameSaveContainer, + XSystemHandleType_GameSaveProvider, + XSystemHandleType_GameSaveUpdate, + XSystemHandleType_PackageInstallationMonitor, + XSystemHandleType_PackageMount, + XSystemHandleType_SpeechSynthesizer, + XSystemHandleType_SpeechSynthesizerStream, + XSystemHandleType_StoreContext, + XSystemHandleType_StoreLicense, + XSystemHandleType_StoreProductQuery, + XSystemHandleType_TaskQueue, + XSystemHandleType_User, + XSystemHandleType_UserSignOutDeferral, + XSystemHandleType_GameUiTextEntry, +} XSystemHandleType; + +cpp_quote("#endif") + +typedef void *XSystemHandle; + +typedef struct XSystemAnalyticsInfo XSystemAnalyticsInfo; +typedef struct XSystemRuntimeInfo XSystemRuntimeInfo; + +typedef void __stdcall XSystemHandleCallback( XSystemHandle handle, XSystemHandleType type, XSystemHandleCallbackReason reason, void *context ); + +struct XSystemAnalyticsInfo +{ + XVersion osVersion; + XVersion hostingOsVersion; + char family[64]; + char form[64]; +}; + +struct XSystemRuntimeInfo +{ + XVersion runtimeVersion; + XVersion availableVersion; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(e349bd1a-fc20-4e40-b99c-4178cc6b409f) +] +interface IXSystemImpl : IUnknown +{ + HRESULT XSystemGetConsoleId( [in] INT32 consoleIdSize, [out, size_is(consoleIdSize)] char *consoleId, [out, optional] SIZE_T *consoleIdUsed ); + HRESULT XSystemGetXboxLiveSandboxId( [in] INT32 sandboxIdSize, [out, size_is(sandboxIdSize)] char *sandboxId, [out] SIZE_T *sandboxIdUsed ); + HRESULT XSystemGetAppSpecificDeviceId( [in] INT32 appSpecificDeviceIdSize, [out, size_is(appSpecificDeviceIdSize)] char *appSpecificDeviceId, [out, optional] SIZE_T *appSpecificDeviceIdUsed ); +} + +[ + local, + object, + uuid(6fd71f09-7513-49f0-89bc-bfaf5df6f852) +] +interface IXSystemImpl2 : IXSystemImpl +{ + /* Unknown which methods added here, all defined in parent for backwards compatibility */ +} + +[ + local, + object, + uuid(67ce4bfc-b1d1-4ac7-bc3a-cb9219a97a85) +] +interface IXSystemImpl3 : IXSystemImpl2 +{ + HRESULT XSystemHandleTrack( [in] XSystemHandleCallback callback, [in, optional] void *context ); + BOOLEAN XSystemIsHandleValid( [in] XSystemHandle handle ); +} + +[ + local, + object, + uuid(dadc2895-34b0-4ef5-a83e-45114d629b80) +] +interface IXSystemImpl4 : IXSystemImpl3 +{ + void XSystemAllowFullDownloadBandwidth( [in] BOOLEAN enable ); +} + +[ + local, + object, + uuid(1861cf2e-e18b-4834-a9f5-b4a4e6efb4cf) +] +interface IXSystemImpl5 : IXSystemImpl4 +{ + /* No known public methods */ +} + +[ + local, + object, + uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) +] +interface IXSystemAnalyticsImpl : IUnknown +{ + XSystemAnalyticsInfo XSystemGetAnalyticsInfo(); +} + +[ + uuid(e349bd1a-fc20-4e40-b99c-4178cc6b409f) +] +coclass XSystemImpl +{ + [default] interface IXSystemImpl5; +} + +[ + uuid(b884675d-b738-4a9c-815d-9a9a1e0c6c9b) +] +coclass XSystemAnalyticsImpl +{ + [default] interface IXSystemAnalyticsImpl; +} + +cpp_quote("#endif") diff --git a/include/xtaskqueue.h b/include/xtaskqueue.h index 49bba4c9ab4..b292d0edacf 100644 --- a/include/xtaskqueue.h +++ b/include/xtaskqueue.h @@ -19,43 +19,57 @@ #ifndef __WINE_XTASKQUEUE_H #define __WINE_XTASKQUEUE_H -#include -#include -#include +#ifdef __cplusplus +extern "C" { -typedef struct XTaskQueueObject* XTaskQueueHandle; - -typedef struct XTaskQueuePortObject* XTaskQueuePortHandle; - -typedef enum XTaskQueueDispatchMode +enum class XTaskQueueDispatchMode : UINT32 { Manual, ThreadPool, SerializedThreadPool, - Immediate + Immediate, +}; + +enum class XTaskQueuePort : UINT32 +{ + Work, + Completion, +}; + +#elif defined(__WINESRC__) + +typedef enum XTaskQueueDispatchMode +{ + XTaskQueueDispatchMode_Manual, + XTaskQueueDispatchMode_ThreadPool, + XTaskQueueDispatchMode_SerializedThreadPool, + XTaskQueueDispatchMode_Immediate, } XTaskQueueDispatchMode; typedef enum XTaskQueuePort { - Work, - Completion + XTaskQueuePort_Work, + XTaskQueuePort_Completion, } XTaskQueuePort; -typedef enum XTaskQueuePortStatus -{ - PortStatus_Active, - PortStatus_Canceled, - PortStatus_Terminating, - PortStatus_Terminated -} XTaskQueuePortStatus; +#endif + +typedef struct XTaskQueueObject *XTaskQueueHandle; +typedef struct XTaskQueuePortObject *XTaskQueuePortHandle; + +typedef struct XTaskQueueRegistrationToken XTaskQueueRegistrationToken; + +typedef void __stdcall XTaskQueueCallback( void *context, BOOLEAN canceled ); +typedef void __stdcall XTaskQueueMonitorCallback( void *context, XTaskQueueHandle queue, XTaskQueuePort port ); +typedef void __stdcall XTaskQueueTerminatedCallback( void *context ); -typedef struct XTaskQueueRegistrationToken +struct XTaskQueueRegistrationToken { - uint64_t token; -} XTaskQueueRegistrationToken; + UINT64 token; +}; -typedef void CALLBACK XTaskQueueCallback(_In_opt_ void* context, _In_ BOOL canceled); -typedef void CALLBACK XTaskQueueMonitorCallback(_In_opt_ void* context, _In_ XTaskQueueHandle queue, _In_ XTaskQueuePort port); -typedef void CALLBACK XTaskQueueTerminatedCallback(_In_opt_ void* context); +#ifdef __cplusplus +} +#endif -#endif \ No newline at end of file +#endif diff --git a/include/xuser.idl b/include/xuser.idl new file mode 100644 index 00000000000..784a1ecb746 --- /dev/null +++ b/include/xuser.idl @@ -0,0 +1,491 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "xasync.h"; + +cpp_quote("#if 0") +typedef struct APP_LOCAL_DEVICE_ID +{ + BYTE value[32]; +} APP_LOCAL_DEVICE_ID; +cpp_quote("#endif") + +cpp_quote("#ifdef __cplusplus") + +cpp_quote("enum class XUserAddOptions : UINT32 ") +cpp_quote("{ ") +cpp_quote(" None = 0x00,") +cpp_quote(" AddDefaultUserSilently = 0x01,") +cpp_quote(" AllowGuests = 0x02,") +cpp_quote(" AddDefaultUserAllowingUI = 0x04,") +cpp_quote("}; ") + +cpp_quote("enum class XUserAgeGroup : UINT32") +cpp_quote("{ ") +cpp_quote(" Unknown, ") +cpp_quote(" Child, ") +cpp_quote(" Teen, ") +cpp_quote(" Adult, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserChangeEvent : UINT32") +cpp_quote("{ ") +cpp_quote(" SignedInAgain, ") +cpp_quote(" SigningOut, ") +cpp_quote(" SignedOut, ") +cpp_quote(" Gamertag, ") +cpp_quote(" GamerPicture, ") +cpp_quote(" Privileges, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserDefaultAudioEndpointKind : UINT32") +cpp_quote("{ ") +cpp_quote(" CommunicationRender, ") +cpp_quote(" CommunicationCapture, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserGamerPictureSize : UINT32") +cpp_quote("{ ") +cpp_quote(" Small, ") +cpp_quote(" Medium, ") +cpp_quote(" Large, ") +cpp_quote(" ExtraLarge, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserGamertagComponent : UINT32") +cpp_quote("{ ") +cpp_quote(" Classic, ") +cpp_quote(" Modern, ") +cpp_quote(" ModernSuffix, ") +cpp_quote(" UniqueModern, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserGetMsaTokenSilentlyOptions : UINT32") +cpp_quote("{ ") +cpp_quote(" None, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserGetTokenAndSignatureOptions : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" ForceRefresh = 0x01, ") +cpp_quote(" AllUsers = 0x02, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserPlatformOperationResult : UINT32") +cpp_quote("{ ") +cpp_quote(" Success, ") +cpp_quote(" Failure, ") +cpp_quote(" Canceled, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserPlatformSpopOperationResult : UINT32") +cpp_quote("{ ") +cpp_quote(" SignInHere, ") +cpp_quote(" SwitchAccount, ") +cpp_quote(" Failure, ") +cpp_quote(" Canceled, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserPrivilege : UINT32") +cpp_quote("{ ") +cpp_quote(" CrossPlay = 185, ") +cpp_quote(" Clubs = 188, ") +cpp_quote(" Sessions = 189, ") +cpp_quote(" Broadcast = 190, ") +cpp_quote(" ManageProfilePrivacy = 196, ") +cpp_quote(" GameDvr = 198, ") +cpp_quote(" MultiplayerParties = 203, ") +cpp_quote(" CloudManageSession = 207, ") +cpp_quote(" CloudJoinSession = 208, ") +cpp_quote(" CloudSavedGames = 209, ") +cpp_quote(" SocialNetworkSharing = 220, ") +cpp_quote(" UserGeneratedContent = 247, ") +cpp_quote(" Communications = 252, ") +cpp_quote(" Multiplayer = 254, ") +cpp_quote(" AddFriends = 255, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserPrivilegeDenyReason : UINT32") +cpp_quote("{ ") +cpp_quote(" None, ") +cpp_quote(" PurchaseRequired, ") +cpp_quote(" Restricted, ") +cpp_quote(" Banned, ") +cpp_quote(" Unknown = 0xFFFFFFFF, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserPrivilegeOptions : UINT32") +cpp_quote("{ ") +cpp_quote(" None = 0x00, ") +cpp_quote(" AllUsers = 0x01, ") +cpp_quote("}; ") + +cpp_quote("enum class XUserState : UINT32") +cpp_quote("{ ") +cpp_quote(" SignedIn, ") +cpp_quote(" SigningOut, ") +cpp_quote(" SignedOut, ") +cpp_quote("}; ") + +cpp_quote("#elif defined(__WINESRC__)") + +typedef enum XUserAddOptions +{ + XUserAddOptions_None = 0x00, + XUserAddOptions_AddDefaultUserSilently = 0x01, + XUserAddOptions_AllowGuests = 0x02, + XUserAddOptions_AddDefaultUserAllowingUI = 0x04, +} XUserAddOptions; + +typedef enum XUserAgeGroup +{ + XUserAgeGroup_Unknown = 0, + XUserAgeGroup_Child = 1, + XUserAgeGroup_Teen = 2, + XUserAgeGroup_Adult = 3, +} XUserAgeGroup; + +typedef enum XUserChangeEvent +{ + XUserChangeEvent_SignedInAgain = 0, + XUserChangeEvent_SigningOut = 1, + XUserChangeEvent_SignedOut = 2, + XUserChangeEvent_Gamertag = 3, + XUserChangeEvent_GamerPicture = 4, + XUserChangeEvent_Privileges = 5, +} XUserChangeEvent; + +typedef enum XUserDefaultAudioEndpointKind +{ + XUserDefaultAudioEndpointKind_CommunicationRender = 0, + XUserDefaultAudioEndpointKind_CommunicationCapture = 1, +} XUserDefaultAudioEndpointKind; + +typedef enum XUserGamerPictureSize +{ + XUserGamerPictureSize_Small = 0, + XUserGamerPictureSize_Medium = 1, + XUserGamerPictureSize_Large = 2, + XUserGamerPictureSize_ExtraLarge = 3, +} XUserGamerPictureSize; + +typedef enum XUserGamertagComponent +{ + XUserGamertagComponent_Classic = 0, + XUserGamertagComponent_Modern = 1, + XUserGamertagComponent_ModernSuffix = 2, + XUserGamertagComponent_UniqueModern = 3, +} XUserGamertagComponent; + +typedef enum XUserGetMsaTokenSilentlyOptions +{ + XUserGetMsaTokenSilentlyOptions_None = 0, +} XUserGetMsaTokenSilentlyOptions; + +typedef enum XUserGetTokenAndSignatureOptions +{ + XUserGetTokenAndSignatureOptions_None = 0x00, + XUserGetTokenAndSignatureOptions_ForceRefresh = 0x01, + XUserGetTokenAndSignatureOptions_AllUsers = 0x02, +} XUserGetTokenAndSignatureOptions; + +typedef enum XUserPlatformOperationResult +{ + XUserPlatformOperationResult_Success = 0, + XUserPlatformOperationResult_Failure = 1, + XUserPlatformOperationResult_Canceled = 2, +} XUserPlatformOperationResult; + +typedef enum XUserPlatformSpopOperationResult +{ + XUserPlatformSpopOperationResult_SignInHere = 0, + XUserPlatformSpopOperationResult_SwitchAccount = 1, + XUserPlatformSpopOperationResult_Failure = 2, + XUserPlatformSpopOperationResult_Canceled = 3, +} XUserPlatformSpopOperationResult; + +typedef enum XUserPrivilege +{ + XUserPrivilege_CrossPlay = 185, + XUserPrivilege_Clubs = 188, + XUserPrivilege_Sessions = 189, + XUserPrivilege_Broadcast = 190, + XUserPrivilege_ManageProfilePrivacy = 196, + XUserPrivilege_GameDvr = 198, + XUserPrivilege_MultiplayerParties = 203, + XUserPrivilege_CloudManageSession = 207, + XUserPrivilege_CloudJoinSession = 208, + XUserPrivilege_CloudSavedGames = 209, + XUserPrivilege_SocialNetworkSharing = 220, + XUserPrivilege_UserGeneratedContent = 247, + XUserPrivilege_Communications = 252, + XUserPrivilege_Multiplayer = 254, + XUserPrivilege_AddFriends = 255, +} XUserPrivilege; + +typedef enum XUserPrivilegeDenyReason +{ + XUserPrivilegeDenyReason_None = 0, + XUserPrivilegeDenyReason_PurchaseRequired = 1, + XUserPrivilegeDenyReason_Restricted = 2, + XUserPrivilegeDenyReason_Banned = 3, + XUserPrivilegeDenyReason_Unknown = 0xFFFFFFFF, +} XUserPrivilegeDenyReason; + +typedef enum XUserPrivilegeOptions +{ + XUserPrivilegeOptions_None = 0x00, + XUserPrivilegeOptions_AllUsers = 0x01, +} XUserPrivilegeOptions; + +typedef enum XUserState +{ + XUserState_SignedIn = 0, + XUserState_SigningOut = 1, + XUserState_SignedOut = 2, +} XUserState; + +cpp_quote("#endif") + +typedef struct XUser *XUserHandle; +typedef struct XUserPlatformOperationToken *XUserPlatformOperation; +typedef struct XUserSignOutDeferral *XUserSignOutDeferralHandle; + +typedef struct XUserDeviceAssociationChange XUserDeviceAssociationChange; +typedef struct XUserGetTokenAndSignatureData XUserGetTokenAndSignatureData; +typedef struct XUserGetTokenAndSignatureHttpHeader XUserGetTokenAndSignatureHttpHeader; +typedef struct XUserGetTokenAndSignatureUtf16Data XUserGetTokenAndSignatureUtf16Data; +typedef struct XUserGetTokenAndSignatureUtf16HttpHeader XUserGetTokenAndSignatureUtf16HttpHeader; +typedef struct XUserLocalId XUserLocalId; +typedef struct XUserPlatformRemoteConnectEventHandlers XUserPlatformRemoteConnectEventHandlers; + +typedef void __stdcall XUserChangeEventCallback( void *context, XUserLocalId userLocalId, XUserChangeEvent event ); +typedef void __stdcall XUserDefaultAudioEndpointUtf16ChangedCallback( void *context, XUserLocalId user, XUserDefaultAudioEndpointKind defaultAudioEndpointKind, const WCHAR *endpointIdUtf16 ); +typedef void __stdcall XUserDeviceAssociationChangedCallback( void *context, const XUserDeviceAssociationChange *change ); +typedef void __stdcall XUserFindControllerForUserUiCallback( void *context, XUserHandle user ); +typedef void __stdcall XUserPlatformRemoteConnectClosePromptEventHandler( void *context, UINT32 userIdentifier, XUserPlatformOperation operation ); +typedef void __stdcall XUserPlatformRemoteConnectShowPromptEventHandler( void *context, UINT32 userIdentifier, XUserPlatformOperation operation, const char *url, const char *code, SIZE_T qrCodeSize, const void *qrCode ); +typedef void __stdcall XUserPlatformSpopPromptEventHandler( void *context, UINT32 userIdentifier, XUserPlatformOperation operation, const char *modernGamertag, const char *modernGamertagSuffix ); + +struct XUserLocalId +{ + UINT64 value; +}; + +struct XUserDeviceAssociationChange +{ + APP_LOCAL_DEVICE_ID deviceId; + XUserLocalId oldUser; + XUserLocalId newUser; +}; + +struct XUserGetTokenAndSignatureData +{ + SIZE_T tokenSize; + SIZE_T signatureSize; + const char *token; + const char *signature; +}; + +struct XUserGetTokenAndSignatureHttpHeader +{ + const char *name; + const char *value; +}; + +struct XUserGetTokenAndSignatureUtf16Data +{ + SIZE_T tokenCount; + SIZE_T signatureCount; + const WCHAR *token; + const WCHAR *signature; +}; + +struct XUserGetTokenAndSignatureUtf16HttpHeader +{ + const WCHAR *name; + const WCHAR *value; +}; + +struct XUserPlatformRemoteConnectEventHandlers +{ + XUserPlatformRemoteConnectShowPromptEventHandler *show; + XUserPlatformRemoteConnectClosePromptEventHandler *close; + void *context; +}; + +cpp_quote("#ifdef __WINESRC__") + +[ + local, + object, + uuid(01acd177-91f9-4763-a38e-ccbb55ce32e0) +] +interface IXUserImpl : IUnknown +{ + HRESULT XUserDuplicateHandle( [in] XUserHandle handle, [out] XUserHandle *duplicatedHandle ); + void XUserCloseHandle( [in] XUserHandle user ); + INT32 XUserCompare( [in, optional] XUserHandle user1, [in, optional] XUserHandle user2 ); + HRESULT XUserGetMaxUsers( [out] UINT32 *maxUsers ); + HRESULT XUserAddAsync( [in] XUserAddOptions options, [in, out] XAsyncBlock *async ); + HRESULT XUserAddResult( [in, out] XAsyncBlock *async, [out] XUserHandle *newUser ); + HRESULT XUserGetLocalId( [in] XUserHandle user, [out] XUserLocalId *userLocalId ); + HRESULT XUserFindUserByLocalId( [in] XUserLocalId userLocalId, [out] XUserHandle *handle ); + HRESULT XUserGetId( [in] XUserHandle user, [out] UINT64 *userId ); + HRESULT XUserFindUserById( [in] UINT64 userId, [out] XUserHandle *handle ); + HRESULT XUserGetIsGuest( [in] XUserHandle user, [out] BOOLEAN *isGuest ); + HRESULT XUserGetState( [in] XUserHandle user, [out] XUserState *state ); + HRESULT __PADDING__(); + HRESULT XUserGetGamerPictureAsync( [in] XUserHandle user, [in] XUserGamerPictureSize pictureSize, [in, out] XAsyncBlock *async ); + HRESULT XUserGetGamerPictureResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *bufferSize ); + HRESULT XUserGetGamerPictureResult( [in, out] XAsyncBlock *async, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XUserGetAgeGroup( [in] XUserHandle user, [out] XUserAgeGroup *ageGroup ); + HRESULT XUserCheckPrivilege( [in] XUserHandle user, [in] XUserPrivilegeOptions options, [in] XUserPrivilege privilege, [out] BOOLEAN *hasPrivilege, [out, optional] XUserPrivilegeDenyReason *reason ); + HRESULT XUserResolvePrivilegeWithUiAsync( [in] XUserHandle user, [in] XUserPrivilegeOptions options, [in] XUserPrivilege privilege, [in, out] XAsyncBlock *async ); + HRESULT XUserResolvePrivilegeWithUiResult( [in, out] XAsyncBlock *async ); + HRESULT XUserGetTokenAndSignatureAsync( [in] XUserHandle user, [in] XUserGetTokenAndSignatureOptions options, [in, string] const char *method, [in, string] const char *url, [in] SIZE_T headerCount, [in, optional, length_is(headerCount)] const XUserGetTokenAndSignatureHttpHeader headers[*], [in] SIZE_T bodySize, [in, optional, size_is(bodySize)] const void *bodyBuffer, [in, out] XAsyncBlock *async ); + HRESULT XUserGetTokenAndSignatureResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *bufferSize ); + HRESULT XUserGetTokenAndSignatureResult( [in, out] XAsyncBlock *async, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, ptr] XUserGetTokenAndSignatureData **ptrToBuffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XUserGetTokenAndSignatureUtf16Async( [in] XUserHandle user, [in] XUserGetTokenAndSignatureOptions options, [in, string] const WCHAR *method, [in, string] const WCHAR *url, [in] SIZE_T headerCount, [in, optional, length_is(headerCount)] const XUserGetTokenAndSignatureUtf16HttpHeader headers[*], [in] SIZE_T bodySize, [in, optional, size_is(bodySize)] const void *bodyBuffer, [in, out] XAsyncBlock *async ); + HRESULT XUserGetTokenAndSignatureUtf16ResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *bufferSize ); + HRESULT XUserGetTokenAndSignatureUtf16Result( [in, out] XAsyncBlock *async, [in] SIZE_T bufferSize, [out, size_is(bufferSize)] void *buffer, [out, ptr] XUserGetTokenAndSignatureUtf16Data **ptrToBuffer, [out, optional] SIZE_T *bufferUsed ); + HRESULT XUserResolveIssueWithUiAsync( [in] XUserHandle user, [in, optional, string] const char *url, [in, out] XAsyncBlock *async ); + HRESULT XUserResolveIssueWithUiResult( [in, out] XAsyncBlock *async ); + HRESULT XUserResolveIssueWithUiUtf16Async( [in] XUserHandle user, [in, optional, string] const WCHAR *url, [in, out] XAsyncBlock *async ); + HRESULT XUserResolveIssueWithUiUtf16Result( [in, out] XAsyncBlock *async ); + HRESULT XUserRegisterForChangeEvent( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XUserChangeEventCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XUserUnregisterForChangeEvent( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XUserGetSignOutDeferral( [out] XUserSignOutDeferralHandle *deferral ); + void XUserCloseSignOutDeferralHandle( [in] XUserSignOutDeferralHandle deferral ); +} + +[ + local, + object, + uuid(eb9bf948-18dc-4d82-bbcc-40e0a809c4c0) +] +interface IXUserImpl2 : IXUserImpl +{ + HRESULT XUserAddByIdWithUiAsync( [in] UINT64 userId, [in, out] XAsyncBlock *async ); + HRESULT XUserAddByIdWithUiResult( [in, out] XAsyncBlock *async, [out] XUserHandle *newUser ); +} + +[ + local, + object, + uuid(1bf2f8c5-d507-4e52-bb05-f726d0e71161) +] +interface IXUserImpl3 : IXUserImpl2 +{ + HRESULT XUserGetMsaTokenSilentlyAsync( [in] XUserHandle user, [in] XUserGetMsaTokenSilentlyOptions options, [in, string] const char *scope, [in, out] XAsyncBlock *async ); + HRESULT XUserGetMsaTokenSilentlyResult( [in, out] XAsyncBlock *async, [in] SIZE_T resultTokenSize, [out, string, size_is(resultTokenSize)] char *resultToken, [out, optional] SIZE_T *resultTokenUsed ); + HRESULT XUserGetMsaTokenSilentlyResultSize( [in, out] XAsyncBlock *async, [out] SIZE_T *tokenSize ); +} + +[ + local, + object, + uuid(079415e3-6727-437f-8e9d-8f8f9b2439f7) +] +interface IXUserImpl4 : IXUserImpl3 +{ + BOOLEAN XUserIsStoreUser( [in] XUserHandle user ); +} + +[ + local, + object, + uuid(26f3c674-a2fe-44fa-b6c4-a323bc94ff53) +] +interface IXUserImpl5 : IXUserImpl4 +{ + HRESULT XUserPlatformRemoteConnectSetEventHandlers( [in, optional] XTaskQueueHandle queue, [in] XUserPlatformRemoteConnectEventHandlers *handlers ); + HRESULT XUserPlatformRemoteConnectCancelPrompt( [in] XUserPlatformOperation operation ); + HRESULT XUserPlatformSpopPromptSetEventHandlers( [in, optional] XTaskQueueHandle queue, [in] XUserPlatformSpopPromptEventHandler *handler, [in, optional] void *context ); + HRESULT XUserPlatformSpopPromptComplete( [in] XUserPlatformOperation operation, [in] XUserPlatformOperationResult result ); +} + +[ + local, + object, + uuid(5131d685-4394-4ee6-8c18-bfb5d4aef1ff) +] +interface IXUserImpl6 : IXUserImpl5 +{ + BOOLEAN XUserIsSignOutPresent(); + HRESULT XUserSignOutAsync( [in] XUserHandle user, [in, out] XAsyncBlock *async ); + HRESULT XUserSignOutResult( [in, out] XAsyncBlock *async ); +} + +[ + local, + object, + uuid(7d824997-10dc-45ab-86b7-2737767c0bf1) +] +interface IXUserDeviceImpl : IUnknown +{ + HRESULT XUserFindForDevice( [in] const APP_LOCAL_DEVICE_ID *deviceId, [out] XUserHandle *handle ); + HRESULT XUserRegisterForDeviceAssociationChanged( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XUserDeviceAssociationChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XUserUnregisterForDeviceAssociationChanged( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XUserGetDefaultAudioEndpointUtf16( [in] XUserLocalId user, [in] XUserDefaultAudioEndpointKind defaultAudioEndpointKind, [in] SIZE_T endpointIdUtf16Count, [out, string, length_is(endpointIdUtf16Count)] WCHAR endpointIdUtf16[*], [out, optional] SIZE_T *endpointIdUtf16Used ); + HRESULT XUserRegisterForDefaultAudioEndpointUtf16Changed( [in, optional] XTaskQueueHandle queue, [in, optional] void *context, [in] XUserDefaultAudioEndpointUtf16ChangedCallback *callback, [out] XTaskQueueRegistrationToken *token ); + BOOLEAN XUserUnregisterForDefaultAudioEndpointUtf16Changed( [in] XTaskQueueRegistrationToken token, [in] BOOLEAN wait ); + HRESULT XUserFindControllerForUserWithUiAsync( [in] XUserHandle user, [in, out] XAsyncBlock *async ); + HRESULT XUserFindControllerForUserWithUiResult( [in, out] XAsyncBlock *async, [out] APP_LOCAL_DEVICE_ID *deviceId ); +} + +[ + local, + object, + uuid(0cc6a956-e7e1-4fdf-9341-9d5da649ebc8) +] +interface IXUserDeviceImpl2 : IXUserDeviceImpl +{ + /* Unknown which methods added here, all defined in parent for backwards compatibility */ +} + +[ + local, + object, + uuid(cef4fac0-7676-4a94-a119-4c43f9eb5b74) +] +interface IXUserGamertagImpl : IUnknown +{ + HRESULT XUserGetGamertag( [in] XUserHandle user, [in] XUserGamertagComponent gamertagComponent, [in] SIZE_T gamertagSize, [out, string, size_is(gamertagSize)] char *gamertag, [out, optional] SIZE_T *gamertagUsed ); +} + +[ + uuid(01acd177-91f9-4763-a38e-ccbb55ce32e0) +] +coclass XUserImpl +{ + [default] interface IXUserImpl6; + interface IXUserGamertagImpl; +} + +[ + uuid(7d824997-10dc-45ab-86b7-2737767c0bf1) +] +coclass XUserDeviceImpl +{ + [default] interface IXUserDeviceImpl2; +} + +cpp_quote("#endif")