-
Notifications
You must be signed in to change notification settings - Fork 20
xgameprotocol: add stubs #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,98 @@ | ||||
| /* | ||||
| * 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 "XGameProtocol.h" | ||||
|
|
||||
| WINE_DEFAULT_DEBUG_CHANNEL(gdkc); | ||||
|
|
||||
| static inline struct x_gameprotocol *impl_from_IXGameProtocolImpl(IXGameProtocolImpl *iface) | ||||
| { | ||||
| return CONTAINING_RECORD(iface, struct x_gameprotocol, IXGameProtocolImpl_iface); | ||||
| } | ||||
|
|
||||
| static HRESULT WINAPI x_gameprotocol_QueryInterface(IXGameProtocolImpl *iface, REFIID iid, void **out) | ||||
| { | ||||
| struct x_gameprotocol *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)) | ||||
| { | ||||
| *out = &impl->IXGameProtocolImpl_iface; | ||||
| impl->IXGameProtocolImpl_iface.lpVtbl->AddRef(*out); | ||||
| return S_OK; | ||||
| } | ||||
|
|
||||
| FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); | ||||
| *out = NULL; | ||||
| return E_NOINTERFACE; | ||||
| } | ||||
|
|
||||
| static ULONG WINAPI x_gameprotocol_AddRef(IXGameProtocolImpl *iface) | ||||
| { | ||||
| struct x_gameprotocol *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_gameprotocol_Release(IXGameProtocolImpl *iface) | ||||
| { | ||||
| struct x_gameprotocol *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_gameprotocol_XGameProtocolRegisterForActivation(IXGameProtocolImpl *iface, XTaskQueueHandle queue, void *context, void *callback, XTaskQueueRegistrationToken *token) | ||||
| { | ||||
| FIXME("iface %p, queue %p, context %p, callback %p, token %p stub!\n", iface, queue, context, callback, token); | ||||
| return S_OK; | ||||
| } | ||||
|
|
||||
| static void WINAPI x_gameprotocol_XGameProtocolActivationCallback(IXGameProtocolImpl *iface, void *context, const LPSTR protocolUri) | ||||
| { | ||||
| FIXME("iface %p, context %p, protocolUri %p stub!\n", iface, context, protocolUri); | ||||
| } | ||||
|
|
||||
| static BOOLEAN WINAPI x_gameprotocol_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_gameprotocol_vtbl = | ||||
| { | ||||
| x_gameprotocol_QueryInterface, | ||||
| x_gameprotocol_AddRef, | ||||
| x_gameprotocol_Release, | ||||
| /* IXGameProtocolImpl methods */ | ||||
| x_gameprotocol_XGameProtocolRegisterForActivation, | ||||
| x_gameprotocol_XGameProtocolUnregisterForActivation, | ||||
| x_gameprotocol_XGameProtocolActivationCallback, | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| }; | ||||
|
|
||||
| static struct x_gameprotocol x_gameprotocol = | ||||
| { | ||||
| {&x_gameprotocol_vtbl}, | ||||
| 0}; | ||||
|
|
||||
| IXGameProtocolImpl *x_gameprotocol_impl = &x_gameprotocol.IXGameProtocolImpl_iface; | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * 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 | ||
| */ | ||
|
|
||
| #ifndef XGAMEPROTOCOL_H | ||
| #define XGAMEPROTOCOL_H | ||
|
|
||
| #include "../../private.h" | ||
|
|
||
| #include <string.h> | ||
|
|
||
| struct x_gameprotocol | ||
| { | ||
| IXGameProtocolImpl IXGameProtocolImpl_iface; | ||
| LONG ref; | ||
| }; | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,8 @@ | |||||||||
|
|
||||||||||
| import "propidl.idl"; | ||||||||||
|
|
||||||||||
| cpp_quote("#include <xtaskqueue.h>") | ||||||||||
|
|
||||||||||
| // --- xgameruntime --- // | ||||||||||
| typedef void* XSystemHandle; | ||||||||||
|
|
||||||||||
|
|
@@ -31,15 +33,19 @@ typedef enum XGameRuntimeFeature XGameRuntimeFeature; | |||||||||
|
|
||||||||||
| typedef struct XVersion XVersion; | ||||||||||
| typedef struct XSystemAnalyticsInfo XSystemAnalyticsInfo; | ||||||||||
| typedef struct XTaskQueueObject* XTaskQueueHandle; | ||||||||||
| typedef struct XTaskQueueRegistrationToken XTaskQueueRegistrationToken; | ||||||||||
|
|
||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| interface IWineAsyncWorkImpl; | ||||||||||
| interface IXSystemImpl; | ||||||||||
| interface IXSystemAnalyticsImpl; | ||||||||||
| interface IXGameRuntimeFeatureImpl; | ||||||||||
| interface IXGameProtocolImpl; | ||||||||||
|
|
||||||||||
| coclass XSystemImpl; | ||||||||||
| coclass XSystemAnalyticsImpl; | ||||||||||
| coclass XGameRuntimeFeatureImpl; | ||||||||||
| coclass XGameProtocolImpl; | ||||||||||
|
|
||||||||||
| enum XSystemHandleType | ||||||||||
| { | ||||||||||
|
|
@@ -162,6 +168,18 @@ interface IXGameRuntimeFeatureImpl : IUnknown | |||||||||
| BOOLEAN XGameRuntimeIsFeatureAvailable( [in] XGameRuntimeFeature feature ); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| [ | ||||||||||
| local, | ||||||||||
| object, | ||||||||||
| uuid(026b010c-06c3-4cdd-bbcb-43f229db1cff) | ||||||||||
| ] | ||||||||||
| interface IXGameProtocolImpl : IUnknown | ||||||||||
| { | ||||||||||
| HRESULT XGameProtocolRegisterForActivation( [in] XTaskQueueHandle queue, [in] void *context, [in] void *callback, [out] XTaskQueueRegistrationToken *token ); | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| BOOLEAN XGameProtocolUnregisterForActivation( XTaskQueueRegistrationToken *token, boolean wait ); | ||||||||||
| void XGameProtocolActivationCallback( [in] void *context, [in] LPSTR protocolUri ); | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| [ | ||||||||||
| uuid(e349bd1a-fc20-4e40-b99c-4178cc6b409f) | ||||||||||
| ] | ||||||||||
|
|
@@ -186,3 +204,11 @@ coclass XGameRuntimeFeatureImpl | |||||||||
| [default] interface IXGameRuntimeFeatureImpl; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| [ | ||||||||||
| uuid(95fd18d2-74dd-4d7c-aa1b-0b51827665d6) | ||||||||||
| ] | ||||||||||
| coclass XGameProtocolImpl | ||||||||||
| { | ||||||||||
| [default] interface IXGameProtocolImpl; | ||||||||||
| } | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.