From 4260a7131190d5b5a0c1ca2b1c448d5a810d710f Mon Sep 17 00:00:00 2001 From: PlayFab SDK Team Date: Mon, 22 Jan 2024 18:36:22 +0000 Subject: [PATCH] https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#240119 --- code/include/playfab/PlayFabAdminDataModels.h | 22 ++++ code/include/playfab/PlayFabError.h | 2 + .../playfab/PlayFabMultiplayerDataModels.h | 114 +++++++++--------- .../include/playfab/PlayFabServerDataModels.h | 22 ++++ code/source/playfab/PlayFabSettings.cpp | 4 +- com.playfab.xplatcppsdk.v141.autopkg | 4 +- com.playfab.xplatcppsdk.v141.nuspec | 4 +- com.playfab.xplatcppsdk.v142.autopkg | 4 +- com.playfab.xplatcppsdk.v142.nuspec | 4 +- com.playfab.xplatxboxsdk.v141.autopkg | 4 +- 10 files changed, 118 insertions(+), 66 deletions(-) diff --git a/code/include/playfab/PlayFabAdminDataModels.h b/code/include/playfab/PlayFabAdminDataModels.h index 7d9c4908..946dc24f 100644 --- a/code/include/playfab/PlayFabAdminDataModels.h +++ b/code/include/playfab/PlayFabAdminDataModels.h @@ -5457,6 +5457,8 @@ namespace PlayFab GenericErrorCodesLeaderboardColumnsNotSpecified, GenericErrorCodesLeaderboardMaxSizeTooLarge, GenericErrorCodesInvalidAttributeStatisticsSpecified, + GenericErrorCodesLeaderboardNotFound, + GenericErrorCodesTokenSigningKeyNotFound, GenericErrorCodesMatchmakingEntityInvalid, GenericErrorCodesMatchmakingPlayerAttributesInvalid, GenericErrorCodesMatchmakingQueueNotFound, @@ -8447,6 +8449,16 @@ namespace PlayFab output = Json::Value("InvalidAttributeStatisticsSpecified"); return; } + if (input == GenericErrorCodes::GenericErrorCodesLeaderboardNotFound) + { + output = Json::Value("LeaderboardNotFound"); + return; + } + if (input == GenericErrorCodes::GenericErrorCodesTokenSigningKeyNotFound) + { + output = Json::Value("TokenSigningKeyNotFound"); + return; + } if (input == GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid) { output = Json::Value("MatchmakingEntityInvalid"); @@ -12305,6 +12317,16 @@ namespace PlayFab output = GenericErrorCodes::GenericErrorCodesInvalidAttributeStatisticsSpecified; return; } + if (inputStr == "LeaderboardNotFound") + { + output = GenericErrorCodes::GenericErrorCodesLeaderboardNotFound; + return; + } + if (inputStr == "TokenSigningKeyNotFound") + { + output = GenericErrorCodes::GenericErrorCodesTokenSigningKeyNotFound; + return; + } if (inputStr == "MatchmakingEntityInvalid") { output = GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid; diff --git a/code/include/playfab/PlayFabError.h b/code/include/playfab/PlayFabError.h index ab0e98ed..b5f265d0 100644 --- a/code/include/playfab/PlayFabError.h +++ b/code/include/playfab/PlayFabError.h @@ -565,6 +565,8 @@ namespace PlayFab PlayFabErrorLeaderboardColumnsNotSpecified = 1564, PlayFabErrorLeaderboardMaxSizeTooLarge = 1565, PlayFabErrorInvalidAttributeStatisticsSpecified = 1566, + PlayFabErrorLeaderboardNotFound = 1567, + PlayFabErrorTokenSigningKeyNotFound = 1568, PlayFabErrorMatchmakingEntityInvalid = 2001, PlayFabErrorMatchmakingPlayerAttributesInvalid = 2002, PlayFabErrorMatchmakingQueueNotFound = 2016, diff --git a/code/include/playfab/PlayFabMultiplayerDataModels.h b/code/include/playfab/PlayFabMultiplayerDataModels.h index 6de9af1b..f8b4bbae 100644 --- a/code/include/playfab/PlayFabMultiplayerDataModels.h +++ b/code/include/playfab/PlayFabMultiplayerDataModels.h @@ -1884,44 +1884,6 @@ namespace PlayFab } } - enum class ServerDataStatus - { - ServerDataStatusInitialized, - ServerDataStatusIgnored - }; - - inline void ToJsonEnum(const ServerDataStatus input, Json::Value& output) - { - if (input == ServerDataStatus::ServerDataStatusInitialized) - { - output = Json::Value("Initialized"); - return; - } - if (input == ServerDataStatus::ServerDataStatusIgnored) - { - output = Json::Value("Ignored"); - return; - } - } - inline void FromJsonEnum(const Json::Value& input, ServerDataStatus& output) - { - if (!input.isString()) - { - return; - } - const std::string& inputStr = input.asString(); - if (inputStr == "Initialized") - { - output = ServerDataStatus::ServerDataStatusInitialized; - return; - } - if (inputStr == "Ignored") - { - output = ServerDataStatus::ServerDataStatusIgnored; - return; - } - } - enum class ServerType { ServerTypeContainer, @@ -6204,6 +6166,45 @@ namespace PlayFab } }; + struct LobbyServer : public PlayFabBaseModel + { + std::string PubSubConnectionHandle; + std::map ServerData; + Boxed ServerEntity; + + LobbyServer() : + PlayFabBaseModel(), + PubSubConnectionHandle(), + ServerData(), + ServerEntity() + {} + + LobbyServer(const LobbyServer& src) : + PlayFabBaseModel(), + PubSubConnectionHandle(src.PubSubConnectionHandle), + ServerData(src.ServerData), + ServerEntity(src.ServerEntity) + {} + + ~LobbyServer() = default; + + void FromJson(const Json::Value& input) override + { + FromJsonUtilS(input["PubSubConnectionHandle"], PubSubConnectionHandle); + FromJsonUtilS(input["ServerData"], ServerData); + FromJsonUtilO(input["ServerEntity"], ServerEntity); + } + + Json::Value ToJson() const override + { + Json::Value output; + Json::Value each_PubSubConnectionHandle; ToJsonUtilS(PubSubConnectionHandle, each_PubSubConnectionHandle); output["PubSubConnectionHandle"] = each_PubSubConnectionHandle; + Json::Value each_ServerData; ToJsonUtilS(ServerData, each_ServerData); output["ServerData"] = each_ServerData; + Json::Value each_ServerEntity; ToJsonUtilO(ServerEntity, each_ServerEntity); output["ServerEntity"] = each_ServerEntity; + return output; + } + }; + struct Lobby : public PlayFabBaseModel { AccessPolicy pfAccessPolicy; @@ -6218,6 +6219,7 @@ namespace PlayFab Boxed pfOwnerMigrationPolicy; std::string PubSubConnectionHandle; std::map SearchData; + Boxed Server; bool UseConnections; Lobby() : @@ -6234,6 +6236,7 @@ namespace PlayFab pfOwnerMigrationPolicy(), PubSubConnectionHandle(), SearchData(), + Server(), UseConnections() {} @@ -6251,6 +6254,7 @@ namespace PlayFab pfOwnerMigrationPolicy(src.pfOwnerMigrationPolicy), PubSubConnectionHandle(src.PubSubConnectionHandle), SearchData(src.SearchData), + Server(src.Server), UseConnections(src.UseConnections) {} @@ -6270,6 +6274,7 @@ namespace PlayFab FromJsonUtilE(input["OwnerMigrationPolicy"], pfOwnerMigrationPolicy); FromJsonUtilS(input["PubSubConnectionHandle"], PubSubConnectionHandle); FromJsonUtilS(input["SearchData"], SearchData); + FromJsonUtilO(input["Server"], Server); FromJsonUtilP(input["UseConnections"], UseConnections); } @@ -6288,6 +6293,7 @@ namespace PlayFab Json::Value each_pfOwnerMigrationPolicy; ToJsonUtilE(pfOwnerMigrationPolicy, each_pfOwnerMigrationPolicy); output["OwnerMigrationPolicy"] = each_pfOwnerMigrationPolicy; Json::Value each_PubSubConnectionHandle; ToJsonUtilS(PubSubConnectionHandle, each_PubSubConnectionHandle); output["PubSubConnectionHandle"] = each_PubSubConnectionHandle; Json::Value each_SearchData; ToJsonUtilS(SearchData, each_SearchData); output["SearchData"] = each_SearchData; + Json::Value each_Server; ToJsonUtilO(Server, each_Server); output["Server"] = each_Server; Json::Value each_UseConnections; ToJsonUtilP(UseConnections, each_UseConnections); output["UseConnections"] = each_UseConnections; return output; } @@ -7522,18 +7528,15 @@ namespace PlayFab struct JoinLobbyAsServerResult : public PlayFabResultCommon { std::string LobbyId; - ServerDataStatus pfServerDataStatus; JoinLobbyAsServerResult() : PlayFabResultCommon(), - LobbyId(), - pfServerDataStatus() + LobbyId() {} JoinLobbyAsServerResult(const JoinLobbyAsServerResult& src) : PlayFabResultCommon(), - LobbyId(src.LobbyId), - pfServerDataStatus(src.pfServerDataStatus) + LobbyId(src.LobbyId) {} ~JoinLobbyAsServerResult() = default; @@ -7541,14 +7544,12 @@ namespace PlayFab void FromJson(const Json::Value& input) override { FromJsonUtilS(input["LobbyId"], LobbyId); - FromJsonEnum(input["ServerDataStatus"], pfServerDataStatus); } Json::Value ToJson() const override { Json::Value output; Json::Value each_LobbyId; ToJsonUtilS(LobbyId, each_LobbyId); output["LobbyId"] = each_LobbyId; - Json::Value each_pfServerDataStatus; ToJsonEnum(pfServerDataStatus, each_pfServerDataStatus); output["ServerDataStatus"] = each_pfServerDataStatus; return output; } }; @@ -8566,17 +8567,20 @@ namespace PlayFab { std::map CustomTags; Boxed IncludeAllRegions; + std::string RoutingPreference; ListQosServersForTitleRequest() : PlayFabRequestCommon(), CustomTags(), - IncludeAllRegions() + IncludeAllRegions(), + RoutingPreference() {} ListQosServersForTitleRequest(const ListQosServersForTitleRequest& src) : PlayFabRequestCommon(), CustomTags(src.CustomTags), - IncludeAllRegions(src.IncludeAllRegions) + IncludeAllRegions(src.IncludeAllRegions), + RoutingPreference(src.RoutingPreference) {} ~ListQosServersForTitleRequest() = default; @@ -8585,6 +8589,7 @@ namespace PlayFab { FromJsonUtilS(input["CustomTags"], CustomTags); FromJsonUtilP(input["IncludeAllRegions"], IncludeAllRegions); + FromJsonUtilS(input["RoutingPreference"], RoutingPreference); } Json::Value ToJson() const override @@ -8592,6 +8597,7 @@ namespace PlayFab Json::Value output; Json::Value each_CustomTags; ToJsonUtilS(CustomTags, each_CustomTags); output["CustomTags"] = each_CustomTags; Json::Value each_IncludeAllRegions; ToJsonUtilP(IncludeAllRegions, each_IncludeAllRegions); output["IncludeAllRegions"] = each_IncludeAllRegions; + Json::Value each_RoutingPreference; ToJsonUtilS(RoutingPreference, each_RoutingPreference); output["RoutingPreference"] = each_RoutingPreference; return output; } }; @@ -9723,26 +9729,26 @@ namespace PlayFab { std::map CustomTags; std::string LobbyId; - Boxed Server; std::map ServerData; std::list ServerDataToDelete; + Boxed ServerEntity; UpdateLobbyAsServerRequest() : PlayFabRequestCommon(), CustomTags(), LobbyId(), - Server(), ServerData(), - ServerDataToDelete() + ServerDataToDelete(), + ServerEntity() {} UpdateLobbyAsServerRequest(const UpdateLobbyAsServerRequest& src) : PlayFabRequestCommon(), CustomTags(src.CustomTags), LobbyId(src.LobbyId), - Server(src.Server), ServerData(src.ServerData), - ServerDataToDelete(src.ServerDataToDelete) + ServerDataToDelete(src.ServerDataToDelete), + ServerEntity(src.ServerEntity) {} ~UpdateLobbyAsServerRequest() = default; @@ -9751,9 +9757,9 @@ namespace PlayFab { FromJsonUtilS(input["CustomTags"], CustomTags); FromJsonUtilS(input["LobbyId"], LobbyId); - FromJsonUtilO(input["Server"], Server); FromJsonUtilS(input["ServerData"], ServerData); FromJsonUtilS(input["ServerDataToDelete"], ServerDataToDelete); + FromJsonUtilO(input["ServerEntity"], ServerEntity); } Json::Value ToJson() const override @@ -9761,9 +9767,9 @@ namespace PlayFab Json::Value output; Json::Value each_CustomTags; ToJsonUtilS(CustomTags, each_CustomTags); output["CustomTags"] = each_CustomTags; Json::Value each_LobbyId; ToJsonUtilS(LobbyId, each_LobbyId); output["LobbyId"] = each_LobbyId; - Json::Value each_Server; ToJsonUtilO(Server, each_Server); output["Server"] = each_Server; Json::Value each_ServerData; ToJsonUtilS(ServerData, each_ServerData); output["ServerData"] = each_ServerData; Json::Value each_ServerDataToDelete; ToJsonUtilS(ServerDataToDelete, each_ServerDataToDelete); output["ServerDataToDelete"] = each_ServerDataToDelete; + Json::Value each_ServerEntity; ToJsonUtilO(ServerEntity, each_ServerEntity); output["ServerEntity"] = each_ServerEntity; return output; } }; diff --git a/code/include/playfab/PlayFabServerDataModels.h b/code/include/playfab/PlayFabServerDataModels.h index dcb580d5..ffe301c9 100644 --- a/code/include/playfab/PlayFabServerDataModels.h +++ b/code/include/playfab/PlayFabServerDataModels.h @@ -5474,6 +5474,8 @@ namespace PlayFab GenericErrorCodesLeaderboardColumnsNotSpecified, GenericErrorCodesLeaderboardMaxSizeTooLarge, GenericErrorCodesInvalidAttributeStatisticsSpecified, + GenericErrorCodesLeaderboardNotFound, + GenericErrorCodesTokenSigningKeyNotFound, GenericErrorCodesMatchmakingEntityInvalid, GenericErrorCodesMatchmakingPlayerAttributesInvalid, GenericErrorCodesMatchmakingQueueNotFound, @@ -8464,6 +8466,16 @@ namespace PlayFab output = Json::Value("InvalidAttributeStatisticsSpecified"); return; } + if (input == GenericErrorCodes::GenericErrorCodesLeaderboardNotFound) + { + output = Json::Value("LeaderboardNotFound"); + return; + } + if (input == GenericErrorCodes::GenericErrorCodesTokenSigningKeyNotFound) + { + output = Json::Value("TokenSigningKeyNotFound"); + return; + } if (input == GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid) { output = Json::Value("MatchmakingEntityInvalid"); @@ -12322,6 +12334,16 @@ namespace PlayFab output = GenericErrorCodes::GenericErrorCodesInvalidAttributeStatisticsSpecified; return; } + if (inputStr == "LeaderboardNotFound") + { + output = GenericErrorCodes::GenericErrorCodesLeaderboardNotFound; + return; + } + if (inputStr == "TokenSigningKeyNotFound") + { + output = GenericErrorCodes::GenericErrorCodesTokenSigningKeyNotFound; + return; + } if (inputStr == "MatchmakingEntityInvalid") { output = GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid; diff --git a/code/source/playfab/PlayFabSettings.cpp b/code/source/playfab/PlayFabSettings.cpp index 86541f01..0a050ea8 100644 --- a/code/source/playfab/PlayFabSettings.cpp +++ b/code/source/playfab/PlayFabSettings.cpp @@ -7,9 +7,9 @@ namespace PlayFab // Control whether all callbacks are threaded or whether the user manually controls callback timing from their main-thread // Note ANY api call may synchronously throw an exception if the title id is not set bool PlayFabSettings::threadedCallbacks = false; - const std::string PlayFabSettings::sdkVersion = "3.128.240105"; + const std::string PlayFabSettings::sdkVersion = "3.130.240119"; const std::string PlayFabSettings::buildIdentifier = "adobuild_xplatcppsdk_117"; - const std::string PlayFabSettings::versionString = "XPlatCppSdk-3.128.240105"; + const std::string PlayFabSettings::versionString = "XPlatCppSdk-3.130.240119"; std::string PlayFabSettings::productionEnvironmentURL = ".playfabapi.com"; ErrorCallback PlayFabSettings::globalErrorHandler = nullptr; diff --git a/com.playfab.xplatcppsdk.v141.autopkg b/com.playfab.xplatcppsdk.v141.autopkg index cef8b31c..3540c847 100644 --- a/com.playfab.xplatcppsdk.v141.autopkg +++ b/com.playfab.xplatcppsdk.v141.autopkg @@ -8,7 +8,7 @@ configurations { nuget { nuspec { id = "com.playfab.xplatcppsdk.v141"; - version : 3.128.240105; + version : 3.130.240119; title: "PlayFab Cross Platform C++ Sdk for Visual Studio 2017"; summary: "PlayFab is the unified backend platform for games and everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience."; authors: "PlayFab"; @@ -18,7 +18,7 @@ nuget { iconUrl: "https://playfab.com/assets/img/playfab-mark.png"; requireLicenseAcceptance: false; description: "Authentication, in-game commerce, player data, title data, inventory, characters, statistics, leaderboards, analytics and reporting, friends, multiplayer, matchmaking, tournaments, cloud script, trading, real-time event handling, player management, live ops, and server hosting for all major platforms/devices and games of any scale. This sdk gives your game the ability log into PlayFab and access cloud data and services."; - releaseNotes: "https://api.playfab.com/releaseNotes/#240105"; + releaseNotes: "https://api.playfab.com/releaseNotes/#240119"; copyright: "Copyright 2024"; language: "C++"; tags: { PlayFab, Baas, Paas, JSON, REST, HTTP, SSL, API, cloud, liveops, game, gamedev, native }; diff --git a/com.playfab.xplatcppsdk.v141.nuspec b/com.playfab.xplatcppsdk.v141.nuspec index 00494149..8db9d2e0 100644 --- a/com.playfab.xplatcppsdk.v141.nuspec +++ b/com.playfab.xplatcppsdk.v141.nuspec @@ -2,14 +2,14 @@ com.playfab.xplatcppsdk.v141 - 3.128.240105 + 3.130.240119 Microsoft Microsoft http://github.com/PlayFab/XPlatCppSdk Apache-2.0 ./images/icon.png false - https://api.playfab.com/releaseNotes/#3.128.240105 + https://api.playfab.com/releaseNotes/#3.130.240119 Microsoft Azure PlayFab XPlatCppSdk © Microsoft Corporation. All rights reserved. Microsoft Azure PlayFab Baas Paas JSON REST HTTP SSL API cloud liveops game gamedev native nativepackage diff --git a/com.playfab.xplatcppsdk.v142.autopkg b/com.playfab.xplatcppsdk.v142.autopkg index 67ae154b..48b3a27f 100644 --- a/com.playfab.xplatcppsdk.v142.autopkg +++ b/com.playfab.xplatcppsdk.v142.autopkg @@ -8,7 +8,7 @@ configurations { nuget { nuspec { id = "com.playfab.xplatcppsdk.v142"; - version : 3.128.240105; + version : 3.130.240119; title: "PlayFab Cross Platform C++ Sdk for Visual Studio 2019+"; summary: "PlayFab is the unified backend platform for games and everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience."; authors: "PlayFab"; @@ -18,7 +18,7 @@ nuget { iconUrl: "https://playfab.com/assets/img/playfab-mark.png"; requireLicenseAcceptance: false; description: "Authentication, in-game commerce, player data, title data, inventory, characters, statistics, leaderboards, analytics and reporting, friends, multiplayer, matchmaking, tournaments, cloud script, trading, real-time event handling, player management, live ops, and server hosting for all major platforms/devices and games of any scale. This sdk gives your game the ability log into PlayFab and access cloud data and services."; - releaseNotes: "https://api.playfab.com/releaseNotes/#240105"; + releaseNotes: "https://api.playfab.com/releaseNotes/#240119"; copyright: "Copyright 2024"; language: "C++"; tags: { PlayFab, Baas, Paas, JSON, REST, HTTP, SSL, API, cloud, liveops, game, gamedev, native }; diff --git a/com.playfab.xplatcppsdk.v142.nuspec b/com.playfab.xplatcppsdk.v142.nuspec index f69c2e55..9c91d4d8 100644 --- a/com.playfab.xplatcppsdk.v142.nuspec +++ b/com.playfab.xplatcppsdk.v142.nuspec @@ -2,14 +2,14 @@ com.playfab.xplatcppsdk.v142 - 3.128.240105 + 3.130.240119 Microsoft Microsoft http://github.com/PlayFab/XPlatCppSdk Apache-2.0 ./images/icon.png false - https://api.playfab.com/releaseNotes/#3.128.240105 + https://api.playfab.com/releaseNotes/#3.130.240119 Microsoft Azure PlayFab XPlatCppSdk © Microsoft Corporation. All rights reserved. Microsoft Azure PlayFab Baas Paas JSON REST HTTP SSL API cloud liveops game gamedev native nativepackage diff --git a/com.playfab.xplatxboxsdk.v141.autopkg b/com.playfab.xplatxboxsdk.v141.autopkg index fa7f520b..dc63ed49 100644 --- a/com.playfab.xplatxboxsdk.v141.autopkg +++ b/com.playfab.xplatxboxsdk.v141.autopkg @@ -18,7 +18,7 @@ configurations { nuget { nuspec { id = "com.playfab.xplatxboxsdk.v141"; - version : 3.128.240105; + version : 3.130.240119; title: "PlayFab Xbox Platform C++ Sdk for Visual Studio 2017"; summary: "PlayFab is the unified backend platform for games and everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience."; authors: "PlayFab"; @@ -28,7 +28,7 @@ nuget { iconUrl: "https://playfab.com/assets/img/playfab-mark.png"; requireLicenseAcceptance: false; description: "Authentication, in-game commerce, player data, title data, inventory, characters, statistics, leaderboards, analytics and reporting, friends, multiplayer, matchmaking, tournaments, cloud script, trading, real-time event handling, player management, live ops, and server hosting for all major platforms/devices and games of any scale. This sdk gives your game the ability log into PlayFab and access cloud data and services."; - releaseNotes: "https://api.playfab.com/releaseNotes/#240105"; + releaseNotes: "https://api.playfab.com/releaseNotes/#240119"; copyright: "Copyright 2024"; language: "C++"; tags: { PlayFab, Baas, Paas, JSON, REST, HTTP, SSL, API, cloud, liveops, game, gamedev, native, xbox };