diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py index affb3ab2..6d186c43 100755 --- a/lsteamclient/gen_wrapper.py +++ b/lsteamclient/gen_wrapper.py @@ -543,7 +543,7 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e unnamed = chr(ord(unnamed) + 1) elif param.type.kind == clang.cindex.TypeKind.POINTER and \ param.type.get_pointee().spelling in wrapped_classes: - cfile.write(", create_Linux%s(%s)" % (param.type.get_pointee().spelling, param.spelling)) + cfile.write(", create_Linux%s(%s, \"%s\")" % (param.type.get_pointee().spelling, param.spelling, winclassname)) cpp.write("(%s)%s" % (param.type.spelling, param.spelling)) elif path_conv and param.spelling in path_conv["w2l_names"]: cfile.write(", %s ? lin_%s : NULL" % (param.spelling, param.spelling)) diff --git a/lsteamclient/steamclient_private.h b/lsteamclient/steamclient_private.h index 3881a692..cd193193 100644 --- a/lsteamclient/steamclient_private.h +++ b/lsteamclient/steamclient_private.h @@ -39,10 +39,10 @@ bool steamclient_dos_path_to_unix_path(const char *src, char *dst); const char **steamclient_dos_to_unix_stringlist(const char **src); void steamclient_free_stringlist(const char **out); const char *steamclient_isteamcontroller_getglyph(int origin, const char *lin_path); -void *create_LinuxISteamMatchmakingServerListResponse(void *win); -void *create_LinuxISteamMatchmakingPingResponse(void *win); -void *create_LinuxISteamMatchmakingPlayersResponse(void *win); -void *create_LinuxISteamMatchmakingRulesResponse(void *win); +void *create_LinuxISteamMatchmakingServerListResponse(void *win, const char *version); +void *create_LinuxISteamMatchmakingPingResponse(void *win, const char *version); +void *create_LinuxISteamMatchmakingPlayersResponse(void *win, const char *version); +void *create_LinuxISteamMatchmakingRulesResponse(void *win, const char *version); extern char g_tmppath[PATH_MAX]; diff --git a/lsteamclient/steamclient_wrappers.c b/lsteamclient/steamclient_wrappers.c index e738ba91..7540afb4 100644 --- a/lsteamclient/steamclient_wrappers.c +++ b/lsteamclient/steamclient_wrappers.c @@ -79,7 +79,37 @@ struct gccServerListResponseVtbl { gccServerListResponse_RefreshComplete }; -void *create_LinuxISteamMatchmakingServerListResponse(void *win) +void gccServerListResponse001_ServerResponded(struct gccServerListResponse *_this, int iServer) +{ + TRACE("%p/%p\n", _this, _this->win_side); + CALL_VTBL_FUNC(_this->win_side, 0, void, (winServerListResponse *, int), (_this->win_side, iServer)); +} + +void gccServerListResponse001_ServerFailedToRespond(struct gccServerListResponse *_this, int iServer) +{ + TRACE("%p/%p\n", _this, _this->win_side); + CALL_VTBL_FUNC(_this->win_side, 4, void, (winServerListResponse *, int), (_this->win_side, iServer)); +} + +void gccServerListResponse001_RefreshComplete(struct gccServerListResponse *_this, EMatchMakingServerResponse response) +{ + TRACE("%p/%p\n", _this, _this->win_side); + CALL_VTBL_FUNC(_this->win_side, 8, void, (winServerListResponse *, EMatchMakingServerResponse), (_this->win_side, response)); +} + +struct gccServerListResponse001Vtbl { + void (*ServerResponded)(struct gccServerListResponse001 *, int); + + void (*ServerFailedToRespond)(struct gccServerListResponse001 *, int); + + void (*RefreshComplete)(struct gccServerListResponse001 *, EMatchMakingServerResponse); +} gccServerListResponse001_vtbl = { + gccServerListResponse001_ServerResponded, + gccServerListResponse001_ServerFailedToRespond, + gccServerListResponse001_RefreshComplete +}; + +void *create_LinuxISteamMatchmakingServerListResponse(void *win, const char *version) { struct gccServerListResponse *ret; @@ -88,7 +118,11 @@ void *create_LinuxISteamMatchmakingServerListResponse(void *win) if(!ret) return NULL; - ret->vtable = &gccServerListResponse_vtbl; + if(strcmp(version, "winISteamMatchmakingServers_SteamMatchMakingServers001") == 0){ + ret->vtable = &gccServerListResponse001_vtbl; + }else{ + ret->vtable = &gccServerListResponse_vtbl; + } ret->win_side = (struct winServerListResponse*)win; return ret; @@ -125,7 +159,7 @@ struct gccPingResponseVtbl { gccPingResponse_ServerFailedToRespond }; -void *create_LinuxISteamMatchmakingPingResponse(void *win) +void *create_LinuxISteamMatchmakingPingResponse(void *win, const char *version) { struct gccPingResponse *ret; @@ -179,7 +213,7 @@ struct gccPlayersResponseVtbl { gccPlayersResponse_PlayersRefreshComplete }; -void *create_LinuxISteamMatchmakingPlayersResponse(void *win) +void *create_LinuxISteamMatchmakingPlayersResponse(void *win, const char *version) { struct gccPlayersResponse *ret; @@ -233,7 +267,7 @@ struct gccRulesResponseVtbl { gccRulesResponse_RulesRefreshComplete }; -void *create_LinuxISteamMatchmakingRulesResponse(void *win) +void *create_LinuxISteamMatchmakingRulesResponse(void *win, const char *version) { struct gccRulesResponse *ret; diff --git a/lsteamclient/winISteamMatchmakingServers.c b/lsteamclient/winISteamMatchmakingServers.c index 86c342d8..89ca6227 100644 --- a/lsteamclient/winISteamMatchmakingServers.c +++ b/lsteamclient/winISteamMatchmakingServers.c @@ -24,42 +24,42 @@ DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_R HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestInternetServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestInternetServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestInternetServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_RequestLANServerList, 12) HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestLANServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestLANServerList(_this->linux_side, iApp, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestLANServerList(_this->linux_side, iApp, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_RequestFriendsServerList, 20) HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestFriendsServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestFriendsServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestFriendsServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_RequestFavoritesServerList, 20) HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestFavoritesServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestFavoritesServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestFavoritesServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_RequestHistoryServerList, 20) HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestHistoryServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestHistoryServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestHistoryServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_RequestSpectatorServerList, 20) HServerListRequest __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_RequestSpectatorServerList(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestSpectatorServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestSpectatorServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest, 8) @@ -115,21 +115,21 @@ DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_P HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_PingServer(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_PingServer(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPingResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_PingServer(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPingResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_PlayerDetails, 14) HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_PlayerDetails(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_PlayerDetails(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPlayersResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_PlayerDetails(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPlayersResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_ServerRules, 14) HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_ServerRules(winISteamMatchmakingServers_SteamMatchMakingServers002 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers002_ServerRules(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingRulesResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers002_ServerRules(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingRulesResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers002")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers002_CancelServerQuery, 8) @@ -187,42 +187,42 @@ DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_R void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestInternetServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestInternetServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestInternetServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_RequestLANServerList, 12) void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestLANServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestLANServerList(_this->linux_side, iApp, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestLANServerList(_this->linux_side, iApp, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_RequestFriendsServerList, 20) void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestFriendsServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestFriendsServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestFriendsServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_RequestFavoritesServerList, 20) void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestFavoritesServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestFavoritesServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestFavoritesServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_RequestHistoryServerList, 20) void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestHistoryServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestHistoryServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestHistoryServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_RequestSpectatorServerList, 20) void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_RequestSpectatorServerList(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse) { TRACE("%p\n", _this); - cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestSpectatorServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse)); + cppISteamMatchmakingServers_SteamMatchMakingServers001_RequestSpectatorServerList(_this->linux_side, iApp, ppchFilters, nFilters, create_LinuxISteamMatchmakingServerListResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_GetServerDetails, 12) @@ -271,21 +271,21 @@ DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_P HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_PingServer(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers001_PingServer(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPingResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers001_PingServer(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPingResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_PlayerDetails, 14) HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_PlayerDetails(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers001_PlayerDetails(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPlayersResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers001_PlayerDetails(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingPlayersResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_ServerRules, 14) HServerQuery __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_ServerRules(winISteamMatchmakingServers_SteamMatchMakingServers001 *_this, uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse * pRequestServersResponse) { TRACE("%p\n", _this); - return cppISteamMatchmakingServers_SteamMatchMakingServers001_ServerRules(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingRulesResponse(pRequestServersResponse)); + return cppISteamMatchmakingServers_SteamMatchMakingServers001_ServerRules(_this->linux_side, unIP, usPort, create_LinuxISteamMatchmakingRulesResponse(pRequestServersResponse, "winISteamMatchmakingServers_SteamMatchMakingServers001")); } DEFINE_THISCALL_WRAPPER(winISteamMatchmakingServers_SteamMatchMakingServers001_CancelServerQuery, 8)