diff --git a/.gitmodules b/.gitmodules index afe8d8e..9df2d67 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,6 +2,6 @@ [submodule "External/libHttpClient"] path = External/libHttpClient url = https://github.com/microsoft/libHttpClient.git -[submodule "External/rapidjson"] - path = External/rapidjson - url = https://github.com/Tencent/rapidjson.git +[submodule "External/nlohmann"] + path = External/nlohmann + url = https://github.com/nlohmann/json.git diff --git a/Build/PlayFab.C.paths.props b/Build/PlayFab.C.paths.props index f1ea334..f34f022 100644 --- a/Build/PlayFab.C.paths.props +++ b/Build/PlayFab.C.paths.props @@ -27,9 +27,9 @@ - - - $(PlayFabExternalDir)\rapidjson - $(RapidJsonRoot)\include + + + $(PlayFabExternalDir)\nlohmann + $(NLohmannRoot)\include diff --git a/Build/PlayFabCore.Android/CMakeLists.txt b/Build/PlayFabCore.Android/CMakeLists.txt index 953dd94..517bc0c 100644 --- a/Build/PlayFabCore.Android/CMakeLists.txt +++ b/Build/PlayFabCore.Android/CMakeLists.txt @@ -58,7 +58,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabCore/Include/Generated" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) @@ -111,7 +111,7 @@ get_linux_flags(FLAGS FLAGS_DEBUG FLAGS_RELEASE) include("../PlayFabSharedInternal.CMake/TargetSetFlags.cmake") target_set_flags( - "PlayFabCore.Android" + "PlayFabCore.Android" "${FLAGS}" "${FLAGS_DEBUG}" "${FLAGS_RELEASE}" diff --git a/Build/PlayFabCore.Apple/PlayFabCore.Apple.xcodeproj/project.pbxproj b/Build/PlayFabCore.Apple/PlayFabCore.Apple.xcodeproj/project.pbxproj index 9168ad0..d67aea7 100644 --- a/Build/PlayFabCore.Apple/PlayFabCore.Apple.xcodeproj/project.pbxproj +++ b/Build/PlayFabCore.Apple/PlayFabCore.Apple.xcodeproj/project.pbxproj @@ -1167,7 +1167,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Source", @@ -1216,7 +1216,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Source", @@ -1406,7 +1406,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Source", @@ -1456,7 +1456,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Source", diff --git a/Build/PlayFabCore.GDK/PlayFabCore.GDK.vcxproj b/Build/PlayFabCore.GDK/PlayFabCore.GDK.vcxproj index c3e77eb..6e08008 100644 --- a/Build/PlayFabCore.GDK/PlayFabCore.GDK.vcxproj +++ b/Build/PlayFabCore.GDK/PlayFabCore.GDK.vcxproj @@ -25,6 +25,14 @@ %(AdditionalLibraryDirectories);$(Console_SdkLibPath) %(AdditionalDependencies);Appnotify.lib + /profile /opt:ref /opt:icf %(AdditionalOptions) + /profile /opt:ref /opt:icf %(AdditionalOptions) + + /Zi %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + \ No newline at end of file diff --git a/Build/PlayFabCore.Linux/CMakeLists.txt b/Build/PlayFabCore.Linux/CMakeLists.txt index a7eb059..bfa1348 100644 --- a/Build/PlayFabCore.Linux/CMakeLists.txt +++ b/Build/PlayFabCore.Linux/CMakeLists.txt @@ -58,8 +58,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabServices/Include/Generated" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include/rapidjson" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) @@ -73,11 +72,13 @@ set(PLAYFAB_SHARED_INTERNAL_BINARY_PATH ) message(STATUS "PLAYFAB_SHARED_INTERNAL_BINARY_PATH: ${PLAYFAB_SHARED_INTERNAL_BINARY_PATH}") +# Removing -D_DEBUG flag due to a crash that's happening on Debug, +# The crash seems to be related with RTTI symbols not being loaded despite we're including the -frtti flag message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions("-DDBG -D_DBG -DDEBUG -D_DEBUG") + add_definitions("-DDBG -D_DBG -DDEBUG") endif() - + ######################### ### Set up shared lib ### ######################### @@ -94,7 +95,7 @@ add_library( "${PATH_TO_SOURCE}/PlayFabCore/Source/Platform/Generic/LocalStorage_Generic.h" ) -target_link_libraries("${PROJECT_NAME}" +target_link_libraries("${PROJECT_NAME}" PRIVATE ${PLAYFAB_SHARED_INTERNAL_BINARY_PATH} PRIVATE ${LIBHTTPCLIENT_BINARY_PATH} ) diff --git a/Build/PlayFabCore.Linux/PlayFabCore_Linux.bash b/Build/PlayFabCore.Linux/PlayFabCore_Linux.bash index 9b37818..31a82b5 100644 --- a/Build/PlayFabCore.Linux/PlayFabCore_Linux.bash +++ b/Build/PlayFabCore.Linux/PlayFabCore_Linux.bash @@ -44,4 +44,4 @@ log "LHC_PATH = ${LHC_PATH}" # make PlayFabCore sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/PlayFabCore.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D LHC_PATH=$LHC_PATH -sudo make -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabCore.Linux +sudo make VERBOSE=1 -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabCore.Linux diff --git a/Build/PlayFabCore.Win32/PlayFabCore.Win32.vcxproj b/Build/PlayFabCore.Win32/PlayFabCore.Win32.vcxproj index c5f3a49..b394fa3 100644 --- a/Build/PlayFabCore.Win32/PlayFabCore.Win32.vcxproj +++ b/Build/PlayFabCore.Win32/PlayFabCore.Win32.vcxproj @@ -6,6 +6,70 @@ v143 10.0.19041.0 + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + diff --git a/Build/PlayFabServices.Android/CMakeLists.txt b/Build/PlayFabServices.Android/CMakeLists.txt index 00a5a7b..04665de 100644 --- a/Build/PlayFabServices.Android/CMakeLists.txt +++ b/Build/PlayFabServices.Android/CMakeLists.txt @@ -60,7 +60,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabServices/Include/Generated" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) @@ -68,7 +68,7 @@ set(COMMON_INCLUDE_DIRS ### Set up shared lib ### ######################### -# We'll usually want to build for full, but adding a case here if we want to build just for x84_64 or arm8 +# We'll usually want to build for full, but adding a case here if we want to build just for x84_64 or arm8 # TODO: Full flavor should just trigger the other two flavors. Weird that it creates a full directory. Something to look into. # IF (EXISTS "${PATH_TO_ROOT}/Out/Android/PlayFabCore.Android/intermediates/cmake/full${CMAKE_BUILD_TYPE}") # add_subdirectory("../PlayFabCore.Android" ${PATH_TO_ROOT}/Out/Android/PlayFabCore.Android/intermediates/cmake/full${CMAKE_BUILD_TYPE}/obj/${ANDROID_ABI}) diff --git a/Build/PlayFabServices.Apple/PlayFabServices.Apple.xcodeproj/project.pbxproj b/Build/PlayFabServices.Apple/PlayFabServices.Apple.xcodeproj/project.pbxproj index eac5b87..c43ee0c 100644 --- a/Build/PlayFabServices.Apple/PlayFabServices.Apple.xcodeproj/project.pbxproj +++ b/Build/PlayFabServices.Apple/PlayFabServices.Apple.xcodeproj/project.pbxproj @@ -1704,7 +1704,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabCore/Include", @@ -1750,7 +1750,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabCore/Include", @@ -1797,7 +1797,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabCore/Include", @@ -1846,7 +1846,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../Source/PlayFabCore/Include", diff --git a/Build/PlayFabServices.GDK/PlayFabServices.GDK.vcxproj b/Build/PlayFabServices.GDK/PlayFabServices.GDK.vcxproj index bb9c66d..01e8301 100644 --- a/Build/PlayFabServices.GDK/PlayFabServices.GDK.vcxproj +++ b/Build/PlayFabServices.GDK/PlayFabServices.GDK.vcxproj @@ -7,6 +7,22 @@ ; 10.0.26100.0 + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + diff --git a/Build/PlayFabServices.Linux/CMakeLists.txt b/Build/PlayFabServices.Linux/CMakeLists.txt index 3610f3f..036d8c4 100644 --- a/Build/PlayFabServices.Linux/CMakeLists.txt +++ b/Build/PlayFabServices.Linux/CMakeLists.txt @@ -61,8 +61,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabServices/Include/Generated" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include/rapidjson" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) @@ -83,9 +82,11 @@ message(STATUS "PLAYFAB_CORE_BINARY_PATH: ${PLAYFAB_CORE_BINARY_PATH}") message(STATUS "PROJECT_NAME: ${PROJECT_NAME}") +# Removing -D_DEBUG flag due to a crash that's happening on Debug, +# The crash seems to be related with RTTI symbols not being loaded despite we're including the -frtti flag message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions("-DDBG -D_DBG -DDEBUG -D_DEBUG") + add_definitions("-DDBG -D_DBG -DDEBUG") endif() # make ${PROJECT_NAME}.so @@ -93,10 +94,10 @@ add_library( "${PROJECT_NAME}" SHARED "${SERVICE_WRAPPER_SOURCE_FILES}" - "${COMMON_SOURCE_FILES}" + "${COMMON_SOURCE_FILES}" ) -target_link_libraries("${PROJECT_NAME}" +target_link_libraries("${PROJECT_NAME}" PRIVATE ${PLAYFAB_CORE_BINARY_PATH} PRIVATE ${PLAYFAB_SHARED_INTERNAL_BINARY_PATH} PRIVATE ${LIBHTTPCLIENT_BINARY_PATH} diff --git a/Build/PlayFabServices.Linux/PlayFabServices_Linux.bash b/Build/PlayFabServices.Linux/PlayFabServices_Linux.bash index 19d692d..9f3789c 100644 --- a/Build/PlayFabServices.Linux/PlayFabServices_Linux.bash +++ b/Build/PlayFabServices.Linux/PlayFabServices_Linux.bash @@ -88,7 +88,7 @@ if [ "$BUILD_PF_CORE" = true ]; then bash "$SCRIPT_DIR"/../PlayFabCore.Linux/PlayFabCore_Linux.bash -c "$CONFIGURATION" -lhc "$LHC_PATH" fi -log "#### Building PlayFabServices ####" +log "#### Building PlayFabServices ####" log "CONFIGURATION = ${CONFIGURATION}" log "LHC_PATH = ${LHC_PATH}" log "BUILD_LHC = ${BUILD_LHC}" @@ -97,4 +97,4 @@ log "BUILD_PF_CORE = ${BUILD_PF_CORE}" # make PlayFabServices sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/PlayFabServices.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D LHC_PATH=$LHC_PATH -sudo make -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabServices.Linux +sudo make VERBOSE=1 -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabServices.Linux diff --git a/Build/PlayFabServices.Win32/PlayFabServices.Win32.vcxproj b/Build/PlayFabServices.Win32/PlayFabServices.Win32.vcxproj index 69b381e..60a2eb7 100644 --- a/Build/PlayFabServices.Win32/PlayFabServices.Win32.vcxproj +++ b/Build/PlayFabServices.Win32/PlayFabServices.Win32.vcxproj @@ -10,5 +10,69 @@ + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + + + + /profile /opt:ref /opt:icf %(AdditionalOptions) + + + /Zi %(AdditionalOptions) + + \ No newline at end of file diff --git a/Build/PlayFabSharedInternal.Android/CMakeLists.txt b/Build/PlayFabSharedInternal.Android/CMakeLists.txt index b9ea88b..1a10071 100644 --- a/Build/PlayFabSharedInternal.Android/CMakeLists.txt +++ b/Build/PlayFabSharedInternal.Android/CMakeLists.txt @@ -49,7 +49,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabSharedInternal/Source/Common" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) diff --git a/Build/PlayFabSharedInternal.Apple/PlayFabSharedInternal.Apple.xcodeproj/project.pbxproj b/Build/PlayFabSharedInternal.Apple/PlayFabSharedInternal.Apple.xcodeproj/project.pbxproj index 9c77992..2a47f53 100644 --- a/Build/PlayFabSharedInternal.Apple/PlayFabSharedInternal.Apple.xcodeproj/project.pbxproj +++ b/Build/PlayFabSharedInternal.Apple/PlayFabSharedInternal.Apple.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 8236DDA22B5AE91900FFA328 /* RunContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FD92AEAF76A00D8B93D /* RunContext.h */; }; 8236DDA32B5AE91900FFA328 /* XAsyncOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDA2AEAF76A00D8B93D /* XAsyncOperation.h */; }; 8236DDA42B5AE91900FFA328 /* EnumTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDB2AEAF76A00D8B93D /* EnumTraits.h */; }; - 8236DDA52B5AE91900FFA328 /* RapidJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDC2AEAF76A00D8B93D /* RapidJson.h */; }; + 8236DDA52B5AE91900FFA328 /* Nlohmann.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDC2AEAF76A00D8B93D /* Nlohmann.h */; }; 8236DDA62B5AE91900FFA328 /* SdkVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDD2AEAF76A00D8B93D /* SdkVersion.h */; }; 8236DDA72B5AE91900FFA328 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDE2AEAF76A00D8B93D /* Types.h */; }; 8236DDA82B5AE91900FFA328 /* Trace.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDF2AEAF76A00D8B93D /* Trace.h */; }; @@ -46,7 +46,7 @@ 82607FED2AEAF76A00D8B93D /* RunContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FD92AEAF76A00D8B93D /* RunContext.h */; }; 82607FEE2AEAF76A00D8B93D /* XAsyncOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDA2AEAF76A00D8B93D /* XAsyncOperation.h */; }; 82607FEF2AEAF76A00D8B93D /* EnumTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDB2AEAF76A00D8B93D /* EnumTraits.h */; }; - 82607FF02AEAF76A00D8B93D /* RapidJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDC2AEAF76A00D8B93D /* RapidJson.h */; }; + 82607FF02AEAF76A00D8B93D /* Nlohmann.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDC2AEAF76A00D8B93D /* Nlohmann.h */; }; 82607FF12AEAF76A00D8B93D /* SdkVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDD2AEAF76A00D8B93D /* SdkVersion.h */; }; 82607FF22AEAF76A00D8B93D /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDE2AEAF76A00D8B93D /* Types.h */; }; 82607FF32AEAF76A00D8B93D /* Trace.h in Headers */ = {isa = PBXBuildFile; fileRef = 82607FDF2AEAF76A00D8B93D /* Trace.h */; }; @@ -193,7 +193,7 @@ 82607FD92AEAF76A00D8B93D /* RunContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RunContext.h; path = ../../Source/PlayFabSharedInternal/Include/RunContext.h; sourceTree = ""; }; 82607FDA2AEAF76A00D8B93D /* XAsyncOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XAsyncOperation.h; path = ../../Source/PlayFabSharedInternal/Include/XAsyncOperation.h; sourceTree = ""; }; 82607FDB2AEAF76A00D8B93D /* EnumTraits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EnumTraits.h; path = ../../Source/PlayFabSharedInternal/Include/EnumTraits.h; sourceTree = ""; }; - 82607FDC2AEAF76A00D8B93D /* RapidJson.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RapidJson.h; path = ../../Source/PlayFabSharedInternal/Include/RapidJson.h; sourceTree = ""; }; + 82607FDC2AEAF76A00D8B93D /* Nlohmann.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Nlohmann.h; path = ../../Source/PlayFabSharedInternal/Include/Nlohmann.h; sourceTree = ""; }; 82607FDD2AEAF76A00D8B93D /* SdkVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SdkVersion.h; path = ../../Source/PlayFabSharedInternal/Include/SdkVersion.h; sourceTree = ""; }; 82607FDE2AEAF76A00D8B93D /* Types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Types.h; path = ../../Source/PlayFabSharedInternal/Include/Types.h; sourceTree = ""; }; 82607FDF2AEAF76A00D8B93D /* Trace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Trace.h; path = ../../Source/PlayFabSharedInternal/Include/Trace.h; sourceTree = ""; }; @@ -273,7 +273,7 @@ 82607FE42AEAF76A00D8B93D /* ModelBuffer.h */, 82607FE82AEAF76A00D8B93D /* PlatformUser.h */, 82607FE22AEAF76A00D8B93D /* PlatformUtils.h */, - 82607FDC2AEAF76A00D8B93D /* RapidJson.h */, + 82607FDC2AEAF76A00D8B93D /* Nlohmann.h */, 82607FE02AEAF76A00D8B93D /* Result.h */, 82607FE52AEAF76A00D8B93D /* ResultMacros.h */, 82607FD92AEAF76A00D8B93D /* RunContext.h */, @@ -356,7 +356,7 @@ 8236DDA22B5AE91900FFA328 /* RunContext.h in Headers */, 8236DDA32B5AE91900FFA328 /* XAsyncOperation.h in Headers */, 8236DDA42B5AE91900FFA328 /* EnumTraits.h in Headers */, - 8236DDA52B5AE91900FFA328 /* RapidJson.h in Headers */, + 8236DDA52B5AE91900FFA328 /* Nlohmann.h in Headers */, 8236DDA62B5AE91900FFA328 /* SdkVersion.h in Headers */, 8236DDA72B5AE91900FFA328 /* Types.h in Headers */, 8236DDA82B5AE91900FFA328 /* Trace.h in Headers */, @@ -384,7 +384,7 @@ 82607FED2AEAF76A00D8B93D /* RunContext.h in Headers */, 82607FEE2AEAF76A00D8B93D /* XAsyncOperation.h in Headers */, 82607FEF2AEAF76A00D8B93D /* EnumTraits.h in Headers */, - 82607FF02AEAF76A00D8B93D /* RapidJson.h in Headers */, + 82607FF02AEAF76A00D8B93D /* Nlohmann.h in Headers */, 82607FF12AEAF76A00D8B93D /* SdkVersion.h in Headers */, 82607FF22AEAF76A00D8B93D /* Types.h in Headers */, 82607FF32AEAF76A00D8B93D /* Trace.h in Headers */, @@ -628,7 +628,7 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", "$(SRCROOT)/../../Source/PlayFabCore/Include/**", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", ); OTHER_LDFLAGS = ""; @@ -652,7 +652,7 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", "$(SRCROOT)/../../Source/PlayFabCore/Include/**", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", ); OTHER_LDFLAGS = ""; @@ -809,7 +809,7 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", "$(SRCROOT)/../../Source/PlayFabCore/Include/**", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", ); OTHER_LDFLAGS = ""; @@ -831,7 +831,7 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../../../libHttpClient/Include", "$(SRCROOT)/../../Source/PlayFabCore/Include/**", - "$(SRCROOT)/../../External/rapidjson/include", + "$(SRCROOT)/../../External/nlohmann/include", "$(SRCROOT)/../../Source/PlayFabSharedInternal/Include/Generated", ); OTHER_LDFLAGS = ""; diff --git a/Build/PlayFabSharedInternal.CMake/GetPlayFabSharedInternalFiles.cmake b/Build/PlayFabSharedInternal.CMake/GetPlayFabSharedInternalFiles.cmake index 1c5e5f3..8223393 100644 --- a/Build/PlayFabSharedInternal.CMake/GetPlayFabSharedInternalFiles.cmake +++ b/Build/PlayFabSharedInternal.CMake/GetPlayFabSharedInternalFiles.cmake @@ -20,7 +20,7 @@ function(GET_PLAYFAB_SHARED_INTERNAL_FILES "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/ModelBuffer.h" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/PlatformUser.h" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/PlatformUtils.h" - "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/RapidJson.h" + "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Nlohmann.h" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Result.h" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/ResultMacros.h" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/RunContext.h" diff --git a/Build/PlayFabSharedInternal.GDK.143/PlayFabSharedInternal.GDK.143.vcxproj b/Build/PlayFabSharedInternal.GDK.143/PlayFabSharedInternal.GDK.143.vcxproj index bf68a9e..a8f29e5 100644 --- a/Build/PlayFabSharedInternal.GDK.143/PlayFabSharedInternal.GDK.143.vcxproj +++ b/Build/PlayFabSharedInternal.GDK.143/PlayFabSharedInternal.GDK.143.vcxproj @@ -11,5 +11,15 @@ + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + \ No newline at end of file diff --git a/Build/PlayFabSharedInternal.Linux/CMakeLists.txt b/Build/PlayFabSharedInternal.Linux/CMakeLists.txt index c842051..a0bf484 100644 --- a/Build/PlayFabSharedInternal.Linux/CMakeLists.txt +++ b/Build/PlayFabSharedInternal.Linux/CMakeLists.txt @@ -47,8 +47,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" - "${PATH_TO_ROOT}/External/rapidjson/include/rapidjson" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_LHC}/Include" ) diff --git a/Build/PlayFabSharedInternal.Linux/PlayFabSharedInternal_Linux.bash b/Build/PlayFabSharedInternal.Linux/PlayFabSharedInternal_Linux.bash index c4d0252..610f3db 100644 --- a/Build/PlayFabSharedInternal.Linux/PlayFabSharedInternal_Linux.bash +++ b/Build/PlayFabSharedInternal.Linux/PlayFabSharedInternal_Linux.bash @@ -44,4 +44,4 @@ log "LHC_PATH = ${LHC_PATH}" # make PlayFabSharedInternal sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/PlayFabSharedInternal.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D LHC_PATH=$LHC_PATH -sudo make -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabSharedInternal.Linux +sudo make VERBOSE=1 -C "$SCRIPT_DIR"/../../Int/CMake/PlayFabSharedInternal.Linux diff --git a/Build/PlayFabSharedInternal.Win32.143/PlayFabSharedInternal.Win32.143.vcxproj b/Build/PlayFabSharedInternal.Win32.143/PlayFabSharedInternal.Win32.143.vcxproj index 7652d7d..c9080e0 100644 --- a/Build/PlayFabSharedInternal.Win32.143/PlayFabSharedInternal.Win32.143.vcxproj +++ b/Build/PlayFabSharedInternal.Win32.143/PlayFabSharedInternal.Win32.143.vcxproj @@ -6,7 +6,47 @@ v143 - + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + + + + /Zi %(AdditionalOptions) + + \ No newline at end of file diff --git a/Build/PlayFabSharedInternal.import.props b/Build/PlayFabSharedInternal.import.props index c364add..0782703 100644 --- a/Build/PlayFabSharedInternal.import.props +++ b/Build/PlayFabSharedInternal.import.props @@ -34,15 +34,15 @@ - - - $(PlayFabExternalDir)\rapidjson\ - $(RapidJsonSdkRoot)include\ + + + $(PlayFabExternalDir)\nlohmann\ + $(NLohmannSdkRoot)include - %(AdditionalIncludeDirectories);$(RapidJsonSdkInclude) + %(AdditionalIncludeDirectories);$(NLohmannSdkInclude) diff --git a/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems b/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems index 48e9efa..7a31714 100644 --- a/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems +++ b/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems @@ -7,7 +7,7 @@ - %(AdditionalIncludeDirectories);$(PlayFabSourceDir)\PlayFabCore\Include;$(PlayFabSourceDir)\PlayFabCore\Include\Generated;$(PlayFabSourceDir)\PlayFabSharedInternal\Include;$(PlayFabSourceDir)\PlayFabSharedInternal\Include\Generated;$(PlayFabSourceDir)\PlayFabSharedInternal\Source;$(RapidJsonIncludeDir) + %(AdditionalIncludeDirectories);$(PlayFabSourceDir)\PlayFabCore\Include;$(PlayFabSourceDir)\PlayFabCore\Include\Generated;$(PlayFabSourceDir)\PlayFabSharedInternal\Include;$(PlayFabSourceDir)\PlayFabSharedInternal\Include\Generated;$(PlayFabSourceDir)\PlayFabSharedInternal\Source;$(NLohmannIncludeDir) @@ -26,7 +26,7 @@ - + @@ -53,7 +53,4 @@ - - - \ No newline at end of file diff --git a/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems.filters b/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems.filters index f35efc8..50f244a 100644 --- a/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems.filters +++ b/Build/PlayFabSharedInternal/PlayFabSharedInternal.vcxitems.filters @@ -51,7 +51,7 @@ Include - + Include @@ -120,7 +120,4 @@ Source - - - \ No newline at end of file diff --git a/Build/libHttpClient.import.props b/Build/libHttpClient.import.props index 4579cda..0ebe795 100644 --- a/Build/libHttpClient.import.props +++ b/Build/libHttpClient.import.props @@ -12,7 +12,7 @@ - MSBuild /nologo /v:m /t:"$(HCPlatform)\$([System.String]::Copy('$(HCProjectName)').Replace('.','_'))" /p:Configuration="$(Configuration)" /p:Platform="$(Platform)" "$(HCRoot)\libHttpClient.vs2022.sln" + MSBuild /nologo /v:m /t:"$(HCPlatform)\$([System.String]::Copy('$(HCProjectName)').Replace('.','_'))" /p:Configuration="$(Configuration)" /p:Platform="$(Platform)" /p:VCToolsVersion="$(VCToolsVersion)" "$(HCRoot)\libHttpClient.vs2022.sln" diff --git a/External/libHttpClient b/External/libHttpClient index dd64f4c..1344f2e 160000 --- a/External/libHttpClient +++ b/External/libHttpClient @@ -1 +1 @@ -Subproject commit dd64f4c94cc35777c4042eef582d367865059485 +Subproject commit 1344f2e9a86ad6ced95e1f8c63c1c2e146a1dc81 diff --git a/External/nlohmann b/External/nlohmann new file mode 160000 index 0000000..b36f4c4 --- /dev/null +++ b/External/nlohmann @@ -0,0 +1 @@ +Subproject commit b36f4c477c40356a0ae1204b567cca3c2a57d201 diff --git a/External/rapidjson b/External/rapidjson deleted file mode 160000 index 973dc9c..0000000 --- a/External/rapidjson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 973dc9c06dcd3d035ebd039cfb9ea457721ec213 diff --git a/External/rapidjson.natvis b/External/rapidjson.natvis deleted file mode 100644 index a525ea5..0000000 --- a/External/rapidjson.natvis +++ /dev/null @@ -1,37 +0,0 @@ - - - - - null - true - false - {(const Ch*)data_.ss.str,na} - {(const Ch*)((size_t)data_.s.str & 0x0000FFFFFFFFFFFF),na} - {data_.n.i.i} - {data_.n.u.u} - {data_.n.i64} - {data_.n.u64} - {data_.n.d} - Object members={data_.o.size} - Array members={data_.a.size} - - data_.o.size - data_.o.capacity - - data_.o.size - - (rapidjson::GenericMember<$T1,$T2>*)(((size_t)data_.o.members) & 0x0000FFFFFFFFFFFF) - - - data_.a.size - data_.a.capacity - - data_.a.size - - (rapidjson::GenericValue<$T1,$T2>*)(((size_t)data_.a.elements) & 0x0000FFFFFFFFFFFF) - - - - - - diff --git a/Source/PlayFabCore/Include/Generated/playfab/core/PFAuthentication.h b/Source/PlayFabCore/Include/Generated/playfab/core/PFAuthentication.h index 0b0c3dc..b851b38 100644 --- a/Source/PlayFabCore/Include/Generated/playfab/core/PFAuthentication.h +++ b/Source/PlayFabCore/Include/Generated/playfab/core/PFAuthentication.h @@ -592,7 +592,7 @@ PF_API PFAuthenticationReLoginWithFacebookInstantGamesIdAsync( /// this case, no email or username will be associated with the PlayFab account. Otherwise, if no PlayFab /// account is linked to the Game Center account, an error indicating this will be returned, so that the /// title can guide the user through creation of a PlayFab account. If an invalid iOS Game Center player -/// identifier is used, an error indicating this will be returned. +/// identifier is used, an error indicating this will be returned. See also ClientLoginWithIOSDeviceIDAsync. /// /// When the asynchronous task is complete, call /// to get the result. @@ -1243,6 +1243,8 @@ PF_API PFAuthenticationReLoginWithNintendoSwitchDeviceIdAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLinkOpenIdConnectAsync, ClientUnlinkOpenIdConnectAsync. +/// /// When the asynchronous task is complete, call /// to get the result. /// @@ -1421,7 +1423,8 @@ PF_API PFAuthenticationReLoginWithPlayFabAsync( /// is set to true, a new PlayFab account will be created and linked to the PlayStation :tm: Network account. /// In this case, no email or username will be associated with the PlayFab account. Otherwise, if no PlayFab /// account is linked to the PlayStation :tm: Network account, an error indicating this will be returned, -/// so that the title can guide the user through creation of a PlayFab account. +/// so that the title can guide the user through creation of a PlayFab account. See also ClientLinkPSNAccountAsync, +/// ClientUnlinkPSNAccountAsync. /// /// When the asynchronous task is complete, call /// to get the result. @@ -1439,10 +1442,10 @@ PF_API PFAuthenticationLoginWithPSNAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ENCRYPTION_KEY_MISSING, -/// E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, E_PF_INVALID_PSN_AUTH_CODE, E_PF_INVALID_PSN_ISSUER_ID, -/// E_PF_PLAYER_SECRET_ALREADY_CONFIGURED, E_PF_PLAYER_SECRET_NOT_CONFIGURED, E_PF_PSN_INACCESSIBLE, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED -/// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details -/// on error handling. +/// E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, E_PF_FEATURE_NOT_CONFIGURED_FOR_TITLE, E_PF_INVALID_PSN_AUTH_CODE, +/// E_PF_INVALID_PSN_ISSUER_ID, E_PF_PLAYER_SECRET_ALREADY_CONFIGURED, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_PSN_INACCESSIBLE, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED or any of the global PlayFab +/// Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFAuthenticationLoginWithPSNGetResultSize( _Inout_ XAsyncBlock* async, @@ -1461,10 +1464,10 @@ PF_API PFAuthenticationLoginWithPSNGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ENCRYPTION_KEY_MISSING, -/// E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, E_PF_INVALID_PSN_AUTH_CODE, E_PF_INVALID_PSN_ISSUER_ID, -/// E_PF_PLAYER_SECRET_ALREADY_CONFIGURED, E_PF_PLAYER_SECRET_NOT_CONFIGURED, E_PF_PSN_INACCESSIBLE, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED -/// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details -/// on error handling. +/// E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, E_PF_FEATURE_NOT_CONFIGURED_FOR_TITLE, E_PF_INVALID_PSN_AUTH_CODE, +/// E_PF_INVALID_PSN_ISSUER_ID, E_PF_PLAYER_SECRET_ALREADY_CONFIGURED, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_PSN_INACCESSIBLE, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED or any of the global PlayFab +/// Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// If the PFAuthenticationLoginWithPSNAsync call fails, entityHandle with be null. Otherwise, the handle must be closed with PFEntityCloseHandle @@ -1703,7 +1706,7 @@ PF_API PFAuthenticationReLoginWithTwitchAsync( /// to true, a new PlayFab account will be created and linked to the Xbox Live account. In this case, /// no email or username will be associated with the PlayFab account. Otherwise, if no PlayFab account /// is linked to the Xbox Live account, an error indicating this will be returned, so that the title can -/// guide the user through creation of a PlayFab account. +/// guide the user through creation of a PlayFab account. See also ClientLinkXboxAccountAsync, ClientUnlinkXboxAccountAsync. /// /// When the asynchronous task is complete, call /// to get the result. @@ -2115,9 +2118,9 @@ PF_API PFAuthenticationServerLoginWithSteamIdAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, -/// E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED, E_PF_STEAM_NOT_ENABLED_FOR_TITLE, E_PF_STEAM_USER_NOT_FOUND -/// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details -/// on error handling. +/// E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED, +/// E_PF_STEAM_NOT_ENABLED_FOR_TITLE, E_PF_STEAM_USER_NOT_FOUND or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFAuthenticationServerLoginWithSteamIdGetResultSize( _Inout_ XAsyncBlock* async, @@ -2136,9 +2139,9 @@ PF_API PFAuthenticationServerLoginWithSteamIdGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_EVALUATION_MODE_PLAYER_COUNT_EXCEEDED, -/// E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED, E_PF_STEAM_NOT_ENABLED_FOR_TITLE, E_PF_STEAM_USER_NOT_FOUND -/// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details -/// on error handling. +/// E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, E_PF_REQUEST_VIEW_CONSTRAINT_PARAMS_NOT_ALLOWED, +/// E_PF_STEAM_NOT_ENABLED_FOR_TITLE, E_PF_STEAM_USER_NOT_FOUND or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// If the PFAuthenticationServerLoginWithSteamIdAsync call fails, entityHandle with be null. Otherwise, the handle must be closed with PFEntityCloseHandle diff --git a/Source/PlayFabCore/Include/Generated/playfab/core/PFErrors.h b/Source/PlayFabCore/Include/Generated/playfab/core/PFErrors.h index dd9c4df..5460730 100644 --- a/Source/PlayFabCore/Include/Generated/playfab/core/PFErrors.h +++ b/Source/PlayFabCore/Include/Generated/playfab/core/PFErrors.h @@ -606,6 +606,10 @@ extern "C" #define E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER MAKE_E_HC(0x578cL) // 0x8923578c #define E_PF_STATISTIC_DEFINITION_HAS_NULL_OR_EMPTY_VERSION_CONFIGURATION MAKE_E_HC(0x5784L) // 0x89235784 #define E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH MAKE_E_HC(0x5785L) // 0x89235785 +#define E_PF_INVALID_EXTERNAL_ENTITY_ID MAKE_E_HC(0x5791L) // 0x89235791 +#define E_PF_UPDATING_STATISTICS_USING_TRANSACTION_ID_NOT_AVAILABLE_FOR_FREE_TIER MAKE_E_HC(0x5792L) // 0x89235792 +#define E_PF_TRANSACTION_ALREADY_APPLIED MAKE_E_HC(0x5793L) // 0x89235793 +#define E_PF_REPORT_DATA_NOT_RETRIEVED_SUCCESSFULLY MAKE_E_HC(0x5794L) // 0x89235794 #define E_PF_MATCHMAKING_ENTITY_INVALID MAKE_E_HC(0x5646L) // 0x89235646 #define E_PF_MATCHMAKING_PLAYER_ATTRIBUTES_INVALID MAKE_E_HC(0x5647L) // 0x89235647 #define E_PF_MATCHMAKING_QUEUE_NOT_FOUND MAKE_E_HC(0x5648L) // 0x89235648 @@ -872,6 +876,8 @@ extern "C" #define E_PF_TRUE_SKILL_INVALID_PLAYER_ID MAKE_E_HC(0x577cL) // 0x8923577c #define E_PF_TRUE_SKILL_INVALID_SQUAD_SIZE MAKE_E_HC(0x577dL) // 0x8923577d #define E_PF_TRUE_SKILL_CONDITION_SET_NOT_IN_MODEL MAKE_E_HC(0x577eL) // 0x8923577e +#define E_PF_TRUE_SKILL_MODEL_STATE_INVALID_FOR_OPERATION MAKE_E_HC(0x578dL) // 0x8923578d +#define E_PF_TRUE_SKILL_SCENARIO_CONTAINS_ACTIVE_MODEL MAKE_E_HC(0x578eL) // 0x8923578e #define E_PF_GAME_SAVE_MANIFEST_NOT_FOUND MAKE_E_HC(0x577fL) // 0x8923577f #define E_PF_GAME_SAVE_MANIFEST_VERSION_ALREADY_EXISTS MAKE_E_HC(0x5780L) // 0x89235780 #define E_PF_GAME_SAVE_CONFLICT_UPDATING_MANIFEST MAKE_E_HC(0x5781L) // 0x89235781 @@ -881,6 +887,10 @@ extern "C" #define E_PF_GAME_SAVE_UNKNOWN_FILE_IN_MANIFEST MAKE_E_HC(0x5789L) // 0x89235789 #define E_PF_GAME_SAVE_FILE_EXCEEDED_REPORTED_SIZE MAKE_E_HC(0x578aL) // 0x8923578a #define E_PF_GAME_SAVE_FILE_NOT_UPLOADED MAKE_E_HC(0x578bL) // 0x8923578b +#define E_PF_GAME_SAVE_BAD_REQUEST MAKE_E_HC(0x578fL) // 0x8923578f +#define E_PF_GAME_SAVE_OPERATION_NOT_ALLOWED MAKE_E_HC(0x5790L) // 0x89235790 +#define E_PF_GAME_SAVE_DATA_STORAGE_QUOTA_EXCEEDED MAKE_E_HC(0x5795L) // 0x89235795 +#define E_PF_GAME_SAVE_NEWER_MANIFEST_EXISTS MAKE_E_HC(0x5796L) // 0x89235796 #define E_PF_STATE_SHARE_FORBIDDEN MAKE_E_HC(0x5769L) // 0x89235769 #define E_PF_STATE_SHARE_TITLE_NOT_IN_FLIGHT MAKE_E_HC(0x576aL) // 0x8923576a #define E_PF_STATE_SHARE_STATE_NOT_FOUND MAKE_E_HC(0x5723L) // 0x89235723 diff --git a/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFAuthentication.h b/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFAuthentication.h index 538e9b5..6683431 100644 --- a/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFAuthentication.h +++ b/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFAuthentication.h @@ -116,6 +116,8 @@ PF_API PFAuthenticationReLoginWithCustomIDAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLinkOpenIdConnectAsync, ClientUnlinkOpenIdConnectAsync. +/// /// When the asynchronous task is complete, call /// to get the result. /// diff --git a/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFErrors.h b/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFErrors.h index dd9c4df..5460730 100644 --- a/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFErrors.h +++ b/Source/PlayFabCore/Include/GeneratedGdk/playfab/core/PFErrors.h @@ -606,6 +606,10 @@ extern "C" #define E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER MAKE_E_HC(0x578cL) // 0x8923578c #define E_PF_STATISTIC_DEFINITION_HAS_NULL_OR_EMPTY_VERSION_CONFIGURATION MAKE_E_HC(0x5784L) // 0x89235784 #define E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH MAKE_E_HC(0x5785L) // 0x89235785 +#define E_PF_INVALID_EXTERNAL_ENTITY_ID MAKE_E_HC(0x5791L) // 0x89235791 +#define E_PF_UPDATING_STATISTICS_USING_TRANSACTION_ID_NOT_AVAILABLE_FOR_FREE_TIER MAKE_E_HC(0x5792L) // 0x89235792 +#define E_PF_TRANSACTION_ALREADY_APPLIED MAKE_E_HC(0x5793L) // 0x89235793 +#define E_PF_REPORT_DATA_NOT_RETRIEVED_SUCCESSFULLY MAKE_E_HC(0x5794L) // 0x89235794 #define E_PF_MATCHMAKING_ENTITY_INVALID MAKE_E_HC(0x5646L) // 0x89235646 #define E_PF_MATCHMAKING_PLAYER_ATTRIBUTES_INVALID MAKE_E_HC(0x5647L) // 0x89235647 #define E_PF_MATCHMAKING_QUEUE_NOT_FOUND MAKE_E_HC(0x5648L) // 0x89235648 @@ -872,6 +876,8 @@ extern "C" #define E_PF_TRUE_SKILL_INVALID_PLAYER_ID MAKE_E_HC(0x577cL) // 0x8923577c #define E_PF_TRUE_SKILL_INVALID_SQUAD_SIZE MAKE_E_HC(0x577dL) // 0x8923577d #define E_PF_TRUE_SKILL_CONDITION_SET_NOT_IN_MODEL MAKE_E_HC(0x577eL) // 0x8923577e +#define E_PF_TRUE_SKILL_MODEL_STATE_INVALID_FOR_OPERATION MAKE_E_HC(0x578dL) // 0x8923578d +#define E_PF_TRUE_SKILL_SCENARIO_CONTAINS_ACTIVE_MODEL MAKE_E_HC(0x578eL) // 0x8923578e #define E_PF_GAME_SAVE_MANIFEST_NOT_FOUND MAKE_E_HC(0x577fL) // 0x8923577f #define E_PF_GAME_SAVE_MANIFEST_VERSION_ALREADY_EXISTS MAKE_E_HC(0x5780L) // 0x89235780 #define E_PF_GAME_SAVE_CONFLICT_UPDATING_MANIFEST MAKE_E_HC(0x5781L) // 0x89235781 @@ -881,6 +887,10 @@ extern "C" #define E_PF_GAME_SAVE_UNKNOWN_FILE_IN_MANIFEST MAKE_E_HC(0x5789L) // 0x89235789 #define E_PF_GAME_SAVE_FILE_EXCEEDED_REPORTED_SIZE MAKE_E_HC(0x578aL) // 0x8923578a #define E_PF_GAME_SAVE_FILE_NOT_UPLOADED MAKE_E_HC(0x578bL) // 0x8923578b +#define E_PF_GAME_SAVE_BAD_REQUEST MAKE_E_HC(0x578fL) // 0x8923578f +#define E_PF_GAME_SAVE_OPERATION_NOT_ALLOWED MAKE_E_HC(0x5790L) // 0x89235790 +#define E_PF_GAME_SAVE_DATA_STORAGE_QUOTA_EXCEEDED MAKE_E_HC(0x5795L) // 0x89235795 +#define E_PF_GAME_SAVE_NEWER_MANIFEST_EXISTS MAKE_E_HC(0x5796L) // 0x89235796 #define E_PF_STATE_SHARE_FORBIDDEN MAKE_E_HC(0x5769L) // 0x89235769 #define E_PF_STATE_SHARE_TITLE_NOT_IN_FLIGHT MAKE_E_HC(0x576aL) // 0x8923576a #define E_PF_STATE_SHARE_STATE_NOT_FOUND MAKE_E_HC(0x5723L) // 0x89235723 diff --git a/Source/PlayFabCore/Include/playfab/core/PFPlatform.h b/Source/PlayFabCore/Include/playfab/core/PFPlatform.h index e5240e6..3dfd13c 100644 --- a/Source/PlayFabCore/Include/playfab/core/PFPlatform.h +++ b/Source/PlayFabCore/Include/playfab/core/PFPlatform.h @@ -35,7 +35,9 @@ extern "C" /// A pointer to an allocated block of memory of the specified size, or a null /// pointer if allocation failed. /// The size of the allocation to be made. This value will never be zero. -typedef _Ret_maybenull_ _Post_writable_byte_size_(size) void* STDAPIVCALLTYPE PFMemAllocFunction(_In_ size_t size); +/// An opaque identifier representing the internal category of +/// memory being allocated. This value should be ignored. +typedef _Ret_maybenull_ _Post_writable_byte_size_(size) void* STDAPIVCALLTYPE PFMemAllocFunction(_In_ size_t size, _In_ uint32_t memoryTypeId); /// /// A callback invoked every time a previously allocated memory buffer is no longer needed by @@ -47,7 +49,9 @@ typedef _Ret_maybenull_ _Post_writable_byte_size_(size) void* STDAPIVCALLTYPE PF /// /// The pointer to the memory buffer previously allocated. This value will /// never be a null pointer. -typedef void STDAPIVCALLTYPE PFMemFreeFunction(_In_ _Post_invalid_ void* pointer); +/// An opaque identifier representing the internal category of +/// memory being allocated. This value should be ignored. +typedef void STDAPIVCALLTYPE PFMemFreeFunction(_In_ _Post_invalid_ void* pointer, _In_ uint32_t memoryTypeId); /// /// Struct encapsulating memory hooks. @@ -97,6 +101,15 @@ PF_API PFMemGetFunctions( _Out_ PFMemoryHooks* hooks ) noexcept; +/// +/// Determines if custom memory functions are being used. +/// +/// Indicates if custom memory functions are in use. +/// HRESULT return code for this API operation. +PF_API PFMemIsUsingCustomMemoryFunctions( + _Out_ bool* isUsingCustomMemoryFunctions +) noexcept; + //----------------------------------------------------------------------------- // Storage. Required on some platforms, see online documentation for more details. //----------------------------------------------------------------------------- diff --git a/Source/PlayFabCore/Source/Api/PFPlatform.cpp b/Source/PlayFabCore/Source/Api/PFPlatform.cpp index 6bcafb9..7e69834 100644 --- a/Source/PlayFabCore/Source/Api/PFPlatform.cpp +++ b/Source/PlayFabCore/Source/Api/PFPlatform.cpp @@ -45,6 +45,15 @@ PF_API PFMemGetFunctions( return S_OK; } +PF_API PFMemIsUsingCustomMemoryFunctions( + _Out_ bool* isUsingCustomMemoryFunctions +) noexcept +{ + RETURN_HR_INVALIDARG_IF_NULL(isUsingCustomMemoryFunctions); + + *isUsingCustomMemoryFunctions = PlayFab::IsUsingCustomMemoryHooks(); + return S_OK; +} PF_API PFPlatformLocalStorageSetHandlers( _In_ PFLocalStorageHooks* hooks diff --git a/Source/PlayFabCore/Source/EventPipeline/EventPipeline.cpp b/Source/PlayFabCore/Source/EventPipeline/EventPipeline.cpp index af4d314..fad524f 100644 --- a/Source/PlayFabCore/Source/EventPipeline/EventPipeline.cpp +++ b/Source/PlayFabCore/Source/EventPipeline/EventPipeline.cpp @@ -48,9 +48,9 @@ WriteEventsResponse::WriteEventsResponse(ServiceResponse&& serviceResponse) : { PlayFab::Vector failedEventIndexes{}; - for (rapidjson::Value::ConstMemberIterator iter = ServiceResponse::ErrorDetails.MemberBegin(); iter != ServiceResponse::ErrorDetails.MemberEnd(); ++iter) + for (auto iter = ServiceResponse::ErrorDetails.begin(); iter != ServiceResponse::ErrorDetails.end(); ++iter) { - char* errorDetail = const_cast(iter->name.GetString()); + char* errorDetail = const_cast(iter.key().c_str()); const char* prefix = "Events["; if (strncmp(prefix, errorDetail, strlen(prefix)) == 0) diff --git a/Source/PlayFabCore/Source/Generated/AuthenticationTypes.cpp b/Source/PlayFabCore/Source/Generated/AuthenticationTypes.cpp index 943a1b2..379ec2f 100644 --- a/Source/PlayFabCore/Source/Generated/AuthenticationTypes.cpp +++ b/Source/PlayFabCore/Source/Generated/AuthenticationTypes.cpp @@ -14,7 +14,7 @@ JsonValue LoginWithAndroidDeviceIDRequest::ToJson() const JsonValue LoginWithAndroidDeviceIDRequest::ToJson(const PFAuthenticationLoginWithAndroidDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AndroidDevice", input.androidDevice); JsonUtils::ObjectAddMember(output, "AndroidDeviceId", input.androidDeviceId); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); @@ -135,27 +135,27 @@ HRESULT LoginResult::Copy(const PFAuthenticationLoginResult& input, PFAuthentica { output = input; { - auto propCopyResult = buffer.CopyTo(input.infoResultPayload); + auto propCopyResult = buffer.CopyTo(input.infoResultPayload); RETURN_IF_FAILED(propCopyResult.hr); output.infoResultPayload = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLoginTime); + auto propCopyResult = buffer.CopyTo(input.lastLoginTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastLoginTime = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.settingsForUser); + auto propCopyResult = buffer.CopyTo(input.settingsForUser); RETURN_IF_FAILED(propCopyResult.hr); output.settingsForUser = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.treatmentAssignment); + auto propCopyResult = buffer.CopyTo(input.treatmentAssignment); RETURN_IF_FAILED(propCopyResult.hr); output.treatmentAssignment = propCopyResult.ExtractPayload(); } @@ -169,7 +169,7 @@ JsonValue LoginWithAppleRequest::ToJson() const JsonValue LoginWithAppleRequest::ToJson(const PFAuthenticationLoginWithAppleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "IdentityToken", input.identityToken); @@ -185,7 +185,7 @@ JsonValue LoginWithCustomIDRequest::ToJson() const JsonValue LoginWithCustomIDRequest::ToJson(const PFAuthenticationLoginWithCustomIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMember(output, "CustomId", input.customId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -201,7 +201,7 @@ JsonValue LoginWithEmailAddressRequest::ToJson() const JsonValue LoginWithEmailAddressRequest::ToJson(const PFAuthenticationLoginWithEmailAddressRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -216,7 +216,7 @@ JsonValue LoginWithFacebookRequest::ToJson() const JsonValue LoginWithFacebookRequest::ToJson(const PFAuthenticationLoginWithFacebookRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AccessToken", input.accessToken); JsonUtils::ObjectAddMember(output, "AuthenticationToken", input.authenticationToken); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); @@ -233,7 +233,7 @@ JsonValue LoginWithFacebookInstantGamesIdRequest::ToJson() const JsonValue LoginWithFacebookInstantGamesIdRequest::ToJson(const PFAuthenticationLoginWithFacebookInstantGamesIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "FacebookInstantGamesSignature", input.facebookInstantGamesSignature); @@ -249,7 +249,7 @@ JsonValue LoginWithGameCenterRequest::ToJson() const JsonValue LoginWithGameCenterRequest::ToJson(const PFAuthenticationLoginWithGameCenterRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -269,7 +269,7 @@ JsonValue LoginWithGoogleAccountRequest::ToJson() const JsonValue LoginWithGoogleAccountRequest::ToJson(const PFAuthenticationLoginWithGoogleAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -286,7 +286,7 @@ JsonValue LoginWithGooglePlayGamesServicesRequest::ToJson() const JsonValue LoginWithGooglePlayGamesServicesRequest::ToJson(const PFAuthenticationLoginWithGooglePlayGamesServicesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -302,7 +302,7 @@ JsonValue LoginWithIOSDeviceIDRequest::ToJson() const JsonValue LoginWithIOSDeviceIDRequest::ToJson(const PFAuthenticationLoginWithIOSDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DeviceId", input.deviceId); @@ -320,7 +320,7 @@ JsonValue LoginWithKongregateRequest::ToJson() const JsonValue LoginWithKongregateRequest::ToJson(const PFAuthenticationLoginWithKongregateRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthTicket", input.authTicket); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -337,7 +337,7 @@ JsonValue LoginWithNintendoServiceAccountRequest::ToJson() const JsonValue LoginWithNintendoServiceAccountRequest::ToJson(const PFAuthenticationLoginWithNintendoServiceAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "IdentityToken", input.identityToken); @@ -353,7 +353,7 @@ JsonValue LoginWithNintendoSwitchDeviceIdRequest::ToJson() const JsonValue LoginWithNintendoSwitchDeviceIdRequest::ToJson(const PFAuthenticationLoginWithNintendoSwitchDeviceIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -369,7 +369,7 @@ JsonValue LoginWithOpenIdConnectRequest::ToJson() const JsonValue LoginWithOpenIdConnectRequest::ToJson(const PFAuthenticationLoginWithOpenIdConnectRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConnectionId", input.connectionId); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -386,7 +386,7 @@ JsonValue LoginWithPlayFabRequest::ToJson() const JsonValue LoginWithPlayFabRequest::ToJson(const PFAuthenticationLoginWithPlayFabRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); JsonUtils::ObjectAddMember(output, "Password", input.password); @@ -401,7 +401,7 @@ JsonValue LoginWithPSNRequest::ToJson() const JsonValue LoginWithPSNRequest::ToJson(const PFAuthenticationLoginWithPSNRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthCode", input.authCode); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -419,7 +419,7 @@ JsonValue LoginWithSteamRequest::ToJson() const JsonValue LoginWithSteamRequest::ToJson(const PFAuthenticationLoginWithSteamRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -436,7 +436,7 @@ JsonValue LoginWithTwitchRequest::ToJson() const JsonValue LoginWithTwitchRequest::ToJson(const PFAuthenticationLoginWithTwitchRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AccessToken", input.accessToken); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -452,7 +452,7 @@ JsonValue LoginWithXboxRequest::ToJson() const JsonValue LoginWithXboxRequest::ToJson(const PFAuthenticationLoginWithXboxRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -469,7 +469,7 @@ JsonValue LoginWithXUserRequest::ToJson() const JsonValue LoginWithXUserRequest::ToJson(const PFAuthenticationLoginWithXUserRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -485,7 +485,7 @@ JsonValue RegisterPlayFabUserRequest::ToJson() const JsonValue RegisterPlayFabUserRequest::ToJson(const PFAuthenticationRegisterPlayFabUserRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DisplayName", input.displayName); JsonUtils::ObjectAddMember(output, "Email", input.email); @@ -551,17 +551,17 @@ HRESULT RegisterPlayFabUserResult::Copy(const PFAuthenticationRegisterPlayFabUse { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.settingsForUser); + auto propCopyResult = buffer.CopyTo(input.settingsForUser); RETURN_IF_FAILED(propCopyResult.hr); output.settingsForUser = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } @@ -575,7 +575,7 @@ JsonValue ServerLoginWithPSNRequest::ToJson() const JsonValue ServerLoginWithPSNRequest::ToJson(const PFAuthenticationServerLoginWithPSNRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthCode", input.authCode); JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -592,7 +592,7 @@ JsonValue LoginWithServerCustomIdRequest::ToJson() const JsonValue LoginWithServerCustomIdRequest::ToJson(const PFAuthenticationLoginWithServerCustomIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -608,7 +608,7 @@ JsonValue LoginWithSteamIdRequest::ToJson() const JsonValue LoginWithSteamIdRequest::ToJson(const PFAuthenticationLoginWithSteamIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -623,7 +623,7 @@ JsonValue ServerLoginWithXboxRequest::ToJson() const JsonValue ServerLoginWithXboxRequest::ToJson(const PFAuthenticationServerLoginWithXboxRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -638,7 +638,7 @@ JsonValue LoginWithXboxIdRequest::ToJson() const JsonValue LoginWithXboxIdRequest::ToJson(const PFAuthenticationLoginWithXboxIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CreateAccount", input.createAccount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); @@ -655,7 +655,7 @@ JsonValue AuthenticateCustomIdRequest::ToJson() const JsonValue AuthenticateCustomIdRequest::ToJson(const PFAuthenticationAuthenticateCustomIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CustomId", input.customId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -714,17 +714,17 @@ HRESULT EntityTokenResponse::Copy(const PFAuthenticationEntityTokenResponse& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityToken); + auto propCopyResult = buffer.CopyTo(input.entityToken); RETURN_IF_FAILED(propCopyResult.hr); output.entityToken = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.tokenExpiration); + auto propCopyResult = buffer.CopyTo(input.tokenExpiration); RETURN_IF_FAILED(propCopyResult.hr); output.tokenExpiration = propCopyResult.ExtractPayload(); } @@ -770,7 +770,7 @@ HRESULT AuthenticateCustomIdResult::Copy(const PFAuthenticationAuthenticateCusto { output = input; { - auto propCopyResult = buffer.CopyTo(input.entityToken); + auto propCopyResult = buffer.CopyTo(input.entityToken); RETURN_IF_FAILED(propCopyResult.hr); output.entityToken = propCopyResult.ExtractPayload(); } @@ -785,7 +785,7 @@ JsonValue DeleteRequest::ToJson() const JsonValue DeleteRequest::ToJson(const PFAuthenticationDeleteRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -798,7 +798,7 @@ JsonValue GetEntityRequest::ToJson() const JsonValue GetEntityRequest::ToJson(const PFAuthenticationGetEntityRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -819,7 +819,7 @@ JsonValue ValidateEntityTokenRequest::ToJson() const JsonValue ValidateEntityTokenRequest::ToJson(const PFAuthenticationValidateEntityTokenRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EntityToken", input.entityToken); return output; @@ -896,27 +896,27 @@ HRESULT ValidateEntityTokenResponse::Copy(const PFAuthenticationValidateEntityTo { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.identifiedDeviceType); + auto propCopyResult = buffer.CopyTo(input.identifiedDeviceType); RETURN_IF_FAILED(propCopyResult.hr); output.identifiedDeviceType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.identityProvider); + auto propCopyResult = buffer.CopyTo(input.identityProvider); RETURN_IF_FAILED(propCopyResult.hr); output.identityProvider = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.identityProviderIssuedId); + auto propCopyResult = buffer.CopyTo(input.identityProviderIssuedId); RETURN_IF_FAILED(propCopyResult.hr); output.identityProviderIssuedId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lineage); + auto propCopyResult = buffer.CopyTo(input.lineage); RETURN_IF_FAILED(propCopyResult.hr); output.lineage = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabCore/Source/Generated/EventsTypes.cpp b/Source/PlayFabCore/Source/Generated/EventsTypes.cpp index 91030bd..ba58abf 100644 --- a/Source/PlayFabCore/Source/Generated/EventsTypes.cpp +++ b/Source/PlayFabCore/Source/Generated/EventsTypes.cpp @@ -14,7 +14,7 @@ JsonValue EventContents::ToJson() const JsonValue EventContents::ToJson(const PFEventsEventContents& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "EventNamespace", input.eventNamespace); @@ -33,7 +33,7 @@ JsonValue WriteEventsRequest::ToJson() const JsonValue WriteEventsRequest::ToJson(const PFEventsWriteEventsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "Events", input.events, input.eventsCount); return output; diff --git a/Source/PlayFabCore/Source/Generated/Types.cpp b/Source/PlayFabCore/Source/Generated/Types.cpp index 162a69d..058d138 100644 --- a/Source/PlayFabCore/Source/Generated/Types.cpp +++ b/Source/PlayFabCore/Source/Generated/Types.cpp @@ -147,7 +147,7 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, { output = input; { - auto propCopyResult = buffer.CopyTo(input.annotation); + auto propCopyResult = buffer.CopyTo(input.annotation); RETURN_IF_FAILED(propCopyResult.hr); output.annotation = propCopyResult.ExtractPayload(); } @@ -157,12 +157,12 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, output.bundleContents = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.bundleParent); + auto propCopyResult = buffer.CopyTo(input.bundleParent); RETURN_IF_FAILED(propCopyResult.hr); output.bundleParent = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.catalogVersion); + auto propCopyResult = buffer.CopyTo(input.catalogVersion); RETURN_IF_FAILED(propCopyResult.hr); output.catalogVersion = propCopyResult.ExtractPayload(); } @@ -172,47 +172,47 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, output.customData = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.expiration); + auto propCopyResult = buffer.CopyTo(input.expiration); RETURN_IF_FAILED(propCopyResult.hr); output.expiration = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemClass); + auto propCopyResult = buffer.CopyTo(input.itemClass); RETURN_IF_FAILED(propCopyResult.hr); output.itemClass = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemInstanceId); + auto propCopyResult = buffer.CopyTo(input.itemInstanceId); RETURN_IF_FAILED(propCopyResult.hr); output.itemInstanceId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.purchaseDate); + auto propCopyResult = buffer.CopyTo(input.purchaseDate); RETURN_IF_FAILED(propCopyResult.hr); output.purchaseDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.remainingUses); + auto propCopyResult = buffer.CopyTo(input.remainingUses); RETURN_IF_FAILED(propCopyResult.hr); output.remainingUses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.unitCurrency); + auto propCopyResult = buffer.CopyTo(input.unitCurrency); RETURN_IF_FAILED(propCopyResult.hr); output.unitCurrency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.usesIncrementedBy); + auto propCopyResult = buffer.CopyTo(input.usesIncrementedBy); RETURN_IF_FAILED(propCopyResult.hr); output.usesIncrementedBy = propCopyResult.ExtractPayload(); } @@ -252,7 +252,7 @@ HRESULT UserAndroidDeviceInfo::Copy(const PFUserAndroidDeviceInfo& input, PFUser { output = input; { - auto propCopyResult = buffer.CopyTo(input.androidDeviceId); + auto propCopyResult = buffer.CopyTo(input.androidDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.androidDeviceId = propCopyResult.ExtractPayload(); } @@ -292,7 +292,7 @@ HRESULT UserAppleIdInfo::Copy(const PFUserAppleIdInfo& input, PFUserAppleIdInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.appleSubjectId); + auto propCopyResult = buffer.CopyTo(input.appleSubjectId); RETURN_IF_FAILED(propCopyResult.hr); output.appleSubjectId = propCopyResult.ExtractPayload(); } @@ -332,7 +332,7 @@ HRESULT UserCustomIdInfo::Copy(const PFUserCustomIdInfo& input, PFUserCustomIdIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.customId); + auto propCopyResult = buffer.CopyTo(input.customId); RETURN_IF_FAILED(propCopyResult.hr); output.customId = propCopyResult.ExtractPayload(); } @@ -380,12 +380,12 @@ HRESULT UserFacebookInfo::Copy(const PFUserFacebookInfo& input, PFUserFacebookIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookId); + auto propCopyResult = buffer.CopyTo(input.facebookId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.fullName); + auto propCopyResult = buffer.CopyTo(input.fullName); RETURN_IF_FAILED(propCopyResult.hr); output.fullName = propCopyResult.ExtractPayload(); } @@ -425,7 +425,7 @@ HRESULT UserFacebookInstantGamesIdInfo::Copy(const PFUserFacebookInstantGamesIdI { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); + auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInstantGamesId = propCopyResult.ExtractPayload(); } @@ -465,7 +465,7 @@ HRESULT UserGameCenterInfo::Copy(const PFUserGameCenterInfo& input, PFUserGameCe { output = input; { - auto propCopyResult = buffer.CopyTo(input.gameCenterId); + auto propCopyResult = buffer.CopyTo(input.gameCenterId); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterId = propCopyResult.ExtractPayload(); } @@ -537,27 +537,27 @@ HRESULT UserGoogleInfo::Copy(const PFUserGoogleInfo& input, PFUserGoogleInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.googleEmail); + auto propCopyResult = buffer.CopyTo(input.googleEmail); RETURN_IF_FAILED(propCopyResult.hr); output.googleEmail = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleGender); + auto propCopyResult = buffer.CopyTo(input.googleGender); RETURN_IF_FAILED(propCopyResult.hr); output.googleGender = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleId); + auto propCopyResult = buffer.CopyTo(input.googleId); RETURN_IF_FAILED(propCopyResult.hr); output.googleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleLocale); + auto propCopyResult = buffer.CopyTo(input.googleLocale); RETURN_IF_FAILED(propCopyResult.hr); output.googleLocale = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleName); + auto propCopyResult = buffer.CopyTo(input.googleName); RETURN_IF_FAILED(propCopyResult.hr); output.googleName = propCopyResult.ExtractPayload(); } @@ -613,17 +613,17 @@ HRESULT UserGooglePlayGamesInfo::Copy(const PFUserGooglePlayGamesInfo& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerAvatarImageUrl); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerAvatarImageUrl); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerAvatarImageUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerDisplayName); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerDisplayName); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerDisplayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerId = propCopyResult.ExtractPayload(); } @@ -663,7 +663,7 @@ HRESULT UserIosDeviceInfo::Copy(const PFUserIosDeviceInfo& input, PFUserIosDevic { output = input; { - auto propCopyResult = buffer.CopyTo(input.iosDeviceId); + auto propCopyResult = buffer.CopyTo(input.iosDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.iosDeviceId = propCopyResult.ExtractPayload(); } @@ -711,12 +711,12 @@ HRESULT UserKongregateInfo::Copy(const PFUserKongregateInfo& input, PFUserKongre { output = input; { - auto propCopyResult = buffer.CopyTo(input.kongregateId); + auto propCopyResult = buffer.CopyTo(input.kongregateId); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.kongregateName); + auto propCopyResult = buffer.CopyTo(input.kongregateName); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateName = propCopyResult.ExtractPayload(); } @@ -756,7 +756,7 @@ HRESULT UserNintendoSwitchAccountIdInfo::Copy(const PFUserNintendoSwitchAccountI { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountSubjectId); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountSubjectId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchAccountSubjectId = propCopyResult.ExtractPayload(); } @@ -796,7 +796,7 @@ HRESULT UserNintendoSwitchDeviceIdInfo::Copy(const PFUserNintendoSwitchDeviceIdI { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchDeviceId = propCopyResult.ExtractPayload(); } @@ -852,17 +852,17 @@ HRESULT UserOpenIdInfo::Copy(const PFUserOpenIdInfo& input, PFUserOpenIdInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.connectionId); + auto propCopyResult = buffer.CopyTo(input.connectionId); RETURN_IF_FAILED(propCopyResult.hr); output.connectionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.issuer); + auto propCopyResult = buffer.CopyTo(input.issuer); RETURN_IF_FAILED(propCopyResult.hr); output.issuer = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subject); + auto propCopyResult = buffer.CopyTo(input.subject); RETURN_IF_FAILED(propCopyResult.hr); output.subject = propCopyResult.ExtractPayload(); } @@ -902,7 +902,7 @@ HRESULT UserPrivateAccountInfo::Copy(const PFUserPrivateAccountInfo& input, PFUs { output = input; { - auto propCopyResult = buffer.CopyTo(input.email); + auto propCopyResult = buffer.CopyTo(input.email); RETURN_IF_FAILED(propCopyResult.hr); output.email = propCopyResult.ExtractPayload(); } @@ -950,12 +950,12 @@ HRESULT UserPsnInfo::Copy(const PFUserPsnInfo& input, PFUserPsnInfo& output, Mod { output = input; { - auto propCopyResult = buffer.CopyTo(input.psnAccountId); + auto propCopyResult = buffer.CopyTo(input.psnAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.psnAccountId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.psnOnlineId); + auto propCopyResult = buffer.CopyTo(input.psnOnlineId); RETURN_IF_FAILED(propCopyResult.hr); output.psnOnlineId = propCopyResult.ExtractPayload(); } @@ -995,7 +995,7 @@ HRESULT UserServerCustomIdInfo::Copy(const PFUserServerCustomIdInfo& input, PFUs { output = input; { - auto propCopyResult = buffer.CopyTo(input.customId); + auto propCopyResult = buffer.CopyTo(input.customId); RETURN_IF_FAILED(propCopyResult.hr); output.customId = propCopyResult.ExtractPayload(); } @@ -1067,27 +1067,27 @@ HRESULT UserSteamInfo::Copy(const PFUserSteamInfo& input, PFUserSteamInfo& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.steamActivationStatus); + auto propCopyResult = buffer.CopyTo(input.steamActivationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.steamActivationStatus = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamCountry); + auto propCopyResult = buffer.CopyTo(input.steamCountry); RETURN_IF_FAILED(propCopyResult.hr); output.steamCountry = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamCurrency); + auto propCopyResult = buffer.CopyTo(input.steamCurrency); RETURN_IF_FAILED(propCopyResult.hr); output.steamCurrency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamId); + auto propCopyResult = buffer.CopyTo(input.steamId); RETURN_IF_FAILED(propCopyResult.hr); output.steamId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamName); + auto propCopyResult = buffer.CopyTo(input.steamName); RETURN_IF_FAILED(propCopyResult.hr); output.steamName = propCopyResult.ExtractPayload(); } @@ -1101,7 +1101,7 @@ JsonValue EntityKey::ToJson() const JsonValue EntityKey::ToJson(const PFEntityKey& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "Type", input.type); return output; @@ -1148,12 +1148,12 @@ HRESULT EntityKey::Copy(const PFEntityKey& input, PFEntityKey& output, ModelBuff { output = input; { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -1246,37 +1246,37 @@ HRESULT UserTitleInfo::Copy(const PFUserTitleInfo& input, PFUserTitleInfo& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.firstLogin); + auto propCopyResult = buffer.CopyTo(input.firstLogin); RETURN_IF_FAILED(propCopyResult.hr); output.firstLogin = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.isBanned); + auto propCopyResult = buffer.CopyTo(input.isBanned); RETURN_IF_FAILED(propCopyResult.hr); output.isBanned = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLogin); + auto propCopyResult = buffer.CopyTo(input.lastLogin); RETURN_IF_FAILED(propCopyResult.hr); output.lastLogin = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.origination); + auto propCopyResult = buffer.CopyTo(input.origination); RETURN_IF_FAILED(propCopyResult.hr); output.origination = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titlePlayerAccount); + auto propCopyResult = buffer.CopyTo(input.titlePlayerAccount); RETURN_IF_FAILED(propCopyResult.hr); output.titlePlayerAccount = propCopyResult.ExtractPayload(); } @@ -1324,12 +1324,12 @@ HRESULT UserTwitchInfo::Copy(const PFUserTwitchInfo& input, PFUserTwitchInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.twitchId); + auto propCopyResult = buffer.CopyTo(input.twitchId); RETURN_IF_FAILED(propCopyResult.hr); output.twitchId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.twitchUserName); + auto propCopyResult = buffer.CopyTo(input.twitchUserName); RETURN_IF_FAILED(propCopyResult.hr); output.twitchUserName = propCopyResult.ExtractPayload(); } @@ -1377,12 +1377,12 @@ HRESULT UserXboxInfo::Copy(const PFUserXboxInfo& input, PFUserXboxInfo& output, { output = input; { - auto propCopyResult = buffer.CopyTo(input.xboxUserId); + auto propCopyResult = buffer.CopyTo(input.xboxUserId); RETURN_IF_FAILED(propCopyResult.hr); output.xboxUserId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxUserSandbox); + auto propCopyResult = buffer.CopyTo(input.xboxUserSandbox); RETURN_IF_FAILED(propCopyResult.hr); output.xboxUserSandbox = propCopyResult.ExtractPayload(); } @@ -1650,62 +1650,62 @@ HRESULT UserAccountInfo::Copy(const PFUserAccountInfo& input, PFUserAccountInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.androidDeviceInfo); + auto propCopyResult = buffer.CopyTo(input.androidDeviceInfo); RETURN_IF_FAILED(propCopyResult.hr); output.androidDeviceInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.appleAccountInfo); + auto propCopyResult = buffer.CopyTo(input.appleAccountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.appleAccountInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.customIdInfo); + auto propCopyResult = buffer.CopyTo(input.customIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.customIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.facebookInfo); + auto propCopyResult = buffer.CopyTo(input.facebookInfo); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesIdInfo); + auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInstantGamesIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); + auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleInfo); + auto propCopyResult = buffer.CopyTo(input.googleInfo); RETURN_IF_FAILED(propCopyResult.hr); output.googleInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesInfo); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesInfo); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.iosDeviceInfo); + auto propCopyResult = buffer.CopyTo(input.iosDeviceInfo); RETURN_IF_FAILED(propCopyResult.hr); output.iosDeviceInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.kongregateInfo); + auto propCopyResult = buffer.CopyTo(input.kongregateInfo); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountInfo); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchAccountInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceIdInfo); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchDeviceIdInfo = propCopyResult.ExtractPayload(); } @@ -1715,47 +1715,47 @@ HRESULT UserAccountInfo::Copy(const PFUserAccountInfo& input, PFUserAccountInfo& output.openIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.privateInfo); + auto propCopyResult = buffer.CopyTo(input.privateInfo); RETURN_IF_FAILED(propCopyResult.hr); output.privateInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.psnInfo); + auto propCopyResult = buffer.CopyTo(input.psnInfo); RETURN_IF_FAILED(propCopyResult.hr); output.psnInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serverCustomIdInfo); + auto propCopyResult = buffer.CopyTo(input.serverCustomIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.serverCustomIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamInfo); + auto propCopyResult = buffer.CopyTo(input.steamInfo); RETURN_IF_FAILED(propCopyResult.hr); output.steamInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleInfo); + auto propCopyResult = buffer.CopyTo(input.titleInfo); RETURN_IF_FAILED(propCopyResult.hr); output.titleInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.twitchInfo); + auto propCopyResult = buffer.CopyTo(input.twitchInfo); RETURN_IF_FAILED(propCopyResult.hr); output.twitchInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxInfo); + auto propCopyResult = buffer.CopyTo(input.xboxInfo); RETURN_IF_FAILED(propCopyResult.hr); output.xboxInfo = propCopyResult.ExtractPayload(); } @@ -1811,17 +1811,17 @@ HRESULT CharacterResult::Copy(const PFCharacterResult& input, PFCharacterResult& { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.characterName); + auto propCopyResult = buffer.CopyTo(input.characterName); RETURN_IF_FAILED(propCopyResult.hr); output.characterName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.characterType); + auto propCopyResult = buffer.CopyTo(input.characterType); RETURN_IF_FAILED(propCopyResult.hr); output.characterType = propCopyResult.ExtractPayload(); } @@ -1871,12 +1871,12 @@ HRESULT UserDataRecord::Copy(const PFUserDataRecord& input, PFUserDataRecord& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.permission); + auto propCopyResult = buffer.CopyTo(input.permission); RETURN_IF_FAILED(propCopyResult.hr); output.permission = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.value); + auto propCopyResult = buffer.CopyTo(input.value); RETURN_IF_FAILED(propCopyResult.hr); output.value = propCopyResult.ExtractPayload(); } @@ -1924,7 +1924,7 @@ JsonValue PlayerProfileViewConstraints::ToJson() const JsonValue PlayerProfileViewConstraints::ToJson(const PFPlayerProfileViewConstraints& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ShowAvatarUrl", input.showAvatarUrl); JsonUtils::ObjectAddMember(output, "ShowBannedUntil", input.showBannedUntil); JsonUtils::ObjectAddMember(output, "ShowCampaignAttributions", input.showCampaignAttributions); @@ -1952,7 +1952,7 @@ JsonValue AdCampaignAttributionModel::ToJson() const JsonValue AdCampaignAttributionModel::ToJson(const PFAdCampaignAttributionModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberTime(output, "AttributedAt", input.attributedAt); JsonUtils::ObjectAddMember(output, "CampaignId", input.campaignId); JsonUtils::ObjectAddMember(output, "Platform", input.platform); @@ -2002,12 +2002,12 @@ HRESULT AdCampaignAttributionModel::Copy(const PFAdCampaignAttributionModel& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.campaignId); + auto propCopyResult = buffer.CopyTo(input.campaignId); RETURN_IF_FAILED(propCopyResult.hr); output.campaignId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -2021,7 +2021,7 @@ JsonValue ContactEmailInfoModel::ToJson() const JsonValue ContactEmailInfoModel::ToJson(const PFContactEmailInfoModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "EmailAddress", input.emailAddress); JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "VerificationStatus", input.verificationStatus); @@ -2077,17 +2077,17 @@ HRESULT ContactEmailInfoModel::Copy(const PFContactEmailInfoModel& input, PFCont { output = input; { - auto propCopyResult = buffer.CopyTo(input.emailAddress); + auto propCopyResult = buffer.CopyTo(input.emailAddress); RETURN_IF_FAILED(propCopyResult.hr); output.emailAddress = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.verificationStatus); + auto propCopyResult = buffer.CopyTo(input.verificationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.verificationStatus = propCopyResult.ExtractPayload(); } @@ -2101,7 +2101,7 @@ JsonValue LinkedPlatformAccountModel::ToJson() const JsonValue LinkedPlatformAccountModel::ToJson(const PFLinkedPlatformAccountModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "Platform", input.platform); JsonUtils::ObjectAddMember(output, "PlatformUserId", input.platformUserId); @@ -2166,22 +2166,22 @@ HRESULT LinkedPlatformAccountModel::Copy(const PFLinkedPlatformAccountModel& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.email); + auto propCopyResult = buffer.CopyTo(input.email); RETURN_IF_FAILED(propCopyResult.hr); output.email = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platformUserId); + auto propCopyResult = buffer.CopyTo(input.platformUserId); RETURN_IF_FAILED(propCopyResult.hr); output.platformUserId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } @@ -2195,7 +2195,7 @@ JsonValue LocationModel::ToJson() const JsonValue LocationModel::ToJson(const PFLocationModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "City", input.city); JsonUtils::ObjectAddMember(output, "ContinentCode", input.continentCode); JsonUtils::ObjectAddMember(output, "CountryCode", input.countryCode); @@ -2269,27 +2269,27 @@ HRESULT LocationModel::Copy(const PFLocationModel& input, PFLocationModel& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.city); + auto propCopyResult = buffer.CopyTo(input.city); RETURN_IF_FAILED(propCopyResult.hr); output.city = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.continentCode); + auto propCopyResult = buffer.CopyTo(input.continentCode); RETURN_IF_FAILED(propCopyResult.hr); output.continentCode = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.countryCode); + auto propCopyResult = buffer.CopyTo(input.countryCode); RETURN_IF_FAILED(propCopyResult.hr); output.countryCode = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.latitude); + auto propCopyResult = buffer.CopyTo(input.latitude); RETURN_IF_FAILED(propCopyResult.hr); output.latitude = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.longitude); + auto propCopyResult = buffer.CopyTo(input.longitude); RETURN_IF_FAILED(propCopyResult.hr); output.longitude = propCopyResult.ExtractPayload(); } @@ -2303,7 +2303,7 @@ JsonValue SubscriptionModel::ToJson() const JsonValue SubscriptionModel::ToJson(const PFSubscriptionModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberTime(output, "Expiration", input.expiration); JsonUtils::ObjectAddMemberTime(output, "InitialSubscriptionTime", input.initialSubscriptionTime); JsonUtils::ObjectAddMember(output, "IsActive", input.isActive); @@ -2377,22 +2377,22 @@ HRESULT SubscriptionModel::Copy(const PFSubscriptionModel& input, PFSubscription { output = input; { - auto propCopyResult = buffer.CopyTo(input.status); + auto propCopyResult = buffer.CopyTo(input.status); RETURN_IF_FAILED(propCopyResult.hr); output.status = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionId); + auto propCopyResult = buffer.CopyTo(input.subscriptionId); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionItemId); + auto propCopyResult = buffer.CopyTo(input.subscriptionItemId); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionItemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionProvider); + auto propCopyResult = buffer.CopyTo(input.subscriptionProvider); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionProvider = propCopyResult.ExtractPayload(); } @@ -2406,7 +2406,7 @@ JsonValue MembershipModel::ToJson() const JsonValue MembershipModel::ToJson(const PFMembershipModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "IsActive", input.isActive); JsonUtils::ObjectAddMemberTime(output, "MembershipExpiration", input.membershipExpiration); JsonUtils::ObjectAddMember(output, "MembershipId", input.membershipId); @@ -2469,12 +2469,12 @@ HRESULT MembershipModel::Copy(const PFMembershipModel& input, PFMembershipModel& { output = input; { - auto propCopyResult = buffer.CopyTo(input.membershipId); + auto propCopyResult = buffer.CopyTo(input.membershipId); RETURN_IF_FAILED(propCopyResult.hr); output.membershipId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.overrideExpiration); + auto propCopyResult = buffer.CopyTo(input.overrideExpiration); RETURN_IF_FAILED(propCopyResult.hr); output.overrideExpiration = propCopyResult.ExtractPayload(); } @@ -2493,7 +2493,7 @@ JsonValue PushNotificationRegistrationModel::ToJson() const JsonValue PushNotificationRegistrationModel::ToJson(const PFPushNotificationRegistrationModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "NotificationEndpointARN", input.notificationEndpointARN); JsonUtils::ObjectAddMember(output, "Platform", input.platform); return output; @@ -2540,12 +2540,12 @@ HRESULT PushNotificationRegistrationModel::Copy(const PFPushNotificationRegistra { output = input; { - auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); + auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); RETURN_IF_FAILED(propCopyResult.hr); output.notificationEndpointARN = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -2559,7 +2559,7 @@ JsonValue StatisticModel::ToJson() const JsonValue StatisticModel::ToJson(const PFStatisticModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "Value", input.value); JsonUtils::ObjectAddMember(output, "Version", input.version); @@ -2603,7 +2603,7 @@ HRESULT StatisticModel::Copy(const PFStatisticModel& input, PFStatisticModel& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -2617,7 +2617,7 @@ JsonValue TagModel::ToJson() const JsonValue TagModel::ToJson(const PFTagModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "TagValue", input.tagValue); return output; } @@ -2655,7 +2655,7 @@ HRESULT TagModel::Copy(const PFTagModel& input, PFTagModel& output, ModelBuffer& { output = input; { - auto propCopyResult = buffer.CopyTo(input.tagValue); + auto propCopyResult = buffer.CopyTo(input.tagValue); RETURN_IF_FAILED(propCopyResult.hr); output.tagValue = propCopyResult.ExtractPayload(); } @@ -2669,7 +2669,7 @@ JsonValue ValueToDateModel::ToJson() const JsonValue ValueToDateModel::ToJson(const PFValueToDateModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Currency", input.currency); JsonUtils::ObjectAddMember(output, "TotalValue", input.totalValue); JsonUtils::ObjectAddMember(output, "TotalValueAsDecimal", input.totalValueAsDecimal); @@ -2719,12 +2719,12 @@ HRESULT ValueToDateModel::Copy(const PFValueToDateModel& input, PFValueToDateMod { output = input; { - auto propCopyResult = buffer.CopyTo(input.currency); + auto propCopyResult = buffer.CopyTo(input.currency); RETURN_IF_FAILED(propCopyResult.hr); output.currency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalValueAsDecimal); + auto propCopyResult = buffer.CopyTo(input.totalValueAsDecimal); RETURN_IF_FAILED(propCopyResult.hr); output.totalValueAsDecimal = propCopyResult.ExtractPayload(); } @@ -2738,7 +2738,7 @@ JsonValue PlayerProfileModel::ToJson() const JsonValue PlayerProfileModel::ToJson(const PFPlayerProfileModel& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AdCampaignAttributions", input.adCampaignAttributions, input.adCampaignAttributionsCount); JsonUtils::ObjectAddMember(output, "AvatarUrl", input.avatarUrl); JsonUtils::ObjectAddMemberTime(output, "BannedUntil", input.bannedUntil); @@ -2962,12 +2962,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.adCampaignAttributions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.bannedUntil); + auto propCopyResult = buffer.CopyTo(input.bannedUntil); RETURN_IF_FAILED(propCopyResult.hr); output.bannedUntil = propCopyResult.ExtractPayload(); } @@ -2977,12 +2977,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.contactEmailAddresses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.created); + auto propCopyResult = buffer.CopyTo(input.created); RETURN_IF_FAILED(propCopyResult.hr); output.created = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } @@ -2992,7 +2992,7 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.experimentVariants = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLogin); + auto propCopyResult = buffer.CopyTo(input.lastLogin); RETURN_IF_FAILED(propCopyResult.hr); output.lastLogin = propCopyResult.ExtractPayload(); } @@ -3012,17 +3012,17 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.memberships = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.origination); + auto propCopyResult = buffer.CopyTo(input.origination); RETURN_IF_FAILED(propCopyResult.hr); output.origination = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playerId); + auto propCopyResult = buffer.CopyTo(input.playerId); RETURN_IF_FAILED(propCopyResult.hr); output.playerId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.publisherId); + auto propCopyResult = buffer.CopyTo(input.publisherId); RETURN_IF_FAILED(propCopyResult.hr); output.publisherId = propCopyResult.ExtractPayload(); } @@ -3042,12 +3042,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.tags = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); + auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); RETURN_IF_FAILED(propCopyResult.hr); output.totalValueToDateInUSD = propCopyResult.ExtractPayload(); } @@ -3066,7 +3066,7 @@ JsonValue GetPlayerCombinedInfoRequestParams::ToJson() const JsonValue GetPlayerCombinedInfoRequestParams::ToJson(const PFGetPlayerCombinedInfoRequestParams& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "GetCharacterInventories", input.getCharacterInventories); JsonUtils::ObjectAddMember(output, "GetCharacterList", input.getCharacterList); JsonUtils::ObjectAddMember(output, "GetPlayerProfile", input.getPlayerProfile); @@ -3127,7 +3127,7 @@ HRESULT CharacterInventory::Copy(const PFCharacterInventory& input, PFCharacterI { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } @@ -3176,7 +3176,7 @@ HRESULT StatisticValue::Copy(const PFStatisticValue& input, PFStatisticValue& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.statisticName); + auto propCopyResult = buffer.CopyTo(input.statisticName); RETURN_IF_FAILED(propCopyResult.hr); output.statisticName = propCopyResult.ExtractPayload(); } @@ -3319,7 +3319,7 @@ HRESULT GetPlayerCombinedInfoResultPayload::Copy(const PFGetPlayerCombinedInfoRe { output = input; { - auto propCopyResult = buffer.CopyTo(input.accountInfo); + auto propCopyResult = buffer.CopyTo(input.accountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.accountInfo = propCopyResult.ExtractPayload(); } @@ -3334,7 +3334,7 @@ HRESULT GetPlayerCombinedInfoResultPayload::Copy(const PFGetPlayerCombinedInfoRe output.characterList = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playerProfile); + auto propCopyResult = buffer.CopyTo(input.playerProfile); RETURN_IF_FAILED(propCopyResult.hr); output.playerProfile = propCopyResult.ExtractPayload(); } @@ -3383,7 +3383,7 @@ JsonValue Variable::ToJson() const JsonValue Variable::ToJson(const PFVariable& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "Value", input.value); return output; @@ -3430,12 +3430,12 @@ HRESULT Variable::Copy(const PFVariable& input, PFVariable& output, ModelBuffer& { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.value); + auto propCopyResult = buffer.CopyTo(input.value); RETURN_IF_FAILED(propCopyResult.hr); output.value = propCopyResult.ExtractPayload(); } @@ -3570,32 +3570,32 @@ HRESULT EntityLineage::Copy(const PFEntityLineage& input, PFEntityLineage& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.groupId); + auto propCopyResult = buffer.CopyTo(input.groupId); RETURN_IF_FAILED(propCopyResult.hr); output.groupId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.masterPlayerAccountId); + auto propCopyResult = buffer.CopyTo(input.masterPlayerAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.masterPlayerAccountId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.namespaceId); + auto propCopyResult = buffer.CopyTo(input.namespaceId); RETURN_IF_FAILED(propCopyResult.hr); output.namespaceId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titlePlayerAccountId); + auto propCopyResult = buffer.CopyTo(input.titlePlayerAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.titlePlayerAccountId = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabCore/Source/HttpClient/PFHCTrace.cpp b/Source/PlayFabCore/Source/HttpClient/PFHCTrace.cpp deleted file mode 100644 index fe9b9b3..0000000 --- a/Source/PlayFabCore/Source/HttpClient/PFHCTrace.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "stdafx.h" -#include -#include -#include -#include "PFCoreGlobalState.h" -#include "Trace/TraceState.h" - -using namespace PlayFab; - -PF_API PFHCSettingsSetTraceLevel( - _In_ PFHCTraceLevel traceLevel -) noexcept -{ - PFHC_TRACE_SET_VERBOSITY(PlayFab, traceLevel); - return HCSettingsSetTraceLevel(static_cast(traceLevel)); -} - -PF_API PFHCSettingsGetTraceLevel( - _Out_ PFHCTraceLevel* traceLevel -) noexcept -{ - HCTraceLevel hcTraceLevel; - HRESULT hr = HCSettingsGetTraceLevel(&hcTraceLevel); - *traceLevel = static_cast(hcTraceLevel); - return hr; -} - -PF_API_(void) PFHCTraceSetClientCallback(_In_opt_ PFHCTraceCallback* callback) noexcept -{ - auto& settings = GetTraceSettings(); - settings.traceCallback = (HCTraceCallback*)callback; -} - -PF_API_(void) PFHCTraceSetTraceToDebugger(_In_ bool traceToDebugger) noexcept -{ - // This impl differs between LHC to so it routes the debug trace to PFCore's trace's formatting. - // This can be called before or after PFInit. If its called after then TraceState::EnableTraceToDebugger - // will setup the internal debug output. Tracing to debugger cannot be disabled after PFInit. - auto& settings = GetTraceSettings(); - settings.traceToDebugger = traceToDebugger; -} - -// Platform Hooks - -PF_API PFHCTraceSetPlatformCallbacks( - _In_ PFHCTracePlatformThisThreadIdCallback* threadIdCallback, - _In_opt_ void* threadIdContext, - _In_ PFHCTracePlatformWriteMessageToDebuggerCallback* writeToDebuggerCallback, - _In_opt_ void* writeToDebuggerContext -) noexcept -{ - return HCTraceSetPlatformCallbacks( - threadIdCallback, - threadIdContext, - (HCTracePlatformWriteMessageToDebuggerCallback*)writeToDebuggerCallback, - writeToDebuggerContext - ); -} - -// Implementation - -PF_API_(void) PFHCTraceImplMessage( - struct PFHCTraceImplArea const* area, - PFHCTraceLevel level, - _Printf_format_string_ char const* format, - ... -) noexcept -{ - va_list varArgs{}; - va_start(varArgs, format); - HCTraceImplMessage_v((HCTraceImplArea*)area, (HCTraceLevel)level, format, varArgs); - va_end(varArgs); -} - -PF_API_(uint64_t) PFHCTraceImplScopeId() noexcept -{ - return HCTraceImplScopeId(); -} \ No newline at end of file diff --git a/Source/PlayFabCore/Source/HttpClient/PFHttpClient.cpp b/Source/PlayFabCore/Source/HttpClient/PFHttpClient.cpp deleted file mode 100644 index 352cf66..0000000 --- a/Source/PlayFabCore/Source/HttpClient/PFHttpClient.cpp +++ /dev/null @@ -1,660 +0,0 @@ -#include "stdafx.h" -#include -#include - -PF_API PFHCMemSetFunctions( - _In_opt_ PFHCMemAllocFunction memAllocFunc, - _In_opt_ PFHCMemFreeFunction memFreeFunc -) noexcept -{ - return HCMemSetFunctions( - memAllocFunc, - memFreeFunc - ); -} - -PF_API PFHCMemGetFunctions( - _Out_ PFHCMemAllocFunction* memAllocFunc, - _Out_ PFHCMemFreeFunction* memFreeFunc -) noexcept -{ - return HCMemGetFunctions( - memAllocFunc, - memFreeFunc - ); -} - -//Global APIs - -PF_API PFHCInitialize( - _In_opt_ PFHCInitArgs* args -) noexcept -{ - UNREFERENCED_PARAMETER(args); - PFHCIsInitialized(); // empty functions don't export with non-mangled names, so make a trivial function call - return S_OK; // ignore this call -} - -PF_API_(bool) PFHCIsInitialized() noexcept -{ - return HCIsInitialized(); -} - -PF_API PFHCCleanupAsync( - _In_ XAsyncBlock* async -) noexcept -{ - UNREFERENCED_PARAMETER(async); - PFHCIsInitialized(); // empty functions don't export with non-mangled names, so make a trivial function call - return S_OK; // ignore this call -} - -PF_API PFHCGetLibVersion(_Outptr_ const char** version) noexcept -{ - return HCGetLibVersion(version); -} - -PF_API_(int32_t) PFHCAddCallRoutedHandler( - _In_ PFHCCallRoutedHandler handler, - _In_opt_ void* context -) noexcept -{ - return HCAddCallRoutedHandler( - handler, - context - ); -} - -PF_API_(void) PFHCRemoveCallRoutedHandler( - _In_ int32_t handlerId -) noexcept -{ - HCRemoveCallRoutedHandler(handlerId); -} - -PF_API PFHCSetGlobalProxy(_In_ const char* proxyUri) noexcept -{ - return HCSetGlobalProxy(proxyUri); -} - -//Http APIs - -PF_API PFHCHttpCallCreate( - _Out_ PFHCCallHandle* call -) noexcept -{ - return HCHttpCallCreate(call); -} - -PF_API PFHCHttpCallPerformAsync( - _In_ PFHCCallHandle call, - _Inout_ XAsyncBlock* asyncBlock -) noexcept -{ - return HCHttpCallPerformAsync( - call, - asyncBlock - ); -} - -PF_API_(PFHCCallHandle) PFHCHttpCallDuplicateHandle( - _In_ PFHCCallHandle call -) noexcept -{ - return HCHttpCallDuplicateHandle(call); -} - -PF_API PFHCHttpCallCloseHandle( - _In_ PFHCCallHandle call -) noexcept -{ - return HCHttpCallCloseHandle(call); -} - -PF_API_(uint64_t) PFHCHttpCallGetId( - _In_ PFHCCallHandle call -) noexcept -{ - return HCHttpCallGetId(call); -} - -PF_API PFHCHttpCallSetTracing( - _In_ PFHCCallHandle call, - _In_ bool traceCall -) noexcept -{ - return HCHttpCallSetTracing( - call, - traceCall - ); -} - -PF_API PFHCHttpCallGetRequestUrl( - _In_ PFHCCallHandle call, - _Out_ const char** url -) noexcept -{ - return HCHttpCallGetRequestUrl( - call, - url - ); -} - -//HttpCallRequest Set APIs - -PF_API PFHCHttpCallRequestSetUrl( - _In_ PFHCCallHandle call, - _In_z_ const char* method, - _In_z_ const char* url -) noexcept -{ - return HCHttpCallRequestSetUrl( - call, - method, - url - ); -} - -PF_API PFHCHttpCallRequestSetRequestBodyBytes( - _In_ PFHCCallHandle call, - _In_reads_bytes_(requestBodySize) const uint8_t* requestBodyBytes, - _In_ uint32_t requestBodySize -) noexcept -{ - return HCHttpCallRequestSetRequestBodyBytes( - call, - requestBodyBytes, - requestBodySize - ); -} - -PF_API PFHCHttpCallRequestSetRequestBodyString( - _In_ PFHCCallHandle call, - _In_z_ const char* requestBodyString -) noexcept -{ - return HCHttpCallRequestSetRequestBodyString( - call, - requestBodyString - ); -} - -PF_API PFHCHttpCallRequestSetRequestBodyReadFunction( - _In_ PFHCCallHandle call, - _In_ PFHCHttpCallRequestBodyReadFunction readFunction, - _In_ size_t bodySize, - _In_opt_ void* context -) noexcept -{ - return HCHttpCallRequestSetRequestBodyReadFunction( - call, - readFunction, - bodySize, - context - ); -} - -PF_API PFHCHttpCallRequestSetHeader( - _In_ PFHCCallHandle call, - _In_z_ const char* headerName, - _In_z_ const char* headerValue, - _In_ bool allowTracing -) noexcept -{ - return HCHttpCallRequestSetHeader( - call, - headerName, - headerValue, - allowTracing - ); -} - -PF_API PFHCHttpCallRequestSetRetryAllowed( - _In_opt_ PFHCCallHandle call, - _In_ bool retryAllowed -) noexcept -{ - return HCHttpCallRequestSetRetryAllowed( - call, - retryAllowed - ); -} - -PF_API PFHCHttpCallRequestSetRetryCacheId( - _In_opt_ PFHCCallHandle call, - _In_ uint32_t retryAfterCacheId -) noexcept -{ - return HCHttpCallRequestSetRetryCacheId( - call, - retryAfterCacheId - ); -} - -PF_API PFHCHttpCallRequestSetTimeout( - _In_opt_ PFHCCallHandle call, - _In_ uint32_t timeoutInSeconds -) noexcept -{ - return HCHttpCallRequestSetTimeout( - call, - timeoutInSeconds - ); -} - -PF_API PFHCHttpCallRequestSetRetryDelay( - _In_opt_ PFHCCallHandle call, - _In_ uint32_t retryDelayInSeconds -) noexcept -{ - return HCHttpCallRequestSetRetryDelay( - call, - retryDelayInSeconds - ); -} - -PF_API PFHCHttpCallRequestSetTimeoutWindow( - _In_opt_ PFHCCallHandle call, - _In_ uint32_t timeoutWindowInSeconds -) noexcept -{ - return HCHttpCallRequestSetTimeoutWindow( - call, - timeoutWindowInSeconds - ); -} - -#if HC_PLATFORM_IS_MICROSOFT && (HC_PLATFORM != HC_PLATFORM_UWP) && (HC_PLATFORM != HC_PLATFORM_XDK) -PF_API PFHCHttpCallRequestSetSSLValidation( - _In_ PFHCCallHandle call, - _In_ bool sslValidation -) noexcept -{ - return HCHttpCallRequestSetSSLValidation(call, sslValidation); -} -#endif - -#if HC_PLATFORM == HC_PLATFORM_GDK -PF_API PFHCHttpDisableAssertsForSSLValidationInDevSandboxes( - _In_ PFHCConfigSetting setting -) noexcept -{ - return HCHttpDisableAssertsForSSLValidationInDevSandboxes((HCConfigSetting)setting); -} -#endif - -//HttpCallResponse Set APIs - -PF_API PFHCHttpCallResponseSetResponseBodyWriteFunction( - _In_ PFHCCallHandle call, - _In_ PFHCHttpCallResponseBodyWriteFunction writeFunction, - _In_opt_ void* context -) noexcept -{ - return HCHttpCallResponseSetResponseBodyWriteFunction( - call, - writeFunction, - context - ); -} - -//HttpCallResponse Get APIs - -PF_API PFHCHttpCallResponseGetResponseString( - _In_ PFHCCallHandle call, - _Out_ const char** responseString -) noexcept -{ - return HCHttpCallResponseGetResponseString( - call, - responseString - ); -} - -PF_API PFHCHttpCallResponseGetResponseBodyBytesSize( - _In_ PFHCCallHandle call, - _Out_ size_t* bufferSize -) noexcept -{ - return HCHttpCallResponseGetResponseBodyBytesSize( - call, - bufferSize - ); -} - -PF_API PFHCHttpCallResponseGetResponseBodyBytes( - _In_ PFHCCallHandle call, - _In_ size_t bufferSize, - _Out_writes_bytes_to_opt_(bufferSize, *bufferUsed) uint8_t* buffer, - _Out_opt_ size_t* bufferUsed -) noexcept -{ - return HCHttpCallResponseGetResponseBodyBytes( - call, - bufferSize, - buffer, - bufferUsed - ); -} - -PF_API PFHCHttpCallResponseGetStatusCode( - _In_ PFHCCallHandle call, - _Out_ uint32_t* statusCode -) noexcept -{ - return HCHttpCallResponseGetStatusCode( - call, - statusCode - ); -} - -PF_API PFHCHttpCallResponseGetNetworkErrorCode( - _In_ PFHCCallHandle call, - _Out_ HRESULT* networkErrorCode, - _Out_ uint32_t* platformNetworkErrorCode -) noexcept -{ - return HCHttpCallResponseGetNetworkErrorCode( - call, - networkErrorCode, - platformNetworkErrorCode - ); -} - -PF_API PFHCHttpCallResponseGetPlatformNetworkErrorMessage( - _In_ PFHCCallHandle call, - _Out_ const char** platformNetworkErrorMessage -) noexcept -{ - return HCHttpCallResponseGetPlatformNetworkErrorMessage( - call, - platformNetworkErrorMessage - ); -} - -PF_API PFHCHttpCallResponseGetHeader( - _In_ PFHCCallHandle call, - _In_z_ const char* headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCHttpCallResponseGetHeader( - call, - headerName, - headerValue - ); -} - -PF_API PFHCHttpCallResponseGetNumHeaders( - _In_ PFHCCallHandle call, - _Out_ uint32_t* numHeaders -) noexcept -{ - return HCHttpCallResponseGetNumHeaders( - call, - numHeaders - ); -} - -PF_API PFHCHttpCallResponseGetHeaderAtIndex( - _In_ PFHCCallHandle call, - _In_ uint32_t headerIndex, - _Out_ const char** headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCHttpCallResponseGetHeaderAtIndex( - call, - headerIndex, - headerName, - headerValue - ); -} - -PF_API PFHCHttpCallRequestEnableGzipCompression( - _In_ PFHCCallHandle call, - _In_ PFHCCompressionLevel level -) noexcept -{ - return HCHttpCallRequestEnableGzipCompression( - call, - (HCCompressionLevel)level - ); -} - -PF_API PFHCHttpCallResponseSetGzipCompressed( - _In_ PFHCCallHandle call, - _In_ bool compress -) noexcept -{ - return HCHttpCallResponseSetGzipCompressed( - call, - compress - ); -} - - -#if !HC_NOWEBSOCKETS - -// WebSocket APIs - -PF_API PFHCWebSocketCreate( - _Out_ PFHCWebsocketHandle* websocket, - _In_opt_ PFHCWebSocketMessageFunction messageFunc, - _In_opt_ PFHCWebSocketBinaryMessageFunction binaryMessageFunc, - _In_opt_ PFHCWebSocketCloseEventFunction closeFunc, - _In_opt_ void* functionContext -) noexcept -{ - return HCWebSocketCreate( - websocket, - messageFunc, - binaryMessageFunc, - (HCWebSocketCloseEventFunction)closeFunc, - functionContext - ); -} - -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK - -PF_API PFHCWebSocketSetBinaryMessageFragmentEventFunction( - _In_ PFHCWebsocketHandle websocket, - _In_ PFHCWebSocketBinaryMessageFragmentFunction binaryMessageFragmentFunc -) noexcept -{ - return HCWebSocketSetBinaryMessageFragmentEventFunction( - websocket, - binaryMessageFragmentFunc - ); -} -#endif - -PF_API PFHCWebSocketSetProxyUri( - _In_ PFHCWebsocketHandle websocket, - _In_z_ const char* proxyUri -) noexcept -{ - return HCWebSocketSetProxyUri( - websocket, - proxyUri - ); -} - -#if HC_PLATFORM == HC_PLATFORM_WIN32 && !HC_WINHTTP_WEBSOCKETS - -PF_API PFHCWebSocketSetProxyDecryptsHttps( - _In_ PFHCWebsocketHandle websocket, - _In_ bool allowProxyToDecryptHttps -) noexcept -{ - return HCWebSocketSetProxyDecryptsHttps( - websocket, - allowProxyToDecryptHttps - ); -} -#endif - -PF_API PFHCWebSocketSetHeader( - _In_ PFHCWebsocketHandle websocket, - _In_z_ const char* headerName, - _In_z_ const char* headerValue -) noexcept -{ - return HCWebSocketSetHeader( - websocket, - headerName, - headerValue - ); -} - -PF_API PFHCWebSocketGetEventFunctions( - _In_ PFHCWebsocketHandle websocket, - _Out_opt_ PFHCWebSocketMessageFunction* messageFunc, - _Out_opt_ PFHCWebSocketBinaryMessageFunction* binaryMessageFunc, - _Out_opt_ PFHCWebSocketCloseEventFunction* closeFunc, - _Out_ void** functionContext -) noexcept -{ - return HCWebSocketGetEventFunctions( - websocket, - messageFunc, - binaryMessageFunc, - (HCWebSocketCloseEventFunction*)closeFunc, - functionContext - ); -} - -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK - -PF_API PFHCWebSocketGetBinaryMessageFragmentEventFunction( - _In_ PFHCWebsocketHandle websocket, - _Out_ PFHCWebSocketBinaryMessageFragmentFunction* binaryMessageFragmentFunc, - _Out_ void** functionContext -) noexcept -{ - return HCWebSocketGetBinaryMessageFragmentEventFunction( - websocket, - binaryMessageFragmentFunc, - functionContext - ); -} -#endif - -PF_API PFHCWebSocketConnectAsync( - _In_z_ const char* uri, - _In_z_ const char* subProtocol, - _In_ PFHCWebsocketHandle websocket, - _Inout_ XAsyncBlock* asyncBlock -) noexcept -{ - return HCWebSocketConnectAsync( - uri, - subProtocol, - websocket, - asyncBlock - ); -} - -PF_API PFHCGetWebSocketConnectResult( - _Inout_ XAsyncBlock* asyncBlock, - _In_ PFWebSocketCompletionResult* result -) noexcept -{ - return HCGetWebSocketConnectResult( - asyncBlock, - (WebSocketCompletionResult*)result - ); -} - -PF_API PFHCWebSocketSendMessageAsync( - _In_ PFHCWebsocketHandle websocket, - _In_z_ const char* message, - _Inout_ XAsyncBlock* asyncBlock -) noexcept -{ - return HCWebSocketSendMessageAsync( - websocket, - message, - asyncBlock - ); -} - -PF_API PFHCWebSocketSendBinaryMessageAsync( - _In_ PFHCWebsocketHandle websocket, - _In_reads_bytes_(payloadSize) const uint8_t* payloadBytes, - _In_ uint32_t payloadSize, - _Inout_ XAsyncBlock* asyncBlock -) noexcept -{ - return HCWebSocketSendBinaryMessageAsync( - websocket, - payloadBytes, - payloadSize, - asyncBlock - ); -} - -PF_API PFHCGetWebSocketSendMessageResult( - _Inout_ XAsyncBlock* asyncBlock, - _In_ PFWebSocketCompletionResult* result -) noexcept -{ - return HCGetWebSocketSendMessageResult( - asyncBlock, - (WebSocketCompletionResult*)result - ); -} - -PF_API PFHCWebSocketDisconnect( - _In_ PFHCWebsocketHandle websocket -) noexcept -{ - return HCWebSocketDisconnect(websocket); -} - -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK -PF_API PFHCWebSocketSetMaxReceiveBufferSize( - _In_ PFHCWebsocketHandle websocket, - _In_ size_t bufferSizeInBytes -) noexcept -{ - return HCWebSocketSetMaxReceiveBufferSize( - websocket, - bufferSizeInBytes - ); -} -#endif - -PF_API_(PFHCWebsocketHandle) PFHCWebSocketDuplicateHandle( - _In_ PFHCWebsocketHandle websocket -) noexcept -{ - return HCWebSocketDuplicateHandle(websocket); -} - -PF_API PFHCWebSocketCloseHandle( - _In_ PFHCWebsocketHandle websocket -) noexcept -{ - return HCWebSocketCloseHandle(websocket); -} - -PF_API_(int32_t) PFHCAddWebSocketRoutedHandler( - _In_ PFHCWebSocketRoutedHandler handler, - _In_opt_ void* context -) noexcept -{ - return HCAddWebSocketRoutedHandler( - handler, - context - ); -} - -PF_API_(void) PFHCRemoveWebSocketRoutedHandler( - _In_ int32_t handlerId -) noexcept -{ - HCRemoveWebSocketRoutedHandler(handlerId); -} - -#endif // !HC_NOWEBSOCKETS diff --git a/Source/PlayFabCore/Source/HttpClient/PFHttpProvider.cpp b/Source/PlayFabCore/Source/HttpClient/PFHttpProvider.cpp deleted file mode 100644 index 5eb51b0..0000000 --- a/Source/PlayFabCore/Source/HttpClient/PFHttpProvider.cpp +++ /dev/null @@ -1,405 +0,0 @@ -#include "stdafx.h" -#include -#include - - -PF_API PFHCSetHttpCallPerformFunction( - _In_ PFHCCallPerformFunction performFunc, - _In_opt_ void* performContext -) noexcept -{ - return HCSetHttpCallPerformFunction( - performFunc, - performContext - ); -} - -PF_API PFHCGetHttpCallPerformFunction( - _Out_ PFHCCallPerformFunction* performFunc, - _Out_ void** performContext -) noexcept -{ - return HCGetHttpCallPerformFunction( - performFunc, - performContext - ); -} - -PF_API PFHCHttpCallGetContext( - _In_ PFHCCallHandle call, - _In_ void** context -) noexcept -{ - return HCHttpCallGetContext( - call, - context - ); -} - -PF_API PFHCHttpCallSetContext( - _In_ PFHCCallHandle call, - _In_opt_ void* context -) noexcept -{ - return HCHttpCallSetContext( - call, - context - ); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// HttpCallRequest Get APIs -// - -PF_API PFHCHttpCallRequestGetUrl( - _In_ PFHCCallHandle call, - _Outptr_ const char** method, - _Outptr_ const char** url -) noexcept -{ - return HCHttpCallRequestGetUrl( - call, - method, - url - ); -} - -PF_API PFHCHttpCallRequestGetRequestBodyBytes( - _In_ PFHCCallHandle call, - _Outptr_result_bytebuffer_maybenull_(*requestBodySize) const uint8_t** requestBodyBytes, - _Out_ uint32_t* requestBodySize -) noexcept -{ - return HCHttpCallRequestGetRequestBodyBytes( - call, - requestBodyBytes, - requestBodySize - ); -} - -PF_API PFHCHttpCallRequestGetRequestBodyString( - _In_ PFHCCallHandle call, - _Outptr_ const char** requestBody -) noexcept -{ - return HCHttpCallRequestGetRequestBodyString( - call, - requestBody - ); -} - -PF_API PFHCHttpCallRequestGetRequestBodyReadFunction( - _In_ PFHCCallHandle call, - _Out_ PFHCHttpCallRequestBodyReadFunction* readFunction, - _Out_ size_t* bodySize, - _Out_ void** context -) noexcept -{ - return HCHttpCallRequestGetRequestBodyReadFunction( - call, - readFunction, - bodySize, - context - ); -} - -PF_API PFHCHttpCallRequestGetHeader( - _In_ PFHCCallHandle call, - _In_z_ const char* headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCHttpCallRequestGetHeader( - call, - headerName, - headerValue - ); -} - -PF_API PFHCHttpCallRequestGetNumHeaders( - _In_ PFHCCallHandle call, - _Out_ uint32_t* numHeaders -) noexcept -{ - return HCHttpCallRequestGetNumHeaders( - call, - numHeaders - ); -} - -PF_API PFHCHttpCallRequestGetHeaderAtIndex( - _In_ PFHCCallHandle call, - _In_ uint32_t headerIndex, - _Out_ const char** headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCHttpCallRequestGetHeaderAtIndex( - call, - headerIndex, - headerName, - headerValue - ); -} - -PF_API PFHCHttpCallRequestGetRetryAllowed( - _In_opt_ PFHCCallHandle call, - _Out_ bool* retryAllowed -) noexcept -{ - return HCHttpCallRequestGetRetryAllowed( - call, - retryAllowed - ); -} - -PF_API PFHCHttpCallRequestGetRetryCacheId( - _In_ PFHCCallHandle call, - _Out_ uint32_t* retryAfterCacheId -) noexcept -{ - return HCHttpCallRequestGetRetryCacheId( - call, - retryAfterCacheId - ); -} - -PF_API PFHCHttpCallRequestGetTimeout( - _In_opt_ PFHCCallHandle call, - _Out_ uint32_t* timeoutInSeconds -) noexcept -{ - return HCHttpCallRequestGetTimeout( - call, - timeoutInSeconds - ); -} - -PF_API PFHCHttpCallRequestGetRetryDelay( - _In_opt_ PFHCCallHandle call, - _In_ uint32_t* retryDelayInSeconds -) noexcept -{ - return HCHttpCallRequestGetRetryDelay( - call, - retryDelayInSeconds - ); -} - -PF_API PFHCHttpCallRequestGetTimeoutWindow( - _In_opt_ PFHCCallHandle call, - _Out_ uint32_t* timeoutWindowInSeconds -) noexcept -{ - return HCHttpCallRequestGetTimeoutWindow( - call, - timeoutWindowInSeconds - ); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// HttpCallResponse Get APIs -// - -PF_API PFHCHttpCallResponseGetResponseBodyWriteFunction( - _In_ PFHCCallHandle call, - _Out_ PFHCHttpCallResponseBodyWriteFunction* writeFunction, - _Out_ void** context -) noexcept -{ - return HCHttpCallResponseGetResponseBodyWriteFunction( - call, - writeFunction, - context - ); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// HttpCallResponse Set APIs -// - -PF_API PFHCHttpCallResponseSetResponseBodyBytes( - _In_ PFHCCallHandle call, - _In_reads_bytes_(bodySize) const uint8_t* bodyBytes, - _In_ size_t bodySize -) noexcept -{ - return HCHttpCallResponseSetResponseBodyBytes( - call, - bodyBytes, - bodySize - ); -} - -PF_API PFHCHttpCallResponseAppendResponseBodyBytes( - _In_ PFHCCallHandle call, - _In_reads_bytes_(bodySize) const uint8_t* bodyBytes, - _In_ size_t bodySize -) noexcept -{ - RETURN_HR_INVALIDARG_IF_NULL(call); - return HCHttpCallResponseAppendResponseBodyBytes( - call, - bodyBytes, - bodySize - ); -} - -PF_API PFHCHttpCallResponseSetStatusCode( - _In_ PFHCCallHandle call, - _In_ uint32_t statusCode -) noexcept -{ - return HCHttpCallResponseSetStatusCode( - call, - statusCode - ); -} - -PF_API PFHCHttpCallResponseSetNetworkErrorCode( - _In_ PFHCCallHandle call, - _In_ HRESULT networkErrorCode, - _In_ uint32_t platformNetworkErrorCode -) noexcept -{ - return HCHttpCallResponseSetNetworkErrorCode( - call, - networkErrorCode, - platformNetworkErrorCode - ); -} - -PF_API PFHCHttpCallResponseSetPlatformNetworkErrorMessage( - _In_ PFHCCallHandle call, - _In_z_ const char* platformNetworkErrorMessage -) noexcept -{ - return HCHttpCallResponseSetPlatformNetworkErrorMessage( - call, - platformNetworkErrorMessage - ); -} - -PF_API PFHCHttpCallResponseSetHeader( - _In_ PFHCCallHandle call, - _In_z_ const char* headerName, - _In_z_ const char* headerValue -) noexcept -{ - return HCHttpCallResponseSetHeader( - call, - headerName, - headerValue - ); -} - -PF_API PFHCHttpCallResponseSetHeaderWithLength( - _In_ PFHCCallHandle call, - _In_reads_(nameSize) const char* headerName, - _In_ size_t nameSize, - _In_reads_(valueSize) const char* headerValue, - _In_ size_t valueSize -) noexcept -{ - return HCHttpCallResponseSetHeaderWithLength( - call, - headerName, - nameSize, - headerValue, - valueSize - ); -} - -#if !HC_NOWEBSOCKETS - -///////////////////////////////////////////////////////////////////////////////////////// -// WebSocket Set APIs -// - - -PF_API PFHCSetWebSocketFunctions( - _In_ PFHCWebSocketConnectFunction websocketConnectFunc, - _In_ PFHCWebSocketSendMessageFunction websocketSendMessageFunc, - _In_ PFHCWebSocketSendBinaryMessageFunction websocketSendBinaryMessageFunc, - _In_ PFHCWebSocketDisconnectFunction websocketDisconnectFunc, - _In_opt_ void* context -) noexcept -{ - return HCSetWebSocketFunctions( - websocketConnectFunc, - websocketSendMessageFunc, - websocketSendBinaryMessageFunc, - (HCWebSocketDisconnectFunction)websocketDisconnectFunc, - context - ); -} - -PF_API PFHCGetWebSocketFunctions( - _Out_ PFHCWebSocketConnectFunction* websocketConnectFunc, - _Out_ PFHCWebSocketSendMessageFunction* websocketSendMessageFunc, - _Out_ PFHCWebSocketSendBinaryMessageFunction* websocketSendBinaryMessageFunc, - _Out_ PFHCWebSocketDisconnectFunction* websocketDisconnectFunc, - _Out_ void** context -) noexcept -{ - return HCGetWebSocketFunctions( - websocketConnectFunc, - websocketSendMessageFunc, - websocketSendBinaryMessageFunc, - (HCWebSocketDisconnectFunction*)websocketDisconnectFunc, - context - ); -} - -PF_API PFHCWebSocketGetProxyUri( - _In_ PFHCWebsocketHandle websocket, - _Out_ const char** proxyUri -) noexcept -{ - return HCWebSocketGetProxyUri( - websocket, - proxyUri - ); -} - -PF_API PFHCWebSocketGetHeader( - _In_ PFHCWebsocketHandle websocket, - _In_z_ const char* headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCWebSocketGetHeader( - websocket, - headerName, - headerValue - ); -} - -PF_API PFHCWebSocketGetNumHeaders( - _In_ PFHCWebsocketHandle websocket, - _Out_ uint32_t* numHeaders -) noexcept -{ - return HCWebSocketGetNumHeaders( - websocket, - numHeaders - ); -} - - -PF_API PFHCWebSocketGetHeaderAtIndex( - _In_ PFHCWebsocketHandle websocket, - _In_ uint32_t headerIndex, - _Out_ const char** headerName, - _Out_ const char** headerValue -) noexcept -{ - return HCWebSocketGetHeaderAtIndex( - websocket, - headerIndex, - headerName, - headerValue - ); -} - -#endif // !HC_NOWEBSOCKETS \ No newline at end of file diff --git a/Source/PlayFabCore/Source/HttpClient/PFMock.cpp b/Source/PlayFabCore/Source/HttpClient/PFMock.cpp deleted file mode 100644 index e1c06a5..0000000 --- a/Source/PlayFabCore/Source/HttpClient/PFMock.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "stdafx.h" -#include -#include - -///////////////////////////////////////////////////////////////////////////////////////// -// Mock APIs -// - -PF_API PFHCMockCallCreate( - _Out_ PFHCMockCallHandle* call -) noexcept -{ - return HCMockCallCreate(call); -} - -PF_API PFHCMockAddMock( - _In_ PFHCMockCallHandle call, - _In_opt_z_ const char* method, - _In_opt_z_ const char* url, - _In_reads_bytes_opt_(requestBodySize) const uint8_t* requestBodyBytes, - _In_ uint32_t requestBodySize -) noexcept -{ - return HCMockAddMock( - call, - method, - url, - requestBodyBytes, - requestBodySize - ); -} - -PF_API PFHCMockSetMockMatchedCallback( - _In_ PFHCMockCallHandle call, - _In_ PFHCMockMatchedCallback callback, - _In_opt_ void* context -) -{ - return HCMockSetMockMatchedCallback( - call, - callback, - context - ); -} - -PF_API PFHCMockRemoveMock( - _In_ PFHCMockCallHandle call -) -{ - return HCMockRemoveMock(call); -} - -PF_API PFHCMockClearMocks() noexcept -{ - return HCMockClearMocks(); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// HCMockResponse Set APIs -// - -PF_API PFHCMockResponseSetResponseBodyBytes( - _In_ PFHCMockCallHandle call, - _In_reads_bytes_(bodySize) const uint8_t* bodyBytes, - _In_ uint32_t bodySize -) noexcept -{ - return HCMockResponseSetResponseBodyBytes( - call, - bodyBytes, - bodySize - ); -} - -PF_API PFHCMockResponseSetStatusCode( - _In_ PFHCMockCallHandle call, - _In_ uint32_t statusCode -) noexcept -{ - return HCMockResponseSetStatusCode( - call, - statusCode - ); -} - -PF_API PFHCMockResponseSetNetworkErrorCode( - _In_ PFHCMockCallHandle call, - _In_ HRESULT networkErrorCode, - _In_ uint32_t platformNetworkErrorCode -) noexcept -{ - return HCMockResponseSetNetworkErrorCode( - call, - networkErrorCode, - platformNetworkErrorCode - ); -} - -PF_API PFHCMockResponseSetHeader( - _In_ PFHCMockCallHandle call, - _In_z_ const char* headerName, - _In_z_ const char* headerValue -) noexcept -{ - return HCMockResponseSetHeader( - call, - headerName, - headerValue - ); -} diff --git a/Source/PlayFabCore/Source/Trace/TraceState.cpp b/Source/PlayFabCore/Source/Trace/TraceState.cpp index f78e570..f0e3072 100644 --- a/Source/PlayFabCore/Source/Trace/TraceState.cpp +++ b/Source/PlayFabCore/Source/Trace/TraceState.cpp @@ -8,7 +8,7 @@ namespace PlayFab { -static constexpr char s_configFile[] = "PlayFabTraceSettings.json"; +// static constexpr char s_configFile[] = "PlayFabTraceSettings.json"; TraceSettings& GetTraceSettings() { @@ -79,7 +79,7 @@ HRESULT AccessTraceState(AccessMode mode, SharedPtr& traceState) } } -TraceState::TraceState(RunContext&& initContext, RunContext&& traceContext, LocalStorage localStorage) noexcept : +TraceState::TraceState(RunContext&& /*initContext*/, RunContext&& traceContext, LocalStorage localStorage) noexcept : m_runContext{ std::move(traceContext) } { // Init LibHttpClient Tracing @@ -92,6 +92,9 @@ TraceState::TraceState(RunContext&& initContext, RunContext&& traceContext, Loca #endif HCTraceSetClientCallback(TraceCallback); + // Removing this feature until we more fully flesh out XPlat tracing unification for merged SDK. For now, trace options + // are tracing to debugger, ETW (windows only), and client callbacks. + // Synchronously load trace settings. TraceSettings loaded from file override those configured via API // TODO document location, name, and format of TraceSettings file. It should just be a Json serialized // version of the TraceSettings struct: @@ -105,14 +108,34 @@ TraceState::TraceState(RunContext&& initContext, RunContext&& traceContext, Loca TraceSettings& settings = GetTraceSettings(); + /* Result> readResult = localStorage.Read(s_configFile, initContext).Wait(); if (SUCCEEDED(readResult.hr)) { auto fileData{ readResult.ExtractPayload() }; - JsonDocument fileJson{ &JsonUtils::allocator, JsonUtils::kDefaultStackCapacity, &JsonUtils::allocator }; - fileJson.Parse(reinterpret_cast(fileData.data()), fileData.size()); - if (!fileJson.HasParseError()) + JsonDocument fileJson; + bool parseError = false; + String parseErrorMsg; + + try + { + if (fileData.data()) + { + fileJson = JsonValue::parse(fileData.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (!parseError) { JsonUtils::ObjectGetMember(fileJson, "enableTraceToFile", settings.enableTraceToFile); JsonUtils::ObjectGetMember(fileJson, "traceToDebugger", settings.traceToDebugger); @@ -123,6 +146,7 @@ TraceState::TraceState(RunContext&& initContext, RunContext&& traceContext, Loca } } } + */ // Add appropriate TraceOutputs based on TraceSettings and Platform if (settings.enableTraceToFile) @@ -220,7 +244,7 @@ HRESULT CALLBACK TraceState::CleanupAsyncProvider(XAsyncOp op, XAsyncProviderDat return E_PENDING; } - // Give TraceOutputs a chance to finish naturally before terminating RunContext. Terminating RunContext immediately may lead to + // Give TraceOutputs a chance to finish naturally before terminating RunContext. Terminating RunContext immediately may lead to // lost trace messages in some cases for (auto& output : context->traceState->m_outputs) { @@ -286,12 +310,12 @@ String FormatString(_In_z_ _Printf_format_string_ const char* format, ...) Vector buffer(1 + std::vsnprintf(NULL, 0, format, args1)); va_end(args1); - + std::vsnprintf(buffer.data(), buffer.size(), format, args2); va_end(args2); - + String strBuffer(buffer.data(), buffer.size()); - + return strBuffer; } @@ -309,13 +333,7 @@ void CALLBACK TraceState::TraceCallback( { return; } - - TraceSettings& settings = GetTraceSettings(); - if (settings.traceCallback) - { - settings.traceCallback(areaName, level, threadId, timestamp, message); - } - + if (state->m_outputs.empty()) { // Early out if we have no outputs @@ -344,7 +362,7 @@ void CALLBACK TraceState::TraceCallback( #else localtime_r(&timeTInSec, &fmtTime); #endif - + String formattedMessage = FormatString("[%04llX][%s][%02d:%02d:%02d.%03u][%s] %s\r\n", threadId, traceLevelNames[static_cast(level)], @@ -355,7 +373,7 @@ void CALLBACK TraceState::TraceCallback( areaName, message ); - + auto& outputs = state->m_outputs; for (auto& output : outputs) { diff --git a/Source/PlayFabCore/Source/Trace/TraceState.h b/Source/PlayFabCore/Source/Trace/TraceState.h index 408b518..b5783a7 100644 --- a/Source/PlayFabCore/Source/Trace/TraceState.h +++ b/Source/PlayFabCore/Source/Trace/TraceState.h @@ -13,7 +13,6 @@ struct TraceSettings bool enableTraceToFile{ false }; char traceFileDirectory[FILENAME_MAX]{ 0 }; bool traceToDebugger{ false }; - HCTraceCallback* traceCallback{ nullptr }; }; TraceSettings& GetTraceSettings(); diff --git a/Source/PlayFabCore/Source/stdafx.h b/Source/PlayFabCore/Source/stdafx.h index bd2e544..b611619 100644 --- a/Source/PlayFabCore/Source/stdafx.h +++ b/Source/PlayFabCore/Source/stdafx.h @@ -23,7 +23,7 @@ #include // PlayFabSharedInternal -#include +#include #include #include #include diff --git a/Source/PlayFabServices/API-List.csv b/Source/PlayFabServices/API-List.csv index 6a98ad1..5d4e142 100644 --- a/Source/PlayFabServices/API-List.csv +++ b/Source/PlayFabServices/API-List.csv @@ -151,6 +151,7 @@ PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromNintendo PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromPSNAccountIDsAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromPSNAccountIDs,false,No,Yes,No,Yes,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromPSNOnlineIDsAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromPSNOnlineIDs,false,No,No,No,No,No,No,No,No PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromSteamIDsAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromSteamIDs,false,No,Yes,No,No,Yes,No,No,Yes +PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromSteamNames,false,No,No,No,No,No,No,No,No PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromTwitchIDsAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromTwitchIDs,false,No,Yes,No,No,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementClientGetPlayFabIDsFromXboxLiveIDsAsync,SessionTicket,Account Management,ClientGetPlayFabIDsFromXboxLiveIDs,false,Yes,Yes,No,No,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementClientLinkAndroidDeviceIDAsync,SessionTicket,Account Management,ClientLinkAndroidDeviceID,false,No,Yes,No,No,Yes,No,No,Yes @@ -206,6 +207,7 @@ PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromNintendo PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromPSNAccountIDsAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromPSNAccountIDs,false,No,Yes,No,No,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromPSNOnlineIDsAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromPSNOnlineIDs,false,No,No,No,No,No,No,No,No PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromSteamIDsAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromSteamIDs,false,No,Yes,No,No,Yes,No,No,Yes +PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromSteamNames,false,No,No,No,No,No,No,No,No PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromTwitchIDsAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromTwitchIDs,false,No,Yes,No,No,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementServerGetPlayFabIDsFromXboxLiveIDsAsync,SecretKey,Account Management,ServerGetPlayFabIDsFromXboxLiveIDs,false,No,Yes,No,No,Yes,No,No,Yes PF Services,AccountManagement,PFAccountManagementServerGetServerCustomIDsFromPlayFabIDsAsync,SecretKey,Account Management,ServerGetServerCustomIDsFromPlayFabIDs,false,No,Yes,No,No,Yes,No,No,Yes diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagement.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagement.h index 5541342..cc4c745 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagement.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagement.h @@ -917,6 +917,63 @@ PF_API PFAccountManagementClientGetPlayFabIDsFromSteamIDsGetResult( ) noexcept; #endif +#if 0 +/// +/// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers +/// are persona names. +/// +/// PFEntityHandle to use for authentication. +/// Populated request object. +/// XAsyncBlock for the async operation. +/// Result code for this API operation. +/// +/// When the asynchronous task is complete, call +/// and to get the result. +/// +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync( + _In_ PFEntityHandle entityHandle, + _In_ const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest* request, + _Inout_ XAsyncBlock* async +) noexcept; + +/// +/// Get the size in bytes needed to store the result of a ClientGetPlayFabIDsFromSteamNames call. +/// +/// XAsyncBlock for the async operation. +/// The buffer size in bytes required for the result. +/// +/// Result code for this API operation. If the service call is unsuccessful, the result will be one of +/// global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. +/// +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResultSize( + _Inout_ XAsyncBlock* async, + _Out_ size_t* bufferSize +) noexcept; + +/// +/// Gets the result of a successful PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync call. +/// +/// XAsyncBlock for the async operation. +/// The size of the buffer for the result object. +/// Byte buffer used for the result value and its fields. +/// Pointer to the result object. +/// The number of bytes in the provided buffer that were used. +/// +/// Result code for this API operation. If the service call is unsuccessful, the result will be one of +/// global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. +/// +/// +/// result is a pointer within buffer and does not need to be freed separately. +/// +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResult( + _Inout_ XAsyncBlock* async, + _In_ size_t bufferSize, + _Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer, + _Outptr_ PFAccountManagementGetPlayFabIDsFromSteamNamesResult** result, + _Out_opt_ size_t* bufferUsed +) noexcept; +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC /// /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers @@ -1088,6 +1145,8 @@ PF_API PFAccountManagementClientLinkAppleAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLoginWithCustomIDAsync, ClientUnlinkCustomIDAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED or any of the global PlayFab Service /// errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -1116,7 +1175,7 @@ PF_API PFAccountManagementClientLinkCustomIDAsync( /// as Facebook provides unique user IDs per application and doing so can result in issues with the Facebook /// ID for the user in their PlayFab account information. If you must re-use an application in a new PlayFab /// Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in the first -/// Title ID. +/// Title ID. See also ClientLoginWithFacebookAsync, ClientUnlinkFacebookAccountAsync. /// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_ACCOUNT_NOT_FOUND, E_PF_FACEBOOK_API_ERROR, @@ -1140,6 +1199,8 @@ PF_API PFAccountManagementClientLinkFacebookAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, and macOS. +/// See also ClientLoginWithFacebookInstantGamesIdAsync, ClientUnlinkFacebookInstantGamesIdAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_FACEBOOK_INSTANT_GAMES_AUTH_NOT_CONFIGURED_FOR_TITLE, E_PF_INVALID_FACEBOOK_INSTANT_GAMES_SIGNATURE, /// E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling @@ -1166,6 +1227,8 @@ PF_API PFAccountManagementClientLinkFacebookInstantGamesIdAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, iOS, and macOS. +/// See also ClientUnlinkGameCenterAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_GAME_CENTER_AUTHENTICATION_FAILED, E_PF_INVALID_GAME_CENTER_AUTH_REQUEST, /// E_PF_LINKED_ACCOUNT_ALREADY_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling @@ -1189,7 +1252,8 @@ PF_API PFAccountManagementClientLinkGameCenterAccountAsync( /// /// This API is available on Win32, Linux, Android, and macOS. /// Google sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google sign-in -/// for Android APIs on the device and passing it to this API. +/// for Android APIs on the device and passing it to this API. See also ClientLoginWithGoogleAccountAsync, +/// ClientUnlinkGoogleAccountAsync. /// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_GOOGLE_O_AUTH_ERROR, E_PF_GOOGLE_O_AUTH_NO_ID_TOKEN_INCLUDED_IN_RESPONSE, @@ -1313,6 +1377,8 @@ PF_API PFAccountManagementClientLinkNintendoServiceAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, and macOS. +/// See also ClientLoginWithNintendoSwitchDeviceIdAsync, ClientUnlinkNintendoSwitchDeviceIdAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED or any of the global PlayFab Service /// errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -1334,6 +1400,8 @@ PF_API PFAccountManagementClientLinkNintendoSwitchDeviceIdAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLoginWithOpenIdConnectAsync, ClientUnlinkOpenIdConnectAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_INVALID_IDENTITY_PROVIDER_ID, E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details @@ -1410,6 +1478,8 @@ PF_API PFAccountManagementClientLinkSteamAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, and macOS. +/// See also ClientLoginWithTwitchAsync, ClientUnlinkTwitchAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_FEATURE_NOT_CONFIGURED_FOR_TITLE, E_PF_INVALID_TWITCH_TOKEN, /// E_PF_LINKED_ACCOUNT_ALREADY_CLAIMED, E_PF_TWITCH_RESPONSE_ERROR or any of the global PlayFab Service @@ -1432,6 +1502,8 @@ PF_API PFAccountManagementClientLinkTwitchAsync( /// Result code for this API operation. /// /// This API is available on Win32, GDK, Linux, and macOS. +/// See also ClientLoginWithXboxAsync, ClientUnlinkXboxAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_EXPIRED_XBOX_LIVE_TOKEN, E_PF_INVALID_XBOX_LIVE_TOKEN, /// E_PF_LINKED_ACCOUNT_ALREADY_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling @@ -1583,6 +1655,8 @@ PF_API PFAccountManagementClientUnlinkAppleAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLinkCustomIDAsync, ClientLoginWithCustomIDAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED, E_PF_CUSTOM_ID_NOT_LINKED or any of the global PlayFab /// Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -1603,6 +1677,8 @@ PF_API PFAccountManagementClientUnlinkCustomIDAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, Android, iOS, and macOS. +/// See also ClientLinkFacebookAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED or any of the global PlayFab Service errors. See /// doc page "Handling PlayFab Errors" for more details on error handling. @@ -1648,6 +1724,8 @@ PF_API PFAccountManagementClientUnlinkFacebookInstantGamesIdAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, iOS, and macOS. +/// See also ClientLinkGameCenterAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED or any of the global PlayFab Service errors. See /// doc page "Handling PlayFab Errors" for more details on error handling. @@ -1669,6 +1747,8 @@ PF_API PFAccountManagementClientUnlinkGameCenterAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, Android, and macOS. +/// See also ClientLinkGoogleAccountAsync, ClientLoginWithGoogleAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED or any of the global PlayFab Service errors. See /// doc page "Handling PlayFab Errors" for more details on error handling. @@ -1783,6 +1863,8 @@ PF_API PFAccountManagementClientUnlinkNintendoServiceAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, and macOS. +/// See also ClientLinkNintendoSwitchDeviceIdAsync, ClientLoginWithNintendoSwitchDeviceIdAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED, E_PF_NINTENDO_SWITCH_DEVICE_ID_NOT_LINKED or any /// of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error @@ -1850,6 +1932,8 @@ PF_API PFAccountManagementClientUnlinkPSNAccountAsync( /// Result code for this API operation. /// /// This API is available on Win32, Linux, and macOS. +/// See also ClientLinkSteamAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED or any of the global PlayFab Service errors. See /// doc page "Handling PlayFab Errors" for more details on error handling. @@ -1894,6 +1978,8 @@ PF_API PFAccountManagementClientUnlinkTwitchAsync( /// Result code for this API operation. /// /// This API is available on Win32, GDK, Linux, and macOS. +/// See also ClientLinkXboxAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED, E_PF_INVALID_XBOX_LIVE_TOKEN or any of the global /// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -2606,6 +2692,63 @@ PF_API PFAccountManagementServerGetPlayFabIDsFromSteamIDsGetResult( ) noexcept; #endif +#if 0 +/// +/// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers +/// are persona names. +/// +/// PFEntityHandle for a title Entity obtained using PFAuthenticationGetEntityWithSecretKeyAsync. +/// Populated request object. +/// XAsyncBlock for the async operation. +/// Result code for this API operation. +/// +/// When the asynchronous task is complete, call +/// and to get the result. +/// +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync( + _In_ PFEntityHandle titleEntityHandle, + _In_ const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest* request, + _Inout_ XAsyncBlock* async +) noexcept; + +/// +/// Get the size in bytes needed to store the result of a ServerGetPlayFabIDsFromSteamNames call. +/// +/// XAsyncBlock for the async operation. +/// The buffer size in bytes required for the result. +/// +/// Result code for this API operation. If the service call is unsuccessful, the result will be one of +/// global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. +/// +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResultSize( + _Inout_ XAsyncBlock* async, + _Out_ size_t* bufferSize +) noexcept; + +/// +/// Gets the result of a successful PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync call. +/// +/// XAsyncBlock for the async operation. +/// The size of the buffer for the result object. +/// Byte buffer used for the result value and its fields. +/// Pointer to the result object. +/// The number of bytes in the provided buffer that were used. +/// +/// Result code for this API operation. If the service call is unsuccessful, the result will be one of +/// global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. +/// +/// +/// result is a pointer within buffer and does not need to be freed separately. +/// +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResult( + _Inout_ XAsyncBlock* async, + _In_ size_t bufferSize, + _Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer, + _Outptr_ PFAccountManagementGetPlayFabIDsFromSteamNamesResult** result, + _Out_opt_ size_t* bufferUsed +) noexcept; +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC /// /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagementTypes.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagementTypes.h index d421171..58a9f73 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagementTypes.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFAccountManagementTypes.h @@ -852,6 +852,60 @@ typedef struct PFAccountManagementGetPlayFabIDsFromSteamIDsResult } PFAccountManagementGetPlayFabIDsFromSteamIDsResult; +/// +/// PFAccountManagementGetPlayFabIDsFromSteamNamesRequest data model. +/// +typedef struct PFAccountManagementGetPlayFabIDsFromSteamNamesRequest +{ + /// + /// Array of unique Steam identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + _Field_size_(steamNamesCount) const char* const* steamNames; + + /// + /// Count of steamNames + /// + uint32_t steamNamesCount; + +} PFAccountManagementGetPlayFabIDsFromSteamNamesRequest; + +/// +/// PFAccountManagementSteamNamePlayFabIdPair data model. +/// +typedef struct PFAccountManagementSteamNamePlayFabIdPair +{ + /// + /// (Optional) Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the + /// Steam identifier. + /// + _Maybenull_ _Null_terminated_ const char* playFabId; + + /// + /// (Optional) Unique Steam identifier for a user, also known as Steam persona name. + /// + _Maybenull_ _Null_terminated_ const char* steamName; + +} PFAccountManagementSteamNamePlayFabIdPair; + +/// +/// PFAccountManagementGetPlayFabIDsFromSteamNamesResult data model. For Steam identifiers which have +/// not been linked to PlayFab accounts, or if the user has not logged in recently, null will be returned. +/// +typedef struct PFAccountManagementGetPlayFabIDsFromSteamNamesResult +{ + /// + /// (Optional) Mapping of Steam identifiers to PlayFab identifiers. + /// + _Maybenull_ _Field_size_(dataCount) PFAccountManagementSteamNamePlayFabIdPair const* const* data; + + /// + /// Count of data + /// + uint32_t dataCount; + +} PFAccountManagementGetPlayFabIDsFromSteamNamesResult; + /// /// PFAccountManagementGetPlayFabIDsFromTwitchIDsRequest data model. /// diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFCatalog.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFCatalog.h index 6581549..4e1fb86 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFCatalog.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFCatalog.h @@ -41,8 +41,8 @@ PF_API PFCatalogCreateDraftItemAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service errors. See doc page -/// "Handling PlayFab Errors" for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service +/// errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCatalogCreateDraftItemGetResultSize( _Inout_ XAsyncBlock* async, @@ -59,8 +59,8 @@ PF_API PFCatalogCreateDraftItemGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service errors. See doc page -/// "Handling PlayFab Errors" for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service +/// errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. @@ -1137,8 +1137,8 @@ PF_API PFCatalogUpdateDraftItemAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" -/// for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page +/// "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCatalogUpdateDraftItemGetResultSize( _Inout_ XAsyncBlock* async, @@ -1155,8 +1155,8 @@ PF_API PFCatalogUpdateDraftItemGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" -/// for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page +/// "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFCloudScript.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFCloudScript.h index 154442e..ce274e0 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFCloudScript.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFCloudScript.h @@ -230,10 +230,10 @@ PF_API PFCloudScriptExecuteFunctionAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_ARGUMENT_SIZE_EXCEEDED, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, -/// E_PF_INVALID_ENTITY_TYPE or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EVENT_HUB_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, E_PF_INVALID_ENTITY_TYPE or any of the global +/// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCloudScriptExecuteFunctionGetResultSize( _Inout_ XAsyncBlock* async, @@ -250,10 +250,10 @@ PF_API PFCloudScriptExecuteFunctionGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_ARGUMENT_SIZE_EXCEEDED, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, -/// E_PF_INVALID_ENTITY_TYPE or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EVENT_HUB_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, E_PF_INVALID_ENTITY_TYPE or any of the global +/// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFFriends.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFFriends.h index 5760550..d82a1b1 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFFriends.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFFriends.h @@ -24,6 +24,8 @@ extern "C" /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientGetFriendsListAsync, ClientSetFriendTagsAsync. +/// /// When the asynchronous task is complete, call to get /// the result. /// diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboards.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboards.h index 70153a8..fa4cbe0 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboards.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboards.h @@ -26,9 +26,11 @@ extern "C" /// See also LeaderboardDeleteLeaderboardDefinitionAsync. /// /// Call to get the status of the operation. If the service call is unsuccessful, -/// the async result will be E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DUPLICATE_LINKED_STATISTIC_COLUMN_NAME_FOUND, -/// E_PF_INVALID_BASE_TIME_FOR_INTERVAL, E_PF_LEADERBOARD_NAME_CONFLICT, E_PF_LEADERBOARD_SIZE_LIMIT_EXCEEDED, -/// E_PF_LINKED_STATISTIC_COLUMN_MISMATCH, E_PF_LINKING_STATS_NOT_ALLOWED_FOR_ENTITY_TYPE, E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER, +/// the async result will be E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DUPLICATE_COLUMN_NAME_FOUND, E_PF_DUPLICATE_LINKED_STATISTIC_COLUMN_NAME_FOUND, +/// E_PF_EXTERNAL_ENTITY_NOT_ALLOWED_FOR_TIER, E_PF_INVALID_BASE_TIME_FOR_INTERVAL, E_PF_LEADERBOARD_COUNT_LIMIT_EXCEEDED, +/// E_PF_LEADERBOARD_NAME_CONFLICT, E_PF_LEADERBOARD_SIZE_LIMIT_EXCEEDED, E_PF_LINKED_STATISTIC_COLUMN_MISMATCH, +/// E_PF_LINKED_STATISTIC_COLUMN_NOT_FOUND, E_PF_LINKED_STATISTIC_COLUMN_REQUIRED, E_PF_LINKING_STATS_NOT_ALLOWED_FOR_ENTITY_TYPE, +/// E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER, E_PF_MULTIPLE_LINKED_STATISTICS_NOT_ALLOWED, /// E_PF_STAT_DEFINITION_ALREADY_LINKED_TO_LEADERBOARD, E_PF_STATISTIC_NOT_FOUND or any of the global /// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// @@ -88,7 +90,7 @@ PF_API PFLeaderboardsDeleteLeaderboardEntriesAsync( #endif /// -/// Get the friend leaderboard for the specified entity. A maximum of 100 friend entries are listed in +/// Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in /// the leaderboard. /// /// PFEntityHandle to use for authentication. @@ -112,8 +114,11 @@ PF_API PFLeaderboardsGetFriendLeaderboardForEntityAsync( /// XAsyncBlock for the async operation. /// The buffer size in bytes required for the result. /// -/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_TITLE, -/// E_PF_INVALID_ENTITY_TYPE, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_STATISTIC_NOT_FOUND +/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ACCOUNT_NOT_FOUND, +/// E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DOWNSTREAM_SERVICE_UNAVAILABLE, E_PF_EXPIRED_XBOX_LIVE_TOKEN, +/// E_PF_FACEBOOK_API_ERROR, E_PF_INVALID_ENTITY_TYPE, E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, +/// E_PF_INVALID_XBOX_LIVE_TOKEN, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_STATISTIC_NOT_FOUND, E_PF_XBOX_INACCESSIBLE, E_PF_XBOX_SERVICE_TOO_MANY_REQUESTS, E_PF_XBOX_XASS_EXCHANGE_FAILURE /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details /// on error handling. /// @@ -131,8 +136,11 @@ PF_API PFLeaderboardsGetFriendLeaderboardForEntityGetResultSize( /// Pointer to the result object. /// The number of bytes in the provided buffer that were used. /// -/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_TITLE, -/// E_PF_INVALID_ENTITY_TYPE, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_STATISTIC_NOT_FOUND +/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ACCOUNT_NOT_FOUND, +/// E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DOWNSTREAM_SERVICE_UNAVAILABLE, E_PF_EXPIRED_XBOX_LIVE_TOKEN, +/// E_PF_FACEBOOK_API_ERROR, E_PF_INVALID_ENTITY_TYPE, E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, +/// E_PF_INVALID_XBOX_LIVE_TOKEN, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_STATISTIC_NOT_FOUND, E_PF_XBOX_INACCESSIBLE, E_PF_XBOX_SERVICE_TOO_MANY_REQUESTS, E_PF_XBOX_XASS_EXCHANGE_FAILURE /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details /// on error handling. /// @@ -521,9 +529,9 @@ PF_API PFLeaderboardsUnlinkLeaderboardFromStatisticAsync( /// See also LeaderboardDeleteLeaderboardEntriesAsync. /// /// Call to get the status of the operation. If the service call is unsuccessful, -/// the async result will be E_PF_LEADERBOARD_COLUMN_LENGTH_MISMATCH, E_PF_LEADERBOARD_NOT_FOUND, E_PF_LEADERBOARD_UPDATE_NOT_ALLOWED_WHILE_LINKED -/// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details -/// on error handling. +/// the async result will be E_PF_API_NOT_ENABLED_FOR_GAME_CLIENT_ACCESS, E_PF_LEADERBOARD_COLUMN_LENGTH_MISMATCH, +/// E_PF_LEADERBOARD_NOT_FOUND, E_PF_LEADERBOARD_UPDATE_NOT_ALLOWED_WHILE_LINKED or any of the global +/// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFLeaderboardsUpdateLeaderboardEntriesAsync( _In_ PFEntityHandle entityHandle, diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboardsTypes.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboardsTypes.h index c8d0633..b11bafb 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboardsTypes.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFLeaderboardsTypes.h @@ -280,7 +280,7 @@ typedef struct PFLeaderboardsEntityLeaderboardEntry typedef struct PFLeaderboardsGetEntityLeaderboardResponse { /// - /// (Optional) Leaderboard columns describing the sort directions,. + /// (Optional) Leaderboard columns describing the sort directions. /// _Maybenull_ _Field_size_(columnsCount) PFLeaderboardsLeaderboardColumn const* const* columns; @@ -289,6 +289,11 @@ typedef struct PFLeaderboardsGetEntityLeaderboardResponse /// uint32_t columnsCount; + /// + /// The number of entries on the leaderboard. + /// + uint32_t entryCount; + /// /// (Optional) Individual entity rankings in the leaderboard, in sorted order by rank. /// diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFMultiplayerServerTypes.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFMultiplayerServerTypes.h index 2523bc7..5767c7d 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFMultiplayerServerTypes.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFMultiplayerServerTypes.h @@ -938,7 +938,7 @@ typedef struct PFMultiplayerServerPartyNetworkConfiguration _Maybenull_ _Null_terminated_ const char* directPeerConnectivityOptions; /// - /// The maximum number of devices allowed to connect to the network. Must be between 1 and 32, inclusive. + /// The maximum number of devices allowed to connect to the network. Must be between 1 and 128, inclusive. /// uint32_t maxDevices; diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFPlayerDataManagement.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFPlayerDataManagement.h index a30a7c4..13f8c72 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFPlayerDataManagement.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFPlayerDataManagement.h @@ -26,7 +26,7 @@ extern "C" /// counter is incremented. If the Version parameter is provided, then this call will only return data /// if the current version on the system is greater than the value provided. If the Keys parameter is /// provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, -/// the full set of custom user data will be returned. +/// the full set of custom user data will be returned. See also ClientGetUserReadOnlyDataAsync, ClientUpdateUserDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -85,7 +85,7 @@ PF_API PFPlayerDataManagementClientGetUserDataGetResult( /// This API is available on all platforms. /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned /// will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user -/// data will be returned. +/// data will be returned. See also ClientGetUserPublisherReadOnlyDataAsync, ClientUpdateUserPublisherDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -146,7 +146,7 @@ PF_API PFPlayerDataManagementClientGetUserPublisherDataGetResult( /// This API is available on all platforms. /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned /// will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user -/// data will be returned. +/// data will be returned. See also ClientGetUserPublisherDataAsync, ClientUpdateUserPublisherDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -209,7 +209,7 @@ PF_API PFPlayerDataManagementClientGetUserPublisherReadOnlyDataGetResult( /// counter is incremented. If the Version parameter is provided, then this call will only return data /// if the current version on the system is greater than the value provided. If the Keys parameter is /// provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, -/// the full set of custom user data will be returned. +/// the full set of custom user data will be returned. See also ClientGetUserDataAsync, ClientUpdateUserDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -270,7 +270,8 @@ PF_API PFPlayerDataManagementClientGetUserReadOnlyDataGetResult( /// This function performs an additive update of the arbitrary strings containing the custom data for /// the user. In updating the custom data object, keys which already exist in the object will have their /// values overwritten, while keys with null values will be removed. New keys will be added, with the -/// given values. No other key-value pairs will be changed apart from those specified in the call. +/// given values. No other key-value pairs will be changed apart from those specified in the call. See +/// also ClientGetUserDataAsync, ClientGetUserReadOnlyDataAsync. /// /// When the asynchronous task is complete, call /// to get the result. @@ -308,7 +309,8 @@ PF_API PFPlayerDataManagementClientUpdateUserDataGetResult( /// This function performs an additive update of the arbitrary strings containing the custom data for /// the user. In updating the custom data object, keys which already exist in the object will have their /// values overwritten, while keys with null values will be removed. New keys will be added, with the -/// given values. No other key-value pairs will be changed apart from those specified in the call. +/// given values. No other key-value pairs will be changed apart from those specified in the call. See +/// also ClientGetUserPublisherDataAsync, ClientGetUserPublisherReadOnlyDataAsync. /// /// When the asynchronous task is complete, call /// to get the result. diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFStatistics.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFStatistics.h index 6a00888..0d9c3a2 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFStatistics.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFStatistics.h @@ -27,10 +27,11 @@ extern "C" /// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_AGGREGATION_TYPE_NOT_ALLOWED_FOR_MULTI_COLUMN_STATISTIC, E_PF_API_NOT_ENABLED_FOR_TITLE, -/// E_PF_DUPLICATE_STATISTIC_NAME, E_PF_INVALID_BASE_TIME_FOR_INTERVAL, E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER, -/// E_PF_STATISTIC_COUNT_LIMIT_EXCEEDED, E_PF_STATISTIC_DEFINITION_HAS_NULL_OR_EMPTY_VERSION_CONFIGURATION, -/// E_PF_STATISTIC_NAME_CONFLICT or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_DUPLICATE_COLUMN_NAME_FOUND, E_PF_DUPLICATE_STATISTIC_NAME, E_PF_EXTERNAL_ENTITY_NOT_ALLOWED_FOR_TIER, +/// E_PF_INVALID_BASE_TIME_FOR_INTERVAL, E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER, E_PF_STATISTIC_COUNT_LIMIT_EXCEEDED, +/// E_PF_STATISTIC_DEFINITION_HAS_NULL_OR_EMPTY_VERSION_CONFIGURATION, E_PF_STATISTIC_NAME_CONFLICT or +/// any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details +/// on error handling. /// PF_API PFStatisticsCreateStatisticDefinitionAsync( _In_ PFEntityHandle entityHandle, @@ -428,8 +429,8 @@ PF_API PFStatisticsUpdateStatisticsAsync( /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_GAME_CLIENT_ACCESS, /// E_PF_ENTITY_TYPE_MISMATCH_WITH_STAT_DEFINITION, E_PF_INVALID_ENTITY_TYPE, E_PF_NOT_AUTHORIZED, E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH, -/// E_PF_STATISTIC_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_STATISTIC_NOT_FOUND, E_PF_TRANSACTION_ALREADY_APPLIED or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFStatisticsUpdateStatisticsGetResultSize( _Inout_ XAsyncBlock* async, @@ -447,8 +448,8 @@ PF_API PFStatisticsUpdateStatisticsGetResultSize( /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_GAME_CLIENT_ACCESS, /// E_PF_ENTITY_TYPE_MISMATCH_WITH_STAT_DEFINITION, E_PF_INVALID_ENTITY_TYPE, E_PF_NOT_AUTHORIZED, E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH, -/// E_PF_STATISTIC_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_STATISTIC_NOT_FOUND, E_PF_TRANSACTION_ALREADY_APPLIED or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/PFStatisticsTypes.h b/Source/PlayFabServices/Include/Generated/playfab/services/PFStatisticsTypes.h index 88bcf04..05398be 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/PFStatisticsTypes.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/PFStatisticsTypes.h @@ -77,7 +77,7 @@ typedef struct PFStatisticsCreateStatisticDefinitionRequest _Maybenull_ _Null_terminated_ const char* entityType; /// - /// Name of the statistic. Must be less than 50 characters. Restricted to a-Z, 0-9, '(', ')', '_', + /// Name of the statistic. Must be less than 150 characters. Restricted to a-Z, 0-9, '(', ')', '_', /// '-' and '.'. /// _Null_terminated_ const char* name; @@ -187,7 +187,7 @@ typedef struct PFStatisticsGetStatisticDefinitionRequest uint32_t customTagsCount; /// - /// Name of the statistic. Must be less than 50 characters. + /// Name of the statistic. Must be less than 150 characters. /// _Null_terminated_ const char* name; diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/cpp/AccountManagementTypeWrappers.h b/Source/PlayFabServices/Include/Generated/playfab/services/cpp/AccountManagementTypeWrappers.h index e369595..f8ab6cf 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/cpp/AccountManagementTypeWrappers.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/cpp/AccountManagementTypeWrappers.h @@ -2814,6 +2814,198 @@ class PFAccountManagementGetPlayFabIDsFromSteamIDsResultWrapper : public ModelWr ModelVector, Alloc> m_data; }; +template class Alloc = std::allocator> +class PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementGetPlayFabIDsFromSteamNamesRequest; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper() = default; + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest& model) : + ModelWrapper{ model }, + m_steamNames{ model.steamNames, model.steamNames + model.steamNamesCount } + { + SetModelPointers(); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper{ src.Model() } + { + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper&& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper{} + { + swap(*this, src); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& operator=(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper() = default; + + friend void swap(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& lhs, PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_steamNames, rhs.m_steamNames); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetSteamNames(CStringVector value) + { + m_steamNames = std::move(value); + this->m_model.steamNames = m_steamNames.empty() ? nullptr : m_steamNames.data(); + this->m_model.steamNamesCount = static_cast(m_steamNames.size()); + } + +private: + void SetModelPointers() + { + this->m_model.steamNames = m_steamNames.empty() ? nullptr : m_steamNames.data(); + } + + CStringVector m_steamNames; +}; + +template class Alloc = std::allocator> +class PFAccountManagementSteamNamePlayFabIdPairWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementSteamNamePlayFabIdPair; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementSteamNamePlayFabIdPairWrapper() = default; + + PFAccountManagementSteamNamePlayFabIdPairWrapper(const PFAccountManagementSteamNamePlayFabIdPair& model) : + ModelWrapper{ model }, + m_playFabId{ SafeString(model.playFabId) }, + m_steamName{ SafeString(model.steamName) } + { + SetModelPointers(); + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper(const PFAccountManagementSteamNamePlayFabIdPairWrapper& src) : + PFAccountManagementSteamNamePlayFabIdPairWrapper{ src.Model() } + { + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper(PFAccountManagementSteamNamePlayFabIdPairWrapper&& src) : + PFAccountManagementSteamNamePlayFabIdPairWrapper{} + { + swap(*this, src); + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper& operator=(PFAccountManagementSteamNamePlayFabIdPairWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementSteamNamePlayFabIdPairWrapper() = default; + + friend void swap(PFAccountManagementSteamNamePlayFabIdPairWrapper& lhs, PFAccountManagementSteamNamePlayFabIdPairWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_playFabId, rhs.m_playFabId); + swap(lhs.m_steamName, rhs.m_steamName); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetPlayFabId(String value) + { + m_playFabId = std::move(value); + this->m_model.playFabId = m_playFabId.empty() ? nullptr : m_playFabId.data(); + } + + void SetSteamName(String value) + { + m_steamName = std::move(value); + this->m_model.steamName = m_steamName.empty() ? nullptr : m_steamName.data(); + } + +private: + void SetModelPointers() + { + this->m_model.playFabId = m_playFabId.empty() ? nullptr : m_playFabId.data(); + this->m_model.steamName = m_steamName.empty() ? nullptr : m_steamName.data(); + } + + String m_playFabId; + String m_steamName; +}; + +template class Alloc = std::allocator> +class PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementGetPlayFabIDsFromSteamNamesResult; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper() = default; + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& model) : + ModelWrapper{ model }, + m_data{ model.data, model.data + model.dataCount } + { + SetModelPointers(); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper{ src.Model() } + { + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper&& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper{} + { + swap(*this, src); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& operator=(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper() = default; + + friend void swap(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& lhs, PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_data, rhs.m_data); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetData(ModelVector, Alloc> value) + { + m_data = std::move(value); + this->m_model.data = m_data.empty() ? nullptr : m_data.data(); + this->m_model.dataCount = static_cast(m_data.size()); + } + +private: + void SetModelPointers() + { + this->m_model.data = m_data.empty() ? nullptr : m_data.data(); + } + + ModelVector, Alloc> m_data; +}; + template class Alloc = std::allocator> class PFAccountManagementGetPlayFabIDsFromTwitchIDsRequestWrapper : public ModelWrapper { diff --git a/Source/PlayFabServices/Include/Generated/playfab/services/cpp/LeaderboardsTypeWrappers.h b/Source/PlayFabServices/Include/Generated/playfab/services/cpp/LeaderboardsTypeWrappers.h index c997827..b4a6c5d 100644 --- a/Source/PlayFabServices/Include/Generated/playfab/services/cpp/LeaderboardsTypeWrappers.h +++ b/Source/PlayFabServices/Include/Generated/playfab/services/cpp/LeaderboardsTypeWrappers.h @@ -686,6 +686,11 @@ class PFLeaderboardsGetEntityLeaderboardResponseWrapper : public ModelWrapperm_model.columnsCount = static_cast(m_columns.size()); } + void SetEntryCount(uint32_t value) + { + this->m_model.entryCount = value; + } + void SetRankings(ModelVector, Alloc> value) { m_rankings = std::move(value); diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagement.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagement.h index ced56d3..eebfb32 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagement.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagement.h @@ -254,6 +254,8 @@ PF_API PFAccountManagementClientGetPlayFabIDsFromXboxLiveIDsGetResult( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLoginWithCustomIDAsync, ClientUnlinkCustomIDAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED or any of the global PlayFab Service /// errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -274,6 +276,8 @@ PF_API PFAccountManagementClientLinkCustomIDAsync( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLoginWithOpenIdConnectAsync, ClientUnlinkOpenIdConnectAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_INVALID_IDENTITY_PROVIDER_ID, E_PF_LINKED_IDENTIFIER_ALREADY_CLAIMED /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details @@ -295,6 +299,8 @@ PF_API PFAccountManagementClientLinkOpenIdConnectAsync( /// Result code for this API operation. /// /// This API is available on Win32, GDK, Linux, and macOS. +/// See also ClientLoginWithXboxAsync, ClientUnlinkXboxAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_ALREADY_LINKED, E_PF_EXPIRED_XBOX_LIVE_TOKEN, E_PF_INVALID_XBOX_LIVE_TOKEN, /// E_PF_LINKED_ACCOUNT_ALREADY_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling @@ -349,6 +355,8 @@ PF_API PFAccountManagementClientReportPlayerGetResult( /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientLinkCustomIDAsync, ClientLoginWithCustomIDAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED, E_PF_CUSTOM_ID_NOT_LINKED or any of the global PlayFab /// Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. @@ -391,6 +399,8 @@ PF_API PFAccountManagementClientUnlinkOpenIdConnectAsync( /// Result code for this API operation. /// /// This API is available on Win32, GDK, Linux, and macOS. +/// See also ClientLinkXboxAccountAsync. +/// /// Call to get the status of the operation. If the service call is unsuccessful, /// the async result will be E_PF_ACCOUNT_NOT_LINKED, E_PF_INVALID_XBOX_LIVE_TOKEN or any of the global /// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagementTypes.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagementTypes.h index d421171..58a9f73 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagementTypes.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFAccountManagementTypes.h @@ -852,6 +852,60 @@ typedef struct PFAccountManagementGetPlayFabIDsFromSteamIDsResult } PFAccountManagementGetPlayFabIDsFromSteamIDsResult; +/// +/// PFAccountManagementGetPlayFabIDsFromSteamNamesRequest data model. +/// +typedef struct PFAccountManagementGetPlayFabIDsFromSteamNamesRequest +{ + /// + /// Array of unique Steam identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + _Field_size_(steamNamesCount) const char* const* steamNames; + + /// + /// Count of steamNames + /// + uint32_t steamNamesCount; + +} PFAccountManagementGetPlayFabIDsFromSteamNamesRequest; + +/// +/// PFAccountManagementSteamNamePlayFabIdPair data model. +/// +typedef struct PFAccountManagementSteamNamePlayFabIdPair +{ + /// + /// (Optional) Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the + /// Steam identifier. + /// + _Maybenull_ _Null_terminated_ const char* playFabId; + + /// + /// (Optional) Unique Steam identifier for a user, also known as Steam persona name. + /// + _Maybenull_ _Null_terminated_ const char* steamName; + +} PFAccountManagementSteamNamePlayFabIdPair; + +/// +/// PFAccountManagementGetPlayFabIDsFromSteamNamesResult data model. For Steam identifiers which have +/// not been linked to PlayFab accounts, or if the user has not logged in recently, null will be returned. +/// +typedef struct PFAccountManagementGetPlayFabIDsFromSteamNamesResult +{ + /// + /// (Optional) Mapping of Steam identifiers to PlayFab identifiers. + /// + _Maybenull_ _Field_size_(dataCount) PFAccountManagementSteamNamePlayFabIdPair const* const* data; + + /// + /// Count of data + /// + uint32_t dataCount; + +} PFAccountManagementGetPlayFabIDsFromSteamNamesResult; + /// /// PFAccountManagementGetPlayFabIDsFromTwitchIDsRequest data model. /// diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCatalog.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCatalog.h index 3ced13d..449bea3 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCatalog.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCatalog.h @@ -41,8 +41,8 @@ PF_API PFCatalogCreateDraftItemAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service errors. See doc page -/// "Handling PlayFab Errors" for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service +/// errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCatalogCreateDraftItemGetResultSize( _Inout_ XAsyncBlock* async, @@ -59,8 +59,8 @@ PF_API PFCatalogCreateDraftItemGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service errors. See doc page -/// "Handling PlayFab Errors" for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND, E_PF_NOT_IMPLEMENTED or any of the global PlayFab Service +/// errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. @@ -931,8 +931,8 @@ PF_API PFCatalogUpdateDraftItemAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" -/// for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page +/// "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCatalogUpdateDraftItemGetResultSize( _Inout_ XAsyncBlock* async, @@ -949,8 +949,8 @@ PF_API PFCatalogUpdateDraftItemGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_DATABASE_THROUGHPUT_EXCEEDED, -/// E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" -/// for more details on error handling. +/// E_PF_INVALID_REQUEST, E_PF_ITEM_NOT_FOUND or any of the global PlayFab Service errors. See doc page +/// "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCloudScript.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCloudScript.h index 0d2c14c..7def865 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCloudScript.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFCloudScript.h @@ -168,10 +168,10 @@ PF_API PFCloudScriptExecuteFunctionAsync( /// The buffer size in bytes required for the result. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_ARGUMENT_SIZE_EXCEEDED, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, -/// E_PF_INVALID_ENTITY_TYPE or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EVENT_HUB_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, E_PF_INVALID_ENTITY_TYPE or any of the global +/// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFCloudScriptExecuteFunctionGetResultSize( _Inout_ XAsyncBlock* async, @@ -188,10 +188,10 @@ PF_API PFCloudScriptExecuteFunctionGetResultSize( /// The number of bytes in the provided buffer that were used. /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_ARGUMENT_SIZE_EXCEEDED, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, -/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, -/// E_PF_INVALID_ENTITY_TYPE or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EVENT_HUB_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_EXECUTION_TIME_LIMIT_EXCEEDED, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_HTTP_REQUEST_ERROR, E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_QUEUE_REQUEST_ERROR, +/// E_PF_CLOUD_SCRIPT_AZURE_FUNCTIONS_RETURN_SIZE_EXCEEDED, E_PF_INVALID_ENTITY_TYPE or any of the global +/// PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFFriends.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFFriends.h index 7e10fa3..87d4395 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFFriends.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFFriends.h @@ -24,6 +24,8 @@ extern "C" /// Result code for this API operation. /// /// This API is available on all platforms. +/// See also ClientGetFriendsListAsync, ClientSetFriendTagsAsync. +/// /// When the asynchronous task is complete, call to get /// the result. /// diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboards.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboards.h index 81f121b..75031c9 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboards.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboards.h @@ -14,7 +14,7 @@ extern "C" { /// -/// Get the friend leaderboard for the specified entity. A maximum of 100 friend entries are listed in +/// Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in /// the leaderboard. /// /// PFEntityHandle to use for authentication. @@ -38,8 +38,11 @@ PF_API PFLeaderboardsGetFriendLeaderboardForEntityAsync( /// XAsyncBlock for the async operation. /// The buffer size in bytes required for the result. /// -/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_TITLE, -/// E_PF_INVALID_ENTITY_TYPE, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_STATISTIC_NOT_FOUND +/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ACCOUNT_NOT_FOUND, +/// E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DOWNSTREAM_SERVICE_UNAVAILABLE, E_PF_EXPIRED_XBOX_LIVE_TOKEN, +/// E_PF_FACEBOOK_API_ERROR, E_PF_INVALID_ENTITY_TYPE, E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, +/// E_PF_INVALID_XBOX_LIVE_TOKEN, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_STATISTIC_NOT_FOUND, E_PF_XBOX_INACCESSIBLE, E_PF_XBOX_SERVICE_TOO_MANY_REQUESTS, E_PF_XBOX_XASS_EXCHANGE_FAILURE /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details /// on error handling. /// @@ -57,8 +60,11 @@ PF_API PFLeaderboardsGetFriendLeaderboardForEntityGetResultSize( /// Pointer to the result object. /// The number of bytes in the provided buffer that were used. /// -/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_TITLE, -/// E_PF_INVALID_ENTITY_TYPE, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_STATISTIC_NOT_FOUND +/// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_ACCOUNT_NOT_FOUND, +/// E_PF_API_NOT_ENABLED_FOR_TITLE, E_PF_DOWNSTREAM_SERVICE_UNAVAILABLE, E_PF_EXPIRED_XBOX_LIVE_TOKEN, +/// E_PF_FACEBOOK_API_ERROR, E_PF_INVALID_ENTITY_TYPE, E_PF_INVALID_SIGNATURE, E_PF_INVALID_SIGNATURE_TIME, +/// E_PF_INVALID_XBOX_LIVE_TOKEN, E_PF_LEADERBOARD_NOT_FOUND, E_PF_NO_LEADERBOARD_FOR_STATISTIC, E_PF_PLAYER_SECRET_NOT_CONFIGURED, +/// E_PF_STATISTIC_NOT_FOUND, E_PF_XBOX_INACCESSIBLE, E_PF_XBOX_SERVICE_TOO_MANY_REQUESTS, E_PF_XBOX_XASS_EXCHANGE_FAILURE /// or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details /// on error handling. /// diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboardsTypes.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboardsTypes.h index c8d0633..b11bafb 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboardsTypes.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFLeaderboardsTypes.h @@ -280,7 +280,7 @@ typedef struct PFLeaderboardsEntityLeaderboardEntry typedef struct PFLeaderboardsGetEntityLeaderboardResponse { /// - /// (Optional) Leaderboard columns describing the sort directions,. + /// (Optional) Leaderboard columns describing the sort directions. /// _Maybenull_ _Field_size_(columnsCount) PFLeaderboardsLeaderboardColumn const* const* columns; @@ -289,6 +289,11 @@ typedef struct PFLeaderboardsGetEntityLeaderboardResponse /// uint32_t columnsCount; + /// + /// The number of entries on the leaderboard. + /// + uint32_t entryCount; + /// /// (Optional) Individual entity rankings in the leaderboard, in sorted order by rank. /// diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFMultiplayerServerTypes.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFMultiplayerServerTypes.h index 2523bc7..5767c7d 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFMultiplayerServerTypes.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFMultiplayerServerTypes.h @@ -938,7 +938,7 @@ typedef struct PFMultiplayerServerPartyNetworkConfiguration _Maybenull_ _Null_terminated_ const char* directPeerConnectivityOptions; /// - /// The maximum number of devices allowed to connect to the network. Must be between 1 and 32, inclusive. + /// The maximum number of devices allowed to connect to the network. Must be between 1 and 128, inclusive. /// uint32_t maxDevices; diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFPlayerDataManagement.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFPlayerDataManagement.h index 7a3d22d..17fb80e 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFPlayerDataManagement.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFPlayerDataManagement.h @@ -26,7 +26,7 @@ extern "C" /// counter is incremented. If the Version parameter is provided, then this call will only return data /// if the current version on the system is greater than the value provided. If the Keys parameter is /// provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, -/// the full set of custom user data will be returned. +/// the full set of custom user data will be returned. See also ClientGetUserReadOnlyDataAsync, ClientUpdateUserDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -85,7 +85,7 @@ PF_API PFPlayerDataManagementClientGetUserDataGetResult( /// This API is available on all platforms. /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned /// will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user -/// data will be returned. +/// data will be returned. See also ClientGetUserPublisherReadOnlyDataAsync, ClientUpdateUserPublisherDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -146,7 +146,7 @@ PF_API PFPlayerDataManagementClientGetUserPublisherDataGetResult( /// This API is available on all platforms. /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned /// will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user -/// data will be returned. +/// data will be returned. See also ClientGetUserPublisherDataAsync, ClientUpdateUserPublisherDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -209,7 +209,7 @@ PF_API PFPlayerDataManagementClientGetUserPublisherReadOnlyDataGetResult( /// counter is incremented. If the Version parameter is provided, then this call will only return data /// if the current version on the system is greater than the value provided. If the Keys parameter is /// provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, -/// the full set of custom user data will be returned. +/// the full set of custom user data will be returned. See also ClientGetUserDataAsync, ClientUpdateUserDataAsync. /// /// When the asynchronous task is complete, call /// and to get the result. @@ -270,7 +270,8 @@ PF_API PFPlayerDataManagementClientGetUserReadOnlyDataGetResult( /// This function performs an additive update of the arbitrary strings containing the custom data for /// the user. In updating the custom data object, keys which already exist in the object will have their /// values overwritten, while keys with null values will be removed. New keys will be added, with the -/// given values. No other key-value pairs will be changed apart from those specified in the call. +/// given values. No other key-value pairs will be changed apart from those specified in the call. See +/// also ClientGetUserDataAsync, ClientGetUserReadOnlyDataAsync. /// /// When the asynchronous task is complete, call /// to get the result. @@ -308,7 +309,8 @@ PF_API PFPlayerDataManagementClientUpdateUserDataGetResult( /// This function performs an additive update of the arbitrary strings containing the custom data for /// the user. In updating the custom data object, keys which already exist in the object will have their /// values overwritten, while keys with null values will be removed. New keys will be added, with the -/// given values. No other key-value pairs will be changed apart from those specified in the call. +/// given values. No other key-value pairs will be changed apart from those specified in the call. See +/// also ClientGetUserPublisherDataAsync, ClientGetUserPublisherReadOnlyDataAsync. /// /// When the asynchronous task is complete, call /// to get the result. diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatistics.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatistics.h index 9f3208d..a02180c 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatistics.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatistics.h @@ -158,8 +158,8 @@ PF_API PFStatisticsUpdateStatisticsAsync( /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_GAME_CLIENT_ACCESS, /// E_PF_ENTITY_TYPE_MISMATCH_WITH_STAT_DEFINITION, E_PF_INVALID_ENTITY_TYPE, E_PF_NOT_AUTHORIZED, E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH, -/// E_PF_STATISTIC_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_STATISTIC_NOT_FOUND, E_PF_TRANSACTION_ALREADY_APPLIED or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// PF_API PFStatisticsUpdateStatisticsGetResultSize( _Inout_ XAsyncBlock* async, @@ -177,8 +177,8 @@ PF_API PFStatisticsUpdateStatisticsGetResultSize( /// /// Result code for this API operation. If the service call is unsuccessful, the result will be E_PF_API_NOT_ENABLED_FOR_GAME_CLIENT_ACCESS, /// E_PF_ENTITY_TYPE_MISMATCH_WITH_STAT_DEFINITION, E_PF_INVALID_ENTITY_TYPE, E_PF_NOT_AUTHORIZED, E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH, -/// E_PF_STATISTIC_NOT_FOUND or any of the global PlayFab Service errors. See doc page "Handling PlayFab -/// Errors" for more details on error handling. +/// E_PF_STATISTIC_NOT_FOUND, E_PF_TRANSACTION_ALREADY_APPLIED or any of the global PlayFab Service errors. +/// See doc page "Handling PlayFab Errors" for more details on error handling. /// /// /// result is a pointer within buffer and does not need to be freed separately. diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatisticsTypes.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatisticsTypes.h index 88bcf04..05398be 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatisticsTypes.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/PFStatisticsTypes.h @@ -77,7 +77,7 @@ typedef struct PFStatisticsCreateStatisticDefinitionRequest _Maybenull_ _Null_terminated_ const char* entityType; /// - /// Name of the statistic. Must be less than 50 characters. Restricted to a-Z, 0-9, '(', ')', '_', + /// Name of the statistic. Must be less than 150 characters. Restricted to a-Z, 0-9, '(', ')', '_', /// '-' and '.'. /// _Null_terminated_ const char* name; @@ -187,7 +187,7 @@ typedef struct PFStatisticsGetStatisticDefinitionRequest uint32_t customTagsCount; /// - /// Name of the statistic. Must be less than 50 characters. + /// Name of the statistic. Must be less than 150 characters. /// _Null_terminated_ const char* name; diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/AccountManagementTypeWrappers.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/AccountManagementTypeWrappers.h index e369595..f8ab6cf 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/AccountManagementTypeWrappers.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/AccountManagementTypeWrappers.h @@ -2814,6 +2814,198 @@ class PFAccountManagementGetPlayFabIDsFromSteamIDsResultWrapper : public ModelWr ModelVector, Alloc> m_data; }; +template class Alloc = std::allocator> +class PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementGetPlayFabIDsFromSteamNamesRequest; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper() = default; + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest& model) : + ModelWrapper{ model }, + m_steamNames{ model.steamNames, model.steamNames + model.steamNamesCount } + { + SetModelPointers(); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper{ src.Model() } + { + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper&& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper{} + { + swap(*this, src); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& operator=(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper() = default; + + friend void swap(PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& lhs, PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_steamNames, rhs.m_steamNames); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetSteamNames(CStringVector value) + { + m_steamNames = std::move(value); + this->m_model.steamNames = m_steamNames.empty() ? nullptr : m_steamNames.data(); + this->m_model.steamNamesCount = static_cast(m_steamNames.size()); + } + +private: + void SetModelPointers() + { + this->m_model.steamNames = m_steamNames.empty() ? nullptr : m_steamNames.data(); + } + + CStringVector m_steamNames; +}; + +template class Alloc = std::allocator> +class PFAccountManagementSteamNamePlayFabIdPairWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementSteamNamePlayFabIdPair; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementSteamNamePlayFabIdPairWrapper() = default; + + PFAccountManagementSteamNamePlayFabIdPairWrapper(const PFAccountManagementSteamNamePlayFabIdPair& model) : + ModelWrapper{ model }, + m_playFabId{ SafeString(model.playFabId) }, + m_steamName{ SafeString(model.steamName) } + { + SetModelPointers(); + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper(const PFAccountManagementSteamNamePlayFabIdPairWrapper& src) : + PFAccountManagementSteamNamePlayFabIdPairWrapper{ src.Model() } + { + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper(PFAccountManagementSteamNamePlayFabIdPairWrapper&& src) : + PFAccountManagementSteamNamePlayFabIdPairWrapper{} + { + swap(*this, src); + } + + PFAccountManagementSteamNamePlayFabIdPairWrapper& operator=(PFAccountManagementSteamNamePlayFabIdPairWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementSteamNamePlayFabIdPairWrapper() = default; + + friend void swap(PFAccountManagementSteamNamePlayFabIdPairWrapper& lhs, PFAccountManagementSteamNamePlayFabIdPairWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_playFabId, rhs.m_playFabId); + swap(lhs.m_steamName, rhs.m_steamName); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetPlayFabId(String value) + { + m_playFabId = std::move(value); + this->m_model.playFabId = m_playFabId.empty() ? nullptr : m_playFabId.data(); + } + + void SetSteamName(String value) + { + m_steamName = std::move(value); + this->m_model.steamName = m_steamName.empty() ? nullptr : m_steamName.data(); + } + +private: + void SetModelPointers() + { + this->m_model.playFabId = m_playFabId.empty() ? nullptr : m_playFabId.data(); + this->m_model.steamName = m_steamName.empty() ? nullptr : m_steamName.data(); + } + + String m_playFabId; + String m_steamName; +}; + +template class Alloc = std::allocator> +class PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper : public ModelWrapper +{ +public: + using ModelType = PFAccountManagementGetPlayFabIDsFromSteamNamesResult; + using String = typename std::basic_string, Alloc>; + template using Vector = typename std::vector>; + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper() = default; + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& model) : + ModelWrapper{ model }, + m_data{ model.data, model.data + model.dataCount } + { + SetModelPointers(); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(const PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper{ src.Model() } + { + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper&& src) : + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper{} + { + swap(*this, src); + } + + PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& operator=(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper src) + { + swap(*this, src); + return *this; + } + + virtual ~PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper() = default; + + friend void swap(PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& lhs, PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper& rhs) + { + using std::swap; + swap(lhs.m_model, rhs.m_model); + swap(lhs.m_data, rhs.m_data); + lhs.SetModelPointers(); + rhs.SetModelPointers(); + } + + void SetData(ModelVector, Alloc> value) + { + m_data = std::move(value); + this->m_model.data = m_data.empty() ? nullptr : m_data.data(); + this->m_model.dataCount = static_cast(m_data.size()); + } + +private: + void SetModelPointers() + { + this->m_model.data = m_data.empty() ? nullptr : m_data.data(); + } + + ModelVector, Alloc> m_data; +}; + template class Alloc = std::allocator> class PFAccountManagementGetPlayFabIDsFromTwitchIDsRequestWrapper : public ModelWrapper { diff --git a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/LeaderboardsTypeWrappers.h b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/LeaderboardsTypeWrappers.h index c997827..b4a6c5d 100644 --- a/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/LeaderboardsTypeWrappers.h +++ b/Source/PlayFabServices/Include/GeneratedGdk/playfab/services/cpp/LeaderboardsTypeWrappers.h @@ -686,6 +686,11 @@ class PFLeaderboardsGetEntityLeaderboardResponseWrapper : public ModelWrapperm_model.columnsCount = static_cast(m_columns.size()); } + void SetEntryCount(uint32_t value) + { + this->m_model.entryCount = value; + } + void SetRankings(ModelVector, Alloc> value) { m_rankings = std::move(value); diff --git a/Source/PlayFabServices/Source/Generated/AccountManagement.cpp b/Source/PlayFabServices/Source/Generated/AccountManagement.cpp index 6c27436..89ef88c 100644 --- a/Source/PlayFabServices/Source/Generated/AccountManagement.cpp +++ b/Source/PlayFabServices/Source/Generated/AccountManagement.cpp @@ -566,6 +566,41 @@ AsyncOp AccountManagementAPI::ClientGetPlayFabI }); } +AsyncOp AccountManagementAPI::ClientGetPlayFabIDsFromSteamNames( + Entity const& entity, + const GetPlayFabIDsFromSteamNamesRequest& request, + RunContext rc +) +{ + const char* path{ "/Client/GetPlayFabIDsFromSteamNames" }; + JsonValue requestBody{ request.ToJson() }; + + auto requestOp = ServicesHttpClient::MakeEntityRequest( + ServicesCacheId::AccountManagementClientGetPlayFabIDsFromSteamNames, + entity, + path, + requestBody, + std::move(rc) + ); + + return requestOp.Then([](Result result) -> Result + { + RETURN_IF_FAILED(result.hr); + + auto serviceResponse = result.ExtractPayload(); + if (serviceResponse.HttpCode >= 200 && serviceResponse.HttpCode < 300) + { + GetPlayFabIDsFromSteamNamesResult resultModel; + RETURN_IF_FAILED(resultModel.FromJson(serviceResponse.Data)); + return resultModel; + } + else + { + return Result{ ServiceErrorToHR(serviceResponse.ErrorCode), std::move(serviceResponse.ErrorMessage) }; + } + }); +} + AsyncOp AccountManagementAPI::ClientGetPlayFabIDsFromTwitchIDs( Entity const& entity, const GetPlayFabIDsFromTwitchIDsRequest& request, @@ -2312,6 +2347,41 @@ AsyncOp AccountManagementAPI::ServerGetPlayFabI }); } +AsyncOp AccountManagementAPI::ServerGetPlayFabIDsFromSteamNames( + Entity const& entity, + const GetPlayFabIDsFromSteamNamesRequest& request, + RunContext rc +) +{ + const char* path{ "/Server/GetPlayFabIDsFromSteamNames" }; + JsonValue requestBody{ request.ToJson() }; + + auto requestOp = ServicesHttpClient::MakeSecretKeyRequest( + ServicesCacheId::AccountManagementServerGetPlayFabIDsFromSteamNames, + entity, + path, + requestBody, + std::move(rc) + ); + + return requestOp.Then([](Result result) -> Result + { + RETURN_IF_FAILED(result.hr); + + auto serviceResponse = result.ExtractPayload(); + if (serviceResponse.HttpCode >= 200 && serviceResponse.HttpCode < 300) + { + GetPlayFabIDsFromSteamNamesResult resultModel; + RETURN_IF_FAILED(resultModel.FromJson(serviceResponse.Data)); + return resultModel; + } + else + { + return Result{ ServiceErrorToHR(serviceResponse.ErrorCode), std::move(serviceResponse.ErrorMessage) }; + } + }); +} + AsyncOp AccountManagementAPI::ServerGetPlayFabIDsFromTwitchIDs( Entity const& entity, const GetPlayFabIDsFromTwitchIDsRequest& request, diff --git a/Source/PlayFabServices/Source/Generated/AccountManagement.h b/Source/PlayFabServices/Source/Generated/AccountManagement.h index 0ecd522..146b509 100644 --- a/Source/PlayFabServices/Source/Generated/AccountManagement.h +++ b/Source/PlayFabServices/Source/Generated/AccountManagement.h @@ -36,6 +36,7 @@ class AccountManagementAPI static AsyncOp ClientGetPlayFabIDsFromPSNAccountIDs(Entity const& entity, const GetPlayFabIDsFromPSNAccountIDsRequest& request, RunContext rc); static AsyncOp ClientGetPlayFabIDsFromPSNOnlineIDs(Entity const& entity, const GetPlayFabIDsFromPSNOnlineIDsRequest& request, RunContext rc); static AsyncOp ClientGetPlayFabIDsFromSteamIDs(Entity const& entity, const GetPlayFabIDsFromSteamIDsRequest& request, RunContext rc); + static AsyncOp ClientGetPlayFabIDsFromSteamNames(Entity const& entity, const GetPlayFabIDsFromSteamNamesRequest& request, RunContext rc); static AsyncOp ClientGetPlayFabIDsFromTwitchIDs(Entity const& entity, const GetPlayFabIDsFromTwitchIDsRequest& request, RunContext rc); static AsyncOp ClientGetPlayFabIDsFromXboxLiveIDs(Entity const& entity, const GetPlayFabIDsFromXboxLiveIDsRequest& request, RunContext rc); static AsyncOp ClientLinkAndroidDeviceID(Entity const& entity, const LinkAndroidDeviceIDRequest& request, RunContext rc); @@ -88,6 +89,7 @@ class AccountManagementAPI static AsyncOp ServerGetPlayFabIDsFromPSNAccountIDs(Entity const& entity, const GetPlayFabIDsFromPSNAccountIDsRequest& request, RunContext rc); static AsyncOp ServerGetPlayFabIDsFromPSNOnlineIDs(Entity const& entity, const GetPlayFabIDsFromPSNOnlineIDsRequest& request, RunContext rc); static AsyncOp ServerGetPlayFabIDsFromSteamIDs(Entity const& entity, const GetPlayFabIDsFromSteamIDsRequest& request, RunContext rc); + static AsyncOp ServerGetPlayFabIDsFromSteamNames(Entity const& entity, const GetPlayFabIDsFromSteamNamesRequest& request, RunContext rc); static AsyncOp ServerGetPlayFabIDsFromTwitchIDs(Entity const& entity, const GetPlayFabIDsFromTwitchIDsRequest& request, RunContext rc); static AsyncOp ServerGetPlayFabIDsFromXboxLiveIDs(Entity const& entity, const GetPlayFabIDsFromXboxLiveIDsRequest& request, RunContext rc); static AsyncOp ServerGetServerCustomIDsFromPlayFabIDs(Entity const& entity, const GetServerCustomIDsFromPlayFabIDsRequest& request, RunContext rc); diff --git a/Source/PlayFabServices/Source/Generated/AccountManagementTypes.cpp b/Source/PlayFabServices/Source/Generated/AccountManagementTypes.cpp index bb975e0..77251de 100644 --- a/Source/PlayFabServices/Source/Generated/AccountManagementTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/AccountManagementTypes.cpp @@ -15,7 +15,7 @@ JsonValue AddOrUpdateContactEmailRequest::ToJson() const JsonValue AddOrUpdateContactEmailRequest::ToJson(const PFAccountManagementAddOrUpdateContactEmailRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EmailAddress", input.emailAddress); return output; @@ -28,7 +28,7 @@ JsonValue AddUsernamePasswordRequest::ToJson() const JsonValue AddUsernamePasswordRequest::ToJson(const PFAccountManagementAddUsernamePasswordRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "Password", input.password); @@ -69,7 +69,7 @@ HRESULT AddUsernamePasswordResult::Copy(const PFAccountManagementAddUsernamePass { output = input; { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } @@ -83,7 +83,7 @@ JsonValue GetAccountInfoRequest::ToJson() const JsonValue GetAccountInfoRequest::ToJson(const PFAccountManagementGetAccountInfoRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "TitleDisplayName", input.titleDisplayName); @@ -127,7 +127,7 @@ HRESULT GetAccountInfoResult::Copy(const PFAccountManagementGetAccountInfoResult { output = input; { - auto propCopyResult = buffer.CopyTo(input.accountInfo); + auto propCopyResult = buffer.CopyTo(input.accountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.accountInfo = propCopyResult.ExtractPayload(); } @@ -141,7 +141,7 @@ JsonValue GetPlayerCombinedInfoRequest::ToJson() const JsonValue GetPlayerCombinedInfoRequest::ToJson(const PFAccountManagementGetPlayerCombinedInfoRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "InfoRequestParameters", input.infoRequestParameters); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -192,12 +192,12 @@ HRESULT GetPlayerCombinedInfoResult::Copy(const PFAccountManagementGetPlayerComb { output = input; { - auto propCopyResult = buffer.CopyTo(input.infoResultPayload); + auto propCopyResult = buffer.CopyTo(input.infoResultPayload); RETURN_IF_FAILED(propCopyResult.hr); output.infoResultPayload = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -211,7 +211,7 @@ JsonValue GetPlayerProfileRequest::ToJson() const JsonValue GetPlayerProfileRequest::ToJson(const PFAccountManagementGetPlayerProfileRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "ProfileConstraints", input.profileConstraints); @@ -254,7 +254,7 @@ HRESULT GetPlayerProfileResult::Copy(const PFAccountManagementGetPlayerProfileRe { output = input; { - auto propCopyResult = buffer.CopyTo(input.playerProfile); + auto propCopyResult = buffer.CopyTo(input.playerProfile); RETURN_IF_FAILED(propCopyResult.hr); output.playerProfile = propCopyResult.ExtractPayload(); } @@ -268,7 +268,7 @@ JsonValue GetPlayFabIDsFromFacebookIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromFacebookIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromFacebookIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "FacebookIDs", input.facebookIDs, input.facebookIDsCount); return output; } @@ -314,12 +314,12 @@ HRESULT FacebookPlayFabIdPair::Copy(const PFAccountManagementFacebookPlayFabIdPa { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookId); + auto propCopyResult = buffer.CopyTo(input.facebookId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -374,7 +374,7 @@ JsonValue GetPlayFabIDsFromFacebookInstantGamesIdsRequest::ToJson() const JsonValue GetPlayFabIDsFromFacebookInstantGamesIdsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromFacebookInstantGamesIdsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "FacebookInstantGamesIds", input.facebookInstantGamesIds, input.facebookInstantGamesIdsCount); return output; } @@ -420,12 +420,12 @@ HRESULT FacebookInstantGamesPlayFabIdPair::Copy(const PFAccountManagementFaceboo { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); + auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInstantGamesId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -480,7 +480,7 @@ JsonValue GetPlayFabIDsFromGameCenterIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromGameCenterIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromGameCenterIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "GameCenterIDs", input.gameCenterIDs, input.gameCenterIDsCount); return output; } @@ -526,12 +526,12 @@ HRESULT GameCenterPlayFabIdPair::Copy(const PFAccountManagementGameCenterPlayFab { output = input; { - auto propCopyResult = buffer.CopyTo(input.gameCenterId); + auto propCopyResult = buffer.CopyTo(input.gameCenterId); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -586,7 +586,7 @@ JsonValue GetPlayFabIDsFromGoogleIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromGoogleIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromGoogleIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "GoogleIDs", input.googleIDs, input.googleIDsCount); return output; } @@ -632,12 +632,12 @@ HRESULT GooglePlayFabIdPair::Copy(const PFAccountManagementGooglePlayFabIdPair& { output = input; { - auto propCopyResult = buffer.CopyTo(input.googleId); + auto propCopyResult = buffer.CopyTo(input.googleId); RETURN_IF_FAILED(propCopyResult.hr); output.googleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -692,7 +692,7 @@ JsonValue GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "GooglePlayGamesPlayerIDs", input.googlePlayGamesPlayerIDs, input.googlePlayGamesPlayerIDsCount); return output; } @@ -738,12 +738,12 @@ HRESULT GooglePlayGamesPlayFabIdPair::Copy(const PFAccountManagementGooglePlayGa { output = input; { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -798,7 +798,7 @@ JsonValue GetPlayFabIDsFromKongregateIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromKongregateIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromKongregateIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "KongregateIDs", input.kongregateIDs, input.kongregateIDsCount); return output; } @@ -844,12 +844,12 @@ HRESULT KongregatePlayFabIdPair::Copy(const PFAccountManagementKongregatePlayFab { output = input; { - auto propCopyResult = buffer.CopyTo(input.kongregateId); + auto propCopyResult = buffer.CopyTo(input.kongregateId); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -904,7 +904,7 @@ JsonValue GetPlayFabIDsFromNintendoServiceAccountIdsRequest::ToJson() const JsonValue GetPlayFabIDsFromNintendoServiceAccountIdsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromNintendoServiceAccountIdsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "NintendoAccountIds", input.nintendoAccountIds, input.nintendoAccountIdsCount); return output; } @@ -950,12 +950,12 @@ HRESULT NintendoServiceAccountPlayFabIdPair::Copy(const PFAccountManagementNinte { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoServiceAccountId); + auto propCopyResult = buffer.CopyTo(input.nintendoServiceAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoServiceAccountId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -1010,7 +1010,7 @@ JsonValue GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest::ToJson() const JsonValue GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromNintendoSwitchDeviceIdsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "NintendoSwitchDeviceIds", input.nintendoSwitchDeviceIds, input.nintendoSwitchDeviceIdsCount); return output; } @@ -1056,12 +1056,12 @@ HRESULT NintendoSwitchPlayFabIdPair::Copy(const PFAccountManagementNintendoSwitc { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchDeviceId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -1116,7 +1116,7 @@ JsonValue GetPlayFabIDsFromPSNAccountIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromPSNAccountIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromPSNAccountIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "IssuerId", input.issuerId); JsonUtils::ObjectAddMemberArray(output, "PSNAccountIDs", input.PSNAccountIDs, input.PSNAccountIDsCount); return output; @@ -1163,12 +1163,12 @@ HRESULT PSNAccountPlayFabIdPair::Copy(const PFAccountManagementPSNAccountPlayFab { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.PSNAccountId); + auto propCopyResult = buffer.CopyTo(input.PSNAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.PSNAccountId = propCopyResult.ExtractPayload(); } @@ -1223,7 +1223,7 @@ JsonValue GetPlayFabIDsFromPSNOnlineIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromPSNOnlineIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromPSNOnlineIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "IssuerId", input.issuerId); JsonUtils::ObjectAddMemberArray(output, "PSNOnlineIDs", input.PSNOnlineIDs, input.PSNOnlineIDsCount); return output; @@ -1270,12 +1270,12 @@ HRESULT PSNOnlinePlayFabIdPair::Copy(const PFAccountManagementPSNOnlinePlayFabId { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.PSNOnlineId); + auto propCopyResult = buffer.CopyTo(input.PSNOnlineId); RETURN_IF_FAILED(propCopyResult.hr); output.PSNOnlineId = propCopyResult.ExtractPayload(); } @@ -1330,7 +1330,7 @@ JsonValue GetPlayFabIDsFromSteamIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromSteamIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromSteamIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "SteamStringIDs", input.steamStringIDs, input.steamStringIDsCount); return output; } @@ -1376,12 +1376,12 @@ HRESULT SteamPlayFabIdPair::Copy(const PFAccountManagementSteamPlayFabIdPair& in { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamStringId); + auto propCopyResult = buffer.CopyTo(input.steamStringId); RETURN_IF_FAILED(propCopyResult.hr); output.steamStringId = propCopyResult.ExtractPayload(); } @@ -1429,6 +1429,112 @@ HRESULT GetPlayFabIDsFromSteamIDsResult::Copy(const PFAccountManagementGetPlayFa return S_OK; } +JsonValue GetPlayFabIDsFromSteamNamesRequest::ToJson() const +{ + return GetPlayFabIDsFromSteamNamesRequest::ToJson(this->Model()); +} + +JsonValue GetPlayFabIDsFromSteamNamesRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest& input) +{ + JsonValue output { JsonValue::object() }; + JsonUtils::ObjectAddMemberArray(output, "SteamNames", input.steamNames, input.steamNamesCount); + return output; +} + +HRESULT SteamNamePlayFabIdPair::FromJson(const JsonValue& input) +{ + String playFabId{}; + RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "PlayFabId", playFabId)); + this->SetPlayFabId(std::move(playFabId)); + + String steamName{}; + RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "SteamName", steamName)); + this->SetSteamName(std::move(steamName)); + + return S_OK; +} + +size_t SteamNamePlayFabIdPair::RequiredBufferSize() const +{ + return RequiredBufferSize(this->Model()); +} + +Result SteamNamePlayFabIdPair::Copy(ModelBuffer& buffer) const +{ + return buffer.CopyTo(&this->Model()); +} + +size_t SteamNamePlayFabIdPair::RequiredBufferSize(const PFAccountManagementSteamNamePlayFabIdPair& model) +{ + size_t requiredSize{ alignof(ModelType) + sizeof(ModelType) }; + if (model.playFabId) + { + requiredSize += (std::strlen(model.playFabId) + 1); + } + if (model.steamName) + { + requiredSize += (std::strlen(model.steamName) + 1); + } + return requiredSize; +} + +HRESULT SteamNamePlayFabIdPair::Copy(const PFAccountManagementSteamNamePlayFabIdPair& input, PFAccountManagementSteamNamePlayFabIdPair& output, ModelBuffer& buffer) +{ + output = input; + { + auto propCopyResult = buffer.CopyTo(input.playFabId); + RETURN_IF_FAILED(propCopyResult.hr); + output.playFabId = propCopyResult.ExtractPayload(); + } + { + auto propCopyResult = buffer.CopyTo(input.steamName); + RETURN_IF_FAILED(propCopyResult.hr); + output.steamName = propCopyResult.ExtractPayload(); + } + return S_OK; +} + +HRESULT GetPlayFabIDsFromSteamNamesResult::FromJson(const JsonValue& input) +{ + ModelVector data{}; + RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "Data", data)); + this->SetData(std::move(data)); + + return S_OK; +} + +size_t GetPlayFabIDsFromSteamNamesResult::RequiredBufferSize() const +{ + return RequiredBufferSize(this->Model()); +} + +Result GetPlayFabIDsFromSteamNamesResult::Copy(ModelBuffer& buffer) const +{ + return buffer.CopyTo(&this->Model()); +} + +size_t GetPlayFabIDsFromSteamNamesResult::RequiredBufferSize(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& model) +{ + size_t requiredSize{ alignof(ModelType) + sizeof(ModelType) }; + requiredSize += (alignof(PFAccountManagementSteamNamePlayFabIdPair*) + sizeof(PFAccountManagementSteamNamePlayFabIdPair*) * model.dataCount); + for (size_t i = 0; i < model.dataCount; ++i) + { + requiredSize += SteamNamePlayFabIdPair::RequiredBufferSize(*model.data[i]); + } + return requiredSize; +} + +HRESULT GetPlayFabIDsFromSteamNamesResult::Copy(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& input, PFAccountManagementGetPlayFabIDsFromSteamNamesResult& output, ModelBuffer& buffer) +{ + output = input; + { + auto propCopyResult = buffer.CopyToArray(input.data, input.dataCount); + RETURN_IF_FAILED(propCopyResult.hr); + output.data = propCopyResult.ExtractPayload(); + } + return S_OK; +} + JsonValue GetPlayFabIDsFromTwitchIDsRequest::ToJson() const { return GetPlayFabIDsFromTwitchIDsRequest::ToJson(this->Model()); @@ -1436,7 +1542,7 @@ JsonValue GetPlayFabIDsFromTwitchIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromTwitchIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromTwitchIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "TwitchIds", input.twitchIds, input.twitchIdsCount); return output; } @@ -1482,12 +1588,12 @@ HRESULT TwitchPlayFabIdPair::Copy(const PFAccountManagementTwitchPlayFabIdPair& { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.twitchId); + auto propCopyResult = buffer.CopyTo(input.twitchId); RETURN_IF_FAILED(propCopyResult.hr); output.twitchId = propCopyResult.ExtractPayload(); } @@ -1542,7 +1648,7 @@ JsonValue GetPlayFabIDsFromXboxLiveIDsRequest::ToJson() const JsonValue GetPlayFabIDsFromXboxLiveIDsRequest::ToJson(const PFAccountManagementGetPlayFabIDsFromXboxLiveIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Sandbox", input.sandbox); JsonUtils::ObjectAddMemberArray(output, "XboxLiveAccountIDs", input.xboxLiveAccountIDs, input.xboxLiveAccountIDsCount); return output; @@ -1589,12 +1695,12 @@ HRESULT XboxLiveAccountPlayFabIdPair::Copy(const PFAccountManagementXboxLiveAcco { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxLiveAccountId); + auto propCopyResult = buffer.CopyTo(input.xboxLiveAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.xboxLiveAccountId = propCopyResult.ExtractPayload(); } @@ -1649,7 +1755,7 @@ JsonValue LinkAndroidDeviceIDRequest::ToJson() const JsonValue LinkAndroidDeviceIDRequest::ToJson(const PFAccountManagementLinkAndroidDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AndroidDevice", input.androidDevice); JsonUtils::ObjectAddMember(output, "AndroidDeviceId", input.androidDeviceId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -1665,7 +1771,7 @@ JsonValue LinkAppleRequest::ToJson() const JsonValue LinkAppleRequest::ToJson(const PFAccountManagementLinkAppleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "IdentityToken", input.identityToken); @@ -1679,7 +1785,7 @@ JsonValue LinkCustomIDRequest::ToJson() const JsonValue LinkCustomIDRequest::ToJson(const PFAccountManagementLinkCustomIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CustomId", input.customId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1693,7 +1799,7 @@ JsonValue LinkFacebookAccountRequest::ToJson() const JsonValue LinkFacebookAccountRequest::ToJson(const PFAccountManagementLinkFacebookAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AccessToken", input.accessToken); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1707,7 +1813,7 @@ JsonValue LinkFacebookInstantGamesIdRequest::ToJson() const JsonValue LinkFacebookInstantGamesIdRequest::ToJson(const PFAccountManagementLinkFacebookInstantGamesIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "FacebookInstantGamesSignature", input.facebookInstantGamesSignature); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1721,7 +1827,7 @@ JsonValue LinkGameCenterAccountRequest::ToJson() const JsonValue LinkGameCenterAccountRequest::ToJson(const PFAccountManagementLinkGameCenterAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "GameCenterId", input.gameCenterId); @@ -1739,7 +1845,7 @@ JsonValue LinkGoogleAccountRequest::ToJson() const JsonValue LinkGoogleAccountRequest::ToJson(const PFAccountManagementLinkGoogleAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "ServerAuthCode", input.serverAuthCode); @@ -1753,7 +1859,7 @@ JsonValue LinkGooglePlayGamesServicesAccountRequest::ToJson() const JsonValue LinkGooglePlayGamesServicesAccountRequest::ToJson(const PFAccountManagementLinkGooglePlayGamesServicesAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "ServerAuthCode", input.serverAuthCode); @@ -1767,7 +1873,7 @@ JsonValue LinkIOSDeviceIDRequest::ToJson() const JsonValue LinkIOSDeviceIDRequest::ToJson(const PFAccountManagementLinkIOSDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DeviceId", input.deviceId); JsonUtils::ObjectAddMember(output, "DeviceModel", input.deviceModel); @@ -1783,7 +1889,7 @@ JsonValue LinkKongregateAccountRequest::ToJson() const JsonValue LinkKongregateAccountRequest::ToJson(const PFAccountManagementLinkKongregateAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthTicket", input.authTicket); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1798,7 +1904,7 @@ JsonValue ClientLinkNintendoServiceAccountRequest::ToJson() const JsonValue ClientLinkNintendoServiceAccountRequest::ToJson(const PFAccountManagementClientLinkNintendoServiceAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "IdentityToken", input.identityToken); @@ -1812,7 +1918,7 @@ JsonValue ClientLinkNintendoSwitchDeviceIdRequest::ToJson() const JsonValue ClientLinkNintendoSwitchDeviceIdRequest::ToJson(const PFAccountManagementClientLinkNintendoSwitchDeviceIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "NintendoSwitchDeviceId", input.nintendoSwitchDeviceId); @@ -1826,7 +1932,7 @@ JsonValue LinkOpenIdConnectRequest::ToJson() const JsonValue LinkOpenIdConnectRequest::ToJson(const PFAccountManagementLinkOpenIdConnectRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConnectionId", input.connectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1841,7 +1947,7 @@ JsonValue ClientLinkPSNAccountRequest::ToJson() const JsonValue ClientLinkPSNAccountRequest::ToJson(const PFAccountManagementClientLinkPSNAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthCode", input.authCode); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1857,7 +1963,7 @@ JsonValue LinkSteamAccountRequest::ToJson() const JsonValue LinkSteamAccountRequest::ToJson(const PFAccountManagementLinkSteamAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "SteamTicket", input.steamTicket); @@ -1872,7 +1978,7 @@ JsonValue LinkTwitchAccountRequest::ToJson() const JsonValue LinkTwitchAccountRequest::ToJson(const PFAccountManagementLinkTwitchAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AccessToken", input.accessToken); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -1886,7 +1992,7 @@ JsonValue ClientLinkXboxAccountRequest::ToJson() const JsonValue ClientLinkXboxAccountRequest::ToJson(const PFAccountManagementClientLinkXboxAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); #if HC_PLATFORM != HC_PLATFORM_GDK @@ -1902,7 +2008,7 @@ JsonValue RemoveContactEmailRequest::ToJson() const JsonValue RemoveContactEmailRequest::ToJson(const PFAccountManagementRemoveContactEmailRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -1914,7 +2020,7 @@ JsonValue ReportPlayerClientRequest::ToJson() const JsonValue ReportPlayerClientRequest::ToJson(const PFAccountManagementReportPlayerClientRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Comment", input.comment); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ReporteeId", input.reporteeId); @@ -1958,7 +2064,7 @@ JsonValue SendAccountRecoveryEmailRequest::ToJson() const JsonValue SendAccountRecoveryEmailRequest::ToJson(const PFAccountManagementSendAccountRecoveryEmailRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "EmailTemplateId", input.emailTemplateId); @@ -1973,7 +2079,7 @@ JsonValue UnlinkAndroidDeviceIDRequest::ToJson() const JsonValue UnlinkAndroidDeviceIDRequest::ToJson(const PFAccountManagementUnlinkAndroidDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AndroidDeviceId", input.androidDeviceId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -1986,7 +2092,7 @@ JsonValue UnlinkAppleRequest::ToJson() const JsonValue UnlinkAppleRequest::ToJson(const PFAccountManagementUnlinkAppleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -1998,7 +2104,7 @@ JsonValue UnlinkCustomIDRequest::ToJson() const JsonValue UnlinkCustomIDRequest::ToJson(const PFAccountManagementUnlinkCustomIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CustomId", input.customId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -2011,7 +2117,7 @@ JsonValue UnlinkFacebookAccountRequest::ToJson() const JsonValue UnlinkFacebookAccountRequest::ToJson(const PFAccountManagementUnlinkFacebookAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2023,7 +2129,7 @@ JsonValue UnlinkFacebookInstantGamesIdRequest::ToJson() const JsonValue UnlinkFacebookInstantGamesIdRequest::ToJson(const PFAccountManagementUnlinkFacebookInstantGamesIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "FacebookInstantGamesId", input.facebookInstantGamesId); return output; @@ -2036,7 +2142,7 @@ JsonValue UnlinkGameCenterAccountRequest::ToJson() const JsonValue UnlinkGameCenterAccountRequest::ToJson(const PFAccountManagementUnlinkGameCenterAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2048,7 +2154,7 @@ JsonValue UnlinkGoogleAccountRequest::ToJson() const JsonValue UnlinkGoogleAccountRequest::ToJson(const PFAccountManagementUnlinkGoogleAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2060,7 +2166,7 @@ JsonValue UnlinkGooglePlayGamesServicesAccountRequest::ToJson() const JsonValue UnlinkGooglePlayGamesServicesAccountRequest::ToJson(const PFAccountManagementUnlinkGooglePlayGamesServicesAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2072,7 +2178,7 @@ JsonValue UnlinkIOSDeviceIDRequest::ToJson() const JsonValue UnlinkIOSDeviceIDRequest::ToJson(const PFAccountManagementUnlinkIOSDeviceIDRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DeviceId", input.deviceId); return output; @@ -2085,7 +2191,7 @@ JsonValue UnlinkKongregateAccountRequest::ToJson() const JsonValue UnlinkKongregateAccountRequest::ToJson(const PFAccountManagementUnlinkKongregateAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2097,7 +2203,7 @@ JsonValue ClientUnlinkNintendoServiceAccountRequest::ToJson() const JsonValue ClientUnlinkNintendoServiceAccountRequest::ToJson(const PFAccountManagementClientUnlinkNintendoServiceAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2109,7 +2215,7 @@ JsonValue ClientUnlinkNintendoSwitchDeviceIdRequest::ToJson() const JsonValue ClientUnlinkNintendoSwitchDeviceIdRequest::ToJson(const PFAccountManagementClientUnlinkNintendoSwitchDeviceIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "NintendoSwitchDeviceId", input.nintendoSwitchDeviceId); return output; @@ -2122,7 +2228,7 @@ JsonValue UnlinkOpenIdConnectRequest::ToJson() const JsonValue UnlinkOpenIdConnectRequest::ToJson(const PFAccountManagementUnlinkOpenIdConnectRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConnectionId", input.connectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -2135,7 +2241,7 @@ JsonValue ClientUnlinkPSNAccountRequest::ToJson() const JsonValue ClientUnlinkPSNAccountRequest::ToJson(const PFAccountManagementClientUnlinkPSNAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2147,7 +2253,7 @@ JsonValue UnlinkSteamAccountRequest::ToJson() const JsonValue UnlinkSteamAccountRequest::ToJson(const PFAccountManagementUnlinkSteamAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2159,7 +2265,7 @@ JsonValue UnlinkTwitchAccountRequest::ToJson() const JsonValue UnlinkTwitchAccountRequest::ToJson(const PFAccountManagementUnlinkTwitchAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AccessToken", input.accessToken); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -2172,7 +2278,7 @@ JsonValue ClientUnlinkXboxAccountRequest::ToJson() const JsonValue ClientUnlinkXboxAccountRequest::ToJson(const PFAccountManagementClientUnlinkXboxAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -2184,7 +2290,7 @@ JsonValue ClientUpdateAvatarUrlRequest::ToJson() const JsonValue ClientUpdateAvatarUrlRequest::ToJson(const PFAccountManagementClientUpdateAvatarUrlRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ImageUrl", input.imageUrl); return output; } @@ -2196,7 +2302,7 @@ JsonValue UpdateUserTitleDisplayNameRequest::ToJson() const JsonValue UpdateUserTitleDisplayNameRequest::ToJson(const PFAccountManagementUpdateUserTitleDisplayNameRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DisplayName", input.displayName); return output; @@ -2235,7 +2341,7 @@ HRESULT UpdateUserTitleDisplayNameResult::Copy(const PFAccountManagementUpdateUs { output = input; { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } @@ -2249,7 +2355,7 @@ JsonValue BanRequest::ToJson() const JsonValue BanRequest::ToJson(const PFAccountManagementBanRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "DurationInHours", input.durationInHours); JsonUtils::ObjectAddMember(output, "IPAddress", input.IPAddress); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2265,7 +2371,7 @@ JsonValue BanUsersRequest::ToJson() const JsonValue BanUsersRequest::ToJson(const PFAccountManagementBanUsersRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Bans", input.bans, input.bansCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -2354,37 +2460,37 @@ HRESULT BanInfo::Copy(const PFAccountManagementBanInfo& input, PFAccountManageme { output = input; { - auto propCopyResult = buffer.CopyTo(input.banId); + auto propCopyResult = buffer.CopyTo(input.banId); RETURN_IF_FAILED(propCopyResult.hr); output.banId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.created); + auto propCopyResult = buffer.CopyTo(input.created); RETURN_IF_FAILED(propCopyResult.hr); output.created = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.expires); + auto propCopyResult = buffer.CopyTo(input.expires); RETURN_IF_FAILED(propCopyResult.hr); output.expires = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.IPAddress); + auto propCopyResult = buffer.CopyTo(input.IPAddress); RETURN_IF_FAILED(propCopyResult.hr); output.IPAddress = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reason); + auto propCopyResult = buffer.CopyTo(input.reason); RETURN_IF_FAILED(propCopyResult.hr); output.reason = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.userFamilyType); + auto propCopyResult = buffer.CopyTo(input.userFamilyType); RETURN_IF_FAILED(propCopyResult.hr); output.userFamilyType = propCopyResult.ExtractPayload(); } @@ -2439,7 +2545,7 @@ JsonValue DeletePlayerRequest::ToJson() const JsonValue DeletePlayerRequest::ToJson(const PFAccountManagementDeletePlayerRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; } @@ -2451,7 +2557,7 @@ JsonValue GetServerCustomIDsFromPlayFabIDsRequest::ToJson() const JsonValue GetServerCustomIDsFromPlayFabIDsRequest::ToJson(const PFAccountManagementGetServerCustomIDsFromPlayFabIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "PlayFabIDs", input.playFabIDs, input.playFabIDsCount); return output; } @@ -2497,12 +2603,12 @@ HRESULT ServerCustomIDPlayFabIDPair::Copy(const PFAccountManagementServerCustomI { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serverCustomId); + auto propCopyResult = buffer.CopyTo(input.serverCustomId); RETURN_IF_FAILED(propCopyResult.hr); output.serverCustomId = propCopyResult.ExtractPayload(); } @@ -2557,7 +2663,7 @@ JsonValue GetUserAccountInfoRequest::ToJson() const JsonValue GetUserAccountInfoRequest::ToJson(const PFAccountManagementGetUserAccountInfoRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; } @@ -2598,7 +2704,7 @@ HRESULT GetUserAccountInfoResult::Copy(const PFAccountManagementGetUserAccountIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.userInfo); + auto propCopyResult = buffer.CopyTo(input.userInfo); RETURN_IF_FAILED(propCopyResult.hr); output.userInfo = propCopyResult.ExtractPayload(); } @@ -2612,7 +2718,7 @@ JsonValue GetUserBansRequest::ToJson() const JsonValue GetUserBansRequest::ToJson(const PFAccountManagementGetUserBansRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; } @@ -2665,7 +2771,7 @@ JsonValue ServerLinkNintendoServiceAccountRequest::ToJson() const JsonValue ServerLinkNintendoServiceAccountRequest::ToJson(const PFAccountManagementServerLinkNintendoServiceAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "IdentityToken", input.identityToken); @@ -2680,7 +2786,7 @@ JsonValue LinkNintendoServiceAccountSubjectRequest::ToJson() const JsonValue LinkNintendoServiceAccountSubjectRequest::ToJson(const PFAccountManagementLinkNintendoServiceAccountSubjectRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2695,7 +2801,7 @@ JsonValue ServerLinkNintendoSwitchDeviceIdRequest::ToJson() const JsonValue ServerLinkNintendoSwitchDeviceIdRequest::ToJson(const PFAccountManagementServerLinkNintendoSwitchDeviceIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "NintendoSwitchDeviceId", input.nintendoSwitchDeviceId); @@ -2710,7 +2816,7 @@ JsonValue ServerLinkPSNAccountRequest::ToJson() const JsonValue ServerLinkPSNAccountRequest::ToJson(const PFAccountManagementServerLinkPSNAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthCode", input.authCode); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); @@ -2727,7 +2833,7 @@ JsonValue LinkPSNIdRequest::ToJson() const JsonValue LinkPSNIdRequest::ToJson(const PFAccountManagementLinkPSNIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "IssuerId", input.issuerId); @@ -2743,7 +2849,7 @@ JsonValue LinkServerCustomIdRequest::ToJson() const JsonValue LinkServerCustomIdRequest::ToJson(const PFAccountManagementLinkServerCustomIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2758,7 +2864,7 @@ JsonValue LinkSteamIdRequest::ToJson() const JsonValue LinkSteamIdRequest::ToJson(const PFAccountManagementLinkSteamIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2773,7 +2879,7 @@ JsonValue ServerLinkXboxAccountRequest::ToJson() const JsonValue ServerLinkXboxAccountRequest::ToJson(const PFAccountManagementServerLinkXboxAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceLink", input.forceLink); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2788,7 +2894,7 @@ JsonValue RevokeAllBansForUserRequest::ToJson() const JsonValue RevokeAllBansForUserRequest::ToJson(const PFAccountManagementRevokeAllBansForUserRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; } @@ -2841,7 +2947,7 @@ JsonValue RevokeBansRequest::ToJson() const JsonValue RevokeBansRequest::ToJson(const PFAccountManagementRevokeBansRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "BanIds", input.banIds, input.banIdsCount); return output; } @@ -2894,7 +3000,7 @@ JsonValue SendCustomAccountRecoveryEmailRequest::ToJson() const JsonValue SendCustomAccountRecoveryEmailRequest::ToJson(const PFAccountManagementSendCustomAccountRecoveryEmailRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Email", input.email); JsonUtils::ObjectAddMember(output, "EmailTemplateId", input.emailTemplateId); @@ -2909,7 +3015,7 @@ JsonValue SendEmailFromTemplateRequest::ToJson() const JsonValue SendEmailFromTemplateRequest::ToJson(const PFAccountManagementSendEmailFromTemplateRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EmailTemplateId", input.emailTemplateId); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2923,7 +3029,7 @@ JsonValue ServerUnlinkNintendoServiceAccountRequest::ToJson() const JsonValue ServerUnlinkNintendoServiceAccountRequest::ToJson(const PFAccountManagementServerUnlinkNintendoServiceAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -2936,7 +3042,7 @@ JsonValue ServerUnlinkNintendoSwitchDeviceIdRequest::ToJson() const JsonValue ServerUnlinkNintendoSwitchDeviceIdRequest::ToJson(const PFAccountManagementServerUnlinkNintendoSwitchDeviceIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "NintendoSwitchDeviceId", input.nintendoSwitchDeviceId); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -2950,7 +3056,7 @@ JsonValue ServerUnlinkPSNAccountRequest::ToJson() const JsonValue ServerUnlinkPSNAccountRequest::ToJson(const PFAccountManagementServerUnlinkPSNAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -2963,7 +3069,7 @@ JsonValue UnlinkServerCustomIdRequest::ToJson() const JsonValue UnlinkServerCustomIdRequest::ToJson(const PFAccountManagementUnlinkServerCustomIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "ServerCustomId", input.serverCustomId); @@ -2977,7 +3083,7 @@ JsonValue UnlinkSteamIdRequest::ToJson() const JsonValue UnlinkSteamIdRequest::ToJson(const PFAccountManagementUnlinkSteamIdRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -2990,7 +3096,7 @@ JsonValue ServerUnlinkXboxAccountRequest::ToJson() const JsonValue ServerUnlinkXboxAccountRequest::ToJson(const PFAccountManagementServerUnlinkXboxAccountRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -3003,7 +3109,7 @@ JsonValue ServerUpdateAvatarUrlRequest::ToJson() const JsonValue ServerUpdateAvatarUrlRequest::ToJson(const PFAccountManagementServerUpdateAvatarUrlRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ImageUrl", input.imageUrl); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -3016,7 +3122,7 @@ JsonValue UpdateBanRequest::ToJson() const JsonValue UpdateBanRequest::ToJson(const PFAccountManagementUpdateBanRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Active", input.active); JsonUtils::ObjectAddMember(output, "BanId", input.banId); JsonUtils::ObjectAddMemberTime(output, "Expires", input.expires); @@ -3034,7 +3140,7 @@ JsonValue UpdateBansRequest::ToJson() const JsonValue UpdateBansRequest::ToJson(const PFAccountManagementUpdateBansRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Bans", input.bans, input.bansCount); return output; } @@ -3087,7 +3193,7 @@ JsonValue GetTitlePlayersFromXboxLiveIDsRequest::ToJson() const JsonValue GetTitlePlayersFromXboxLiveIDsRequest::ToJson(const PFAccountManagementGetTitlePlayersFromXboxLiveIDsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Sandbox", input.sandbox); JsonUtils::ObjectAddMember(output, "TitleId", input.titleId); @@ -3144,7 +3250,7 @@ JsonValue SetDisplayNameRequest::ToJson() const JsonValue SetDisplayNameRequest::ToJson(const PFAccountManagementSetDisplayNameRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DisplayName", input.displayName); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3193,12 +3299,12 @@ HRESULT SetDisplayNameResponse::Copy(const PFAccountManagementSetDisplayNameResp { output = input; { - auto propCopyResult = buffer.CopyTo(input.operationResult); + auto propCopyResult = buffer.CopyTo(input.operationResult); RETURN_IF_FAILED(propCopyResult.hr); output.operationResult = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionNumber); + auto propCopyResult = buffer.CopyTo(input.versionNumber); RETURN_IF_FAILED(propCopyResult.hr); output.versionNumber = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/AccountManagementTypes.h b/Source/PlayFabServices/Source/Generated/AccountManagementTypes.h index 6fc3de2..acdaf55 100644 --- a/Source/PlayFabServices/Source/Generated/AccountManagementTypes.h +++ b/Source/PlayFabServices/Source/Generated/AccountManagementTypes.h @@ -729,6 +729,58 @@ class GetPlayFabIDsFromSteamIDsResult : public Wrappers::PFAccountManagementGetP static HRESULT Copy(const PFAccountManagementGetPlayFabIDsFromSteamIDsResult& input, PFAccountManagementGetPlayFabIDsFromSteamIDsResult& output, ModelBuffer& buffer); }; +class GetPlayFabIDsFromSteamNamesRequest : public Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper, public InputModel +{ +public: + using ModelWrapperType = typename Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper; + using ModelWrapperType::ModelType; + + // Constructors + using ModelWrapperType::ModelWrapperType; + + // InputModel + JsonValue ToJson() const override; + static JsonValue ToJson(const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest& input); +}; + +class SteamNamePlayFabIdPair : public Wrappers::PFAccountManagementSteamNamePlayFabIdPairWrapper, public ServiceOutputModel, public ClientOutputModel +{ +public: + using ModelWrapperType = typename Wrappers::PFAccountManagementSteamNamePlayFabIdPairWrapper; + using ModelWrapperType::ModelType; + + // Constructors + using ModelWrapperType::ModelWrapperType; + + // ServiceOutputModel + HRESULT FromJson(const JsonValue& input) override; + // ClientOutputModel + size_t RequiredBufferSize() const override; + Result Copy(ModelBuffer& buffer) const override; + + static size_t RequiredBufferSize(const PFAccountManagementSteamNamePlayFabIdPair& model); + static HRESULT Copy(const PFAccountManagementSteamNamePlayFabIdPair& input, PFAccountManagementSteamNamePlayFabIdPair& output, ModelBuffer& buffer); +}; + +class GetPlayFabIDsFromSteamNamesResult : public Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper, public ServiceOutputModel, public ClientOutputModel +{ +public: + using ModelWrapperType = typename Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper; + using ModelWrapperType::ModelType; + + // Constructors + using ModelWrapperType::ModelWrapperType; + + // ServiceOutputModel + HRESULT FromJson(const JsonValue& input) override; + // ClientOutputModel + size_t RequiredBufferSize() const override; + Result Copy(ModelBuffer& buffer) const override; + + static size_t RequiredBufferSize(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& model); + static HRESULT Copy(const PFAccountManagementGetPlayFabIDsFromSteamNamesResult& input, PFAccountManagementGetPlayFabIDsFromSteamNamesResult& output, ModelBuffer& buffer); +}; + class GetPlayFabIDsFromTwitchIDsRequest : public Wrappers::PFAccountManagementGetPlayFabIDsFromTwitchIDsRequestWrapper, public InputModel { public: diff --git a/Source/PlayFabServices/Source/Generated/CacheId.h b/Source/PlayFabServices/Source/Generated/CacheId.h index 5d8c12d..45473c9 100644 --- a/Source/PlayFabServices/Source/Generated/CacheId.h +++ b/Source/PlayFabServices/Source/Generated/CacheId.h @@ -39,249 +39,251 @@ enum class ServicesCacheId : uint32_t AccountManagementClientGetPlayFabIDsFromPSNAccountIDs = 2022, AccountManagementClientGetPlayFabIDsFromPSNOnlineIDs = 2023, AccountManagementClientGetPlayFabIDsFromSteamIDs = 2024, - AccountManagementClientGetPlayFabIDsFromTwitchIDs = 2025, - AccountManagementClientGetPlayFabIDsFromXboxLiveIDs = 2026, - AccountManagementClientLinkAndroidDeviceID = 2027, - AccountManagementClientLinkApple = 2028, - AccountManagementClientLinkCustomID = 2029, - AccountManagementClientLinkFacebookAccount = 2030, - AccountManagementClientLinkFacebookInstantGamesId = 2031, - AccountManagementClientLinkGameCenterAccount = 2032, - AccountManagementClientLinkGoogleAccount = 2033, - AccountManagementClientLinkGooglePlayGamesServicesAccount = 2034, - AccountManagementClientLinkIOSDeviceID = 2035, - AccountManagementClientLinkKongregate = 2036, - AccountManagementClientLinkNintendoServiceAccount = 2037, - AccountManagementClientLinkNintendoSwitchDeviceId = 2038, - AccountManagementClientLinkOpenIdConnect = 2039, - AccountManagementClientLinkPSNAccount = 2040, - AccountManagementClientLinkSteamAccount = 2041, - AccountManagementClientLinkTwitch = 2042, - AccountManagementClientLinkXboxAccount = 2043, - AccountManagementClientRemoveContactEmail = 2044, - AccountManagementClientReportPlayer = 2045, - AccountManagementClientSendAccountRecoveryEmail = 2046, - AccountManagementClientUnlinkAndroidDeviceID = 2047, - AccountManagementClientUnlinkApple = 2048, - AccountManagementClientUnlinkCustomID = 2049, - AccountManagementClientUnlinkFacebookAccount = 2050, - AccountManagementClientUnlinkFacebookInstantGamesId = 2051, - AccountManagementClientUnlinkGameCenterAccount = 2052, - AccountManagementClientUnlinkGoogleAccount = 2053, - AccountManagementClientUnlinkGooglePlayGamesServicesAccount = 2054, - AccountManagementClientUnlinkIOSDeviceID = 2055, - AccountManagementClientUnlinkKongregate = 2056, - AccountManagementClientUnlinkNintendoServiceAccount = 2057, - AccountManagementClientUnlinkNintendoSwitchDeviceId = 2058, - AccountManagementClientUnlinkOpenIdConnect = 2059, - AccountManagementClientUnlinkPSNAccount = 2060, - AccountManagementClientUnlinkSteamAccount = 2061, - AccountManagementClientUnlinkTwitch = 2062, - AccountManagementClientUnlinkXboxAccount = 2063, - AccountManagementClientUpdateAvatarUrl = 2064, - AccountManagementClientUpdateUserTitleDisplayName = 2065, - AccountManagementServerBanUsers = 2066, - AccountManagementServerDeletePlayer = 2067, - AccountManagementServerGetPlayerCombinedInfo = 2068, - AccountManagementServerGetPlayerProfile = 2069, - AccountManagementServerGetPlayFabIDsFromFacebookIDs = 2070, - AccountManagementServerGetPlayFabIDsFromFacebookInstantGamesIds = 2071, - AccountManagementServerGetPlayFabIDsFromNintendoServiceAccountIds = 2072, - AccountManagementServerGetPlayFabIDsFromNintendoSwitchDeviceIds = 2073, - AccountManagementServerGetPlayFabIDsFromPSNAccountIDs = 2074, - AccountManagementServerGetPlayFabIDsFromPSNOnlineIDs = 2075, - AccountManagementServerGetPlayFabIDsFromSteamIDs = 2076, - AccountManagementServerGetPlayFabIDsFromTwitchIDs = 2077, - AccountManagementServerGetPlayFabIDsFromXboxLiveIDs = 2078, - AccountManagementServerGetServerCustomIDsFromPlayFabIDs = 2079, - AccountManagementServerGetUserAccountInfo = 2080, - AccountManagementServerGetUserBans = 2081, - AccountManagementServerLinkNintendoServiceAccount = 2082, - AccountManagementServerLinkNintendoServiceAccountSubject = 2083, - AccountManagementServerLinkNintendoSwitchDeviceId = 2084, - AccountManagementServerLinkPSNAccount = 2085, - AccountManagementServerLinkPSNId = 2086, - AccountManagementServerLinkServerCustomId = 2087, - AccountManagementServerLinkSteamId = 2088, - AccountManagementServerLinkXboxAccount = 2089, - AccountManagementServerRevokeAllBansForUser = 2090, - AccountManagementServerRevokeBans = 2091, - AccountManagementServerSendCustomAccountRecoveryEmail = 2092, - AccountManagementServerSendEmailFromTemplate = 2093, - AccountManagementServerUnlinkNintendoServiceAccount = 2094, - AccountManagementServerUnlinkNintendoSwitchDeviceId = 2095, - AccountManagementServerUnlinkPSNAccount = 2096, - AccountManagementServerUnlinkServerCustomId = 2097, - AccountManagementServerUnlinkSteamId = 2098, - AccountManagementServerUnlinkXboxAccount = 2099, - AccountManagementServerUpdateAvatarUrl = 2100, - AccountManagementServerUpdateBans = 2101, - AccountManagementGetTitlePlayersFromXboxLiveIDs = 2102, - AccountManagementSetDisplayName = 2103, - PlatformSpecificClientAndroidDevicePushNotificationRegistration = 2104, - PlatformSpecificClientRefreshPSNAuthToken = 2105, - PlatformSpecificClientRegisterForIOSPushNotification = 2106, - PlatformSpecificServerAwardSteamAchievement = 2107, - CloudScriptClientExecuteCloudScript = 2108, - CloudScriptServerExecuteCloudScript = 2109, - CloudScriptExecuteEntityCloudScript = 2110, - CloudScriptExecuteFunction = 2111, - CloudScriptListEventHubFunctions = 2112, - CloudScriptRegisterEventHubFunction = 2113, - SegmentsClientGetPlayerSegments = 2114, - SegmentsClientGetPlayerTags = 2115, - SegmentsServerAddPlayerTag = 2116, - SegmentsServerGetAllSegments = 2117, - SegmentsServerGetPlayerSegments = 2118, - SegmentsServerGetPlayersInSegment = 2119, - SegmentsServerGetPlayerTags = 2120, - SegmentsServerRemovePlayerTag = 2121, - TitleDataManagementClientGetPublisherData = 2122, - TitleDataManagementClientGetTime = 2123, - TitleDataManagementClientGetTitleData = 2124, - TitleDataManagementClientGetTitleNews = 2125, - TitleDataManagementServerGetPublisherData = 2126, - TitleDataManagementServerGetTime = 2127, - TitleDataManagementServerGetTitleData = 2128, - TitleDataManagementServerGetTitleInternalData = 2129, - TitleDataManagementServerGetTitleNews = 2130, - TitleDataManagementServerSetPublisherData = 2131, - TitleDataManagementServerSetTitleData = 2132, - TitleDataManagementServerSetTitleInternalData = 2133, - PlayerDataManagementClientGetUserData = 2134, - PlayerDataManagementClientGetUserPublisherData = 2135, - PlayerDataManagementClientGetUserPublisherReadOnlyData = 2136, - PlayerDataManagementClientGetUserReadOnlyData = 2137, - PlayerDataManagementClientUpdateUserData = 2138, - PlayerDataManagementClientUpdateUserPublisherData = 2139, - PlayerDataManagementServerGetUserData = 2140, - PlayerDataManagementServerGetUserInternalData = 2141, - PlayerDataManagementServerGetUserPublisherData = 2142, - PlayerDataManagementServerGetUserPublisherInternalData = 2143, - PlayerDataManagementServerGetUserPublisherReadOnlyData = 2144, - PlayerDataManagementServerGetUserReadOnlyData = 2145, - PlayerDataManagementServerUpdateUserData = 2146, - PlayerDataManagementServerUpdateUserInternalData = 2147, - PlayerDataManagementServerUpdateUserPublisherData = 2148, - PlayerDataManagementServerUpdateUserPublisherInternalData = 2149, - PlayerDataManagementServerUpdateUserPublisherReadOnlyData = 2150, - PlayerDataManagementServerUpdateUserReadOnlyData = 2151, - PushNotificationsServerSendPushNotification = 2152, - PushNotificationsServerSendPushNotificationFromTemplate = 2153, - DataAbortFileUploads = 2154, - DataDeleteFiles = 2155, - DataFinalizeFileUploads = 2156, - DataGetFiles = 2157, - DataGetObjects = 2158, - DataInitiateFileUploads = 2159, - DataSetObjects = 2160, - InventoryAddInventoryItems = 2161, - InventoryDeleteInventoryCollection = 2162, - InventoryDeleteInventoryItems = 2163, - InventoryExecuteInventoryOperations = 2164, - InventoryExecuteTransferOperations = 2165, - InventoryGetInventoryCollectionIds = 2166, - InventoryGetInventoryItems = 2167, - InventoryGetInventoryOperationStatus = 2168, - InventoryGetMicrosoftStoreAccessTokens = 2169, - InventoryGetTransactionHistory = 2170, - InventoryPurchaseInventoryItems = 2171, - InventoryRedeemAppleAppStoreInventoryItems = 2172, - InventoryRedeemGooglePlayInventoryItems = 2173, - InventoryRedeemMicrosoftStoreInventoryItems = 2174, - InventoryRedeemNintendoEShopInventoryItems = 2175, - InventoryRedeemPlayStationStoreInventoryItems = 2176, - InventoryRedeemSteamInventoryItems = 2177, - InventorySubtractInventoryItems = 2178, - InventoryTransferInventoryItems = 2179, - InventoryUpdateInventoryItems = 2180, - CatalogCreateDraftItem = 2181, - CatalogCreateUploadUrls = 2182, - CatalogDeleteEntityItemReviews = 2183, - CatalogDeleteItem = 2184, - CatalogGetCatalogConfig = 2185, - CatalogGetDraftItem = 2186, - CatalogGetDraftItems = 2187, - CatalogGetEntityDraftItems = 2188, - CatalogGetEntityItemReview = 2189, - CatalogGetItem = 2190, - CatalogGetItemContainers = 2191, - CatalogGetItemModerationState = 2192, - CatalogGetItemPublishStatus = 2193, - CatalogGetItemReviews = 2194, - CatalogGetItemReviewSummary = 2195, - CatalogGetItems = 2196, - CatalogPublishDraftItem = 2197, - CatalogReportItem = 2198, - CatalogReportItemReview = 2199, - CatalogReviewItem = 2200, - CatalogSearchItems = 2201, - CatalogSetItemModerationState = 2202, - CatalogSubmitItemReviewVote = 2203, - CatalogTakedownItemReviews = 2204, - CatalogUpdateCatalogConfig = 2205, - CatalogUpdateDraftItem = 2206, - ExperimentationGetTreatmentAssignment = 2207, - GroupsAcceptGroupApplication = 2208, - GroupsAcceptGroupInvitation = 2209, - GroupsAddMembers = 2210, - GroupsApplyToGroup = 2211, - GroupsBlockEntity = 2212, - GroupsChangeMemberRole = 2213, - GroupsCreateGroup = 2214, - GroupsCreateRole = 2215, - GroupsDeleteGroup = 2216, - GroupsDeleteRole = 2217, - GroupsGetGroup = 2218, - GroupsInviteToGroup = 2219, - GroupsIsMember = 2220, - GroupsListGroupApplications = 2221, - GroupsListGroupBlocks = 2222, - GroupsListGroupInvitations = 2223, - GroupsListGroupMembers = 2224, - GroupsListMembership = 2225, - GroupsListMembershipOpportunities = 2226, - GroupsRemoveGroupApplication = 2227, - GroupsRemoveGroupInvitation = 2228, - GroupsRemoveMembers = 2229, - GroupsUnblockEntity = 2230, - GroupsUpdateGroup = 2231, - GroupsUpdateRole = 2232, - LeaderboardsCreateLeaderboardDefinition = 2233, - LeaderboardsDeleteLeaderboardDefinition = 2234, - LeaderboardsDeleteLeaderboardEntries = 2235, - LeaderboardsGetFriendLeaderboardForEntity = 2236, - LeaderboardsGetLeaderboard = 2237, - LeaderboardsGetLeaderboardAroundEntity = 2238, - LeaderboardsGetLeaderboardDefinition = 2239, - LeaderboardsGetLeaderboardForEntities = 2240, - LeaderboardsIncrementLeaderboardVersion = 2241, - LeaderboardsListLeaderboardDefinitions = 2242, - LeaderboardsUnlinkLeaderboardFromStatistic = 2243, - LeaderboardsUpdateLeaderboardEntries = 2244, - StatisticsCreateStatisticDefinition = 2245, - StatisticsDeleteStatisticDefinition = 2246, - StatisticsDeleteStatistics = 2247, - StatisticsGetStatisticDefinition = 2248, - StatisticsGetStatistics = 2249, - StatisticsGetStatisticsForEntities = 2250, - StatisticsIncrementStatisticVersion = 2251, - StatisticsListStatisticDefinitions = 2252, - StatisticsUpdateStatistics = 2253, - LocalizationGetLanguageList = 2254, - MultiplayerServerDeleteSecret = 2255, - MultiplayerServerListBuildAliases = 2256, - MultiplayerServerListBuildSummariesV2 = 2257, - MultiplayerServerListQosServersForTitle = 2258, - MultiplayerServerListSecretSummaries = 2259, - MultiplayerServerRequestMultiplayerServer = 2260, - MultiplayerServerRequestPartyService = 2261, - MultiplayerServerUploadSecret = 2262, - ProfilesGetProfile = 2263, - ProfilesGetProfiles = 2264, - ProfilesGetTitlePlayersFromMasterPlayerAccountIds = 2265, - ProfilesSetProfileLanguage = 2266, - ProfilesSetProfilePolicy = 2267, + AccountManagementClientGetPlayFabIDsFromSteamNames = 2025, + AccountManagementClientGetPlayFabIDsFromTwitchIDs = 2026, + AccountManagementClientGetPlayFabIDsFromXboxLiveIDs = 2027, + AccountManagementClientLinkAndroidDeviceID = 2028, + AccountManagementClientLinkApple = 2029, + AccountManagementClientLinkCustomID = 2030, + AccountManagementClientLinkFacebookAccount = 2031, + AccountManagementClientLinkFacebookInstantGamesId = 2032, + AccountManagementClientLinkGameCenterAccount = 2033, + AccountManagementClientLinkGoogleAccount = 2034, + AccountManagementClientLinkGooglePlayGamesServicesAccount = 2035, + AccountManagementClientLinkIOSDeviceID = 2036, + AccountManagementClientLinkKongregate = 2037, + AccountManagementClientLinkNintendoServiceAccount = 2038, + AccountManagementClientLinkNintendoSwitchDeviceId = 2039, + AccountManagementClientLinkOpenIdConnect = 2040, + AccountManagementClientLinkPSNAccount = 2041, + AccountManagementClientLinkSteamAccount = 2042, + AccountManagementClientLinkTwitch = 2043, + AccountManagementClientLinkXboxAccount = 2044, + AccountManagementClientRemoveContactEmail = 2045, + AccountManagementClientReportPlayer = 2046, + AccountManagementClientSendAccountRecoveryEmail = 2047, + AccountManagementClientUnlinkAndroidDeviceID = 2048, + AccountManagementClientUnlinkApple = 2049, + AccountManagementClientUnlinkCustomID = 2050, + AccountManagementClientUnlinkFacebookAccount = 2051, + AccountManagementClientUnlinkFacebookInstantGamesId = 2052, + AccountManagementClientUnlinkGameCenterAccount = 2053, + AccountManagementClientUnlinkGoogleAccount = 2054, + AccountManagementClientUnlinkGooglePlayGamesServicesAccount = 2055, + AccountManagementClientUnlinkIOSDeviceID = 2056, + AccountManagementClientUnlinkKongregate = 2057, + AccountManagementClientUnlinkNintendoServiceAccount = 2058, + AccountManagementClientUnlinkNintendoSwitchDeviceId = 2059, + AccountManagementClientUnlinkOpenIdConnect = 2060, + AccountManagementClientUnlinkPSNAccount = 2061, + AccountManagementClientUnlinkSteamAccount = 2062, + AccountManagementClientUnlinkTwitch = 2063, + AccountManagementClientUnlinkXboxAccount = 2064, + AccountManagementClientUpdateAvatarUrl = 2065, + AccountManagementClientUpdateUserTitleDisplayName = 2066, + AccountManagementServerBanUsers = 2067, + AccountManagementServerDeletePlayer = 2068, + AccountManagementServerGetPlayerCombinedInfo = 2069, + AccountManagementServerGetPlayerProfile = 2070, + AccountManagementServerGetPlayFabIDsFromFacebookIDs = 2071, + AccountManagementServerGetPlayFabIDsFromFacebookInstantGamesIds = 2072, + AccountManagementServerGetPlayFabIDsFromNintendoServiceAccountIds = 2073, + AccountManagementServerGetPlayFabIDsFromNintendoSwitchDeviceIds = 2074, + AccountManagementServerGetPlayFabIDsFromPSNAccountIDs = 2075, + AccountManagementServerGetPlayFabIDsFromPSNOnlineIDs = 2076, + AccountManagementServerGetPlayFabIDsFromSteamIDs = 2077, + AccountManagementServerGetPlayFabIDsFromSteamNames = 2078, + AccountManagementServerGetPlayFabIDsFromTwitchIDs = 2079, + AccountManagementServerGetPlayFabIDsFromXboxLiveIDs = 2080, + AccountManagementServerGetServerCustomIDsFromPlayFabIDs = 2081, + AccountManagementServerGetUserAccountInfo = 2082, + AccountManagementServerGetUserBans = 2083, + AccountManagementServerLinkNintendoServiceAccount = 2084, + AccountManagementServerLinkNintendoServiceAccountSubject = 2085, + AccountManagementServerLinkNintendoSwitchDeviceId = 2086, + AccountManagementServerLinkPSNAccount = 2087, + AccountManagementServerLinkPSNId = 2088, + AccountManagementServerLinkServerCustomId = 2089, + AccountManagementServerLinkSteamId = 2090, + AccountManagementServerLinkXboxAccount = 2091, + AccountManagementServerRevokeAllBansForUser = 2092, + AccountManagementServerRevokeBans = 2093, + AccountManagementServerSendCustomAccountRecoveryEmail = 2094, + AccountManagementServerSendEmailFromTemplate = 2095, + AccountManagementServerUnlinkNintendoServiceAccount = 2096, + AccountManagementServerUnlinkNintendoSwitchDeviceId = 2097, + AccountManagementServerUnlinkPSNAccount = 2098, + AccountManagementServerUnlinkServerCustomId = 2099, + AccountManagementServerUnlinkSteamId = 2100, + AccountManagementServerUnlinkXboxAccount = 2101, + AccountManagementServerUpdateAvatarUrl = 2102, + AccountManagementServerUpdateBans = 2103, + AccountManagementGetTitlePlayersFromXboxLiveIDs = 2104, + AccountManagementSetDisplayName = 2105, + PlatformSpecificClientAndroidDevicePushNotificationRegistration = 2106, + PlatformSpecificClientRefreshPSNAuthToken = 2107, + PlatformSpecificClientRegisterForIOSPushNotification = 2108, + PlatformSpecificServerAwardSteamAchievement = 2109, + CloudScriptClientExecuteCloudScript = 2110, + CloudScriptServerExecuteCloudScript = 2111, + CloudScriptExecuteEntityCloudScript = 2112, + CloudScriptExecuteFunction = 2113, + CloudScriptListEventHubFunctions = 2114, + CloudScriptRegisterEventHubFunction = 2115, + SegmentsClientGetPlayerSegments = 2116, + SegmentsClientGetPlayerTags = 2117, + SegmentsServerAddPlayerTag = 2118, + SegmentsServerGetAllSegments = 2119, + SegmentsServerGetPlayerSegments = 2120, + SegmentsServerGetPlayersInSegment = 2121, + SegmentsServerGetPlayerTags = 2122, + SegmentsServerRemovePlayerTag = 2123, + TitleDataManagementClientGetPublisherData = 2124, + TitleDataManagementClientGetTime = 2125, + TitleDataManagementClientGetTitleData = 2126, + TitleDataManagementClientGetTitleNews = 2127, + TitleDataManagementServerGetPublisherData = 2128, + TitleDataManagementServerGetTime = 2129, + TitleDataManagementServerGetTitleData = 2130, + TitleDataManagementServerGetTitleInternalData = 2131, + TitleDataManagementServerGetTitleNews = 2132, + TitleDataManagementServerSetPublisherData = 2133, + TitleDataManagementServerSetTitleData = 2134, + TitleDataManagementServerSetTitleInternalData = 2135, + PlayerDataManagementClientGetUserData = 2136, + PlayerDataManagementClientGetUserPublisherData = 2137, + PlayerDataManagementClientGetUserPublisherReadOnlyData = 2138, + PlayerDataManagementClientGetUserReadOnlyData = 2139, + PlayerDataManagementClientUpdateUserData = 2140, + PlayerDataManagementClientUpdateUserPublisherData = 2141, + PlayerDataManagementServerGetUserData = 2142, + PlayerDataManagementServerGetUserInternalData = 2143, + PlayerDataManagementServerGetUserPublisherData = 2144, + PlayerDataManagementServerGetUserPublisherInternalData = 2145, + PlayerDataManagementServerGetUserPublisherReadOnlyData = 2146, + PlayerDataManagementServerGetUserReadOnlyData = 2147, + PlayerDataManagementServerUpdateUserData = 2148, + PlayerDataManagementServerUpdateUserInternalData = 2149, + PlayerDataManagementServerUpdateUserPublisherData = 2150, + PlayerDataManagementServerUpdateUserPublisherInternalData = 2151, + PlayerDataManagementServerUpdateUserPublisherReadOnlyData = 2152, + PlayerDataManagementServerUpdateUserReadOnlyData = 2153, + PushNotificationsServerSendPushNotification = 2154, + PushNotificationsServerSendPushNotificationFromTemplate = 2155, + DataAbortFileUploads = 2156, + DataDeleteFiles = 2157, + DataFinalizeFileUploads = 2158, + DataGetFiles = 2159, + DataGetObjects = 2160, + DataInitiateFileUploads = 2161, + DataSetObjects = 2162, + InventoryAddInventoryItems = 2163, + InventoryDeleteInventoryCollection = 2164, + InventoryDeleteInventoryItems = 2165, + InventoryExecuteInventoryOperations = 2166, + InventoryExecuteTransferOperations = 2167, + InventoryGetInventoryCollectionIds = 2168, + InventoryGetInventoryItems = 2169, + InventoryGetInventoryOperationStatus = 2170, + InventoryGetMicrosoftStoreAccessTokens = 2171, + InventoryGetTransactionHistory = 2172, + InventoryPurchaseInventoryItems = 2173, + InventoryRedeemAppleAppStoreInventoryItems = 2174, + InventoryRedeemGooglePlayInventoryItems = 2175, + InventoryRedeemMicrosoftStoreInventoryItems = 2176, + InventoryRedeemNintendoEShopInventoryItems = 2177, + InventoryRedeemPlayStationStoreInventoryItems = 2178, + InventoryRedeemSteamInventoryItems = 2179, + InventorySubtractInventoryItems = 2180, + InventoryTransferInventoryItems = 2181, + InventoryUpdateInventoryItems = 2182, + CatalogCreateDraftItem = 2183, + CatalogCreateUploadUrls = 2184, + CatalogDeleteEntityItemReviews = 2185, + CatalogDeleteItem = 2186, + CatalogGetCatalogConfig = 2187, + CatalogGetDraftItem = 2188, + CatalogGetDraftItems = 2189, + CatalogGetEntityDraftItems = 2190, + CatalogGetEntityItemReview = 2191, + CatalogGetItem = 2192, + CatalogGetItemContainers = 2193, + CatalogGetItemModerationState = 2194, + CatalogGetItemPublishStatus = 2195, + CatalogGetItemReviews = 2196, + CatalogGetItemReviewSummary = 2197, + CatalogGetItems = 2198, + CatalogPublishDraftItem = 2199, + CatalogReportItem = 2200, + CatalogReportItemReview = 2201, + CatalogReviewItem = 2202, + CatalogSearchItems = 2203, + CatalogSetItemModerationState = 2204, + CatalogSubmitItemReviewVote = 2205, + CatalogTakedownItemReviews = 2206, + CatalogUpdateCatalogConfig = 2207, + CatalogUpdateDraftItem = 2208, + ExperimentationGetTreatmentAssignment = 2209, + GroupsAcceptGroupApplication = 2210, + GroupsAcceptGroupInvitation = 2211, + GroupsAddMembers = 2212, + GroupsApplyToGroup = 2213, + GroupsBlockEntity = 2214, + GroupsChangeMemberRole = 2215, + GroupsCreateGroup = 2216, + GroupsCreateRole = 2217, + GroupsDeleteGroup = 2218, + GroupsDeleteRole = 2219, + GroupsGetGroup = 2220, + GroupsInviteToGroup = 2221, + GroupsIsMember = 2222, + GroupsListGroupApplications = 2223, + GroupsListGroupBlocks = 2224, + GroupsListGroupInvitations = 2225, + GroupsListGroupMembers = 2226, + GroupsListMembership = 2227, + GroupsListMembershipOpportunities = 2228, + GroupsRemoveGroupApplication = 2229, + GroupsRemoveGroupInvitation = 2230, + GroupsRemoveMembers = 2231, + GroupsUnblockEntity = 2232, + GroupsUpdateGroup = 2233, + GroupsUpdateRole = 2234, + LeaderboardsCreateLeaderboardDefinition = 2235, + LeaderboardsDeleteLeaderboardDefinition = 2236, + LeaderboardsDeleteLeaderboardEntries = 2237, + LeaderboardsGetFriendLeaderboardForEntity = 2238, + LeaderboardsGetLeaderboard = 2239, + LeaderboardsGetLeaderboardAroundEntity = 2240, + LeaderboardsGetLeaderboardDefinition = 2241, + LeaderboardsGetLeaderboardForEntities = 2242, + LeaderboardsIncrementLeaderboardVersion = 2243, + LeaderboardsListLeaderboardDefinitions = 2244, + LeaderboardsUnlinkLeaderboardFromStatistic = 2245, + LeaderboardsUpdateLeaderboardEntries = 2246, + StatisticsCreateStatisticDefinition = 2247, + StatisticsDeleteStatisticDefinition = 2248, + StatisticsDeleteStatistics = 2249, + StatisticsGetStatisticDefinition = 2250, + StatisticsGetStatistics = 2251, + StatisticsGetStatisticsForEntities = 2252, + StatisticsIncrementStatisticVersion = 2253, + StatisticsListStatisticDefinitions = 2254, + StatisticsUpdateStatistics = 2255, + LocalizationGetLanguageList = 2256, + MultiplayerServerDeleteSecret = 2257, + MultiplayerServerListBuildAliases = 2258, + MultiplayerServerListBuildSummariesV2 = 2259, + MultiplayerServerListQosServersForTitle = 2260, + MultiplayerServerListSecretSummaries = 2261, + MultiplayerServerRequestMultiplayerServer = 2262, + MultiplayerServerRequestPartyService = 2263, + MultiplayerServerUploadSecret = 2264, + ProfilesGetProfile = 2265, + ProfilesGetProfiles = 2266, + ProfilesGetTitlePlayersFromMasterPlayerAccountIds = 2267, + ProfilesSetProfileLanguage = 2268, + ProfilesSetProfilePolicy = 2269, }; } // namespace PlayFab \ No newline at end of file diff --git a/Source/PlayFabServices/Source/Generated/CatalogTypes.cpp b/Source/PlayFabServices/Source/Generated/CatalogTypes.cpp index 0305930..e5e1f33 100644 --- a/Source/PlayFabServices/Source/Generated/CatalogTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/CatalogTypes.cpp @@ -15,7 +15,7 @@ JsonValue CatalogAlternateId::ToJson() const JsonValue CatalogAlternateId::ToJson(const PFCatalogCatalogAlternateId& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Type", input.type); JsonUtils::ObjectAddMember(output, "Value", input.value); return output; @@ -62,12 +62,12 @@ HRESULT CatalogAlternateId::Copy(const PFCatalogCatalogAlternateId& input, PFCat { output = input; { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.value); + auto propCopyResult = buffer.CopyTo(input.value); RETURN_IF_FAILED(propCopyResult.hr); output.value = propCopyResult.ExtractPayload(); } @@ -81,7 +81,7 @@ JsonValue Content::ToJson() const JsonValue Content::ToJson(const PFCatalogContent& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "MaxClientVersion", input.maxClientVersion); JsonUtils::ObjectAddMember(output, "MinClientVersion", input.minClientVersion); @@ -165,17 +165,17 @@ HRESULT Content::Copy(const PFCatalogContent& input, PFCatalogContent& output, M { output = input; { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.maxClientVersion); + auto propCopyResult = buffer.CopyTo(input.maxClientVersion); RETURN_IF_FAILED(propCopyResult.hr); output.maxClientVersion = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.minClientVersion); + auto propCopyResult = buffer.CopyTo(input.minClientVersion); RETURN_IF_FAILED(propCopyResult.hr); output.minClientVersion = propCopyResult.ExtractPayload(); } @@ -185,12 +185,12 @@ HRESULT Content::Copy(const PFCatalogContent& input, PFCatalogContent& output, M output.tags = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.url); + auto propCopyResult = buffer.CopyTo(input.url); RETURN_IF_FAILED(propCopyResult.hr); output.url = propCopyResult.ExtractPayload(); } @@ -204,7 +204,7 @@ JsonValue DeepLink::ToJson() const JsonValue DeepLink::ToJson(const PFCatalogDeepLink& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Platform", input.platform); JsonUtils::ObjectAddMember(output, "Url", input.url); return output; @@ -251,12 +251,12 @@ HRESULT DeepLink::Copy(const PFCatalogDeepLink& input, PFCatalogDeepLink& output { output = input; { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.url); + auto propCopyResult = buffer.CopyTo(input.url); RETURN_IF_FAILED(propCopyResult.hr); output.url = propCopyResult.ExtractPayload(); } @@ -270,7 +270,7 @@ JsonValue Image::ToJson() const JsonValue Image::ToJson(const PFCatalogImage& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "Tag", input.tag); JsonUtils::ObjectAddMember(output, "Type", input.type); @@ -335,22 +335,22 @@ HRESULT Image::Copy(const PFCatalogImage& input, PFCatalogImage& output, ModelBu { output = input; { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.tag); + auto propCopyResult = buffer.CopyTo(input.tag); RETURN_IF_FAILED(propCopyResult.hr); output.tag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.url); + auto propCopyResult = buffer.CopyTo(input.url); RETURN_IF_FAILED(propCopyResult.hr); output.url = propCopyResult.ExtractPayload(); } @@ -364,7 +364,7 @@ JsonValue CatalogPriceAmount::ToJson() const JsonValue CatalogPriceAmount::ToJson(const PFCatalogCatalogPriceAmount& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "ItemId", input.itemId); return output; @@ -405,7 +405,7 @@ HRESULT CatalogPriceAmount::Copy(const PFCatalogCatalogPriceAmount& input, PFCat { output = input; { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } @@ -419,7 +419,7 @@ JsonValue CatalogPrice::ToJson() const JsonValue CatalogPrice::ToJson(const PFCatalogCatalogPrice& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Amounts", input.amounts, input.amountsCount); JsonUtils::ObjectAddMember(output, "UnitAmount", input.unitAmount); JsonUtils::ObjectAddMember(output, "UnitDurationInSeconds", input.unitDurationInSeconds); @@ -481,12 +481,12 @@ HRESULT CatalogPrice::Copy(const PFCatalogCatalogPrice& input, PFCatalogCatalogP output.amounts = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.unitAmount); + auto propCopyResult = buffer.CopyTo(input.unitAmount); RETURN_IF_FAILED(propCopyResult.hr); output.unitAmount = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.unitDurationInSeconds); + auto propCopyResult = buffer.CopyTo(input.unitDurationInSeconds); RETURN_IF_FAILED(propCopyResult.hr); output.unitDurationInSeconds = propCopyResult.ExtractPayload(); } @@ -500,7 +500,7 @@ JsonValue CatalogPriceOptions::ToJson() const JsonValue CatalogPriceOptions::ToJson(const PFCatalogCatalogPriceOptions& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Prices", input.prices, input.pricesCount); return output; } @@ -553,7 +553,7 @@ JsonValue CatalogItemReference::ToJson() const JsonValue CatalogItemReference::ToJson(const PFCatalogCatalogItemReference& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "PriceOptions", input.priceOptions); @@ -612,17 +612,17 @@ HRESULT CatalogItemReference::Copy(const PFCatalogCatalogItemReference& input, P { output = input; { - auto propCopyResult = buffer.CopyTo(input.amount); + auto propCopyResult = buffer.CopyTo(input.amount); RETURN_IF_FAILED(propCopyResult.hr); output.amount = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.priceOptions); + auto propCopyResult = buffer.CopyTo(input.priceOptions); RETURN_IF_FAILED(propCopyResult.hr); output.priceOptions = propCopyResult.ExtractPayload(); } @@ -636,7 +636,7 @@ JsonValue KeywordSet::ToJson() const JsonValue KeywordSet::ToJson(const PFCatalogKeywordSet& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Values", input.values, input.valuesCount); return output; } @@ -689,7 +689,7 @@ JsonValue ModerationState::ToJson() const JsonValue ModerationState::ToJson(const PFCatalogModerationState& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberTime(output, "LastModifiedDate", input.lastModifiedDate); JsonUtils::ObjectAddMember(output, "Reason", input.reason); JsonUtils::ObjectAddMember(output, "Status", input.status); @@ -745,17 +745,17 @@ HRESULT ModerationState::Copy(const PFCatalogModerationState& input, PFCatalogMo { output = input; { - auto propCopyResult = buffer.CopyTo(input.lastModifiedDate); + auto propCopyResult = buffer.CopyTo(input.lastModifiedDate); RETURN_IF_FAILED(propCopyResult.hr); output.lastModifiedDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reason); + auto propCopyResult = buffer.CopyTo(input.reason); RETURN_IF_FAILED(propCopyResult.hr); output.reason = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.status); + auto propCopyResult = buffer.CopyTo(input.status); RETURN_IF_FAILED(propCopyResult.hr); output.status = propCopyResult.ExtractPayload(); } @@ -769,7 +769,7 @@ JsonValue Rating::ToJson() const JsonValue Rating::ToJson(const PFCatalogRating& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Average", input.average); JsonUtils::ObjectAddMember(output, "Count1Star", input.count1Star); JsonUtils::ObjectAddMember(output, "Count2Star", input.count2Star); @@ -861,37 +861,37 @@ HRESULT Rating::Copy(const PFCatalogRating& input, PFCatalogRating& output, Mode { output = input; { - auto propCopyResult = buffer.CopyTo(input.average); + auto propCopyResult = buffer.CopyTo(input.average); RETURN_IF_FAILED(propCopyResult.hr); output.average = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.count1Star); + auto propCopyResult = buffer.CopyTo(input.count1Star); RETURN_IF_FAILED(propCopyResult.hr); output.count1Star = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.count2Star); + auto propCopyResult = buffer.CopyTo(input.count2Star); RETURN_IF_FAILED(propCopyResult.hr); output.count2Star = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.count3Star); + auto propCopyResult = buffer.CopyTo(input.count3Star); RETURN_IF_FAILED(propCopyResult.hr); output.count3Star = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.count4Star); + auto propCopyResult = buffer.CopyTo(input.count4Star); RETURN_IF_FAILED(propCopyResult.hr); output.count4Star = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.count5Star); + auto propCopyResult = buffer.CopyTo(input.count5Star); RETURN_IF_FAILED(propCopyResult.hr); output.count5Star = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalCount); + auto propCopyResult = buffer.CopyTo(input.totalCount); RETURN_IF_FAILED(propCopyResult.hr); output.totalCount = propCopyResult.ExtractPayload(); } @@ -905,7 +905,7 @@ JsonValue FilterOptions::ToJson() const JsonValue FilterOptions::ToJson(const PFCatalogFilterOptions& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Filter", input.filter); JsonUtils::ObjectAddMember(output, "IncludeAllItems", input.includeAllItems); return output; @@ -952,12 +952,12 @@ HRESULT FilterOptions::Copy(const PFCatalogFilterOptions& input, PFCatalogFilter { output = input; { - auto propCopyResult = buffer.CopyTo(input.filter); + auto propCopyResult = buffer.CopyTo(input.filter); RETURN_IF_FAILED(propCopyResult.hr); output.filter = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.includeAllItems); + auto propCopyResult = buffer.CopyTo(input.includeAllItems); RETURN_IF_FAILED(propCopyResult.hr); output.includeAllItems = propCopyResult.ExtractPayload(); } @@ -971,7 +971,7 @@ JsonValue Permissions::ToJson() const JsonValue Permissions::ToJson(const PFCatalogPermissions& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "SegmentIds", input.segmentIds, input.segmentIdsCount); return output; } @@ -1024,7 +1024,7 @@ JsonValue CatalogPriceAmountOverride::ToJson() const JsonValue CatalogPriceAmountOverride::ToJson(const PFCatalogCatalogPriceAmountOverride& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FixedValue", input.fixedValue); JsonUtils::ObjectAddMember(output, "ItemId", input.itemId); JsonUtils::ObjectAddMember(output, "Multiplier", input.multiplier); @@ -1080,17 +1080,17 @@ HRESULT CatalogPriceAmountOverride::Copy(const PFCatalogCatalogPriceAmountOverri { output = input; { - auto propCopyResult = buffer.CopyTo(input.fixedValue); + auto propCopyResult = buffer.CopyTo(input.fixedValue); RETURN_IF_FAILED(propCopyResult.hr); output.fixedValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.multiplier); + auto propCopyResult = buffer.CopyTo(input.multiplier); RETURN_IF_FAILED(propCopyResult.hr); output.multiplier = propCopyResult.ExtractPayload(); } @@ -1104,7 +1104,7 @@ JsonValue CatalogPriceOverride::ToJson() const JsonValue CatalogPriceOverride::ToJson(const PFCatalogCatalogPriceOverride& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Amounts", input.amounts, input.amountsCount); return output; } @@ -1157,7 +1157,7 @@ JsonValue CatalogPriceOptionsOverride::ToJson() const JsonValue CatalogPriceOptionsOverride::ToJson(const PFCatalogCatalogPriceOptionsOverride& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Prices", input.prices, input.pricesCount); return output; } @@ -1210,7 +1210,7 @@ JsonValue StoreDetails::ToJson() const JsonValue StoreDetails::ToJson(const PFCatalogStoreDetails& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FilterOptions", input.filterOptions); JsonUtils::ObjectAddMember(output, "Permissions", input.permissions); JsonUtils::ObjectAddMember(output, "PriceOptionsOverride", input.priceOptionsOverride); @@ -1275,17 +1275,17 @@ HRESULT StoreDetails::Copy(const PFCatalogStoreDetails& input, PFCatalogStoreDet { output = input; { - auto propCopyResult = buffer.CopyTo(input.filterOptions); + auto propCopyResult = buffer.CopyTo(input.filterOptions); RETURN_IF_FAILED(propCopyResult.hr); output.filterOptions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.permissions); + auto propCopyResult = buffer.CopyTo(input.permissions); RETURN_IF_FAILED(propCopyResult.hr); output.permissions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.priceOptionsOverride); + auto propCopyResult = buffer.CopyTo(input.priceOptionsOverride); RETURN_IF_FAILED(propCopyResult.hr); output.priceOptionsOverride = propCopyResult.ExtractPayload(); } @@ -1299,7 +1299,7 @@ JsonValue CatalogItem::ToJson() const JsonValue CatalogItem::ToJson(const PFCatalogCatalogItem& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AlternateIds", input.alternateIds, input.alternateIdsCount); JsonUtils::ObjectAddMemberArray(output, "Contents", input.contents, input.contentsCount); JsonUtils::ObjectAddMember(output, "ContentType", input.contentType); @@ -1609,17 +1609,17 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.contents = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.contentType); + auto propCopyResult = buffer.CopyTo(input.contentType); RETURN_IF_FAILED(propCopyResult.hr); output.contentType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.creationDate); + auto propCopyResult = buffer.CopyTo(input.creationDate); RETURN_IF_FAILED(propCopyResult.hr); output.creationDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.creatorEntity); + auto propCopyResult = buffer.CopyTo(input.creatorEntity); RETURN_IF_FAILED(propCopyResult.hr); output.creatorEntity = propCopyResult.ExtractPayload(); } @@ -1629,7 +1629,7 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.deepLinks = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.defaultStackId); + auto propCopyResult = buffer.CopyTo(input.defaultStackId); RETURN_IF_FAILED(propCopyResult.hr); output.defaultStackId = propCopyResult.ExtractPayload(); } @@ -1644,22 +1644,22 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.displayProperties.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayVersion); + auto propCopyResult = buffer.CopyTo(input.displayVersion); RETURN_IF_FAILED(propCopyResult.hr); output.displayVersion = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.endDate); + auto propCopyResult = buffer.CopyTo(input.endDate); RETURN_IF_FAILED(propCopyResult.hr); output.endDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } @@ -1669,7 +1669,7 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.images = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.isHidden); + auto propCopyResult = buffer.CopyTo(input.isHidden); RETURN_IF_FAILED(propCopyResult.hr); output.isHidden = propCopyResult.ExtractPayload(); } @@ -1684,12 +1684,12 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.keywords = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastModifiedDate); + auto propCopyResult = buffer.CopyTo(input.lastModifiedDate); RETURN_IF_FAILED(propCopyResult.hr); output.lastModifiedDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.moderation); + auto propCopyResult = buffer.CopyTo(input.moderation); RETURN_IF_FAILED(propCopyResult.hr); output.moderation = propCopyResult.ExtractPayload(); } @@ -1699,22 +1699,22 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.platforms = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.priceOptions); + auto propCopyResult = buffer.CopyTo(input.priceOptions); RETURN_IF_FAILED(propCopyResult.hr); output.priceOptions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.rating); + auto propCopyResult = buffer.CopyTo(input.rating); RETURN_IF_FAILED(propCopyResult.hr); output.rating = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.startDate); + auto propCopyResult = buffer.CopyTo(input.startDate); RETURN_IF_FAILED(propCopyResult.hr); output.startDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.storeDetails); + auto propCopyResult = buffer.CopyTo(input.storeDetails); RETURN_IF_FAILED(propCopyResult.hr); output.storeDetails = propCopyResult.ExtractPayload(); } @@ -1729,7 +1729,7 @@ HRESULT CatalogItem::Copy(const PFCatalogCatalogItem& input, PFCatalogCatalogIte output.title = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -1743,7 +1743,7 @@ JsonValue CreateDraftItemRequest::ToJson() const JsonValue CreateDraftItemRequest::ToJson(const PFCatalogCreateDraftItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Item", input.item); JsonUtils::ObjectAddMember(output, "Publish", input.publish); @@ -1786,7 +1786,7 @@ HRESULT CreateDraftItemResponse::Copy(const PFCatalogCreateDraftItemResponse& in { output = input; { - auto propCopyResult = buffer.CopyTo(input.item); + auto propCopyResult = buffer.CopyTo(input.item); RETURN_IF_FAILED(propCopyResult.hr); output.item = propCopyResult.ExtractPayload(); } @@ -1800,7 +1800,7 @@ JsonValue UploadInfo::ToJson() const JsonValue UploadInfo::ToJson(const PFCatalogUploadInfo& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FileName", input.fileName); return output; } @@ -1812,7 +1812,7 @@ JsonValue CreateUploadUrlsRequest::ToJson() const JsonValue CreateUploadUrlsRequest::ToJson(const PFCatalogCreateUploadUrlsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "Files", input.files, input.filesCount); return output; @@ -1867,17 +1867,17 @@ HRESULT UploadUrlMetadata::Copy(const PFCatalogUploadUrlMetadata& input, PFCatal { output = input; { - auto propCopyResult = buffer.CopyTo(input.fileName); + auto propCopyResult = buffer.CopyTo(input.fileName); RETURN_IF_FAILED(propCopyResult.hr); output.fileName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.url); + auto propCopyResult = buffer.CopyTo(input.url); RETURN_IF_FAILED(propCopyResult.hr); output.url = propCopyResult.ExtractPayload(); } @@ -1932,7 +1932,7 @@ JsonValue DeleteEntityItemReviewsRequest::ToJson() const JsonValue DeleteEntityItemReviewsRequest::ToJson(const PFCatalogDeleteEntityItemReviewsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -1945,7 +1945,7 @@ JsonValue DeleteItemRequest::ToJson() const JsonValue DeleteItemRequest::ToJson(const PFCatalogDeleteItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -1960,7 +1960,7 @@ JsonValue GetCatalogConfigRequest::ToJson() const JsonValue GetCatalogConfigRequest::ToJson(const PFCatalogGetCatalogConfigRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -1972,7 +1972,7 @@ JsonValue CatalogSpecificConfig::ToJson() const JsonValue CatalogSpecificConfig::ToJson(const PFCatalogCatalogSpecificConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "ContentTypes", input.contentTypes, input.contentTypesCount); JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); return output; @@ -2040,7 +2040,7 @@ JsonValue DeepLinkFormat::ToJson() const JsonValue DeepLinkFormat::ToJson(const PFCatalogDeepLinkFormat& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Format", input.format); JsonUtils::ObjectAddMember(output, "Platform", input.platform); return output; @@ -2087,12 +2087,12 @@ HRESULT DeepLinkFormat::Copy(const PFCatalogDeepLinkFormat& input, PFCatalogDeep { output = input; { - auto propCopyResult = buffer.CopyTo(input.format); + auto propCopyResult = buffer.CopyTo(input.format); RETURN_IF_FAILED(propCopyResult.hr); output.format = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -2106,7 +2106,7 @@ JsonValue DisplayPropertyIndexInfo::ToJson() const JsonValue DisplayPropertyIndexInfo::ToJson(const PFCatalogDisplayPropertyIndexInfo& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "Type", input.type); return output; @@ -2153,12 +2153,12 @@ HRESULT DisplayPropertyIndexInfo::Copy(const PFCatalogDisplayPropertyIndexInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -2172,7 +2172,7 @@ JsonValue FileConfig::ToJson() const JsonValue FileConfig::ToJson(const PFCatalogFileConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "ContentTypes", input.contentTypes, input.contentTypesCount); JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); return output; @@ -2240,7 +2240,7 @@ JsonValue ImageConfig::ToJson() const JsonValue ImageConfig::ToJson(const PFCatalogImageConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); return output; } @@ -2293,7 +2293,7 @@ JsonValue CategoryRatingConfig::ToJson() const JsonValue CategoryRatingConfig::ToJson(const PFCatalogCategoryRatingConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Name", input.name); return output; } @@ -2331,7 +2331,7 @@ HRESULT CategoryRatingConfig::Copy(const PFCatalogCategoryRatingConfig& input, P { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -2345,7 +2345,7 @@ JsonValue ReviewConfig::ToJson() const JsonValue ReviewConfig::ToJson(const PFCatalogReviewConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "CategoryRatings", input.categoryRatings, input.categoryRatingsCount); return output; } @@ -2398,7 +2398,7 @@ JsonValue UserGeneratedContentSpecificConfig::ToJson() const JsonValue UserGeneratedContentSpecificConfig::ToJson(const PFCatalogUserGeneratedContentSpecificConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "ContentTypes", input.contentTypes, input.contentTypesCount); JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); return output; @@ -2466,7 +2466,7 @@ JsonValue CatalogConfig::ToJson() const JsonValue CatalogConfig::ToJson(const PFCatalogCatalogConfig& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AdminEntities", input.adminEntities, input.adminEntitiesCount); JsonUtils::ObjectAddMember(output, "Catalog", input.catalog); JsonUtils::ObjectAddMemberArray(output, "DeepLinkFormats", input.deepLinkFormats, input.deepLinkFormatsCount); @@ -2613,7 +2613,7 @@ HRESULT CatalogConfig::Copy(const PFCatalogCatalogConfig& input, PFCatalogCatalo output.adminEntities = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.catalog); + auto propCopyResult = buffer.CopyTo(input.catalog); RETURN_IF_FAILED(propCopyResult.hr); output.catalog = propCopyResult.ExtractPayload(); } @@ -2628,12 +2628,12 @@ HRESULT CatalogConfig::Copy(const PFCatalogCatalogConfig& input, PFCatalogCatalo output.displayPropertyIndexInfos = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.file); + auto propCopyResult = buffer.CopyTo(input.file); RETURN_IF_FAILED(propCopyResult.hr); output.file = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.image); + auto propCopyResult = buffer.CopyTo(input.image); RETURN_IF_FAILED(propCopyResult.hr); output.image = propCopyResult.ExtractPayload(); } @@ -2643,7 +2643,7 @@ HRESULT CatalogConfig::Copy(const PFCatalogCatalogConfig& input, PFCatalogCatalo output.platforms = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.review); + auto propCopyResult = buffer.CopyTo(input.review); RETURN_IF_FAILED(propCopyResult.hr); output.review = propCopyResult.ExtractPayload(); } @@ -2653,7 +2653,7 @@ HRESULT CatalogConfig::Copy(const PFCatalogCatalogConfig& input, PFCatalogCatalo output.reviewerEntities = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.userGeneratedContent); + auto propCopyResult = buffer.CopyTo(input.userGeneratedContent); RETURN_IF_FAILED(propCopyResult.hr); output.userGeneratedContent = propCopyResult.ExtractPayload(); } @@ -2696,7 +2696,7 @@ HRESULT GetCatalogConfigResponse::Copy(const PFCatalogGetCatalogConfigResponse& { output = input; { - auto propCopyResult = buffer.CopyTo(input.config); + auto propCopyResult = buffer.CopyTo(input.config); RETURN_IF_FAILED(propCopyResult.hr); output.config = propCopyResult.ExtractPayload(); } @@ -2710,7 +2710,7 @@ JsonValue GetDraftItemRequest::ToJson() const JsonValue GetDraftItemRequest::ToJson(const PFCatalogGetDraftItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2754,7 +2754,7 @@ HRESULT GetDraftItemResponse::Copy(const PFCatalogGetDraftItemResponse& input, P { output = input; { - auto propCopyResult = buffer.CopyTo(input.item); + auto propCopyResult = buffer.CopyTo(input.item); RETURN_IF_FAILED(propCopyResult.hr); output.item = propCopyResult.ExtractPayload(); } @@ -2768,7 +2768,7 @@ JsonValue GetDraftItemsRequest::ToJson() const JsonValue GetDraftItemsRequest::ToJson(const PFCatalogGetDraftItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AlternateIds", input.alternateIds, input.alternateIdsCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2818,7 +2818,7 @@ HRESULT GetDraftItemsResponse::Copy(const PFCatalogGetDraftItemsResponse& input, { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -2837,7 +2837,7 @@ JsonValue GetEntityDraftItemsRequest::ToJson() const JsonValue GetEntityDraftItemsRequest::ToJson(const PFCatalogGetEntityDraftItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -2888,7 +2888,7 @@ HRESULT GetEntityDraftItemsResponse::Copy(const PFCatalogGetEntityDraftItemsResp { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -2907,7 +2907,7 @@ JsonValue GetEntityItemReviewRequest::ToJson() const JsonValue GetEntityItemReviewRequest::ToJson(const PFCatalogGetEntityItemReviewRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2922,7 +2922,7 @@ JsonValue Review::ToJson() const JsonValue Review::ToJson(const PFCatalogReview& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CategoryRatings", input.categoryRatings, input.categoryRatingsCount); JsonUtils::ObjectAddMember(output, "HelpfulNegative", input.helpfulNegative); JsonUtils::ObjectAddMember(output, "HelpfulPositive", input.helpfulPositive); @@ -3056,42 +3056,42 @@ HRESULT Review::Copy(const PFCatalogReview& input, PFCatalogReview& output, Mode output.categoryRatings = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemVersion); + auto propCopyResult = buffer.CopyTo(input.itemVersion); RETURN_IF_FAILED(propCopyResult.hr); output.itemVersion = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.locale); + auto propCopyResult = buffer.CopyTo(input.locale); RETURN_IF_FAILED(propCopyResult.hr); output.locale = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reviewerEntity); + auto propCopyResult = buffer.CopyTo(input.reviewerEntity); RETURN_IF_FAILED(propCopyResult.hr); output.reviewerEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reviewerId); + auto propCopyResult = buffer.CopyTo(input.reviewerId); RETURN_IF_FAILED(propCopyResult.hr); output.reviewerId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reviewId); + auto propCopyResult = buffer.CopyTo(input.reviewId); RETURN_IF_FAILED(propCopyResult.hr); output.reviewId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.reviewText); + auto propCopyResult = buffer.CopyTo(input.reviewText); RETURN_IF_FAILED(propCopyResult.hr); output.reviewText = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.title); + auto propCopyResult = buffer.CopyTo(input.title); RETURN_IF_FAILED(propCopyResult.hr); output.title = propCopyResult.ExtractPayload(); } @@ -3134,7 +3134,7 @@ HRESULT GetEntityItemReviewResponse::Copy(const PFCatalogGetEntityItemReviewResp { output = input; { - auto propCopyResult = buffer.CopyTo(input.review); + auto propCopyResult = buffer.CopyTo(input.review); RETURN_IF_FAILED(propCopyResult.hr); output.review = propCopyResult.ExtractPayload(); } @@ -3148,7 +3148,7 @@ JsonValue GetItemRequest::ToJson() const JsonValue GetItemRequest::ToJson(const PFCatalogGetItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3192,7 +3192,7 @@ HRESULT GetItemResponse::Copy(const PFCatalogGetItemResponse& input, PFCatalogGe { output = input; { - auto propCopyResult = buffer.CopyTo(input.item); + auto propCopyResult = buffer.CopyTo(input.item); RETURN_IF_FAILED(propCopyResult.hr); output.item = propCopyResult.ExtractPayload(); } @@ -3206,7 +3206,7 @@ JsonValue GetItemContainersRequest::ToJson() const JsonValue GetItemContainersRequest::ToJson(const PFCatalogGetItemContainersRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); @@ -3263,7 +3263,7 @@ HRESULT GetItemContainersResponse::Copy(const PFCatalogGetItemContainersResponse output.containers = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -3277,7 +3277,7 @@ JsonValue GetItemModerationStateRequest::ToJson() const JsonValue GetItemModerationStateRequest::ToJson(const PFCatalogGetItemModerationStateRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Id", input.id); @@ -3320,7 +3320,7 @@ HRESULT GetItemModerationStateResponse::Copy(const PFCatalogGetItemModerationSta { output = input; { - auto propCopyResult = buffer.CopyTo(input.state); + auto propCopyResult = buffer.CopyTo(input.state); RETURN_IF_FAILED(propCopyResult.hr); output.state = propCopyResult.ExtractPayload(); } @@ -3334,7 +3334,7 @@ JsonValue GetItemPublishStatusRequest::ToJson() const JsonValue GetItemPublishStatusRequest::ToJson(const PFCatalogGetItemPublishStatusRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3383,12 +3383,12 @@ HRESULT GetItemPublishStatusResponse::Copy(const PFCatalogGetItemPublishStatusRe { output = input; { - auto propCopyResult = buffer.CopyTo(input.result); + auto propCopyResult = buffer.CopyTo(input.result); RETURN_IF_FAILED(propCopyResult.hr); output.result = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.statusMessage); + auto propCopyResult = buffer.CopyTo(input.statusMessage); RETURN_IF_FAILED(propCopyResult.hr); output.statusMessage = propCopyResult.ExtractPayload(); } @@ -3402,7 +3402,7 @@ JsonValue GetItemReviewsRequest::ToJson() const JsonValue GetItemReviewsRequest::ToJson(const PFCatalogGetItemReviewsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); @@ -3454,7 +3454,7 @@ HRESULT GetItemReviewsResponse::Copy(const PFCatalogGetItemReviewsResponse& inpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -3473,7 +3473,7 @@ JsonValue GetItemReviewSummaryRequest::ToJson() const JsonValue GetItemReviewSummaryRequest::ToJson(const PFCatalogGetItemReviewSummaryRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Id", input.id); @@ -3540,17 +3540,17 @@ HRESULT GetItemReviewSummaryResponse::Copy(const PFCatalogGetItemReviewSummaryRe { output = input; { - auto propCopyResult = buffer.CopyTo(input.leastFavorableReview); + auto propCopyResult = buffer.CopyTo(input.leastFavorableReview); RETURN_IF_FAILED(propCopyResult.hr); output.leastFavorableReview = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.mostFavorableReview); + auto propCopyResult = buffer.CopyTo(input.mostFavorableReview); RETURN_IF_FAILED(propCopyResult.hr); output.mostFavorableReview = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.rating); + auto propCopyResult = buffer.CopyTo(input.rating); RETURN_IF_FAILED(propCopyResult.hr); output.rating = propCopyResult.ExtractPayload(); } @@ -3564,7 +3564,7 @@ JsonValue GetItemsRequest::ToJson() const JsonValue GetItemsRequest::ToJson(const PFCatalogGetItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AlternateIds", input.alternateIds, input.alternateIdsCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3620,7 +3620,7 @@ JsonValue PublishDraftItemRequest::ToJson() const JsonValue PublishDraftItemRequest::ToJson(const PFCatalogPublishDraftItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3636,7 +3636,7 @@ JsonValue ReportItemRequest::ToJson() const JsonValue ReportItemRequest::ToJson(const PFCatalogReportItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "ConcernCategory", input.concernCategory); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -3653,7 +3653,7 @@ JsonValue ReportItemReviewRequest::ToJson() const JsonValue ReportItemReviewRequest::ToJson(const PFCatalogReportItemReviewRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "ConcernCategory", input.concernCategory); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -3671,7 +3671,7 @@ JsonValue ReviewItemRequest::ToJson() const JsonValue ReviewItemRequest::ToJson(const PFCatalogReviewItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3687,7 +3687,7 @@ JsonValue StoreReference::ToJson() const JsonValue StoreReference::ToJson(const PFCatalogStoreReference& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "Id", input.id); return output; @@ -3700,7 +3700,7 @@ JsonValue SearchItemsRequest::ToJson() const JsonValue SearchItemsRequest::ToJson(const PFCatalogSearchItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -3756,7 +3756,7 @@ HRESULT SearchItemsResponse::Copy(const PFCatalogSearchItemsResponse& input, PFC { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -3775,7 +3775,7 @@ JsonValue SetItemModerationStateRequest::ToJson() const JsonValue SetItemModerationStateRequest::ToJson(const PFCatalogSetItemModerationStateRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Id", input.id); @@ -3791,7 +3791,7 @@ JsonValue SubmitItemReviewVoteRequest::ToJson() const JsonValue SubmitItemReviewVoteRequest::ToJson(const PFCatalogSubmitItemReviewVoteRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -3808,7 +3808,7 @@ JsonValue ReviewTakedown::ToJson() const JsonValue ReviewTakedown::ToJson(const PFCatalogReviewTakedown& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "ItemId", input.itemId); JsonUtils::ObjectAddMember(output, "ReviewId", input.reviewId); @@ -3822,7 +3822,7 @@ JsonValue TakedownItemReviewsRequest::ToJson() const JsonValue TakedownItemReviewsRequest::ToJson(const PFCatalogTakedownItemReviewsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "Reviews", input.reviews, input.reviewsCount); return output; @@ -3835,7 +3835,7 @@ JsonValue UpdateCatalogConfigRequest::ToJson() const JsonValue UpdateCatalogConfigRequest::ToJson(const PFCatalogUpdateCatalogConfigRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Config", input.config); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; @@ -3848,7 +3848,7 @@ JsonValue UpdateDraftItemRequest::ToJson() const JsonValue UpdateDraftItemRequest::ToJson(const PFCatalogUpdateDraftItemRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Item", input.item); JsonUtils::ObjectAddMember(output, "Publish", input.publish); @@ -3891,7 +3891,7 @@ HRESULT UpdateDraftItemResponse::Copy(const PFCatalogUpdateDraftItemResponse& in { output = input; { - auto propCopyResult = buffer.CopyTo(input.item); + auto propCopyResult = buffer.CopyTo(input.item); RETURN_IF_FAILED(propCopyResult.hr); output.item = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/CloudScriptTypes.cpp b/Source/PlayFabServices/Source/Generated/CloudScriptTypes.cpp index 4e95b9e..9ee1c99 100644 --- a/Source/PlayFabServices/Source/Generated/CloudScriptTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/CloudScriptTypes.cpp @@ -15,7 +15,7 @@ JsonValue ExecuteCloudScriptRequest::ToJson() const JsonValue ExecuteCloudScriptRequest::ToJson(const PFCloudScriptExecuteCloudScriptRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "FunctionName", input.functionName); JsonUtils::ObjectAddMember(output, "FunctionParameter", input.functionParameter); @@ -74,17 +74,17 @@ HRESULT ScriptExecutionError::Copy(const PFCloudScriptScriptExecutionError& inpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.error); + auto propCopyResult = buffer.CopyTo(input.error); RETURN_IF_FAILED(propCopyResult.hr); output.error = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.message); + auto propCopyResult = buffer.CopyTo(input.message); RETURN_IF_FAILED(propCopyResult.hr); output.message = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.stackTrace); + auto propCopyResult = buffer.CopyTo(input.stackTrace); RETURN_IF_FAILED(propCopyResult.hr); output.stackTrace = propCopyResult.ExtractPayload(); } @@ -145,12 +145,12 @@ HRESULT LogStatement::Copy(const PFCloudScriptLogStatement& input, PFCloudScript output.data.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.level); + auto propCopyResult = buffer.CopyTo(input.level); RETURN_IF_FAILED(propCopyResult.hr); output.level = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.message); + auto propCopyResult = buffer.CopyTo(input.message); RETURN_IF_FAILED(propCopyResult.hr); output.message = propCopyResult.ExtractPayload(); } @@ -246,12 +246,12 @@ HRESULT ExecuteCloudScriptResult::Copy(const PFCloudScriptExecuteCloudScriptResu { output = input; { - auto propCopyResult = buffer.CopyTo(input.error); + auto propCopyResult = buffer.CopyTo(input.error); RETURN_IF_FAILED(propCopyResult.hr); output.error = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.functionName); + auto propCopyResult = buffer.CopyTo(input.functionName); RETURN_IF_FAILED(propCopyResult.hr); output.functionName = propCopyResult.ExtractPayload(); } @@ -261,7 +261,7 @@ HRESULT ExecuteCloudScriptResult::Copy(const PFCloudScriptExecuteCloudScriptResu output.functionResult.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.functionResultTooLarge); + auto propCopyResult = buffer.CopyTo(input.functionResultTooLarge); RETURN_IF_FAILED(propCopyResult.hr); output.functionResultTooLarge = propCopyResult.ExtractPayload(); } @@ -271,7 +271,7 @@ HRESULT ExecuteCloudScriptResult::Copy(const PFCloudScriptExecuteCloudScriptResu output.logs = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.logsTooLarge); + auto propCopyResult = buffer.CopyTo(input.logsTooLarge); RETURN_IF_FAILED(propCopyResult.hr); output.logsTooLarge = propCopyResult.ExtractPayload(); } @@ -285,7 +285,7 @@ JsonValue ExecuteCloudScriptServerRequest::ToJson() const JsonValue ExecuteCloudScriptServerRequest::ToJson(const PFCloudScriptExecuteCloudScriptServerRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "FunctionName", input.functionName); JsonUtils::ObjectAddMember(output, "FunctionParameter", input.functionParameter); @@ -303,7 +303,7 @@ JsonValue ExecuteEntityCloudScriptRequest::ToJson() const JsonValue ExecuteEntityCloudScriptRequest::ToJson(const PFCloudScriptExecuteEntityCloudScriptRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "FunctionName", input.functionName); @@ -321,7 +321,7 @@ JsonValue ExecuteFunctionRequest::ToJson() const JsonValue ExecuteFunctionRequest::ToJson(const PFCloudScriptExecuteFunctionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "FunctionName", input.functionName); @@ -379,17 +379,17 @@ HRESULT FunctionExecutionError::Copy(const PFCloudScriptFunctionExecutionError& { output = input; { - auto propCopyResult = buffer.CopyTo(input.error); + auto propCopyResult = buffer.CopyTo(input.error); RETURN_IF_FAILED(propCopyResult.hr); output.error = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.message); + auto propCopyResult = buffer.CopyTo(input.message); RETURN_IF_FAILED(propCopyResult.hr); output.message = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.stackTrace); + auto propCopyResult = buffer.CopyTo(input.stackTrace); RETURN_IF_FAILED(propCopyResult.hr); output.stackTrace = propCopyResult.ExtractPayload(); } @@ -458,12 +458,12 @@ HRESULT ExecuteFunctionResult::Copy(const PFCloudScriptExecuteFunctionResult& in { output = input; { - auto propCopyResult = buffer.CopyTo(input.error); + auto propCopyResult = buffer.CopyTo(input.error); RETURN_IF_FAILED(propCopyResult.hr); output.error = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.functionName); + auto propCopyResult = buffer.CopyTo(input.functionName); RETURN_IF_FAILED(propCopyResult.hr); output.functionName = propCopyResult.ExtractPayload(); } @@ -473,7 +473,7 @@ HRESULT ExecuteFunctionResult::Copy(const PFCloudScriptExecuteFunctionResult& in output.functionResult.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.functionResultTooLarge); + auto propCopyResult = buffer.CopyTo(input.functionResultTooLarge); RETURN_IF_FAILED(propCopyResult.hr); output.functionResultTooLarge = propCopyResult.ExtractPayload(); } @@ -487,7 +487,7 @@ JsonValue ListFunctionsRequest::ToJson() const JsonValue ListFunctionsRequest::ToJson(const PFCloudScriptListFunctionsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -541,17 +541,17 @@ HRESULT EventHubFunctionModel::Copy(const PFCloudScriptEventHubFunctionModel& in { output = input; { - auto propCopyResult = buffer.CopyTo(input.connectionString); + auto propCopyResult = buffer.CopyTo(input.connectionString); RETURN_IF_FAILED(propCopyResult.hr); output.connectionString = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.eventHubName); + auto propCopyResult = buffer.CopyTo(input.eventHubName); RETURN_IF_FAILED(propCopyResult.hr); output.eventHubName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.functionName); + auto propCopyResult = buffer.CopyTo(input.functionName); RETURN_IF_FAILED(propCopyResult.hr); output.functionName = propCopyResult.ExtractPayload(); } @@ -606,7 +606,7 @@ JsonValue RegisterEventHubFunctionRequest::ToJson() const JsonValue RegisterEventHubFunctionRequest::ToJson(const PFCloudScriptRegisterEventHubFunctionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConnectionString", input.connectionString); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EventHubName", input.eventHubName); diff --git a/Source/PlayFabServices/Source/Generated/CoreTypes.cpp b/Source/PlayFabServices/Source/Generated/CoreTypes.cpp index da937dc..45b8ab5 100644 --- a/Source/PlayFabServices/Source/Generated/CoreTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/CoreTypes.cpp @@ -13,7 +13,7 @@ JsonValue PlayerProfileViewConstraints::ToJson() const JsonValue PlayerProfileViewConstraints::ToJson(const PFPlayerProfileViewConstraints& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ShowAvatarUrl", input.showAvatarUrl); JsonUtils::ObjectAddMember(output, "ShowBannedUntil", input.showBannedUntil); JsonUtils::ObjectAddMember(output, "ShowCampaignAttributions", input.showCampaignAttributions); @@ -41,7 +41,7 @@ JsonValue GetPlayerCombinedInfoRequestParams::ToJson() const JsonValue GetPlayerCombinedInfoRequestParams::ToJson(const PFGetPlayerCombinedInfoRequestParams& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "GetCharacterInventories", input.getCharacterInventories); JsonUtils::ObjectAddMember(output, "GetCharacterList", input.getCharacterList); JsonUtils::ObjectAddMember(output, "GetPlayerProfile", input.getPlayerProfile); @@ -67,7 +67,7 @@ JsonValue EntityKey::ToJson() const JsonValue EntityKey::ToJson(const PFEntityKey& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "Type", input.type); return output; @@ -114,12 +114,12 @@ HRESULT EntityKey::Copy(const PFEntityKey& input, PFEntityKey& output, ModelBuff { output = input; { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -159,7 +159,7 @@ HRESULT UserAndroidDeviceInfo::Copy(const PFUserAndroidDeviceInfo& input, PFUser { output = input; { - auto propCopyResult = buffer.CopyTo(input.androidDeviceId); + auto propCopyResult = buffer.CopyTo(input.androidDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.androidDeviceId = propCopyResult.ExtractPayload(); } @@ -199,7 +199,7 @@ HRESULT UserAppleIdInfo::Copy(const PFUserAppleIdInfo& input, PFUserAppleIdInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.appleSubjectId); + auto propCopyResult = buffer.CopyTo(input.appleSubjectId); RETURN_IF_FAILED(propCopyResult.hr); output.appleSubjectId = propCopyResult.ExtractPayload(); } @@ -239,7 +239,7 @@ HRESULT UserCustomIdInfo::Copy(const PFUserCustomIdInfo& input, PFUserCustomIdIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.customId); + auto propCopyResult = buffer.CopyTo(input.customId); RETURN_IF_FAILED(propCopyResult.hr); output.customId = propCopyResult.ExtractPayload(); } @@ -287,12 +287,12 @@ HRESULT UserFacebookInfo::Copy(const PFUserFacebookInfo& input, PFUserFacebookIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookId); + auto propCopyResult = buffer.CopyTo(input.facebookId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.fullName); + auto propCopyResult = buffer.CopyTo(input.fullName); RETURN_IF_FAILED(propCopyResult.hr); output.fullName = propCopyResult.ExtractPayload(); } @@ -332,7 +332,7 @@ HRESULT UserFacebookInstantGamesIdInfo::Copy(const PFUserFacebookInstantGamesIdI { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); + auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesId); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInstantGamesId = propCopyResult.ExtractPayload(); } @@ -372,7 +372,7 @@ HRESULT UserGameCenterInfo::Copy(const PFUserGameCenterInfo& input, PFUserGameCe { output = input; { - auto propCopyResult = buffer.CopyTo(input.gameCenterId); + auto propCopyResult = buffer.CopyTo(input.gameCenterId); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterId = propCopyResult.ExtractPayload(); } @@ -444,27 +444,27 @@ HRESULT UserGoogleInfo::Copy(const PFUserGoogleInfo& input, PFUserGoogleInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.googleEmail); + auto propCopyResult = buffer.CopyTo(input.googleEmail); RETURN_IF_FAILED(propCopyResult.hr); output.googleEmail = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleGender); + auto propCopyResult = buffer.CopyTo(input.googleGender); RETURN_IF_FAILED(propCopyResult.hr); output.googleGender = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleId); + auto propCopyResult = buffer.CopyTo(input.googleId); RETURN_IF_FAILED(propCopyResult.hr); output.googleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleLocale); + auto propCopyResult = buffer.CopyTo(input.googleLocale); RETURN_IF_FAILED(propCopyResult.hr); output.googleLocale = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleName); + auto propCopyResult = buffer.CopyTo(input.googleName); RETURN_IF_FAILED(propCopyResult.hr); output.googleName = propCopyResult.ExtractPayload(); } @@ -520,17 +520,17 @@ HRESULT UserGooglePlayGamesInfo::Copy(const PFUserGooglePlayGamesInfo& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerAvatarImageUrl); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerAvatarImageUrl); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerAvatarImageUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerDisplayName); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerDisplayName); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerDisplayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesPlayerId); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesPlayerId = propCopyResult.ExtractPayload(); } @@ -570,7 +570,7 @@ HRESULT UserIosDeviceInfo::Copy(const PFUserIosDeviceInfo& input, PFUserIosDevic { output = input; { - auto propCopyResult = buffer.CopyTo(input.iosDeviceId); + auto propCopyResult = buffer.CopyTo(input.iosDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.iosDeviceId = propCopyResult.ExtractPayload(); } @@ -618,12 +618,12 @@ HRESULT UserKongregateInfo::Copy(const PFUserKongregateInfo& input, PFUserKongre { output = input; { - auto propCopyResult = buffer.CopyTo(input.kongregateId); + auto propCopyResult = buffer.CopyTo(input.kongregateId); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.kongregateName); + auto propCopyResult = buffer.CopyTo(input.kongregateName); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateName = propCopyResult.ExtractPayload(); } @@ -663,7 +663,7 @@ HRESULT UserNintendoSwitchAccountIdInfo::Copy(const PFUserNintendoSwitchAccountI { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountSubjectId); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountSubjectId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchAccountSubjectId = propCopyResult.ExtractPayload(); } @@ -703,7 +703,7 @@ HRESULT UserNintendoSwitchDeviceIdInfo::Copy(const PFUserNintendoSwitchDeviceIdI { output = input; { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceId); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchDeviceId = propCopyResult.ExtractPayload(); } @@ -759,17 +759,17 @@ HRESULT UserOpenIdInfo::Copy(const PFUserOpenIdInfo& input, PFUserOpenIdInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.connectionId); + auto propCopyResult = buffer.CopyTo(input.connectionId); RETURN_IF_FAILED(propCopyResult.hr); output.connectionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.issuer); + auto propCopyResult = buffer.CopyTo(input.issuer); RETURN_IF_FAILED(propCopyResult.hr); output.issuer = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subject); + auto propCopyResult = buffer.CopyTo(input.subject); RETURN_IF_FAILED(propCopyResult.hr); output.subject = propCopyResult.ExtractPayload(); } @@ -809,7 +809,7 @@ HRESULT UserPrivateAccountInfo::Copy(const PFUserPrivateAccountInfo& input, PFUs { output = input; { - auto propCopyResult = buffer.CopyTo(input.email); + auto propCopyResult = buffer.CopyTo(input.email); RETURN_IF_FAILED(propCopyResult.hr); output.email = propCopyResult.ExtractPayload(); } @@ -857,12 +857,12 @@ HRESULT UserPsnInfo::Copy(const PFUserPsnInfo& input, PFUserPsnInfo& output, Mod { output = input; { - auto propCopyResult = buffer.CopyTo(input.psnAccountId); + auto propCopyResult = buffer.CopyTo(input.psnAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.psnAccountId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.psnOnlineId); + auto propCopyResult = buffer.CopyTo(input.psnOnlineId); RETURN_IF_FAILED(propCopyResult.hr); output.psnOnlineId = propCopyResult.ExtractPayload(); } @@ -902,7 +902,7 @@ HRESULT UserServerCustomIdInfo::Copy(const PFUserServerCustomIdInfo& input, PFUs { output = input; { - auto propCopyResult = buffer.CopyTo(input.customId); + auto propCopyResult = buffer.CopyTo(input.customId); RETURN_IF_FAILED(propCopyResult.hr); output.customId = propCopyResult.ExtractPayload(); } @@ -974,27 +974,27 @@ HRESULT UserSteamInfo::Copy(const PFUserSteamInfo& input, PFUserSteamInfo& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.steamActivationStatus); + auto propCopyResult = buffer.CopyTo(input.steamActivationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.steamActivationStatus = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamCountry); + auto propCopyResult = buffer.CopyTo(input.steamCountry); RETURN_IF_FAILED(propCopyResult.hr); output.steamCountry = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamCurrency); + auto propCopyResult = buffer.CopyTo(input.steamCurrency); RETURN_IF_FAILED(propCopyResult.hr); output.steamCurrency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamId); + auto propCopyResult = buffer.CopyTo(input.steamId); RETURN_IF_FAILED(propCopyResult.hr); output.steamId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamName); + auto propCopyResult = buffer.CopyTo(input.steamName); RETURN_IF_FAILED(propCopyResult.hr); output.steamName = propCopyResult.ExtractPayload(); } @@ -1087,37 +1087,37 @@ HRESULT UserTitleInfo::Copy(const PFUserTitleInfo& input, PFUserTitleInfo& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.firstLogin); + auto propCopyResult = buffer.CopyTo(input.firstLogin); RETURN_IF_FAILED(propCopyResult.hr); output.firstLogin = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.isBanned); + auto propCopyResult = buffer.CopyTo(input.isBanned); RETURN_IF_FAILED(propCopyResult.hr); output.isBanned = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLogin); + auto propCopyResult = buffer.CopyTo(input.lastLogin); RETURN_IF_FAILED(propCopyResult.hr); output.lastLogin = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.origination); + auto propCopyResult = buffer.CopyTo(input.origination); RETURN_IF_FAILED(propCopyResult.hr); output.origination = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titlePlayerAccount); + auto propCopyResult = buffer.CopyTo(input.titlePlayerAccount); RETURN_IF_FAILED(propCopyResult.hr); output.titlePlayerAccount = propCopyResult.ExtractPayload(); } @@ -1165,12 +1165,12 @@ HRESULT UserTwitchInfo::Copy(const PFUserTwitchInfo& input, PFUserTwitchInfo& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.twitchId); + auto propCopyResult = buffer.CopyTo(input.twitchId); RETURN_IF_FAILED(propCopyResult.hr); output.twitchId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.twitchUserName); + auto propCopyResult = buffer.CopyTo(input.twitchUserName); RETURN_IF_FAILED(propCopyResult.hr); output.twitchUserName = propCopyResult.ExtractPayload(); } @@ -1218,12 +1218,12 @@ HRESULT UserXboxInfo::Copy(const PFUserXboxInfo& input, PFUserXboxInfo& output, { output = input; { - auto propCopyResult = buffer.CopyTo(input.xboxUserId); + auto propCopyResult = buffer.CopyTo(input.xboxUserId); RETURN_IF_FAILED(propCopyResult.hr); output.xboxUserId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxUserSandbox); + auto propCopyResult = buffer.CopyTo(input.xboxUserSandbox); RETURN_IF_FAILED(propCopyResult.hr); output.xboxUserSandbox = propCopyResult.ExtractPayload(); } @@ -1491,62 +1491,62 @@ HRESULT UserAccountInfo::Copy(const PFUserAccountInfo& input, PFUserAccountInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.androidDeviceInfo); + auto propCopyResult = buffer.CopyTo(input.androidDeviceInfo); RETURN_IF_FAILED(propCopyResult.hr); output.androidDeviceInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.appleAccountInfo); + auto propCopyResult = buffer.CopyTo(input.appleAccountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.appleAccountInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.customIdInfo); + auto propCopyResult = buffer.CopyTo(input.customIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.customIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.facebookInfo); + auto propCopyResult = buffer.CopyTo(input.facebookInfo); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesIdInfo); + auto propCopyResult = buffer.CopyTo(input.facebookInstantGamesIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInstantGamesIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); + auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googleInfo); + auto propCopyResult = buffer.CopyTo(input.googleInfo); RETURN_IF_FAILED(propCopyResult.hr); output.googleInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.googlePlayGamesInfo); + auto propCopyResult = buffer.CopyTo(input.googlePlayGamesInfo); RETURN_IF_FAILED(propCopyResult.hr); output.googlePlayGamesInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.iosDeviceInfo); + auto propCopyResult = buffer.CopyTo(input.iosDeviceInfo); RETURN_IF_FAILED(propCopyResult.hr); output.iosDeviceInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.kongregateInfo); + auto propCopyResult = buffer.CopyTo(input.kongregateInfo); RETURN_IF_FAILED(propCopyResult.hr); output.kongregateInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountInfo); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchAccountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchAccountInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceIdInfo); + auto propCopyResult = buffer.CopyTo(input.nintendoSwitchDeviceIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.nintendoSwitchDeviceIdInfo = propCopyResult.ExtractPayload(); } @@ -1556,47 +1556,47 @@ HRESULT UserAccountInfo::Copy(const PFUserAccountInfo& input, PFUserAccountInfo& output.openIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.privateInfo); + auto propCopyResult = buffer.CopyTo(input.privateInfo); RETURN_IF_FAILED(propCopyResult.hr); output.privateInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.psnInfo); + auto propCopyResult = buffer.CopyTo(input.psnInfo); RETURN_IF_FAILED(propCopyResult.hr); output.psnInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serverCustomIdInfo); + auto propCopyResult = buffer.CopyTo(input.serverCustomIdInfo); RETURN_IF_FAILED(propCopyResult.hr); output.serverCustomIdInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamInfo); + auto propCopyResult = buffer.CopyTo(input.steamInfo); RETURN_IF_FAILED(propCopyResult.hr); output.steamInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleInfo); + auto propCopyResult = buffer.CopyTo(input.titleInfo); RETURN_IF_FAILED(propCopyResult.hr); output.titleInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.twitchInfo); + auto propCopyResult = buffer.CopyTo(input.twitchInfo); RETURN_IF_FAILED(propCopyResult.hr); output.twitchInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxInfo); + auto propCopyResult = buffer.CopyTo(input.xboxInfo); RETURN_IF_FAILED(propCopyResult.hr); output.xboxInfo = propCopyResult.ExtractPayload(); } @@ -1745,7 +1745,7 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, { output = input; { - auto propCopyResult = buffer.CopyTo(input.annotation); + auto propCopyResult = buffer.CopyTo(input.annotation); RETURN_IF_FAILED(propCopyResult.hr); output.annotation = propCopyResult.ExtractPayload(); } @@ -1755,12 +1755,12 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, output.bundleContents = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.bundleParent); + auto propCopyResult = buffer.CopyTo(input.bundleParent); RETURN_IF_FAILED(propCopyResult.hr); output.bundleParent = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.catalogVersion); + auto propCopyResult = buffer.CopyTo(input.catalogVersion); RETURN_IF_FAILED(propCopyResult.hr); output.catalogVersion = propCopyResult.ExtractPayload(); } @@ -1770,47 +1770,47 @@ HRESULT ItemInstance::Copy(const PFItemInstance& input, PFItemInstance& output, output.customData = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.expiration); + auto propCopyResult = buffer.CopyTo(input.expiration); RETURN_IF_FAILED(propCopyResult.hr); output.expiration = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemClass); + auto propCopyResult = buffer.CopyTo(input.itemClass); RETURN_IF_FAILED(propCopyResult.hr); output.itemClass = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemInstanceId); + auto propCopyResult = buffer.CopyTo(input.itemInstanceId); RETURN_IF_FAILED(propCopyResult.hr); output.itemInstanceId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.purchaseDate); + auto propCopyResult = buffer.CopyTo(input.purchaseDate); RETURN_IF_FAILED(propCopyResult.hr); output.purchaseDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.remainingUses); + auto propCopyResult = buffer.CopyTo(input.remainingUses); RETURN_IF_FAILED(propCopyResult.hr); output.remainingUses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.unitCurrency); + auto propCopyResult = buffer.CopyTo(input.unitCurrency); RETURN_IF_FAILED(propCopyResult.hr); output.unitCurrency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.usesIncrementedBy); + auto propCopyResult = buffer.CopyTo(input.usesIncrementedBy); RETURN_IF_FAILED(propCopyResult.hr); output.usesIncrementedBy = propCopyResult.ExtractPayload(); } @@ -1859,7 +1859,7 @@ HRESULT CharacterInventory::Copy(const PFCharacterInventory& input, PFCharacterI { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } @@ -1920,17 +1920,17 @@ HRESULT CharacterResult::Copy(const PFCharacterResult& input, PFCharacterResult& { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.characterName); + auto propCopyResult = buffer.CopyTo(input.characterName); RETURN_IF_FAILED(propCopyResult.hr); output.characterName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.characterType); + auto propCopyResult = buffer.CopyTo(input.characterType); RETURN_IF_FAILED(propCopyResult.hr); output.characterType = propCopyResult.ExtractPayload(); } @@ -1980,12 +1980,12 @@ HRESULT AdCampaignAttributionModel::Copy(const PFAdCampaignAttributionModel& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.campaignId); + auto propCopyResult = buffer.CopyTo(input.campaignId); RETURN_IF_FAILED(propCopyResult.hr); output.campaignId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -2041,17 +2041,17 @@ HRESULT ContactEmailInfoModel::Copy(const PFContactEmailInfoModel& input, PFCont { output = input; { - auto propCopyResult = buffer.CopyTo(input.emailAddress); + auto propCopyResult = buffer.CopyTo(input.emailAddress); RETURN_IF_FAILED(propCopyResult.hr); output.emailAddress = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.verificationStatus); + auto propCopyResult = buffer.CopyTo(input.verificationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.verificationStatus = propCopyResult.ExtractPayload(); } @@ -2115,22 +2115,22 @@ HRESULT LinkedPlatformAccountModel::Copy(const PFLinkedPlatformAccountModel& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.email); + auto propCopyResult = buffer.CopyTo(input.email); RETURN_IF_FAILED(propCopyResult.hr); output.email = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platformUserId); + auto propCopyResult = buffer.CopyTo(input.platformUserId); RETURN_IF_FAILED(propCopyResult.hr); output.platformUserId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } @@ -2202,27 +2202,27 @@ HRESULT LocationModel::Copy(const PFLocationModel& input, PFLocationModel& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.city); + auto propCopyResult = buffer.CopyTo(input.city); RETURN_IF_FAILED(propCopyResult.hr); output.city = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.continentCode); + auto propCopyResult = buffer.CopyTo(input.continentCode); RETURN_IF_FAILED(propCopyResult.hr); output.continentCode = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.countryCode); + auto propCopyResult = buffer.CopyTo(input.countryCode); RETURN_IF_FAILED(propCopyResult.hr); output.countryCode = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.latitude); + auto propCopyResult = buffer.CopyTo(input.latitude); RETURN_IF_FAILED(propCopyResult.hr); output.latitude = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.longitude); + auto propCopyResult = buffer.CopyTo(input.longitude); RETURN_IF_FAILED(propCopyResult.hr); output.longitude = propCopyResult.ExtractPayload(); } @@ -2292,22 +2292,22 @@ HRESULT SubscriptionModel::Copy(const PFSubscriptionModel& input, PFSubscription { output = input; { - auto propCopyResult = buffer.CopyTo(input.status); + auto propCopyResult = buffer.CopyTo(input.status); RETURN_IF_FAILED(propCopyResult.hr); output.status = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionId); + auto propCopyResult = buffer.CopyTo(input.subscriptionId); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionItemId); + auto propCopyResult = buffer.CopyTo(input.subscriptionItemId); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionItemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.subscriptionProvider); + auto propCopyResult = buffer.CopyTo(input.subscriptionProvider); RETURN_IF_FAILED(propCopyResult.hr); output.subscriptionProvider = propCopyResult.ExtractPayload(); } @@ -2368,12 +2368,12 @@ HRESULT MembershipModel::Copy(const PFMembershipModel& input, PFMembershipModel& { output = input; { - auto propCopyResult = buffer.CopyTo(input.membershipId); + auto propCopyResult = buffer.CopyTo(input.membershipId); RETURN_IF_FAILED(propCopyResult.hr); output.membershipId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.overrideExpiration); + auto propCopyResult = buffer.CopyTo(input.overrideExpiration); RETURN_IF_FAILED(propCopyResult.hr); output.overrideExpiration = propCopyResult.ExtractPayload(); } @@ -2426,12 +2426,12 @@ HRESULT PushNotificationRegistrationModel::Copy(const PFPushNotificationRegistra { output = input; { - auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); + auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); RETURN_IF_FAILED(propCopyResult.hr); output.notificationEndpointARN = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -2475,7 +2475,7 @@ HRESULT StatisticModel::Copy(const PFStatisticModel& input, PFStatisticModel& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -2515,7 +2515,7 @@ HRESULT TagModel::Copy(const PFTagModel& input, PFTagModel& output, ModelBuffer& { output = input; { - auto propCopyResult = buffer.CopyTo(input.tagValue); + auto propCopyResult = buffer.CopyTo(input.tagValue); RETURN_IF_FAILED(propCopyResult.hr); output.tagValue = propCopyResult.ExtractPayload(); } @@ -2565,12 +2565,12 @@ HRESULT ValueToDateModel::Copy(const PFValueToDateModel& input, PFValueToDateMod { output = input; { - auto propCopyResult = buffer.CopyTo(input.currency); + auto propCopyResult = buffer.CopyTo(input.currency); RETURN_IF_FAILED(propCopyResult.hr); output.currency = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalValueAsDecimal); + auto propCopyResult = buffer.CopyTo(input.totalValueAsDecimal); RETURN_IF_FAILED(propCopyResult.hr); output.totalValueAsDecimal = propCopyResult.ExtractPayload(); } @@ -2777,12 +2777,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.adCampaignAttributions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.bannedUntil); + auto propCopyResult = buffer.CopyTo(input.bannedUntil); RETURN_IF_FAILED(propCopyResult.hr); output.bannedUntil = propCopyResult.ExtractPayload(); } @@ -2792,12 +2792,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.contactEmailAddresses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.created); + auto propCopyResult = buffer.CopyTo(input.created); RETURN_IF_FAILED(propCopyResult.hr); output.created = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } @@ -2807,7 +2807,7 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.experimentVariants = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLogin); + auto propCopyResult = buffer.CopyTo(input.lastLogin); RETURN_IF_FAILED(propCopyResult.hr); output.lastLogin = propCopyResult.ExtractPayload(); } @@ -2827,17 +2827,17 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.memberships = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.origination); + auto propCopyResult = buffer.CopyTo(input.origination); RETURN_IF_FAILED(propCopyResult.hr); output.origination = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playerId); + auto propCopyResult = buffer.CopyTo(input.playerId); RETURN_IF_FAILED(propCopyResult.hr); output.playerId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.publisherId); + auto propCopyResult = buffer.CopyTo(input.publisherId); RETURN_IF_FAILED(propCopyResult.hr); output.publisherId = propCopyResult.ExtractPayload(); } @@ -2857,12 +2857,12 @@ HRESULT PlayerProfileModel::Copy(const PFPlayerProfileModel& input, PFPlayerProf output.tags = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); + auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); RETURN_IF_FAILED(propCopyResult.hr); output.totalValueToDateInUSD = propCopyResult.ExtractPayload(); } @@ -2911,7 +2911,7 @@ HRESULT StatisticValue::Copy(const PFStatisticValue& input, PFStatisticValue& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.statisticName); + auto propCopyResult = buffer.CopyTo(input.statisticName); RETURN_IF_FAILED(propCopyResult.hr); output.statisticName = propCopyResult.ExtractPayload(); } @@ -2961,12 +2961,12 @@ HRESULT UserDataRecord::Copy(const PFUserDataRecord& input, PFUserDataRecord& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.permission); + auto propCopyResult = buffer.CopyTo(input.permission); RETURN_IF_FAILED(propCopyResult.hr); output.permission = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.value); + auto propCopyResult = buffer.CopyTo(input.value); RETURN_IF_FAILED(propCopyResult.hr); output.value = propCopyResult.ExtractPayload(); } @@ -3143,7 +3143,7 @@ HRESULT GetPlayerCombinedInfoResultPayload::Copy(const PFGetPlayerCombinedInfoRe { output = input; { - auto propCopyResult = buffer.CopyTo(input.accountInfo); + auto propCopyResult = buffer.CopyTo(input.accountInfo); RETURN_IF_FAILED(propCopyResult.hr); output.accountInfo = propCopyResult.ExtractPayload(); } @@ -3158,7 +3158,7 @@ HRESULT GetPlayerCombinedInfoResultPayload::Copy(const PFGetPlayerCombinedInfoRe output.characterList = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playerProfile); + auto propCopyResult = buffer.CopyTo(input.playerProfile); RETURN_IF_FAILED(propCopyResult.hr); output.playerProfile = propCopyResult.ExtractPayload(); } @@ -3241,12 +3241,12 @@ HRESULT Variable::Copy(const PFVariable& input, PFVariable& output, ModelBuffer& { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.value); + auto propCopyResult = buffer.CopyTo(input.value); RETURN_IF_FAILED(propCopyResult.hr); output.value = propCopyResult.ExtractPayload(); } @@ -3381,32 +3381,32 @@ HRESULT EntityLineage::Copy(const PFEntityLineage& input, PFEntityLineage& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.characterId); + auto propCopyResult = buffer.CopyTo(input.characterId); RETURN_IF_FAILED(propCopyResult.hr); output.characterId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.groupId); + auto propCopyResult = buffer.CopyTo(input.groupId); RETURN_IF_FAILED(propCopyResult.hr); output.groupId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.masterPlayerAccountId); + auto propCopyResult = buffer.CopyTo(input.masterPlayerAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.masterPlayerAccountId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.namespaceId); + auto propCopyResult = buffer.CopyTo(input.namespaceId); RETURN_IF_FAILED(propCopyResult.hr); output.namespaceId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titlePlayerAccountId); + auto propCopyResult = buffer.CopyTo(input.titlePlayerAccountId); RETURN_IF_FAILED(propCopyResult.hr); output.titlePlayerAccountId = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/DataTypes.cpp b/Source/PlayFabServices/Source/Generated/DataTypes.cpp index 4a2539c..04aeb9a 100644 --- a/Source/PlayFabServices/Source/Generated/DataTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/DataTypes.cpp @@ -15,7 +15,7 @@ JsonValue AbortFileUploadsRequest::ToJson() const JsonValue AbortFileUploadsRequest::ToJson(const PFDataAbortFileUploadsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "FileNames", input.fileNames, input.fileNamesCount); @@ -61,7 +61,7 @@ HRESULT AbortFileUploadsResponse::Copy(const PFDataAbortFileUploadsResponse& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -75,7 +75,7 @@ JsonValue DeleteFilesRequest::ToJson() const JsonValue DeleteFilesRequest::ToJson(const PFDataDeleteFilesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "FileNames", input.fileNames, input.fileNamesCount); @@ -121,7 +121,7 @@ HRESULT DeleteFilesResponse::Copy(const PFDataDeleteFilesResponse& input, PFData { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -135,7 +135,7 @@ JsonValue FinalizeFileUploadsRequest::ToJson() const JsonValue FinalizeFileUploadsRequest::ToJson(const PFDataFinalizeFileUploadsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "FileNames", input.fileNames, input.fileNamesCount); @@ -196,17 +196,17 @@ HRESULT GetFileMetadata::Copy(const PFDataGetFileMetadata& input, PFDataGetFileM { output = input; { - auto propCopyResult = buffer.CopyTo(input.checksum); + auto propCopyResult = buffer.CopyTo(input.checksum); RETURN_IF_FAILED(propCopyResult.hr); output.checksum = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.downloadUrl); + auto propCopyResult = buffer.CopyTo(input.downloadUrl); RETURN_IF_FAILED(propCopyResult.hr); output.downloadUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.fileName); + auto propCopyResult = buffer.CopyTo(input.fileName); RETURN_IF_FAILED(propCopyResult.hr); output.fileName = propCopyResult.ExtractPayload(); } @@ -261,7 +261,7 @@ HRESULT FinalizeFileUploadsResponse::Copy(const PFDataFinalizeFileUploadsRespons { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -280,7 +280,7 @@ JsonValue GetFilesRequest::ToJson() const JsonValue GetFilesRequest::ToJson(const PFDataGetFilesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -334,7 +334,7 @@ HRESULT GetFilesResponse::Copy(const PFDataGetFilesResponse& input, PFDataGetFil { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -353,7 +353,7 @@ JsonValue GetObjectsRequest::ToJson() const JsonValue GetObjectsRequest::ToJson(const PFDataGetObjectsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "EscapeObject", input.escapeObject); @@ -414,12 +414,12 @@ HRESULT ObjectResult::Copy(const PFDataObjectResult& input, PFDataObjectResult& output.dataObject.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.escapedDataObject); + auto propCopyResult = buffer.CopyTo(input.escapedDataObject); RETURN_IF_FAILED(propCopyResult.hr); output.escapedDataObject = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.objectName); + auto propCopyResult = buffer.CopyTo(input.objectName); RETURN_IF_FAILED(propCopyResult.hr); output.objectName = propCopyResult.ExtractPayload(); } @@ -474,7 +474,7 @@ HRESULT GetObjectsResponse::Copy(const PFDataGetObjectsResponse& input, PFDataGe { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -493,7 +493,7 @@ JsonValue InitiateFileUploadsRequest::ToJson() const JsonValue InitiateFileUploadsRequest::ToJson(const PFDataInitiateFileUploadsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "FileNames", input.fileNames, input.fileNamesCount); @@ -542,12 +542,12 @@ HRESULT InitiateFileUploadMetadata::Copy(const PFDataInitiateFileUploadMetadata& { output = input; { - auto propCopyResult = buffer.CopyTo(input.fileName); + auto propCopyResult = buffer.CopyTo(input.fileName); RETURN_IF_FAILED(propCopyResult.hr); output.fileName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.uploadUrl); + auto propCopyResult = buffer.CopyTo(input.uploadUrl); RETURN_IF_FAILED(propCopyResult.hr); output.uploadUrl = propCopyResult.ExtractPayload(); } @@ -601,7 +601,7 @@ HRESULT InitiateFileUploadsResponse::Copy(const PFDataInitiateFileUploadsRespons { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -620,7 +620,7 @@ JsonValue SetObject::ToJson() const JsonValue SetObject::ToJson(const PFDataSetObject& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "DataObject", input.dataObject); JsonUtils::ObjectAddMember(output, "DeleteObject", input.deleteObject); JsonUtils::ObjectAddMember(output, "EscapedDataObject", input.escapedDataObject); @@ -635,7 +635,7 @@ JsonValue SetObjectsRequest::ToJson() const JsonValue SetObjectsRequest::ToJson(const PFDataSetObjectsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "ExpectedProfileVersion", input.expectedProfileVersion); @@ -692,17 +692,17 @@ HRESULT SetObjectInfo::Copy(const PFDataSetObjectInfo& input, PFDataSetObjectInf { output = input; { - auto propCopyResult = buffer.CopyTo(input.objectName); + auto propCopyResult = buffer.CopyTo(input.objectName); RETURN_IF_FAILED(propCopyResult.hr); output.objectName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationReason); + auto propCopyResult = buffer.CopyTo(input.operationReason); RETURN_IF_FAILED(propCopyResult.hr); output.operationReason = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.setResult); + auto propCopyResult = buffer.CopyTo(input.setResult); RETURN_IF_FAILED(propCopyResult.hr); output.setResult = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/ExperimentationTypes.cpp b/Source/PlayFabServices/Source/Generated/ExperimentationTypes.cpp index f05bd23..d7a27fb 100644 --- a/Source/PlayFabServices/Source/Generated/ExperimentationTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/ExperimentationTypes.cpp @@ -15,7 +15,7 @@ JsonValue GetTreatmentAssignmentRequest::ToJson() const JsonValue GetTreatmentAssignmentRequest::ToJson(const PFExperimentationGetTreatmentAssignmentRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -57,7 +57,7 @@ HRESULT GetTreatmentAssignmentResult::Copy(const PFExperimentationGetTreatmentAs { output = input; { - auto propCopyResult = buffer.CopyTo(input.treatmentAssignment); + auto propCopyResult = buffer.CopyTo(input.treatmentAssignment); RETURN_IF_FAILED(propCopyResult.hr); output.treatmentAssignment = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/FriendsTypes.cpp b/Source/PlayFabServices/Source/Generated/FriendsTypes.cpp index 064d1d1..cb75681 100644 --- a/Source/PlayFabServices/Source/Generated/FriendsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/FriendsTypes.cpp @@ -15,7 +15,7 @@ JsonValue ClientAddFriendRequest::ToJson() const JsonValue ClientAddFriendRequest::ToJson(const PFFriendsClientAddFriendRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendEmail", input.friendEmail); JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); JsonUtils::ObjectAddMember(output, "FriendTitleDisplayName", input.friendTitleDisplayName); @@ -60,7 +60,7 @@ JsonValue ClientGetFriendsListRequest::ToJson() const JsonValue ClientGetFriendsListRequest::ToJson(const PFFriendsClientGetFriendsListRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ExternalPlatformFriends", JsonUtils::ToJson(input.externalPlatformFriends)); JsonUtils::ObjectAddMember(output, "ProfileConstraints", input.profileConstraints); @@ -194,32 +194,32 @@ HRESULT FriendInfo::Copy(const PFFriendsFriendInfo& input, PFFriendsFriendInfo& { output = input; { - auto propCopyResult = buffer.CopyTo(input.facebookInfo); + auto propCopyResult = buffer.CopyTo(input.facebookInfo); RETURN_IF_FAILED(propCopyResult.hr); output.facebookInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.friendPlayFabId); + auto propCopyResult = buffer.CopyTo(input.friendPlayFabId); RETURN_IF_FAILED(propCopyResult.hr); output.friendPlayFabId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); + auto propCopyResult = buffer.CopyTo(input.gameCenterInfo); RETURN_IF_FAILED(propCopyResult.hr); output.gameCenterInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.profile); + auto propCopyResult = buffer.CopyTo(input.profile); RETURN_IF_FAILED(propCopyResult.hr); output.profile = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.PSNInfo); + auto propCopyResult = buffer.CopyTo(input.PSNInfo); RETURN_IF_FAILED(propCopyResult.hr); output.PSNInfo = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.steamInfo); + auto propCopyResult = buffer.CopyTo(input.steamInfo); RETURN_IF_FAILED(propCopyResult.hr); output.steamInfo = propCopyResult.ExtractPayload(); } @@ -229,17 +229,17 @@ HRESULT FriendInfo::Copy(const PFFriendsFriendInfo& input, PFFriendsFriendInfo& output.tags = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleDisplayName); + auto propCopyResult = buffer.CopyTo(input.titleDisplayName); RETURN_IF_FAILED(propCopyResult.hr); output.titleDisplayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.xboxInfo); + auto propCopyResult = buffer.CopyTo(input.xboxInfo); RETURN_IF_FAILED(propCopyResult.hr); output.xboxInfo = propCopyResult.ExtractPayload(); } @@ -294,7 +294,7 @@ JsonValue ClientRemoveFriendRequest::ToJson() const JsonValue ClientRemoveFriendRequest::ToJson(const PFFriendsClientRemoveFriendRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); return output; } @@ -306,7 +306,7 @@ JsonValue ClientSetFriendTagsRequest::ToJson() const JsonValue ClientSetFriendTagsRequest::ToJson(const PFFriendsClientSetFriendTagsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); return output; @@ -319,7 +319,7 @@ JsonValue ServerAddFriendRequest::ToJson() const JsonValue ServerAddFriendRequest::ToJson(const PFFriendsServerAddFriendRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendEmail", input.friendEmail); JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); JsonUtils::ObjectAddMember(output, "FriendTitleDisplayName", input.friendTitleDisplayName); @@ -335,7 +335,7 @@ JsonValue ServerGetFriendsListRequest::ToJson() const JsonValue ServerGetFriendsListRequest::ToJson(const PFFriendsServerGetFriendsListRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ExternalPlatformFriends", JsonUtils::ToJson(input.externalPlatformFriends)); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -351,7 +351,7 @@ JsonValue ServerRemoveFriendRequest::ToJson() const JsonValue ServerRemoveFriendRequest::ToJson(const PFFriendsServerRemoveFriendRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -364,7 +364,7 @@ JsonValue ServerSetFriendTagsRequest::ToJson() const JsonValue ServerSetFriendTagsRequest::ToJson(const PFFriendsServerSetFriendTagsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "FriendPlayFabId", input.friendPlayFabId); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMemberArray(output, "Tags", input.tags, input.tagsCount); @@ -385,7 +385,7 @@ JsonValue ToJson(PFFriendsExternalFriendSources const* input) Stringstream ss; if (*input == PFFriendsExternalFriendSources::None) { - return JsonValue{ EnumName(PFFriendsExternalFriendSources::None), JsonUtils::allocator }; + return JsonValue{ EnumName(PFFriendsExternalFriendSources::None) }; } if ((*input & PFFriendsExternalFriendSources::Steam) == PFFriendsExternalFriendSources::Steam) { @@ -412,11 +412,11 @@ JsonValue ToJson(PFFriendsExternalFriendSources const* input) ss << separator << EnumName(PFFriendsExternalFriendSources::All); separator = ","; } - return JsonValue{ ss.str().data(), JsonUtils::allocator }; + return JsonValue{ ss.str().data() }; } else { - return JsonValue{ rapidjson::kNullType }; + return JsonValue{}; } } diff --git a/Source/PlayFabServices/Source/Generated/GroupsTypes.cpp b/Source/PlayFabServices/Source/Generated/GroupsTypes.cpp index 8e12160..088d769 100644 --- a/Source/PlayFabServices/Source/Generated/GroupsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/GroupsTypes.cpp @@ -15,7 +15,7 @@ JsonValue AcceptGroupApplicationRequest::ToJson() const JsonValue AcceptGroupApplicationRequest::ToJson(const PFGroupsAcceptGroupApplicationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -29,7 +29,7 @@ JsonValue AcceptGroupInvitationRequest::ToJson() const JsonValue AcceptGroupInvitationRequest::ToJson(const PFGroupsAcceptGroupInvitationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -43,7 +43,7 @@ JsonValue AddMembersRequest::ToJson() const JsonValue AddMembersRequest::ToJson(const PFGroupsAddMembersRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); JsonUtils::ObjectAddMemberArray(output, "Members", input.members, input.membersCount); @@ -58,7 +58,7 @@ JsonValue ApplyToGroupRequest::ToJson() const JsonValue ApplyToGroupRequest::ToJson(const PFGroupsApplyToGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AutoAcceptOutstandingInvite", input.autoAcceptOutstandingInvite); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -112,7 +112,7 @@ HRESULT EntityWithLineage::Copy(const PFGroupsEntityWithLineage& input, PFGroups { output = input; { - auto propCopyResult = buffer.CopyTo(input.key); + auto propCopyResult = buffer.CopyTo(input.key); RETURN_IF_FAILED(propCopyResult.hr); output.key = propCopyResult.ExtractPayload(); } @@ -173,12 +173,12 @@ HRESULT ApplyToGroupResponse::Copy(const PFGroupsApplyToGroupResponse& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } @@ -192,7 +192,7 @@ JsonValue BlockEntityRequest::ToJson() const JsonValue BlockEntityRequest::ToJson(const PFGroupsBlockEntityRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -206,7 +206,7 @@ JsonValue ChangeMemberRoleRequest::ToJson() const JsonValue ChangeMemberRoleRequest::ToJson(const PFGroupsChangeMemberRoleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DestinationRoleId", input.destinationRoleId); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -222,7 +222,7 @@ JsonValue CreateGroupRequest::ToJson() const JsonValue CreateGroupRequest::ToJson(const PFGroupsCreateGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "GroupName", input.groupName); @@ -300,22 +300,22 @@ HRESULT CreateGroupResponse::Copy(const PFGroupsCreateGroupResponse& input, PFGr { output = input; { - auto propCopyResult = buffer.CopyTo(input.adminRoleId); + auto propCopyResult = buffer.CopyTo(input.adminRoleId); RETURN_IF_FAILED(propCopyResult.hr); output.adminRoleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.groupName); + auto propCopyResult = buffer.CopyTo(input.groupName); RETURN_IF_FAILED(propCopyResult.hr); output.groupName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.memberRoleId); + auto propCopyResult = buffer.CopyTo(input.memberRoleId); RETURN_IF_FAILED(propCopyResult.hr); output.memberRoleId = propCopyResult.ExtractPayload(); } @@ -334,7 +334,7 @@ JsonValue CreateGroupRoleRequest::ToJson() const JsonValue CreateGroupRoleRequest::ToJson(const PFGroupsCreateGroupRoleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); JsonUtils::ObjectAddMember(output, "RoleId", input.roleId); @@ -385,12 +385,12 @@ HRESULT CreateGroupRoleResponse::Copy(const PFGroupsCreateGroupRoleResponse& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.roleId); + auto propCopyResult = buffer.CopyTo(input.roleId); RETURN_IF_FAILED(propCopyResult.hr); output.roleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleName); + auto propCopyResult = buffer.CopyTo(input.roleName); RETURN_IF_FAILED(propCopyResult.hr); output.roleName = propCopyResult.ExtractPayload(); } @@ -404,7 +404,7 @@ JsonValue DeleteGroupRequest::ToJson() const JsonValue DeleteGroupRequest::ToJson(const PFGroupsDeleteGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); return output; @@ -417,7 +417,7 @@ JsonValue DeleteRoleRequest::ToJson() const JsonValue DeleteRoleRequest::ToJson(const PFGroupsDeleteRoleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); JsonUtils::ObjectAddMember(output, "RoleId", input.roleId); @@ -431,7 +431,7 @@ JsonValue GetGroupRequest::ToJson() const JsonValue GetGroupRequest::ToJson(const PFGroupsGetGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); JsonUtils::ObjectAddMember(output, "GroupName", input.groupName); @@ -509,22 +509,22 @@ HRESULT GetGroupResponse::Copy(const PFGroupsGetGroupResponse& input, PFGroupsGe { output = input; { - auto propCopyResult = buffer.CopyTo(input.adminRoleId); + auto propCopyResult = buffer.CopyTo(input.adminRoleId); RETURN_IF_FAILED(propCopyResult.hr); output.adminRoleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.groupName); + auto propCopyResult = buffer.CopyTo(input.groupName); RETURN_IF_FAILED(propCopyResult.hr); output.groupName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.memberRoleId); + auto propCopyResult = buffer.CopyTo(input.memberRoleId); RETURN_IF_FAILED(propCopyResult.hr); output.memberRoleId = propCopyResult.ExtractPayload(); } @@ -543,7 +543,7 @@ JsonValue InviteToGroupRequest::ToJson() const JsonValue InviteToGroupRequest::ToJson(const PFGroupsInviteToGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AutoAcceptOutstandingApplication", input.autoAcceptOutstandingApplication); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -620,22 +620,22 @@ HRESULT InviteToGroupResponse::Copy(const PFGroupsInviteToGroupResponse& input, { output = input; { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.invitedByEntity); + auto propCopyResult = buffer.CopyTo(input.invitedByEntity); RETURN_IF_FAILED(propCopyResult.hr); output.invitedByEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.invitedEntity); + auto propCopyResult = buffer.CopyTo(input.invitedEntity); RETURN_IF_FAILED(propCopyResult.hr); output.invitedEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleId); + auto propCopyResult = buffer.CopyTo(input.roleId); RETURN_IF_FAILED(propCopyResult.hr); output.roleId = propCopyResult.ExtractPayload(); } @@ -649,7 +649,7 @@ JsonValue IsMemberRequest::ToJson() const JsonValue IsMemberRequest::ToJson(const PFGroupsIsMemberRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -694,7 +694,7 @@ JsonValue ListGroupApplicationsRequest::ToJson() const JsonValue ListGroupApplicationsRequest::ToJson(const PFGroupsListGroupApplicationsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); return output; @@ -749,12 +749,12 @@ HRESULT GroupApplication::Copy(const PFGroupsGroupApplication& input, PFGroupsGr { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } @@ -809,7 +809,7 @@ JsonValue ListGroupBlocksRequest::ToJson() const JsonValue ListGroupBlocksRequest::ToJson(const PFGroupsListGroupBlocksRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); return output; @@ -859,12 +859,12 @@ HRESULT GroupBlock::Copy(const PFGroupsGroupBlock& input, PFGroupsGroupBlock& ou { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } @@ -919,7 +919,7 @@ JsonValue ListGroupInvitationsRequest::ToJson() const JsonValue ListGroupInvitationsRequest::ToJson(const PFGroupsListGroupInvitationsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); return output; @@ -993,22 +993,22 @@ HRESULT GroupInvitation::Copy(const PFGroupsGroupInvitation& input, PFGroupsGrou { output = input; { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.invitedByEntity); + auto propCopyResult = buffer.CopyTo(input.invitedByEntity); RETURN_IF_FAILED(propCopyResult.hr); output.invitedByEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.invitedEntity); + auto propCopyResult = buffer.CopyTo(input.invitedEntity); RETURN_IF_FAILED(propCopyResult.hr); output.invitedEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleId); + auto propCopyResult = buffer.CopyTo(input.roleId); RETURN_IF_FAILED(propCopyResult.hr); output.roleId = propCopyResult.ExtractPayload(); } @@ -1063,7 +1063,7 @@ JsonValue ListGroupMembersRequest::ToJson() const JsonValue ListGroupMembersRequest::ToJson(const PFGroupsListGroupMembersRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); return output; @@ -1124,12 +1124,12 @@ HRESULT EntityMemberRole::Copy(const PFGroupsEntityMemberRole& input, PFGroupsEn output.members = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleId); + auto propCopyResult = buffer.CopyTo(input.roleId); RETURN_IF_FAILED(propCopyResult.hr); output.roleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleName); + auto propCopyResult = buffer.CopyTo(input.roleName); RETURN_IF_FAILED(propCopyResult.hr); output.roleName = propCopyResult.ExtractPayload(); } @@ -1184,7 +1184,7 @@ JsonValue ListMembershipRequest::ToJson() const JsonValue ListMembershipRequest::ToJson(const PFGroupsListMembershipRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -1231,12 +1231,12 @@ HRESULT GroupRole::Copy(const PFGroupsGroupRole& input, PFGroupsGroupRole& outpu { output = input; { - auto propCopyResult = buffer.CopyTo(input.roleId); + auto propCopyResult = buffer.CopyTo(input.roleId); RETURN_IF_FAILED(propCopyResult.hr); output.roleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.roleName); + auto propCopyResult = buffer.CopyTo(input.roleName); RETURN_IF_FAILED(propCopyResult.hr); output.roleName = propCopyResult.ExtractPayload(); } @@ -1298,12 +1298,12 @@ HRESULT GroupWithRoles::Copy(const PFGroupsGroupWithRoles& input, PFGroupsGroupW { output = input; { - auto propCopyResult = buffer.CopyTo(input.group); + auto propCopyResult = buffer.CopyTo(input.group); RETURN_IF_FAILED(propCopyResult.hr); output.group = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.groupName); + auto propCopyResult = buffer.CopyTo(input.groupName); RETURN_IF_FAILED(propCopyResult.hr); output.groupName = propCopyResult.ExtractPayload(); } @@ -1363,7 +1363,7 @@ JsonValue ListMembershipOpportunitiesRequest::ToJson() const JsonValue ListMembershipOpportunitiesRequest::ToJson(const PFGroupsListMembershipOpportunitiesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -1431,7 +1431,7 @@ JsonValue RemoveGroupApplicationRequest::ToJson() const JsonValue RemoveGroupApplicationRequest::ToJson(const PFGroupsRemoveGroupApplicationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -1445,7 +1445,7 @@ JsonValue RemoveGroupInvitationRequest::ToJson() const JsonValue RemoveGroupInvitationRequest::ToJson(const PFGroupsRemoveGroupInvitationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -1459,7 +1459,7 @@ JsonValue RemoveMembersRequest::ToJson() const JsonValue RemoveMembersRequest::ToJson(const PFGroupsRemoveMembersRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Group", input.group); JsonUtils::ObjectAddMemberArray(output, "Members", input.members, input.membersCount); @@ -1474,7 +1474,7 @@ JsonValue UnblockEntityRequest::ToJson() const JsonValue UnblockEntityRequest::ToJson(const PFGroupsUnblockEntityRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -1488,7 +1488,7 @@ JsonValue UpdateGroupRequest::ToJson() const JsonValue UpdateGroupRequest::ToJson(const PFGroupsUpdateGroupRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AdminRoleId", input.adminRoleId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ExpectedProfileVersion", input.expectedProfileVersion); @@ -1541,12 +1541,12 @@ HRESULT UpdateGroupResponse::Copy(const PFGroupsUpdateGroupResponse& input, PFGr { output = input; { - auto propCopyResult = buffer.CopyTo(input.operationReason); + auto propCopyResult = buffer.CopyTo(input.operationReason); RETURN_IF_FAILED(propCopyResult.hr); output.operationReason = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.setResult); + auto propCopyResult = buffer.CopyTo(input.setResult); RETURN_IF_FAILED(propCopyResult.hr); output.setResult = propCopyResult.ExtractPayload(); } @@ -1560,7 +1560,7 @@ JsonValue UpdateGroupRoleRequest::ToJson() const JsonValue UpdateGroupRoleRequest::ToJson(const PFGroupsUpdateGroupRoleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ExpectedProfileVersion", input.expectedProfileVersion); JsonUtils::ObjectAddMember(output, "Group", input.group); @@ -1612,12 +1612,12 @@ HRESULT UpdateGroupRoleResponse::Copy(const PFGroupsUpdateGroupRoleResponse& inp { output = input; { - auto propCopyResult = buffer.CopyTo(input.operationReason); + auto propCopyResult = buffer.CopyTo(input.operationReason); RETURN_IF_FAILED(propCopyResult.hr); output.operationReason = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.setResult); + auto propCopyResult = buffer.CopyTo(input.setResult); RETURN_IF_FAILED(propCopyResult.hr); output.setResult = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/InventoryTypes.cpp b/Source/PlayFabServices/Source/Generated/InventoryTypes.cpp index e4ef77c..b16bd3b 100644 --- a/Source/PlayFabServices/Source/Generated/InventoryTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/InventoryTypes.cpp @@ -15,7 +15,7 @@ JsonValue AlternateId::ToJson() const JsonValue AlternateId::ToJson(const PFInventoryAlternateId& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Type", input.type); JsonUtils::ObjectAddMember(output, "Value", input.value); return output; @@ -28,7 +28,7 @@ JsonValue InventoryItemReference::ToJson() const JsonValue InventoryItemReference::ToJson(const PFInventoryInventoryItemReference& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AlternateId", input.alternateId); JsonUtils::ObjectAddMember(output, "Id", input.id); JsonUtils::ObjectAddMember(output, "StackId", input.stackId); @@ -42,7 +42,7 @@ JsonValue InitialValues::ToJson() const JsonValue InitialValues::ToJson(const PFInventoryInitialValues& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "DisplayProperties", input.displayProperties); return output; } @@ -54,7 +54,7 @@ JsonValue AddInventoryItemsRequest::ToJson() const JsonValue AddInventoryItemsRequest::ToJson(const PFInventoryAddInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -117,12 +117,12 @@ HRESULT AddInventoryItemsResponse::Copy(const PFInventoryAddInventoryItemsRespon { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } @@ -141,7 +141,7 @@ JsonValue DeleteInventoryCollectionRequest::ToJson() const JsonValue DeleteInventoryCollectionRequest::ToJson(const PFInventoryDeleteInventoryCollectionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -156,7 +156,7 @@ JsonValue DeleteInventoryItemsRequest::ToJson() const JsonValue DeleteInventoryItemsRequest::ToJson(const PFInventoryDeleteInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -216,12 +216,12 @@ HRESULT DeleteInventoryItemsResponse::Copy(const PFInventoryDeleteInventoryItems { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } @@ -240,7 +240,7 @@ JsonValue AddInventoryItemsOperation::ToJson() const JsonValue AddInventoryItemsOperation::ToJson(const PFInventoryAddInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "DurationInSeconds", input.durationInSeconds); JsonUtils::ObjectAddMember(output, "Item", input.item); @@ -255,7 +255,7 @@ JsonValue DeleteInventoryItemsOperation::ToJson() const JsonValue DeleteInventoryItemsOperation::ToJson(const PFInventoryDeleteInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Item", input.item); return output; } @@ -267,7 +267,7 @@ JsonValue PurchasePriceAmount::ToJson() const JsonValue PurchasePriceAmount::ToJson(const PFInventoryPurchasePriceAmount& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "ItemId", input.itemId); JsonUtils::ObjectAddMember(output, "StackId", input.stackId); @@ -281,7 +281,7 @@ JsonValue PurchaseInventoryItemsOperation::ToJson() const JsonValue PurchaseInventoryItemsOperation::ToJson(const PFInventoryPurchaseInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "DeleteEmptyStacks", input.deleteEmptyStacks); JsonUtils::ObjectAddMember(output, "DurationInSeconds", input.durationInSeconds); @@ -299,7 +299,7 @@ JsonValue SubtractInventoryItemsOperation::ToJson() const JsonValue SubtractInventoryItemsOperation::ToJson(const PFInventorySubtractInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "DeleteEmptyStacks", input.deleteEmptyStacks); JsonUtils::ObjectAddMember(output, "DurationInSeconds", input.durationInSeconds); @@ -314,7 +314,7 @@ JsonValue TransferInventoryItemsOperation::ToJson() const JsonValue TransferInventoryItemsOperation::ToJson(const PFInventoryTransferInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "DeleteEmptyStacks", input.deleteEmptyStacks); JsonUtils::ObjectAddMember(output, "GivingItem", input.givingItem); @@ -330,7 +330,7 @@ JsonValue InventoryItem::ToJson() const JsonValue InventoryItem::ToJson(const PFInventoryInventoryItem& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "DisplayProperties", input.displayProperties); JsonUtils::ObjectAddMemberTime(output, "ExpirationDate", input.expirationDate); @@ -413,7 +413,7 @@ HRESULT InventoryItem::Copy(const PFInventoryInventoryItem& input, PFInventoryIn { output = input; { - auto propCopyResult = buffer.CopyTo(input.amount); + auto propCopyResult = buffer.CopyTo(input.amount); RETURN_IF_FAILED(propCopyResult.hr); output.amount = propCopyResult.ExtractPayload(); } @@ -423,22 +423,22 @@ HRESULT InventoryItem::Copy(const PFInventoryInventoryItem& input, PFInventoryIn output.displayProperties.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.expirationDate); + auto propCopyResult = buffer.CopyTo(input.expirationDate); RETURN_IF_FAILED(propCopyResult.hr); output.expirationDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.stackId); + auto propCopyResult = buffer.CopyTo(input.stackId); RETURN_IF_FAILED(propCopyResult.hr); output.stackId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -452,7 +452,7 @@ JsonValue UpdateInventoryItemsOperation::ToJson() const JsonValue UpdateInventoryItemsOperation::ToJson(const PFInventoryUpdateInventoryItemsOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Item", input.item); return output; } @@ -464,7 +464,7 @@ JsonValue InventoryOperation::ToJson() const JsonValue InventoryOperation::ToJson(const PFInventoryInventoryOperation& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Add", input.add); JsonUtils::ObjectAddMember(output, "Delete", input.deleteOp); JsonUtils::ObjectAddMember(output, "Purchase", input.purchase); @@ -481,7 +481,7 @@ JsonValue ExecuteInventoryOperationsRequest::ToJson() const JsonValue ExecuteInventoryOperationsRequest::ToJson(const PFInventoryExecuteInventoryOperationsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -541,12 +541,12 @@ HRESULT ExecuteInventoryOperationsResponse::Copy(const PFInventoryExecuteInvento { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } @@ -565,7 +565,7 @@ JsonValue ExecuteTransferOperationsRequest::ToJson() const JsonValue ExecuteTransferOperationsRequest::ToJson(const PFInventoryExecuteTransferOperationsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "GivingCollectionId", input.givingCollectionId); JsonUtils::ObjectAddMember(output, "GivingEntity", input.givingEntity); @@ -660,7 +660,7 @@ HRESULT ExecuteTransferOperationsResponse::Copy(const PFInventoryExecuteTransfer { output = input; { - auto propCopyResult = buffer.CopyTo(input.givingETag); + auto propCopyResult = buffer.CopyTo(input.givingETag); RETURN_IF_FAILED(propCopyResult.hr); output.givingETag = propCopyResult.ExtractPayload(); } @@ -670,22 +670,22 @@ HRESULT ExecuteTransferOperationsResponse::Copy(const PFInventoryExecuteTransfer output.givingTransactionIds = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationStatus); + auto propCopyResult = buffer.CopyTo(input.operationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.operationStatus = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationToken); + auto propCopyResult = buffer.CopyTo(input.operationToken); RETURN_IF_FAILED(propCopyResult.hr); output.operationToken = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.receivingETag); + auto propCopyResult = buffer.CopyTo(input.receivingETag); RETURN_IF_FAILED(propCopyResult.hr); output.receivingETag = propCopyResult.ExtractPayload(); } @@ -704,7 +704,7 @@ JsonValue GetInventoryCollectionIdsRequest::ToJson() const JsonValue GetInventoryCollectionIdsRequest::ToJson(const PFInventoryGetInventoryCollectionIdsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -759,7 +759,7 @@ HRESULT GetInventoryCollectionIdsResponse::Copy(const PFInventoryGetInventoryCol output.collectionIds = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -773,7 +773,7 @@ JsonValue GetInventoryItemsRequest::ToJson() const JsonValue GetInventoryItemsRequest::ToJson(const PFInventoryGetInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); @@ -833,12 +833,12 @@ HRESULT GetInventoryItemsResponse::Copy(const PFInventoryGetInventoryItemsRespon { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } @@ -857,7 +857,7 @@ JsonValue GetInventoryOperationStatusRequest::ToJson() const JsonValue GetInventoryOperationStatusRequest::ToJson(const PFInventoryGetInventoryOperationStatusRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -897,7 +897,7 @@ HRESULT GetInventoryOperationStatusResponse::Copy(const PFInventoryGetInventoryO { output = input; { - auto propCopyResult = buffer.CopyTo(input.operationStatus); + auto propCopyResult = buffer.CopyTo(input.operationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.operationStatus = propCopyResult.ExtractPayload(); } @@ -911,7 +911,7 @@ JsonValue GetMicrosoftStoreAccessTokensRequest::ToJson() const JsonValue GetMicrosoftStoreAccessTokensRequest::ToJson(const PFInventoryGetMicrosoftStoreAccessTokensRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -951,7 +951,7 @@ HRESULT GetMicrosoftStoreAccessTokensResponse::Copy(const PFInventoryGetMicrosof { output = input; { - auto propCopyResult = buffer.CopyTo(input.collectionsAccessToken); + auto propCopyResult = buffer.CopyTo(input.collectionsAccessToken); RETURN_IF_FAILED(propCopyResult.hr); output.collectionsAccessToken = propCopyResult.ExtractPayload(); } @@ -965,7 +965,7 @@ JsonValue GetTransactionHistoryRequest::ToJson() const JsonValue GetTransactionHistoryRequest::ToJson(const PFInventoryGetTransactionHistoryRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMember(output, "Count", input.count); @@ -1057,37 +1057,37 @@ HRESULT TransactionOperation::Copy(const PFInventoryTransactionOperation& input, { output = input; { - auto propCopyResult = buffer.CopyTo(input.amount); + auto propCopyResult = buffer.CopyTo(input.amount); RETURN_IF_FAILED(propCopyResult.hr); output.amount = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.durationInSeconds); + auto propCopyResult = buffer.CopyTo(input.durationInSeconds); RETURN_IF_FAILED(propCopyResult.hr); output.durationInSeconds = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemFriendlyId); + auto propCopyResult = buffer.CopyTo(input.itemFriendlyId); RETURN_IF_FAILED(propCopyResult.hr); output.itemFriendlyId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemId); + auto propCopyResult = buffer.CopyTo(input.itemId); RETURN_IF_FAILED(propCopyResult.hr); output.itemId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemType); + auto propCopyResult = buffer.CopyTo(input.itemType); RETURN_IF_FAILED(propCopyResult.hr); output.itemType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.stackId); + auto propCopyResult = buffer.CopyTo(input.stackId); RETURN_IF_FAILED(propCopyResult.hr); output.stackId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.type); + auto propCopyResult = buffer.CopyTo(input.type); RETURN_IF_FAILED(propCopyResult.hr); output.type = propCopyResult.ExtractPayload(); } @@ -1135,12 +1135,12 @@ HRESULT TransactionPurchaseDetails::Copy(const PFInventoryTransactionPurchaseDet { output = input; { - auto propCopyResult = buffer.CopyTo(input.storeFriendlyId); + auto propCopyResult = buffer.CopyTo(input.storeFriendlyId); RETURN_IF_FAILED(propCopyResult.hr); output.storeFriendlyId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.storeId); + auto propCopyResult = buffer.CopyTo(input.storeId); RETURN_IF_FAILED(propCopyResult.hr); output.storeId = propCopyResult.ExtractPayload(); } @@ -1196,17 +1196,17 @@ HRESULT TransactionRedeemDetails::Copy(const PFInventoryTransactionRedeemDetails { output = input; { - auto propCopyResult = buffer.CopyTo(input.marketplace); + auto propCopyResult = buffer.CopyTo(input.marketplace); RETURN_IF_FAILED(propCopyResult.hr); output.marketplace = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); + auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); RETURN_IF_FAILED(propCopyResult.hr); output.marketplaceTransactionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.offerId); + auto propCopyResult = buffer.CopyTo(input.offerId); RETURN_IF_FAILED(propCopyResult.hr); output.offerId = propCopyResult.ExtractPayload(); } @@ -1284,27 +1284,27 @@ HRESULT TransactionTransferDetails::Copy(const PFInventoryTransactionTransferDet { output = input; { - auto propCopyResult = buffer.CopyTo(input.givingCollectionId); + auto propCopyResult = buffer.CopyTo(input.givingCollectionId); RETURN_IF_FAILED(propCopyResult.hr); output.givingCollectionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.givingEntity); + auto propCopyResult = buffer.CopyTo(input.givingEntity); RETURN_IF_FAILED(propCopyResult.hr); output.givingEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.receivingCollectionId); + auto propCopyResult = buffer.CopyTo(input.receivingCollectionId); RETURN_IF_FAILED(propCopyResult.hr); output.receivingCollectionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.receivingEntity); + auto propCopyResult = buffer.CopyTo(input.receivingEntity); RETURN_IF_FAILED(propCopyResult.hr); output.receivingEntity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.transferId); + auto propCopyResult = buffer.CopyTo(input.transferId); RETURN_IF_FAILED(propCopyResult.hr); output.transferId = propCopyResult.ExtractPayload(); } @@ -1412,12 +1412,12 @@ HRESULT Transaction::Copy(const PFInventoryTransaction& input, PFInventoryTransa { output = input; { - auto propCopyResult = buffer.CopyTo(input.apiName); + auto propCopyResult = buffer.CopyTo(input.apiName); RETURN_IF_FAILED(propCopyResult.hr); output.apiName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.itemType); + auto propCopyResult = buffer.CopyTo(input.itemType); RETURN_IF_FAILED(propCopyResult.hr); output.itemType = propCopyResult.ExtractPayload(); } @@ -1427,27 +1427,27 @@ HRESULT Transaction::Copy(const PFInventoryTransaction& input, PFInventoryTransa output.operations = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationType); + auto propCopyResult = buffer.CopyTo(input.operationType); RETURN_IF_FAILED(propCopyResult.hr); output.operationType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.purchaseDetails); + auto propCopyResult = buffer.CopyTo(input.purchaseDetails); RETURN_IF_FAILED(propCopyResult.hr); output.purchaseDetails = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.redeemDetails); + auto propCopyResult = buffer.CopyTo(input.redeemDetails); RETURN_IF_FAILED(propCopyResult.hr); output.redeemDetails = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.transactionId); + auto propCopyResult = buffer.CopyTo(input.transactionId); RETURN_IF_FAILED(propCopyResult.hr); output.transactionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.transferDetails); + auto propCopyResult = buffer.CopyTo(input.transferDetails); RETURN_IF_FAILED(propCopyResult.hr); output.transferDetails = propCopyResult.ExtractPayload(); } @@ -1496,7 +1496,7 @@ HRESULT GetTransactionHistoryResponse::Copy(const PFInventoryGetTransactionHisto { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -1515,7 +1515,7 @@ JsonValue PurchaseInventoryItemsRequest::ToJson() const JsonValue PurchaseInventoryItemsRequest::ToJson(const PFInventoryPurchaseInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -1581,12 +1581,12 @@ HRESULT PurchaseInventoryItemsResponse::Copy(const PFInventoryPurchaseInventoryI { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } @@ -1605,7 +1605,7 @@ JsonValue RedeemAppleAppStoreInventoryItemsRequest::ToJson() const JsonValue RedeemAppleAppStoreInventoryItemsRequest::ToJson(const PFInventoryRedeemAppleAppStoreInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -1670,22 +1670,22 @@ HRESULT RedemptionFailure::Copy(const PFInventoryRedemptionFailure& input, PFInv { output = input; { - auto propCopyResult = buffer.CopyTo(input.failureCode); + auto propCopyResult = buffer.CopyTo(input.failureCode); RETURN_IF_FAILED(propCopyResult.hr); output.failureCode = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.failureDetails); + auto propCopyResult = buffer.CopyTo(input.failureDetails); RETURN_IF_FAILED(propCopyResult.hr); output.failureDetails = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.marketplaceAlternateId); + auto propCopyResult = buffer.CopyTo(input.marketplaceAlternateId); RETURN_IF_FAILED(propCopyResult.hr); output.marketplaceAlternateId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); + auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); RETURN_IF_FAILED(propCopyResult.hr); output.marketplaceTransactionId = propCopyResult.ExtractPayload(); } @@ -1735,12 +1735,12 @@ HRESULT RedemptionSuccess::Copy(const PFInventoryRedemptionSuccess& input, PFInv { output = input; { - auto propCopyResult = buffer.CopyTo(input.marketplaceAlternateId); + auto propCopyResult = buffer.CopyTo(input.marketplaceAlternateId); RETURN_IF_FAILED(propCopyResult.hr); output.marketplaceAlternateId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); + auto propCopyResult = buffer.CopyTo(input.marketplaceTransactionId); RETURN_IF_FAILED(propCopyResult.hr); output.marketplaceTransactionId = propCopyResult.ExtractPayload(); } @@ -1823,7 +1823,7 @@ JsonValue GooglePlayProductPurchase::ToJson() const JsonValue GooglePlayProductPurchase::ToJson(const PFInventoryGooglePlayProductPurchase& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ProductId", input.productId); JsonUtils::ObjectAddMember(output, "Token", input.token); return output; @@ -1836,7 +1836,7 @@ JsonValue RedeemGooglePlayInventoryItemsRequest::ToJson() const JsonValue RedeemGooglePlayInventoryItemsRequest::ToJson(const PFInventoryRedeemGooglePlayInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -1920,7 +1920,7 @@ JsonValue RedeemMicrosoftStoreInventoryItemsRequest::ToJson() const JsonValue RedeemMicrosoftStoreInventoryItemsRequest::ToJson(const PFInventoryRedeemMicrosoftStoreInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMember(output, "CollectionsIdKey", input.collectionsIdKey); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -2007,7 +2007,7 @@ JsonValue RedeemNintendoEShopInventoryItemsRequest::ToJson() const JsonValue RedeemNintendoEShopInventoryItemsRequest::ToJson(const PFInventoryRedeemNintendoEShopInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2091,7 +2091,7 @@ JsonValue RedeemPlayStationStoreInventoryItemsRequest::ToJson() const JsonValue RedeemPlayStationStoreInventoryItemsRequest::ToJson(const PFInventoryRedeemPlayStationStoreInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthorizationCode", input.authorizationCode); JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -2177,7 +2177,7 @@ JsonValue RedeemSteamInventoryItemsRequest::ToJson() const JsonValue RedeemSteamInventoryItemsRequest::ToJson(const PFInventoryRedeemSteamInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2260,7 +2260,7 @@ JsonValue SubtractInventoryItemsRequest::ToJson() const JsonValue SubtractInventoryItemsRequest::ToJson(const PFInventorySubtractInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -2323,12 +2323,12 @@ HRESULT SubtractInventoryItemsResponse::Copy(const PFInventorySubtractInventoryI { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } @@ -2347,7 +2347,7 @@ JsonValue TransferInventoryItemsRequest::ToJson() const JsonValue TransferInventoryItemsRequest::ToJson(const PFInventoryTransferInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Amount", input.amount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DeleteEmptyStacks", input.deleteEmptyStacks); @@ -2438,7 +2438,7 @@ HRESULT TransferInventoryItemsResponse::Copy(const PFInventoryTransferInventoryI { output = input; { - auto propCopyResult = buffer.CopyTo(input.givingETag); + auto propCopyResult = buffer.CopyTo(input.givingETag); RETURN_IF_FAILED(propCopyResult.hr); output.givingETag = propCopyResult.ExtractPayload(); } @@ -2448,17 +2448,17 @@ HRESULT TransferInventoryItemsResponse::Copy(const PFInventoryTransferInventoryI output.givingTransactionIds = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationStatus); + auto propCopyResult = buffer.CopyTo(input.operationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.operationStatus = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.operationToken); + auto propCopyResult = buffer.CopyTo(input.operationToken); RETURN_IF_FAILED(propCopyResult.hr); output.operationToken = propCopyResult.ExtractPayload(); } @@ -2477,7 +2477,7 @@ JsonValue UpdateInventoryItemsRequest::ToJson() const JsonValue UpdateInventoryItemsRequest::ToJson(const PFInventoryUpdateInventoryItemsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "CollectionId", input.collectionId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -2537,12 +2537,12 @@ HRESULT UpdateInventoryItemsResponse::Copy(const PFInventoryUpdateInventoryItems { output = input; { - auto propCopyResult = buffer.CopyTo(input.eTag); + auto propCopyResult = buffer.CopyTo(input.eTag); RETURN_IF_FAILED(propCopyResult.hr); output.eTag = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.idempotencyId); + auto propCopyResult = buffer.CopyTo(input.idempotencyId); RETURN_IF_FAILED(propCopyResult.hr); output.idempotencyId = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/LeaderboardsTypes.cpp b/Source/PlayFabServices/Source/Generated/LeaderboardsTypes.cpp index 002fa5f..e08f215 100644 --- a/Source/PlayFabServices/Source/Generated/LeaderboardsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/LeaderboardsTypes.cpp @@ -15,7 +15,7 @@ JsonValue LinkedStatisticColumn::ToJson() const JsonValue LinkedStatisticColumn::ToJson(const PFLeaderboardsLinkedStatisticColumn& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "LinkedStatisticColumnName", input.linkedStatisticColumnName); JsonUtils::ObjectAddMember(output, "LinkedStatisticName", input.linkedStatisticName); return output; @@ -62,12 +62,12 @@ HRESULT LinkedStatisticColumn::Copy(const PFLeaderboardsLinkedStatisticColumn& i { output = input; { - auto propCopyResult = buffer.CopyTo(input.linkedStatisticColumnName); + auto propCopyResult = buffer.CopyTo(input.linkedStatisticColumnName); RETURN_IF_FAILED(propCopyResult.hr); output.linkedStatisticColumnName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.linkedStatisticName); + auto propCopyResult = buffer.CopyTo(input.linkedStatisticName); RETURN_IF_FAILED(propCopyResult.hr); output.linkedStatisticName = propCopyResult.ExtractPayload(); } @@ -81,7 +81,7 @@ JsonValue LeaderboardColumn::ToJson() const JsonValue LeaderboardColumn::ToJson(const PFLeaderboardsLeaderboardColumn& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "LinkedStatisticColumn", input.linkedStatisticColumn); JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "SortDirection", input.sortDirection); @@ -134,12 +134,12 @@ HRESULT LeaderboardColumn::Copy(const PFLeaderboardsLeaderboardColumn& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.linkedStatisticColumn); + auto propCopyResult = buffer.CopyTo(input.linkedStatisticColumn); RETURN_IF_FAILED(propCopyResult.hr); output.linkedStatisticColumn = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -153,7 +153,7 @@ JsonValue CreateLeaderboardDefinitionRequest::ToJson() const JsonValue CreateLeaderboardDefinitionRequest::ToJson(const PFLeaderboardsCreateLeaderboardDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Columns", input.columns, input.columnsCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EntityType", input.entityType); @@ -170,7 +170,7 @@ JsonValue DeleteLeaderboardDefinitionRequest::ToJson() const JsonValue DeleteLeaderboardDefinitionRequest::ToJson(const PFLeaderboardsDeleteLeaderboardDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -183,7 +183,7 @@ JsonValue DeleteLeaderboardEntriesRequest::ToJson() const JsonValue DeleteLeaderboardEntriesRequest::ToJson(const PFLeaderboardsDeleteLeaderboardEntriesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "EntityIds", input.entityIds, input.entityIdsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); @@ -197,7 +197,7 @@ JsonValue GetFriendLeaderboardForEntityRequest::ToJson() const JsonValue GetFriendLeaderboardForEntityRequest::ToJson(const PFLeaderboardsGetFriendLeaderboardForEntityRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "ExternalFriendSources", JsonUtils::ToJson(input.externalFriendSources)); @@ -272,17 +272,17 @@ HRESULT EntityLeaderboardEntry::Copy(const PFLeaderboardsEntityLeaderboardEntry& { output = input; { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.metadata); + auto propCopyResult = buffer.CopyTo(input.metadata); RETURN_IF_FAILED(propCopyResult.hr); output.metadata = propCopyResult.ExtractPayload(); } @@ -300,6 +300,8 @@ HRESULT GetEntityLeaderboardResponse::FromJson(const JsonValue& input) RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "Columns", columns)); this->SetColumns(std::move(columns)); + RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "EntryCount", this->m_model.entryCount)); + ModelVector rankings{}; RETURN_IF_FAILED(JsonUtils::ObjectGetMember(input, "Rankings", rankings)); this->SetRankings(std::move(rankings)); @@ -358,7 +360,7 @@ JsonValue GetEntityLeaderboardRequest::ToJson() const JsonValue GetEntityLeaderboardRequest::ToJson(const PFLeaderboardsGetEntityLeaderboardRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "LeaderboardName", input.leaderboardName); JsonUtils::ObjectAddMember(output, "PageSize", input.pageSize); @@ -374,7 +376,7 @@ JsonValue GetLeaderboardAroundEntityRequest::ToJson() const JsonValue GetLeaderboardAroundEntityRequest::ToJson(const PFLeaderboardsGetLeaderboardAroundEntityRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "LeaderboardName", input.leaderboardName); @@ -390,7 +392,7 @@ JsonValue GetLeaderboardDefinitionRequest::ToJson() const JsonValue GetLeaderboardDefinitionRequest::ToJson(const PFLeaderboardsGetLeaderboardDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -473,22 +475,22 @@ HRESULT GetLeaderboardDefinitionResponse::Copy(const PFLeaderboardsGetLeaderboar output.columns = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityType); + auto propCopyResult = buffer.CopyTo(input.entityType); RETURN_IF_FAILED(propCopyResult.hr); output.entityType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastResetTime); + auto propCopyResult = buffer.CopyTo(input.lastResetTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastResetTime = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionConfiguration); + auto propCopyResult = buffer.CopyTo(input.versionConfiguration); RETURN_IF_FAILED(propCopyResult.hr); output.versionConfiguration = propCopyResult.ExtractPayload(); } @@ -502,7 +504,7 @@ JsonValue GetLeaderboardForEntitiesRequest::ToJson() const JsonValue GetLeaderboardForEntitiesRequest::ToJson(const PFLeaderboardsGetLeaderboardForEntitiesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "EntityIds", input.entityIds, input.entityIdsCount); JsonUtils::ObjectAddMember(output, "LeaderboardName", input.leaderboardName); @@ -517,7 +519,7 @@ JsonValue IncrementLeaderboardVersionRequest::ToJson() const JsonValue IncrementLeaderboardVersionRequest::ToJson(const PFLeaderboardsIncrementLeaderboardVersionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -560,7 +562,7 @@ JsonValue ListLeaderboardDefinitionsRequest::ToJson() const JsonValue ListLeaderboardDefinitionsRequest::ToJson(const PFLeaderboardsListLeaderboardDefinitionsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -642,22 +644,22 @@ HRESULT LeaderboardDefinition::Copy(const PFLeaderboardsLeaderboardDefinition& i output.columns = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityType); + auto propCopyResult = buffer.CopyTo(input.entityType); RETURN_IF_FAILED(propCopyResult.hr); output.entityType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastResetTime); + auto propCopyResult = buffer.CopyTo(input.lastResetTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastResetTime = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionConfiguration); + auto propCopyResult = buffer.CopyTo(input.versionConfiguration); RETURN_IF_FAILED(propCopyResult.hr); output.versionConfiguration = propCopyResult.ExtractPayload(); } @@ -712,7 +714,7 @@ JsonValue UnlinkLeaderboardFromStatisticRequest::ToJson() const JsonValue UnlinkLeaderboardFromStatisticRequest::ToJson(const PFLeaderboardsUnlinkLeaderboardFromStatisticRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "StatisticName", input.statisticName); @@ -726,7 +728,7 @@ JsonValue LeaderboardEntryUpdate::ToJson() const JsonValue LeaderboardEntryUpdate::ToJson(const PFLeaderboardsLeaderboardEntryUpdate& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "EntityId", input.entityId); JsonUtils::ObjectAddMember(output, "Metadata", input.metadata); JsonUtils::ObjectAddMemberArray(output, "Scores", input.scores, input.scoresCount); @@ -740,7 +742,7 @@ JsonValue UpdateLeaderboardEntriesRequest::ToJson() const JsonValue UpdateLeaderboardEntriesRequest::ToJson(const PFLeaderboardsUpdateLeaderboardEntriesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "Entries", input.entries, input.entriesCount); JsonUtils::ObjectAddMember(output, "LeaderboardName", input.leaderboardName); @@ -761,7 +763,7 @@ JsonValue ToJson(PFExternalFriendSources const* input) Stringstream ss; if (*input == PFExternalFriendSources::None) { - return JsonValue{ EnumName(PFExternalFriendSources::None), JsonUtils::allocator }; + return JsonValue{ EnumName(PFExternalFriendSources::None) }; } if ((*input & PFExternalFriendSources::Steam) == PFExternalFriendSources::Steam) { @@ -788,11 +790,11 @@ JsonValue ToJson(PFExternalFriendSources const* input) ss << separator << EnumName(PFExternalFriendSources::All); separator = ","; } - return JsonValue{ ss.str().data(), JsonUtils::allocator }; + return JsonValue{ ss.str().data() }; } else { - return JsonValue{ rapidjson::kNullType }; + return JsonValue{}; } } diff --git a/Source/PlayFabServices/Source/Generated/LocalizationTypes.cpp b/Source/PlayFabServices/Source/Generated/LocalizationTypes.cpp index 4b1f575..7a711f1 100644 --- a/Source/PlayFabServices/Source/Generated/LocalizationTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/LocalizationTypes.cpp @@ -15,7 +15,7 @@ JsonValue GetLanguageListRequest::ToJson() const JsonValue GetLanguageListRequest::ToJson(const PFLocalizationGetLanguageListRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } diff --git a/Source/PlayFabServices/Source/Generated/MultiplayerServerTypes.cpp b/Source/PlayFabServices/Source/Generated/MultiplayerServerTypes.cpp index bac5b32..0c522a0 100644 --- a/Source/PlayFabServices/Source/Generated/MultiplayerServerTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/MultiplayerServerTypes.cpp @@ -15,7 +15,7 @@ JsonValue DeleteSecretRequest::ToJson() const JsonValue DeleteSecretRequest::ToJson(const PFMultiplayerServerDeleteSecretRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -28,7 +28,7 @@ JsonValue ListBuildAliasesRequest::ToJson() const JsonValue ListBuildAliasesRequest::ToJson(const PFMultiplayerServerListBuildAliasesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PageSize", input.pageSize); JsonUtils::ObjectAddMember(output, "SkipToken", input.skipToken); @@ -126,12 +126,12 @@ HRESULT BuildAliasDetailsResponse::Copy(const PFMultiplayerServerBuildAliasDetai { output = input; { - auto propCopyResult = buffer.CopyTo(input.aliasId); + auto propCopyResult = buffer.CopyTo(input.aliasId); RETURN_IF_FAILED(propCopyResult.hr); output.aliasId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.aliasName); + auto propCopyResult = buffer.CopyTo(input.aliasName); RETURN_IF_FAILED(propCopyResult.hr); output.aliasName = propCopyResult.ExtractPayload(); } @@ -192,7 +192,7 @@ HRESULT ListBuildAliasesResponse::Copy(const PFMultiplayerServerListBuildAliases output.buildAliases = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.skipToken); + auto propCopyResult = buffer.CopyTo(input.skipToken); RETURN_IF_FAILED(propCopyResult.hr); output.skipToken = propCopyResult.ExtractPayload(); } @@ -206,7 +206,7 @@ JsonValue ListBuildSummariesRequest::ToJson() const JsonValue ListBuildSummariesRequest::ToJson(const PFMultiplayerServerListBuildSummariesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PageSize", input.pageSize); JsonUtils::ObjectAddMember(output, "SkipToken", input.skipToken); @@ -330,7 +330,7 @@ HRESULT DynamicStandbySettings::Copy(const PFMultiplayerServerDynamicStandbySett output.dynamicFloorMultiplierThresholds = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.rampDownSeconds); + auto propCopyResult = buffer.CopyTo(input.rampDownSeconds); RETURN_IF_FAILED(propCopyResult.hr); output.rampDownSeconds = propCopyResult.ExtractPayload(); } @@ -380,7 +380,7 @@ HRESULT Schedule::Copy(const PFMultiplayerServerSchedule& input, PFMultiplayerSe { output = input; { - auto propCopyResult = buffer.CopyTo(input.description); + auto propCopyResult = buffer.CopyTo(input.description); RETURN_IF_FAILED(propCopyResult.hr); output.description = propCopyResult.ExtractPayload(); } @@ -526,37 +526,37 @@ HRESULT BuildRegion::Copy(const PFMultiplayerServerBuildRegion& input, PFMultipl { output = input; { - auto propCopyResult = buffer.CopyTo(input.currentServerStats); + auto propCopyResult = buffer.CopyTo(input.currentServerStats); RETURN_IF_FAILED(propCopyResult.hr); output.currentServerStats = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.dynamicStandbySettings); + auto propCopyResult = buffer.CopyTo(input.dynamicStandbySettings); RETURN_IF_FAILED(propCopyResult.hr); output.dynamicStandbySettings = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.multiplayerServerCountPerVm); + auto propCopyResult = buffer.CopyTo(input.multiplayerServerCountPerVm); RETURN_IF_FAILED(propCopyResult.hr); output.multiplayerServerCountPerVm = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.region); + auto propCopyResult = buffer.CopyTo(input.region); RETURN_IF_FAILED(propCopyResult.hr); output.region = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.scheduledStandbySettings); + auto propCopyResult = buffer.CopyTo(input.scheduledStandbySettings); RETURN_IF_FAILED(propCopyResult.hr); output.scheduledStandbySettings = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.status); + auto propCopyResult = buffer.CopyTo(input.status); RETURN_IF_FAILED(propCopyResult.hr); output.status = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.vmSize); + auto propCopyResult = buffer.CopyTo(input.vmSize); RETURN_IF_FAILED(propCopyResult.hr); output.vmSize = propCopyResult.ExtractPayload(); } @@ -631,17 +631,17 @@ HRESULT BuildSummary::Copy(const PFMultiplayerServerBuildSummary& input, PFMulti { output = input; { - auto propCopyResult = buffer.CopyTo(input.buildId); + auto propCopyResult = buffer.CopyTo(input.buildId); RETURN_IF_FAILED(propCopyResult.hr); output.buildId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.buildName); + auto propCopyResult = buffer.CopyTo(input.buildName); RETURN_IF_FAILED(propCopyResult.hr); output.buildName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.creationTime); + auto propCopyResult = buffer.CopyTo(input.creationTime); RETURN_IF_FAILED(propCopyResult.hr); output.creationTime = propCopyResult.ExtractPayload(); } @@ -707,7 +707,7 @@ HRESULT ListBuildSummariesResponse::Copy(const PFMultiplayerServerListBuildSumma output.buildSummaries = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.skipToken); + auto propCopyResult = buffer.CopyTo(input.skipToken); RETURN_IF_FAILED(propCopyResult.hr); output.skipToken = propCopyResult.ExtractPayload(); } @@ -721,7 +721,7 @@ JsonValue ListQosServersForTitleRequest::ToJson() const JsonValue ListQosServersForTitleRequest::ToJson(const PFMultiplayerServerListQosServersForTitleRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "IncludeAllRegions", input.includeAllRegions); JsonUtils::ObjectAddMember(output, "RoutingPreference", input.routingPreference); @@ -769,12 +769,12 @@ HRESULT QosServer::Copy(const PFMultiplayerServerQosServer& input, PFMultiplayer { output = input; { - auto propCopyResult = buffer.CopyTo(input.region); + auto propCopyResult = buffer.CopyTo(input.region); RETURN_IF_FAILED(propCopyResult.hr); output.region = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serverUrl); + auto propCopyResult = buffer.CopyTo(input.serverUrl); RETURN_IF_FAILED(propCopyResult.hr); output.serverUrl = propCopyResult.ExtractPayload(); } @@ -830,7 +830,7 @@ HRESULT ListQosServersForTitleResponse::Copy(const PFMultiplayerServerListQosSer output.qosServers = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.skipToken); + auto propCopyResult = buffer.CopyTo(input.skipToken); RETURN_IF_FAILED(propCopyResult.hr); output.skipToken = propCopyResult.ExtractPayload(); } @@ -844,7 +844,7 @@ JsonValue ListSecretSummariesRequest::ToJson() const JsonValue ListSecretSummariesRequest::ToJson(const PFMultiplayerServerListSecretSummariesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PageSize", input.pageSize); JsonUtils::ObjectAddMember(output, "SkipToken", input.skipToken); @@ -900,17 +900,17 @@ HRESULT SecretSummary::Copy(const PFMultiplayerServerSecretSummary& input, PFMul { output = input; { - auto propCopyResult = buffer.CopyTo(input.expirationDate); + auto propCopyResult = buffer.CopyTo(input.expirationDate); RETURN_IF_FAILED(propCopyResult.hr); output.expirationDate = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.version); + auto propCopyResult = buffer.CopyTo(input.version); RETURN_IF_FAILED(propCopyResult.hr); output.version = propCopyResult.ExtractPayload(); } @@ -966,7 +966,7 @@ HRESULT ListSecretSummariesResponse::Copy(const PFMultiplayerServerListSecretSum output.secretSummaries = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.skipToken); + auto propCopyResult = buffer.CopyTo(input.skipToken); RETURN_IF_FAILED(propCopyResult.hr); output.skipToken = propCopyResult.ExtractPayload(); } @@ -980,7 +980,7 @@ JsonValue BuildAliasParams::ToJson() const JsonValue BuildAliasParams::ToJson(const PFMultiplayerServerBuildAliasParams& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AliasId", input.aliasId); return output; } @@ -992,7 +992,7 @@ JsonValue RequestMultiplayerServerRequest::ToJson() const JsonValue RequestMultiplayerServerRequest::ToJson(const PFMultiplayerServerRequestMultiplayerServerRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "BuildAliasParams", input.buildAliasParams); JsonUtils::ObjectAddMember(output, "BuildId", input.buildId); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); @@ -1036,7 +1036,7 @@ HRESULT ConnectedPlayer::Copy(const PFMultiplayerServerConnectedPlayer& input, P { output = input; { - auto propCopyResult = buffer.CopyTo(input.playerId); + auto propCopyResult = buffer.CopyTo(input.playerId); RETURN_IF_FAILED(propCopyResult.hr); output.playerId = propCopyResult.ExtractPayload(); } @@ -1080,7 +1080,7 @@ HRESULT Port::Copy(const PFMultiplayerServerPort& input, PFMultiplayerServerPort { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -1136,17 +1136,17 @@ HRESULT PublicIpAddress::Copy(const PFMultiplayerServerPublicIpAddress& input, P { output = input; { - auto propCopyResult = buffer.CopyTo(input.fQDN); + auto propCopyResult = buffer.CopyTo(input.fQDN); RETURN_IF_FAILED(propCopyResult.hr); output.fQDN = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.ipAddress); + auto propCopyResult = buffer.CopyTo(input.ipAddress); RETURN_IF_FAILED(propCopyResult.hr); output.ipAddress = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.routingType); + auto propCopyResult = buffer.CopyTo(input.routingType); RETURN_IF_FAILED(propCopyResult.hr); output.routingType = propCopyResult.ExtractPayload(); } @@ -1277,7 +1277,7 @@ HRESULT RequestMultiplayerServerResponse::Copy(const PFMultiplayerServerRequestM { output = input; { - auto propCopyResult = buffer.CopyTo(input.buildId); + auto propCopyResult = buffer.CopyTo(input.buildId); RETURN_IF_FAILED(propCopyResult.hr); output.buildId = propCopyResult.ExtractPayload(); } @@ -1287,17 +1287,17 @@ HRESULT RequestMultiplayerServerResponse::Copy(const PFMultiplayerServerRequestM output.connectedPlayers = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.fQDN); + auto propCopyResult = buffer.CopyTo(input.fQDN); RETURN_IF_FAILED(propCopyResult.hr); output.fQDN = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.iPV4Address); + auto propCopyResult = buffer.CopyTo(input.iPV4Address); RETURN_IF_FAILED(propCopyResult.hr); output.iPV4Address = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastStateTransitionTime); + auto propCopyResult = buffer.CopyTo(input.lastStateTransitionTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastStateTransitionTime = propCopyResult.ExtractPayload(); } @@ -1312,27 +1312,27 @@ HRESULT RequestMultiplayerServerResponse::Copy(const PFMultiplayerServerRequestM output.publicIPV4Addresses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.region); + auto propCopyResult = buffer.CopyTo(input.region); RETURN_IF_FAILED(propCopyResult.hr); output.region = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serverId); + auto propCopyResult = buffer.CopyTo(input.serverId); RETURN_IF_FAILED(propCopyResult.hr); output.serverId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.sessionId); + auto propCopyResult = buffer.CopyTo(input.sessionId); RETURN_IF_FAILED(propCopyResult.hr); output.sessionId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.state); + auto propCopyResult = buffer.CopyTo(input.state); RETURN_IF_FAILED(propCopyResult.hr); output.state = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.vmId); + auto propCopyResult = buffer.CopyTo(input.vmId); RETURN_IF_FAILED(propCopyResult.hr); output.vmId = propCopyResult.ExtractPayload(); } @@ -1346,7 +1346,7 @@ JsonValue PartyInvitationConfiguration::ToJson() const JsonValue PartyInvitationConfiguration::ToJson(const PFMultiplayerServerPartyInvitationConfiguration& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "EntityKeys", input.entityKeys, input.entityKeysCount); JsonUtils::ObjectAddMember(output, "Identifier", input.identifier); JsonUtils::ObjectAddMember(output, "Revocability", input.revocability); @@ -1360,7 +1360,7 @@ JsonValue PartyNetworkConfiguration::ToJson() const JsonValue PartyNetworkConfiguration::ToJson(const PFMultiplayerServerPartyNetworkConfiguration& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "DirectPeerConnectivityOptions", input.directPeerConnectivityOptions); JsonUtils::ObjectAddMember(output, "MaxDevices", input.maxDevices); JsonUtils::ObjectAddMember(output, "MaxDevicesPerUser", input.maxDevicesPerUser); @@ -1378,7 +1378,7 @@ JsonValue RequestPartyServiceRequest::ToJson() const JsonValue RequestPartyServiceRequest::ToJson(const PFMultiplayerServerRequestPartyServiceRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "NetworkConfiguration", input.networkConfiguration); JsonUtils::ObjectAddMember(output, "PartyId", input.partyId); @@ -1435,17 +1435,17 @@ HRESULT RequestPartyServiceResponse::Copy(const PFMultiplayerServerRequestPartyS { output = input; { - auto propCopyResult = buffer.CopyTo(input.invitationId); + auto propCopyResult = buffer.CopyTo(input.invitationId); RETURN_IF_FAILED(propCopyResult.hr); output.invitationId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.partyId); + auto propCopyResult = buffer.CopyTo(input.partyId); RETURN_IF_FAILED(propCopyResult.hr); output.partyId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.serializedNetworkDescriptor); + auto propCopyResult = buffer.CopyTo(input.serializedNetworkDescriptor); RETURN_IF_FAILED(propCopyResult.hr); output.serializedNetworkDescriptor = propCopyResult.ExtractPayload(); } @@ -1459,7 +1459,7 @@ JsonValue Secret::ToJson() const JsonValue Secret::ToJson(const PFMultiplayerServerSecret& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberTime(output, "ExpirationDate", input.expirationDate); JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMember(output, "Value", input.value); @@ -1473,7 +1473,7 @@ JsonValue UploadSecretRequest::ToJson() const JsonValue UploadSecretRequest::ToJson(const PFMultiplayerServerUploadSecretRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "ForceUpdate", input.forceUpdate); JsonUtils::ObjectAddMember(output, "GameSecret", input.gameSecret); diff --git a/Source/PlayFabServices/Source/Generated/PFAccountManagement.cpp b/Source/PlayFabServices/Source/Generated/PFAccountManagement.cpp index 83dd00f..7f392de 100644 --- a/Source/PlayFabServices/Source/Generated/PFAccountManagement.cpp +++ b/Source/PlayFabServices/Source/Generated/PFAccountManagement.cpp @@ -714,6 +714,52 @@ PF_API PFAccountManagementClientGetPlayFabIDsFromSteamIDsGetResult( } #endif +#if 0 +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync( + _In_ PFEntityHandle contextHandle, + _In_ const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest* request, + _In_ XAsyncBlock* async +) noexcept +{ + RETURN_HR_INVALIDARG_IF_NULL(request); + + SharedPtr state{ nullptr }; + RETURN_IF_FAILED(GlobalState::Get(state)); + + auto provider = MakeProvider( + state->RunContext().DeriveOnQueue(async->queue), + async, + XASYNC_IDENTITY(PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync), + std::bind(&AccountManagementAPI::ClientGetPlayFabIDsFromSteamNames, Entity::Duplicate(contextHandle), *request, std::placeholders::_1) + ); + return XAsyncProviderBase::Run(std::move(provider)); +} + +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResultSize( + _In_ XAsyncBlock* async, + _Out_ size_t* bufferSize +) noexcept +{ + return XAsyncGetResultSize(async, bufferSize); +} + +PF_API PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResult( + _In_ XAsyncBlock* async, + _In_ size_t bufferSize, + _Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer, + _Outptr_ PFAccountManagementGetPlayFabIDsFromSteamNamesResult** result, + _Out_opt_ size_t* bufferUsed +) noexcept +{ + RETURN_HR_INVALIDARG_IF_NULL(result); + + RETURN_IF_FAILED(XAsyncGetResult(async, nullptr, bufferSize, buffer, bufferUsed)); + *result = static_cast(buffer); + + return S_OK; +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC PF_API PFAccountManagementClientGetPlayFabIDsFromTwitchIDsAsync( _In_ PFEntityHandle contextHandle, @@ -2166,6 +2212,52 @@ PF_API PFAccountManagementServerGetPlayFabIDsFromSteamIDsGetResult( } #endif +#if 0 +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync( + _In_ PFEntityHandle contextHandle, + _In_ const PFAccountManagementGetPlayFabIDsFromSteamNamesRequest* request, + _In_ XAsyncBlock* async +) noexcept +{ + RETURN_HR_INVALIDARG_IF_NULL(request); + + SharedPtr state{ nullptr }; + RETURN_IF_FAILED(GlobalState::Get(state)); + + auto provider = MakeProvider( + state->RunContext().DeriveOnQueue(async->queue), + async, + XASYNC_IDENTITY(PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync), + std::bind(&AccountManagementAPI::ServerGetPlayFabIDsFromSteamNames, Entity::Duplicate(contextHandle), *request, std::placeholders::_1) + ); + return XAsyncProviderBase::Run(std::move(provider)); +} + +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResultSize( + _In_ XAsyncBlock* async, + _Out_ size_t* bufferSize +) noexcept +{ + return XAsyncGetResultSize(async, bufferSize); +} + +PF_API PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResult( + _In_ XAsyncBlock* async, + _In_ size_t bufferSize, + _Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer, + _Outptr_ PFAccountManagementGetPlayFabIDsFromSteamNamesResult** result, + _Out_opt_ size_t* bufferUsed +) noexcept +{ + RETURN_HR_INVALIDARG_IF_NULL(result); + + RETURN_IF_FAILED(XAsyncGetResult(async, nullptr, bufferSize, buffer, bufferUsed)); + *result = static_cast(buffer); + + return S_OK; +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC PF_API PFAccountManagementServerGetPlayFabIDsFromTwitchIDsAsync( _In_ PFEntityHandle contextHandle, diff --git a/Source/PlayFabServices/Source/Generated/PlatformSpecificTypes.cpp b/Source/PlayFabServices/Source/Generated/PlatformSpecificTypes.cpp index f5eb413..14f12e9 100644 --- a/Source/PlayFabServices/Source/Generated/PlatformSpecificTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/PlatformSpecificTypes.cpp @@ -15,7 +15,7 @@ JsonValue AndroidDevicePushNotificationRegistrationRequest::ToJson() const JsonValue AndroidDevicePushNotificationRegistrationRequest::ToJson(const PFPlatformSpecificAndroidDevicePushNotificationRegistrationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConfirmationMessage", input.confirmationMessage); JsonUtils::ObjectAddMember(output, "DeviceToken", input.deviceToken); JsonUtils::ObjectAddMember(output, "SendPushNotificationConfirmation", input.sendPushNotificationConfirmation); @@ -29,7 +29,7 @@ JsonValue RefreshPSNAuthTokenRequest::ToJson() const JsonValue RefreshPSNAuthTokenRequest::ToJson(const PFPlatformSpecificRefreshPSNAuthTokenRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AuthCode", input.authCode); JsonUtils::ObjectAddMember(output, "IssuerId", input.issuerId); JsonUtils::ObjectAddMember(output, "RedirectUri", input.redirectUri); @@ -43,7 +43,7 @@ JsonValue RegisterForIOSPushNotificationRequest::ToJson() const JsonValue RegisterForIOSPushNotificationRequest::ToJson(const PFPlatformSpecificRegisterForIOSPushNotificationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ConfirmationMessage", input.confirmationMessage); JsonUtils::ObjectAddMember(output, "DeviceToken", input.deviceToken); JsonUtils::ObjectAddMember(output, "SendPushNotificationConfirmation", input.sendPushNotificationConfirmation); @@ -57,7 +57,7 @@ JsonValue AwardSteamAchievementItem::ToJson() const JsonValue AwardSteamAchievementItem::ToJson(const PFPlatformSpecificAwardSteamAchievementItem& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AchievementName", input.achievementName); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "Result", input.result); @@ -107,12 +107,12 @@ HRESULT AwardSteamAchievementItem::Copy(const PFPlatformSpecificAwardSteamAchiev { output = input; { - auto propCopyResult = buffer.CopyTo(input.achievementName); + auto propCopyResult = buffer.CopyTo(input.achievementName); RETURN_IF_FAILED(propCopyResult.hr); output.achievementName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -126,7 +126,7 @@ JsonValue AwardSteamAchievementRequest::ToJson() const JsonValue AwardSteamAchievementRequest::ToJson(const PFPlatformSpecificAwardSteamAchievementRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Achievements", input.achievements, input.achievementsCount); return output; } diff --git a/Source/PlayFabServices/Source/Generated/PlayerDataManagementTypes.cpp b/Source/PlayFabServices/Source/Generated/PlayerDataManagementTypes.cpp index b2463f6..e88878f 100644 --- a/Source/PlayFabServices/Source/Generated/PlayerDataManagementTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/PlayerDataManagementTypes.cpp @@ -15,7 +15,7 @@ JsonValue GetUserDataRequest::ToJson() const JsonValue GetUserDataRequest::ToJson(const PFPlayerDataManagementGetUserDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "IfChangedFromDataVersion", input.ifChangedFromDataVersion); JsonUtils::ObjectAddMemberArray(output, "Keys", input.keys, input.keysCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -73,7 +73,7 @@ JsonValue ClientUpdateUserDataRequest::ToJson() const JsonValue ClientUpdateUserDataRequest::ToJson(const PFPlayerDataManagementClientUpdateUserDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberDictionary(output, "Data", input.data, input.dataCount); JsonUtils::ObjectAddMemberArray(output, "KeysToRemove", input.keysToRemove, input.keysToRemoveCount); @@ -161,7 +161,7 @@ HRESULT ServerGetUserDataResult::Copy(const PFPlayerDataManagementServerGetUserD output.data = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -175,7 +175,7 @@ JsonValue ServerUpdateUserDataRequest::ToJson() const JsonValue ServerUpdateUserDataRequest::ToJson(const PFPlayerDataManagementServerUpdateUserDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberDictionary(output, "Data", input.data, input.dataCount); JsonUtils::ObjectAddMemberArray(output, "KeysToRemove", input.keysToRemove, input.keysToRemoveCount); @@ -191,7 +191,7 @@ JsonValue UpdateUserInternalDataRequest::ToJson() const JsonValue UpdateUserInternalDataRequest::ToJson(const PFPlayerDataManagementUpdateUserInternalDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberDictionary(output, "Data", input.data, input.dataCount); JsonUtils::ObjectAddMemberArray(output, "KeysToRemove", input.keysToRemove, input.keysToRemoveCount); diff --git a/Source/PlayFabServices/Source/Generated/ProfilesTypes.cpp b/Source/PlayFabServices/Source/Generated/ProfilesTypes.cpp index 1bd98f4..8762bed 100644 --- a/Source/PlayFabServices/Source/Generated/ProfilesTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/ProfilesTypes.cpp @@ -15,7 +15,7 @@ JsonValue GetEntityProfileRequest::ToJson() const JsonValue GetEntityProfileRequest::ToJson(const PFProfilesGetEntityProfileRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DataAsObject", input.dataAsObject); JsonUtils::ObjectAddMember(output, "Entity", input.entity); @@ -67,12 +67,12 @@ HRESULT EntityProfileFileMetadata::Copy(const PFProfilesEntityProfileFileMetadat { output = input; { - auto propCopyResult = buffer.CopyTo(input.checksum); + auto propCopyResult = buffer.CopyTo(input.checksum); RETURN_IF_FAILED(propCopyResult.hr); output.checksum = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.fileName); + auto propCopyResult = buffer.CopyTo(input.fileName); RETURN_IF_FAILED(propCopyResult.hr); output.fileName = propCopyResult.ExtractPayload(); } @@ -133,12 +133,12 @@ HRESULT EntityDataObject::Copy(const PFProfilesEntityDataObject& input, PFProfil output.dataObject.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.escapedDataObject); + auto propCopyResult = buffer.CopyTo(input.escapedDataObject); RETURN_IF_FAILED(propCopyResult.hr); output.escapedDataObject = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.objectName); + auto propCopyResult = buffer.CopyTo(input.objectName); RETURN_IF_FAILED(propCopyResult.hr); output.objectName = propCopyResult.ExtractPayload(); } @@ -152,7 +152,7 @@ JsonValue EntityPermissionStatement::ToJson() const JsonValue EntityPermissionStatement::ToJson(const PFProfilesEntityPermissionStatement& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Action", input.action); JsonUtils::ObjectAddMember(output, "Comment", input.comment); JsonUtils::ObjectAddMember(output, "Condition", input.condition); @@ -229,12 +229,12 @@ HRESULT EntityPermissionStatement::Copy(const PFProfilesEntityPermissionStatemen { output = input; { - auto propCopyResult = buffer.CopyTo(input.action); + auto propCopyResult = buffer.CopyTo(input.action); RETURN_IF_FAILED(propCopyResult.hr); output.action = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.comment); + auto propCopyResult = buffer.CopyTo(input.comment); RETURN_IF_FAILED(propCopyResult.hr); output.comment = propCopyResult.ExtractPayload(); } @@ -249,7 +249,7 @@ HRESULT EntityPermissionStatement::Copy(const PFProfilesEntityPermissionStatemen output.principal.stringValue = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.resource); + auto propCopyResult = buffer.CopyTo(input.resource); RETURN_IF_FAILED(propCopyResult.hr); output.resource = propCopyResult.ExtractPayload(); } @@ -308,12 +308,12 @@ HRESULT EntityStatisticValue::Copy(const PFEntityStatisticValue& input, PFEntity { output = input; { - auto propCopyResult = buffer.CopyTo(input.metadata); + auto propCopyResult = buffer.CopyTo(input.metadata); RETURN_IF_FAILED(propCopyResult.hr); output.metadata = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -456,22 +456,22 @@ HRESULT EntityProfileBody::Copy(const PFProfilesEntityProfileBody& input, PFProf { output = input; { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityChain); + auto propCopyResult = buffer.CopyTo(input.entityChain); RETURN_IF_FAILED(propCopyResult.hr); output.entityChain = propCopyResult.ExtractPayload(); } @@ -486,12 +486,12 @@ HRESULT EntityProfileBody::Copy(const PFProfilesEntityProfileBody& input, PFProf output.files = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.language); + auto propCopyResult = buffer.CopyTo(input.language); RETURN_IF_FAILED(propCopyResult.hr); output.language = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lineage); + auto propCopyResult = buffer.CopyTo(input.lineage); RETURN_IF_FAILED(propCopyResult.hr); output.lineage = propCopyResult.ExtractPayload(); } @@ -549,7 +549,7 @@ HRESULT GetEntityProfileResponse::Copy(const PFProfilesGetEntityProfileResponse& { output = input; { - auto propCopyResult = buffer.CopyTo(input.profile); + auto propCopyResult = buffer.CopyTo(input.profile); RETURN_IF_FAILED(propCopyResult.hr); output.profile = propCopyResult.ExtractPayload(); } @@ -563,7 +563,7 @@ JsonValue GetEntityProfilesRequest::ToJson() const JsonValue GetEntityProfilesRequest::ToJson(const PFProfilesGetEntityProfilesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "DataAsObject", input.dataAsObject); JsonUtils::ObjectAddMemberArray(output, "Entities", input.entities, input.entitiesCount); @@ -618,7 +618,7 @@ JsonValue GetTitlePlayersFromMasterPlayerAccountIdsRequest::ToJson() const JsonValue GetTitlePlayersFromMasterPlayerAccountIdsRequest::ToJson(const PFProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "MasterPlayerAccountIds", input.masterPlayerAccountIds, input.masterPlayerAccountIdsCount); JsonUtils::ObjectAddMember(output, "TitleId", input.titleId); @@ -668,7 +668,7 @@ HRESULT GetTitlePlayersFromMasterPlayerAccountIdsResponse::Copy(const PFProfiles { output = input; { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } @@ -687,7 +687,7 @@ JsonValue SetProfileLanguageRequest::ToJson() const JsonValue SetProfileLanguageRequest::ToJson(const PFProfilesSetProfileLanguageRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMember(output, "ExpectedVersion", input.expectedVersion); @@ -736,12 +736,12 @@ HRESULT SetProfileLanguageResponse::Copy(const PFProfilesSetProfileLanguageRespo { output = input; { - auto propCopyResult = buffer.CopyTo(input.operationResult); + auto propCopyResult = buffer.CopyTo(input.operationResult); RETURN_IF_FAILED(propCopyResult.hr); output.operationResult = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionNumber); + auto propCopyResult = buffer.CopyTo(input.versionNumber); RETURN_IF_FAILED(propCopyResult.hr); output.versionNumber = propCopyResult.ExtractPayload(); } @@ -755,7 +755,7 @@ JsonValue SetEntityProfilePolicyRequest::ToJson() const JsonValue SetEntityProfilePolicyRequest::ToJson(const PFProfilesSetEntityProfilePolicyRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "Statements", input.statements, input.statementsCount); diff --git a/Source/PlayFabServices/Source/Generated/PushNotificationsTypes.cpp b/Source/PlayFabServices/Source/Generated/PushNotificationsTypes.cpp index 1b9d156..7378da7 100644 --- a/Source/PlayFabServices/Source/Generated/PushNotificationsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/PushNotificationsTypes.cpp @@ -15,7 +15,7 @@ JsonValue AdvancedPushPlatformMsg::ToJson() const JsonValue AdvancedPushPlatformMsg::ToJson(const PFPushNotificationsAdvancedPushPlatformMsg& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "GCMDataOnly", input.gCMDataOnly); JsonUtils::ObjectAddMember(output, "Json", input.json); JsonUtils::ObjectAddMember(output, "Platform", input.platform); @@ -29,7 +29,7 @@ JsonValue PushNotificationPackage::ToJson() const JsonValue PushNotificationPackage::ToJson(const PFPushNotificationsPushNotificationPackage& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Badge", input.badge); JsonUtils::ObjectAddMember(output, "CustomData", input.customData); JsonUtils::ObjectAddMember(output, "Icon", input.icon); @@ -46,7 +46,7 @@ JsonValue SendPushNotificationRequest::ToJson() const JsonValue SendPushNotificationRequest::ToJson(const PFPushNotificationsSendPushNotificationRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "AdvancedPlatformDelivery", input.advancedPlatformDelivery, input.advancedPlatformDeliveryCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Message", input.message); @@ -64,7 +64,7 @@ JsonValue SendPushNotificationFromTemplateRequest::ToJson() const JsonValue SendPushNotificationFromTemplateRequest::ToJson(const PFPushNotificationsSendPushNotificationFromTemplateRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PushNotificationTemplateId", input.pushNotificationTemplateId); JsonUtils::ObjectAddMember(output, "Recipient", input.recipient); diff --git a/Source/PlayFabServices/Source/Generated/Segments.cpp b/Source/PlayFabServices/Source/Generated/Segments.cpp index 7ed9c36..9752ecc 100644 --- a/Source/PlayFabServices/Source/Generated/Segments.cpp +++ b/Source/PlayFabServices/Source/Generated/Segments.cpp @@ -14,7 +14,7 @@ AsyncOp SegmentsAPI::ClientGetPlayerSegments( ) { const char* path{ "/Client/GetPlayerSegments" }; - JsonValue requestBody{ rapidjson::kNullType }; + JsonValue requestBody { JsonValue::object() }; auto requestOp = ServicesHttpClient::MakeEntityRequest( ServicesCacheId::SegmentsClientGetPlayerSegments, @@ -116,7 +116,7 @@ AsyncOp SegmentsAPI::ServerGetAllSegments( ) { const char* path{ "/Server/GetAllSegments" }; - JsonValue requestBody{ rapidjson::kNullType }; + JsonValue requestBody { JsonValue::object() }; auto requestOp = ServicesHttpClient::MakeSecretKeyRequest( ServicesCacheId::SegmentsServerGetAllSegments, diff --git a/Source/PlayFabServices/Source/Generated/SegmentsTypes.cpp b/Source/PlayFabServices/Source/Generated/SegmentsTypes.cpp index 41bd5df..aaa9c4a 100644 --- a/Source/PlayFabServices/Source/Generated/SegmentsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/SegmentsTypes.cpp @@ -57,17 +57,17 @@ HRESULT GetSegmentResult::Copy(const PFSegmentsGetSegmentResult& input, PFSegmen { output = input; { - auto propCopyResult = buffer.CopyTo(input.aBTestParent); + auto propCopyResult = buffer.CopyTo(input.aBTestParent); RETURN_IF_FAILED(propCopyResult.hr); output.aBTestParent = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -122,7 +122,7 @@ JsonValue GetPlayerTagsRequest::ToJson() const JsonValue GetPlayerTagsRequest::ToJson(const PFSegmentsGetPlayerTagsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Namespace", input.playfabNamespace); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); @@ -171,7 +171,7 @@ HRESULT GetPlayerTagsResult::Copy(const PFSegmentsGetPlayerTagsResult& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.playFabId); + auto propCopyResult = buffer.CopyTo(input.playFabId); RETURN_IF_FAILED(propCopyResult.hr); output.playFabId = propCopyResult.ExtractPayload(); } @@ -190,7 +190,7 @@ JsonValue AddPlayerTagRequest::ToJson() const JsonValue AddPlayerTagRequest::ToJson(const PFSegmentsAddPlayerTagRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "TagName", input.tagName); @@ -245,7 +245,7 @@ JsonValue GetPlayersSegmentsRequest::ToJson() const JsonValue GetPlayersSegmentsRequest::ToJson(const PFSegmentsGetPlayersSegmentsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); return output; @@ -258,7 +258,7 @@ JsonValue GetPlayersInSegmentRequest::ToJson() const JsonValue GetPlayersInSegmentRequest::ToJson(const PFSegmentsGetPlayersInSegmentRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "ContinuationToken", input.continuationToken); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "GetProfilesAsync", input.getProfilesAsync); @@ -311,12 +311,12 @@ HRESULT AdCampaignAttribution::Copy(const PFSegmentsAdCampaignAttribution& input { output = input; { - auto propCopyResult = buffer.CopyTo(input.campaignId); + auto propCopyResult = buffer.CopyTo(input.campaignId); RETURN_IF_FAILED(propCopyResult.hr); output.campaignId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -372,17 +372,17 @@ HRESULT ContactEmailInfo::Copy(const PFSegmentsContactEmailInfo& input, PFSegmen { output = input; { - auto propCopyResult = buffer.CopyTo(input.emailAddress); + auto propCopyResult = buffer.CopyTo(input.emailAddress); RETURN_IF_FAILED(propCopyResult.hr); output.emailAddress = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.verificationStatus); + auto propCopyResult = buffer.CopyTo(input.verificationStatus); RETURN_IF_FAILED(propCopyResult.hr); output.verificationStatus = propCopyResult.ExtractPayload(); } @@ -446,22 +446,22 @@ HRESULT PlayerLinkedAccount::Copy(const PFSegmentsPlayerLinkedAccount& input, PF { output = input; { - auto propCopyResult = buffer.CopyTo(input.email); + auto propCopyResult = buffer.CopyTo(input.email); RETURN_IF_FAILED(propCopyResult.hr); output.email = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platformUserId); + auto propCopyResult = buffer.CopyTo(input.platformUserId); RETURN_IF_FAILED(propCopyResult.hr); output.platformUserId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.username); + auto propCopyResult = buffer.CopyTo(input.username); RETURN_IF_FAILED(propCopyResult.hr); output.username = propCopyResult.ExtractPayload(); } @@ -521,17 +521,17 @@ HRESULT PlayerLocation::Copy(const PFSegmentsPlayerLocation& input, PFSegmentsPl { output = input; { - auto propCopyResult = buffer.CopyTo(input.city); + auto propCopyResult = buffer.CopyTo(input.city); RETURN_IF_FAILED(propCopyResult.hr); output.city = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.latitude); + auto propCopyResult = buffer.CopyTo(input.latitude); RETURN_IF_FAILED(propCopyResult.hr); output.latitude = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.longitude); + auto propCopyResult = buffer.CopyTo(input.longitude); RETURN_IF_FAILED(propCopyResult.hr); output.longitude = propCopyResult.ExtractPayload(); } @@ -583,12 +583,12 @@ HRESULT PlayerStatistic::Copy(const PFSegmentsPlayerStatistic& input, PFSegments { output = input; { - auto propCopyResult = buffer.CopyTo(input.id); + auto propCopyResult = buffer.CopyTo(input.id); RETURN_IF_FAILED(propCopyResult.hr); output.id = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -636,12 +636,12 @@ HRESULT PushNotificationRegistration::Copy(const PFSegmentsPushNotificationRegis { output = input; { - auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); + auto propCopyResult = buffer.CopyTo(input.notificationEndpointARN); RETURN_IF_FAILED(propCopyResult.hr); output.notificationEndpointARN = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.platform); + auto propCopyResult = buffer.CopyTo(input.platform); RETURN_IF_FAILED(propCopyResult.hr); output.platform = propCopyResult.ExtractPayload(); } @@ -866,17 +866,17 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.adCampaignAttributions = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.avatarUrl); + auto propCopyResult = buffer.CopyTo(input.avatarUrl); RETURN_IF_FAILED(propCopyResult.hr); output.avatarUrl = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.bannedUntil); + auto propCopyResult = buffer.CopyTo(input.bannedUntil); RETURN_IF_FAILED(propCopyResult.hr); output.bannedUntil = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.churnPrediction); + auto propCopyResult = buffer.CopyTo(input.churnPrediction); RETURN_IF_FAILED(propCopyResult.hr); output.churnPrediction = propCopyResult.ExtractPayload(); } @@ -886,17 +886,17 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.contactEmailAddresses = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.created); + auto propCopyResult = buffer.CopyTo(input.created); RETURN_IF_FAILED(propCopyResult.hr); output.created = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.displayName); + auto propCopyResult = buffer.CopyTo(input.displayName); RETURN_IF_FAILED(propCopyResult.hr); output.displayName = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastLogin); + auto propCopyResult = buffer.CopyTo(input.lastLogin); RETURN_IF_FAILED(propCopyResult.hr); output.lastLogin = propCopyResult.ExtractPayload(); } @@ -911,7 +911,7 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.locations = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.origination); + auto propCopyResult = buffer.CopyTo(input.origination); RETURN_IF_FAILED(propCopyResult.hr); output.origination = propCopyResult.ExtractPayload(); } @@ -921,7 +921,7 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.playerExperimentVariants = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.playerId); + auto propCopyResult = buffer.CopyTo(input.playerId); RETURN_IF_FAILED(propCopyResult.hr); output.playerId = propCopyResult.ExtractPayload(); } @@ -931,7 +931,7 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.playerStatistics = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.publisherId); + auto propCopyResult = buffer.CopyTo(input.publisherId); RETURN_IF_FAILED(propCopyResult.hr); output.publisherId = propCopyResult.ExtractPayload(); } @@ -951,12 +951,12 @@ HRESULT PlayerProfile::Copy(const PFSegmentsPlayerProfile& input, PFSegmentsPlay output.tags = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.titleId); + auto propCopyResult = buffer.CopyTo(input.titleId); RETURN_IF_FAILED(propCopyResult.hr); output.titleId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); + auto propCopyResult = buffer.CopyTo(input.totalValueToDateInUSD); RETURN_IF_FAILED(propCopyResult.hr); output.totalValueToDateInUSD = propCopyResult.ExtractPayload(); } @@ -1017,7 +1017,7 @@ HRESULT GetPlayersInSegmentResult::Copy(const PFSegmentsGetPlayersInSegmentResul { output = input; { - auto propCopyResult = buffer.CopyTo(input.continuationToken); + auto propCopyResult = buffer.CopyTo(input.continuationToken); RETURN_IF_FAILED(propCopyResult.hr); output.continuationToken = propCopyResult.ExtractPayload(); } @@ -1036,7 +1036,7 @@ JsonValue RemovePlayerTagRequest::ToJson() const JsonValue RemovePlayerTagRequest::ToJson(const PFSegmentsRemovePlayerTagRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "PlayFabId", input.playFabId); JsonUtils::ObjectAddMember(output, "TagName", input.tagName); diff --git a/Source/PlayFabServices/Source/Generated/StatisticsTypes.cpp b/Source/PlayFabServices/Source/Generated/StatisticsTypes.cpp index a9751e0..8570eb6 100644 --- a/Source/PlayFabServices/Source/Generated/StatisticsTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/StatisticsTypes.cpp @@ -15,7 +15,7 @@ JsonValue StatisticColumn::ToJson() const JsonValue StatisticColumn::ToJson(const PFStatisticsStatisticColumn& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "AggregationMethod", input.aggregationMethod); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -56,7 +56,7 @@ HRESULT StatisticColumn::Copy(const PFStatisticsStatisticColumn& input, PFStatis { output = input; { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -70,7 +70,7 @@ JsonValue CreateStatisticDefinitionRequest::ToJson() const JsonValue CreateStatisticDefinitionRequest::ToJson(const PFStatisticsCreateStatisticDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Columns", input.columns, input.columnsCount); JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "EntityType", input.entityType); @@ -86,7 +86,7 @@ JsonValue DeleteStatisticDefinitionRequest::ToJson() const JsonValue DeleteStatisticDefinitionRequest::ToJson(const PFStatisticsDeleteStatisticDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -99,7 +99,7 @@ JsonValue StatisticDelete::ToJson() const JsonValue StatisticDelete::ToJson(const PFStatisticsStatisticDelete& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Name", input.name); return output; } @@ -111,7 +111,7 @@ JsonValue DeleteStatisticsRequest::ToJson() const JsonValue DeleteStatisticsRequest::ToJson(const PFStatisticsDeleteStatisticsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "Statistics", input.statistics, input.statisticsCount); @@ -154,7 +154,7 @@ HRESULT DeleteStatisticsResponse::Copy(const PFStatisticsDeleteStatisticsRespons { output = input; { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -168,7 +168,7 @@ JsonValue GetStatisticDefinitionRequest::ToJson() const JsonValue GetStatisticDefinitionRequest::ToJson(const PFStatisticsGetStatisticDefinitionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -261,12 +261,12 @@ HRESULT GetStatisticDefinitionResponse::Copy(const PFStatisticsGetStatisticDefin output.columns = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityType); + auto propCopyResult = buffer.CopyTo(input.entityType); RETURN_IF_FAILED(propCopyResult.hr); output.entityType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastResetTime); + auto propCopyResult = buffer.CopyTo(input.lastResetTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastResetTime = propCopyResult.ExtractPayload(); } @@ -276,12 +276,12 @@ HRESULT GetStatisticDefinitionResponse::Copy(const PFStatisticsGetStatisticDefin output.linkedLeaderboardNames = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionConfiguration); + auto propCopyResult = buffer.CopyTo(input.versionConfiguration); RETURN_IF_FAILED(propCopyResult.hr); output.versionConfiguration = propCopyResult.ExtractPayload(); } @@ -295,7 +295,7 @@ JsonValue GetStatisticsRequest::ToJson() const JsonValue GetStatisticsRequest::ToJson(const PFStatisticsGetStatisticsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); return output; @@ -394,12 +394,12 @@ HRESULT EntityStatisticValue::Copy(const PFStatisticsEntityStatisticValue& input { output = input; { - auto propCopyResult = buffer.CopyTo(input.metadata); + auto propCopyResult = buffer.CopyTo(input.metadata); RETURN_IF_FAILED(propCopyResult.hr); output.metadata = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } @@ -472,7 +472,7 @@ HRESULT GetStatisticsResponse::Copy(const PFStatisticsGetStatisticsResponse& inp output.columnDetails = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } @@ -491,7 +491,7 @@ JsonValue GetStatisticsForEntitiesRequest::ToJson() const JsonValue GetStatisticsForEntitiesRequest::ToJson(const PFStatisticsGetStatisticsForEntitiesRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMemberArray(output, "Entities", input.entities, input.entitiesCount); return output; @@ -542,7 +542,7 @@ HRESULT EntityStatistics::Copy(const PFStatisticsEntityStatistics& input, PFStat { output = input; { - auto propCopyResult = buffer.CopyTo(input.entityKey); + auto propCopyResult = buffer.CopyTo(input.entityKey); RETURN_IF_FAILED(propCopyResult.hr); output.entityKey = propCopyResult.ExtractPayload(); } @@ -617,7 +617,7 @@ JsonValue IncrementStatisticVersionRequest::ToJson() const JsonValue IncrementStatisticVersionRequest::ToJson(const PFStatisticsIncrementStatisticVersionRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Name", input.name); return output; @@ -660,7 +660,7 @@ JsonValue ListStatisticDefinitionsRequest::ToJson() const JsonValue ListStatisticDefinitionsRequest::ToJson(const PFStatisticsListStatisticDefinitionsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); return output; } @@ -752,12 +752,12 @@ HRESULT StatisticDefinition::Copy(const PFStatisticsStatisticDefinition& input, output.columns = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entityType); + auto propCopyResult = buffer.CopyTo(input.entityType); RETURN_IF_FAILED(propCopyResult.hr); output.entityType = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.lastResetTime); + auto propCopyResult = buffer.CopyTo(input.lastResetTime); RETURN_IF_FAILED(propCopyResult.hr); output.lastResetTime = propCopyResult.ExtractPayload(); } @@ -767,12 +767,12 @@ HRESULT StatisticDefinition::Copy(const PFStatisticsStatisticDefinition& input, output.linkedLeaderboardNames = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.name); + auto propCopyResult = buffer.CopyTo(input.name); RETURN_IF_FAILED(propCopyResult.hr); output.name = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.versionConfiguration); + auto propCopyResult = buffer.CopyTo(input.versionConfiguration); RETURN_IF_FAILED(propCopyResult.hr); output.versionConfiguration = propCopyResult.ExtractPayload(); } @@ -842,7 +842,7 @@ JsonValue StatisticUpdate::ToJson() const JsonValue StatisticUpdate::ToJson(const PFStatisticsStatisticUpdate& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Metadata", input.metadata); JsonUtils::ObjectAddMember(output, "Name", input.name); JsonUtils::ObjectAddMemberArray(output, "Scores", input.scores, input.scoresCount); @@ -857,7 +857,7 @@ JsonValue UpdateStatisticsRequest::ToJson() const JsonValue UpdateStatisticsRequest::ToJson(const PFStatisticsUpdateStatisticsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberDictionary(output, "CustomTags", input.customTags, input.customTagsCount); JsonUtils::ObjectAddMember(output, "Entity", input.entity); JsonUtils::ObjectAddMemberArray(output, "Statistics", input.statistics, input.statisticsCount); @@ -925,7 +925,7 @@ HRESULT UpdateStatisticsResponse::Copy(const PFStatisticsUpdateStatisticsRespons output.columnDetails = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.entity); + auto propCopyResult = buffer.CopyTo(input.entity); RETURN_IF_FAILED(propCopyResult.hr); output.entity = propCopyResult.ExtractPayload(); } diff --git a/Source/PlayFabServices/Source/Generated/TitleDataManagement.cpp b/Source/PlayFabServices/Source/Generated/TitleDataManagement.cpp index fa3dc45..02ca672 100644 --- a/Source/PlayFabServices/Source/Generated/TitleDataManagement.cpp +++ b/Source/PlayFabServices/Source/Generated/TitleDataManagement.cpp @@ -49,7 +49,7 @@ AsyncOp TitleDataManagementAPI::ClientGetTime( ) { const char* path{ "/Client/GetTime" }; - JsonValue requestBody{ rapidjson::kNullType }; + JsonValue requestBody { JsonValue::object() }; auto requestOp = ServicesHttpClient::MakeEntityRequest( ServicesCacheId::TitleDataManagementClientGetTime, @@ -188,7 +188,7 @@ AsyncOp TitleDataManagementAPI::ServerGetTime( ) { const char* path{ "/Server/GetTime" }; - JsonValue requestBody{ rapidjson::kNullType }; + JsonValue requestBody { JsonValue::object() }; auto requestOp = ServicesHttpClient::MakeSecretKeyRequest( ServicesCacheId::TitleDataManagementServerGetTime, diff --git a/Source/PlayFabServices/Source/Generated/TitleDataManagementTypes.cpp b/Source/PlayFabServices/Source/Generated/TitleDataManagementTypes.cpp index ac4c898..73f69c6 100644 --- a/Source/PlayFabServices/Source/Generated/TitleDataManagementTypes.cpp +++ b/Source/PlayFabServices/Source/Generated/TitleDataManagementTypes.cpp @@ -15,7 +15,7 @@ JsonValue GetPublisherDataRequest::ToJson() const JsonValue GetPublisherDataRequest::ToJson(const PFTitleDataManagementGetPublisherDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Keys", input.keys, input.keysCount); return output; } @@ -99,7 +99,7 @@ JsonValue GetTitleDataRequest::ToJson() const JsonValue GetTitleDataRequest::ToJson(const PFTitleDataManagementGetTitleDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMemberArray(output, "Keys", input.keys, input.keysCount); JsonUtils::ObjectAddMember(output, "OverrideLabel", input.overrideLabel); return output; @@ -154,7 +154,7 @@ JsonValue GetTitleNewsRequest::ToJson() const JsonValue GetTitleNewsRequest::ToJson(const PFTitleDataManagementGetTitleNewsRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Count", input.count); return output; } @@ -210,17 +210,17 @@ HRESULT TitleNewsItem::Copy(const PFTitleDataManagementTitleNewsItem& input, PFT { output = input; { - auto propCopyResult = buffer.CopyTo(input.body); + auto propCopyResult = buffer.CopyTo(input.body); RETURN_IF_FAILED(propCopyResult.hr); output.body = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.newsId); + auto propCopyResult = buffer.CopyTo(input.newsId); RETURN_IF_FAILED(propCopyResult.hr); output.newsId = propCopyResult.ExtractPayload(); } { - auto propCopyResult = buffer.CopyTo(input.title); + auto propCopyResult = buffer.CopyTo(input.title); RETURN_IF_FAILED(propCopyResult.hr); output.title = propCopyResult.ExtractPayload(); } @@ -275,7 +275,7 @@ JsonValue SetPublisherDataRequest::ToJson() const JsonValue SetPublisherDataRequest::ToJson(const PFTitleDataManagementSetPublisherDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Key", input.key); JsonUtils::ObjectAddMember(output, "Value", input.value); return output; @@ -288,7 +288,7 @@ JsonValue SetTitleDataRequest::ToJson() const JsonValue SetTitleDataRequest::ToJson(const PFTitleDataManagementSetTitleDataRequest& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "Key", input.key); JsonUtils::ObjectAddMember(output, "Value", input.value); return output; diff --git a/Source/PlayFabServices/Source/Generated/Types.cpp b/Source/PlayFabServices/Source/Generated/Types.cpp index 00c444f..37142a9 100644 --- a/Source/PlayFabServices/Source/Generated/Types.cpp +++ b/Source/PlayFabServices/Source/Generated/Types.cpp @@ -13,7 +13,7 @@ JsonValue VersionConfiguration::ToJson() const JsonValue VersionConfiguration::ToJson(const PFVersionConfiguration& input) { - JsonValue output{ rapidjson::kObjectType }; + JsonValue output { JsonValue::object() }; JsonUtils::ObjectAddMember(output, "MaxQueryableVersions", input.maxQueryableVersions); JsonUtils::ObjectAddMember(output, "ResetInterval", input.resetInterval); return output; diff --git a/Source/PlayFabServices/Source/stdafx.h b/Source/PlayFabServices/Source/stdafx.h index b29697a..ecde3b1 100644 --- a/Source/PlayFabServices/Source/stdafx.h +++ b/Source/PlayFabServices/Source/stdafx.h @@ -22,7 +22,7 @@ #include // PlayFabSharedInternal -#include +#include #include #include #include diff --git a/Source/PlayFabSharedInternal/Include/Generated/Error.h b/Source/PlayFabSharedInternal/Include/Generated/Error.h index 82e6122..66db930 100644 --- a/Source/PlayFabSharedInternal/Include/Generated/Error.h +++ b/Source/PlayFabSharedInternal/Include/Generated/Error.h @@ -590,6 +590,10 @@ enum class ServiceErrorCode MaxQueryableVersionsValueNotAllowedForTier = 1591, StatisticDefinitionHasNullOrEmptyVersionConfiguration = 1592, StatisticColumnLengthMismatch = 1593, + InvalidExternalEntityId = 1594, + UpdatingStatisticsUsingTransactionIdNotAvailableForFreeTier = 1595, + TransactionAlreadyApplied = 1596, + ReportDataNotRetrievedSuccessfully = 1597, MatchmakingEntityInvalid = 2001, MatchmakingPlayerAttributesInvalid = 2002, MatchmakingQueueNotFound = 2016, @@ -856,6 +860,8 @@ enum class ServiceErrorCode TrueSkillInvalidPlayerId = 20063, TrueSkillInvalidSquadSize = 20064, TrueSkillConditionSetNotInModel = 20065, + TrueSkillModelStateInvalidForOperation = 20066, + TrueSkillScenarioContainsActiveModel = 20067, GameSaveManifestNotFound = 20300, GameSaveManifestVersionAlreadyExists = 20301, GameSaveConflictUpdatingManifest = 20302, @@ -865,6 +871,10 @@ enum class ServiceErrorCode GameSaveUnknownFileInManifest = 20306, GameSaveFileExceededReportedSize = 20307, GameSaveFileNotUploaded = 20308, + GameSaveBadRequest = 20309, + GameSaveOperationNotAllowed = 20310, + GameSaveDataStorageQuotaExceeded = 20311, + GameSaveNewerManifestExists = 20312, StateShareForbidden = 21000, StateShareTitleNotInFlight = 21001, StateShareStateNotFound = 21002, diff --git a/Source/PlayFabSharedInternal/Include/JsonUtils.h b/Source/PlayFabSharedInternal/Include/JsonUtils.h index 9b1a3de..b17bda5 100644 --- a/Source/PlayFabSharedInternal/Include/JsonUtils.h +++ b/Source/PlayFabSharedInternal/Include/JsonUtils.h @@ -2,7 +2,7 @@ #include #include -#include "RapidJson.h" +#include "Nlohmann.h" #include "EnumTraits.h" #include "BaseModel.h" @@ -11,12 +11,6 @@ namespace PlayFab namespace JsonUtils { -// Default stack size of rapidjson StackAllocator. Using the same default capacity as rapidjson::CrtAllocator -static size_t kDefaultStackCapacity = 1024; - -// Allocator to be used by rapidjson for all needed allocations -extern JsonAllocator allocator; - // Write JsonValue to String String WriteToString(const JsonValue& jsonValue); @@ -85,60 +79,55 @@ HRESULT FromJson(const JsonValue& input, JsonValue& output); //------------------------------------------------------------------------------ // Helpers for adding members JsonObjects. 'value' param will be converted to a JsonValue added as a member to 'jsonObject'. -// A global JsonAllocator will be used for any rapidjson allocations that are needed. //------------------------------------------------------------------------------ -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue&& name, JsonValue&& value); - -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, JsonValue&& value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, JsonValue&& value); -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const JsonValue& value); - -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const String& value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const String& value); template || std::is_same_v, bool> = true> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const T& value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const T& value); template -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const std::optional& value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const std::optional& value); template && !std::is_same_v, bool> = true> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const PtrT value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const PtrT value); template , bool> = true> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::ModelType* value); +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::ModelType* value); template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const Vector& array); +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const Vector& array); template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const T* array, uint32_t arrayCount); +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const T* array, uint32_t arrayCount); template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::ModelType* const* array, uint32_t arrayCount); +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::ModelType* const* array, uint32_t arrayCount); template -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const Map& map); +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const Map& map); template ::value, bool> = true> -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const EntryT* associativeArray, uint32_t arrayCount); +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const EntryT* associativeArray, uint32_t arrayCount); template , bool> = true> -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::DictionaryEntryType* associativeArray, uint32_t arrayCount); +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::DictionaryEntryType* associativeArray, uint32_t arrayCount); -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, time_t value); +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, time_t value); -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const std::optional& value); +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const std::optional& value); -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const time_t* value); +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const time_t* value); -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const time_t* array, uint32_t arrayCount); +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const time_t* array, uint32_t arrayCount); -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const PFDateTimeDictionaryEntry* associativeArray, uint32_t arrayCount); +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const PFDateTimeDictionaryEntry* associativeArray, uint32_t arrayCount); //------------------------------------------------------------------------------ // Helpers for getting fields from JsonObjects as Cpp types. -// Unless the output field is optional, rapidjson will assert if the JsonObject is missing the requested +// Unless the output field is optional, nlohmann will assert if the JsonObject is missing the requested // field or if the requested fields are not the expected Json type. // // Some of the methods also have output parameters where a pointer to the retreived value & (in the case of collections) the count is returned. @@ -185,7 +174,7 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, Dicti namespace Detail { // Helper method for ObjectGetMember methods. Basically JsonValue::FindMember with type validation -Result ObjectFindMember(const JsonValue& jsonObject, const char* name); +Result ObjectFindMember(const JsonValue& jsonObject, const char* name); } //------------------------------------------------------------------------------ @@ -201,13 +190,13 @@ JsonValue ToJson(const typename InternalModelWrapperT::ModelType& value) template , bool>> JsonValue ToJson(FundamentalT value) { - return JsonValue{ value }; + return value; } template , bool>> inline JsonValue ToJson(EnumT value) { - return JsonValue{ EnumName(value), allocator }; + return EnumName(value); } template, bool>> @@ -219,29 +208,23 @@ HRESULT FromJson(const JsonValue& input, InternalModelWrapperT& output) template , bool>> HRESULT FromJson(const JsonValue& jsonValue, EnumT& output) { - if (!jsonValue.IsString()) + if (!jsonValue.is_string()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = EnumValue(jsonValue.GetString()); + output = EnumValue(jsonValue.get().c_str()); return S_OK; } template || std::is_same_v, bool>> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const T& value) -{ - return ObjectAddMember(jsonObject, JsonValue{ name }, ToJson(value)); -} - -template -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue&& name, const T& value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const T& value) { - return ObjectAddMember(jsonObject, std::move(name), ToJson(value)); + return ObjectAddMember(jsonObject, name, ToJson(value)); } template -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const std::optional& value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const std::optional& value) { if (value.has_value()) { @@ -249,12 +232,12 @@ HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, co } else { - return ObjectAddMember(jsonObject, name, JsonValue{ rapidjson::kNullType }); + return ObjectAddMember(jsonObject, name, JsonValue{}); } } template && !std::is_same_v, bool>> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const PtrT value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const PtrT value) { if (value) { @@ -262,12 +245,12 @@ HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, co } else { - return ObjectAddMember(jsonObject, name, JsonValue{ rapidjson::kNullType }); + return ObjectAddMember(jsonObject, name, JsonValue{}); } } template , bool>> -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::ModelType* value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::ModelType* value) { if (value) { @@ -275,74 +258,75 @@ HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, co } else { - return ObjectAddMember(jsonObject, name, JsonValue{ rapidjson::kNullType }); + return ObjectAddMember(jsonObject, name, JsonValue{}); } } template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const Vector& array) +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const Vector& array) { - JsonValue member{ rapidjson::kArrayType }; + JsonValue member{ JsonValue::array() }; for (auto& item : array) { - member.PushBack(ToJson(item), allocator); + member.push_back(ToJson(item)); } return ObjectAddMember(jsonObject, name, std::move(member)); } template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const T* array, uint32_t arrayCount) +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const T* array, uint32_t arrayCount) { - JsonValue member{ rapidjson::kArrayType }; + JsonValue member{ JsonValue::array() }; for (auto i = 0u; i < arrayCount; ++i) { - member.PushBack(ToJson(array[i]), allocator); + member.push_back(ToJson(array[i])); } return ObjectAddMember(jsonObject, name, std::move(member)); } template -HRESULT ObjectAddMemberArray(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::ModelType* const* array, uint32_t arrayCount) +HRESULT ObjectAddMemberArray(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::ModelType* const* array, uint32_t arrayCount) { - JsonValue member{ rapidjson::kArrayType }; + JsonValue member{ JsonValue::array() }; for (auto i = 0u; i < arrayCount; ++i) { - member.PushBack(ToJson(*array[i]), allocator); + member.push_back(ToJson(*array[i])); } return ObjectAddMember(jsonObject, name, std::move(member)); } template -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const Map& map) +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const Map& map) { - JsonValue member{ rapidjson::kObjectType }; + JsonValue member{ JsonValue::object() }; + for (auto& pair : map) { - RETURN_IF_FAILED(ObjectAddMember(member, ToJson(pair.first), ToJson(pair.second))); + RETURN_IF_FAILED(ObjectAddMember(member, String(ToJson(pair.first)), ToJson(pair.second))); } return ObjectAddMember(jsonObject, name, std::move(member)); } template ::value, bool>> -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const EntryT* associativeArray, uint32_t arrayCount) +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const EntryT* associativeArray, uint32_t arrayCount) { - JsonValue member{ rapidjson::kObjectType }; + JsonValue member{ JsonValue::object() }; for (auto i = 0u; i < arrayCount; ++i) { auto& entry{ associativeArray[i] }; - RETURN_IF_FAILED(ObjectAddMember(member, ToJson(entry.key), ToJson(entry.value))); + RETURN_IF_FAILED(ObjectAddMember(member, String(ToJson(entry.key)), ToJson(entry.value))); } return ObjectAddMember(jsonObject, name, std::move(member)); } template , bool>> -HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, JsonValue::StringRefType name, const typename InternalModelWrapperT::DictionaryEntryType* associativeArray, uint32_t arrayCount) +HRESULT ObjectAddMemberDictionary(JsonValue& jsonObject, StringRefType name, const typename InternalModelWrapperT::DictionaryEntryType* associativeArray, uint32_t arrayCount) { - JsonValue member{ rapidjson::kObjectType }; + JsonValue member{ JsonValue::object() }; for (auto i = 0u; i < arrayCount; ++i) { auto& entry{ associativeArray[i] }; - RETURN_IF_FAILED(ObjectAddMember(member, ToJson(entry.key), ToJson(*entry.value))); + RETURN_IF_FAILED(ObjectAddMember(member, String(ToJson(entry.key)), ToJson(*entry.value))); } return ObjectAddMember(jsonObject, name, std::move(member)); } @@ -352,12 +336,12 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, T& output { auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); - if (findResult.Payload() == jsonObject.MemberEnd()) + if (findResult.Payload() == jsonObject.cend()) { TRACE_ERROR("Json Parse Error: object missing non-optional member \"%s\"", name); return E_FAIL; } - return FromJson(findResult.Payload()->value, output); + return FromJson(findResult.Payload().value(), output); } template @@ -366,10 +350,10 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, std::opti auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.reset(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { output.emplace(); - RETURN_IF_FAILED(FromJson(findResult.Payload()->value, *output)); + RETURN_IF_FAILED(FromJson(findResult.Payload().value(), *output)); } return S_OK; } @@ -380,16 +364,16 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, Vector auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsArray()) + if (!findResult.Payload().value().is_array()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto jsonArray{ findResult.Payload()->value.GetArray() }; - output.reserve(jsonArray.Size()); + auto jsonArray{ findResult.Payload()->get>() }; + output.reserve(jsonArray.size()); for (auto& value : jsonArray) { output.emplace_back(); @@ -405,19 +389,20 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, ModelVect auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsArray()) + if (!findResult.Payload().value().is_array()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto jsonArray{ findResult.Payload()->value.GetArray() }; - output.reserve(jsonArray.Size()); - for (auto& value : jsonArray) + auto jsonArray{ findResult.Payload()->get>() }; + output.reserve(jsonArray.size()); + + for (const auto& value : jsonArray) { - if (!value.IsObject()) + if (!value.is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; @@ -437,21 +422,21 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, Dictionar auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsObject()) + if (!findResult.Payload().value().is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto memberObject{ findResult.Payload()->value.GetObj() }; - output.reserve(memberObject.MemberCount()); - for (auto& pair : memberObject) + auto memberObject{ findResult.Payload()->get() }; + output.reserve(memberObject.size()); + for (const auto& [key, value] : memberObject.items()) { - decltype(EntryT::value) value{}; - RETURN_IF_FAILED(FromJson(pair.value, value)); - output.insert_or_assign(pair.name.GetString(), value); + decltype(EntryT::value) entryValue{}; + RETURN_IF_FAILED(FromJson(value, entryValue)); + output.insert_or_assign(key.c_str(), entryValue); } } return S_OK; @@ -463,21 +448,21 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, ModelDict auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsObject()) + if (!findResult.Payload().value().is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto memberObject{ findResult.Payload()->value.GetObj() }; - output.reserve(memberObject.MemberCount()); - for (auto& pair : memberObject) + auto memberObject{ findResult.Payload()->get() }; + output.reserve(memberObject.size()); + for (const auto& [key, value] : memberObject.items()) { InternalModelWrapperT model{}; - RETURN_IF_FAILED(model.FromJson(pair.value)); - output.insert_or_assign(pair.name.GetString(), std::move(model)); + RETURN_IF_FAILED(model.FromJson(value)); + output.insert_or_assign(key.c_str(), std::move(model)); } } return S_OK; diff --git a/Source/PlayFabSharedInternal/Include/Memory.h b/Source/PlayFabSharedInternal/Include/Memory.h index c4be95f..fc36041 100644 --- a/Source/PlayFabSharedInternal/Include/Memory.h +++ b/Source/PlayFabSharedInternal/Include/Memory.h @@ -12,6 +12,7 @@ namespace PlayFab //------------------------------------------------------------------------------ PFMemoryHooks& GetMemoryHooks(); HRESULT SetMemoryHooks(PFMemoryHooks& hooks); +bool IsUsingCustomMemoryHooks(); //------------------------------------------------------------------------------ // Raw allocation and free methods @@ -56,7 +57,7 @@ struct Deleter }; //------------------------------------------------------------------------------ -// rapidjson Allocator +// nlohmann Allocator //------------------------------------------------------------------------------ struct JsonAllocator { diff --git a/Source/PlayFabSharedInternal/Include/Nlohmann.h b/Source/PlayFabSharedInternal/Include/Nlohmann.h new file mode 100644 index 0000000..78b77b1 --- /dev/null +++ b/Source/PlayFabSharedInternal/Include/Nlohmann.h @@ -0,0 +1,4 @@ +#pragma once + +#include "Memory.h" +#include \ No newline at end of file diff --git a/Source/PlayFabSharedInternal/Include/RapidJson.h b/Source/PlayFabSharedInternal/Include/RapidJson.h deleted file mode 100644 index c70c1c7..0000000 --- a/Source/PlayFabSharedInternal/Include/RapidJson.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "Memory.h" // Required as rapidjson will depend on our Allocators - -#define RAPIDJSON_NAMESPACE PlayFab::rapidjson -#define RAPIDJSON_NAMESPACE_BEGIN namespace PlayFab { namespace rapidjson { -#define RAPIDJSON_NAMESPACE_END } } - -#define RAPIDJSON_DEFAULT_ALLOCATOR PlayFab::JsonAllocator -#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR PlayFab::JsonAllocator - -#define RAPIDJSON_NO_INT64DEFINE - -#include -#include -#include -#include -#include -#include \ No newline at end of file diff --git a/Source/PlayFabSharedInternal/Include/Types.h b/Source/PlayFabSharedInternal/Include/Types.h index 1f61f0c..016c33b 100644 --- a/Source/PlayFabSharedInternal/Include/Types.h +++ b/Source/PlayFabSharedInternal/Include/Types.h @@ -9,7 +9,7 @@ #include #include #include "Memory.h" -#include "RapidJson.h" +#include "Nlohmann.h" namespace PlayFab { @@ -24,6 +24,10 @@ using BasicStringsteam = std::basic_stringstream>; using Stringstream = BasicStringsteam; using WStringstream = BasicStringsteam; +template> +using BasicStringView = std::basic_string_view; +using StringRefType = BasicStringView; + template struct Hash : public std::hash{}; @@ -54,11 +58,8 @@ using Queue = std::queue>; template using List = std::list>; -using JsonDocument = rapidjson::Document; -using JsonValue = rapidjson::Value; - -template -using JsonWriter = rapidjson::Writer, rapidjson::UTF8<>, JsonAllocator>; +using JsonDocument = nlohmann::json; +using JsonValue = nlohmann::json; using Clock = std::chrono::steady_clock; using SystemClock = std::chrono::system_clock; diff --git a/Source/PlayFabSharedInternal/Source/Generated/Error.cpp b/Source/PlayFabSharedInternal/Source/Generated/Error.cpp index bc424dc..6941e33 100644 --- a/Source/PlayFabSharedInternal/Source/Generated/Error.cpp +++ b/Source/PlayFabSharedInternal/Source/Generated/Error.cpp @@ -590,6 +590,10 @@ HRESULT ServiceErrorToHR(ServiceErrorCode errorCode) case ServiceErrorCode::MaxQueryableVersionsValueNotAllowedForTier: return E_PF_MAX_QUERYABLE_VERSIONS_VALUE_NOT_ALLOWED_FOR_TIER; case ServiceErrorCode::StatisticDefinitionHasNullOrEmptyVersionConfiguration: return E_PF_STATISTIC_DEFINITION_HAS_NULL_OR_EMPTY_VERSION_CONFIGURATION; case ServiceErrorCode::StatisticColumnLengthMismatch: return E_PF_STATISTIC_COLUMN_LENGTH_MISMATCH; + case ServiceErrorCode::InvalidExternalEntityId: return E_PF_INVALID_EXTERNAL_ENTITY_ID; + case ServiceErrorCode::UpdatingStatisticsUsingTransactionIdNotAvailableForFreeTier: return E_PF_UPDATING_STATISTICS_USING_TRANSACTION_ID_NOT_AVAILABLE_FOR_FREE_TIER; + case ServiceErrorCode::TransactionAlreadyApplied: return E_PF_TRANSACTION_ALREADY_APPLIED; + case ServiceErrorCode::ReportDataNotRetrievedSuccessfully: return E_PF_REPORT_DATA_NOT_RETRIEVED_SUCCESSFULLY; case ServiceErrorCode::MatchmakingEntityInvalid: return E_PF_MATCHMAKING_ENTITY_INVALID; case ServiceErrorCode::MatchmakingPlayerAttributesInvalid: return E_PF_MATCHMAKING_PLAYER_ATTRIBUTES_INVALID; case ServiceErrorCode::MatchmakingQueueNotFound: return E_PF_MATCHMAKING_QUEUE_NOT_FOUND; @@ -856,6 +860,8 @@ HRESULT ServiceErrorToHR(ServiceErrorCode errorCode) case ServiceErrorCode::TrueSkillInvalidPlayerId: return E_PF_TRUE_SKILL_INVALID_PLAYER_ID; case ServiceErrorCode::TrueSkillInvalidSquadSize: return E_PF_TRUE_SKILL_INVALID_SQUAD_SIZE; case ServiceErrorCode::TrueSkillConditionSetNotInModel: return E_PF_TRUE_SKILL_CONDITION_SET_NOT_IN_MODEL; + case ServiceErrorCode::TrueSkillModelStateInvalidForOperation: return E_PF_TRUE_SKILL_MODEL_STATE_INVALID_FOR_OPERATION; + case ServiceErrorCode::TrueSkillScenarioContainsActiveModel: return E_PF_TRUE_SKILL_SCENARIO_CONTAINS_ACTIVE_MODEL; case ServiceErrorCode::GameSaveManifestNotFound: return E_PF_GAME_SAVE_MANIFEST_NOT_FOUND; case ServiceErrorCode::GameSaveManifestVersionAlreadyExists: return E_PF_GAME_SAVE_MANIFEST_VERSION_ALREADY_EXISTS; case ServiceErrorCode::GameSaveConflictUpdatingManifest: return E_PF_GAME_SAVE_CONFLICT_UPDATING_MANIFEST; @@ -865,6 +871,10 @@ HRESULT ServiceErrorToHR(ServiceErrorCode errorCode) case ServiceErrorCode::GameSaveUnknownFileInManifest: return E_PF_GAME_SAVE_UNKNOWN_FILE_IN_MANIFEST; case ServiceErrorCode::GameSaveFileExceededReportedSize: return E_PF_GAME_SAVE_FILE_EXCEEDED_REPORTED_SIZE; case ServiceErrorCode::GameSaveFileNotUploaded: return E_PF_GAME_SAVE_FILE_NOT_UPLOADED; + case ServiceErrorCode::GameSaveBadRequest: return E_PF_GAME_SAVE_BAD_REQUEST; + case ServiceErrorCode::GameSaveOperationNotAllowed: return E_PF_GAME_SAVE_OPERATION_NOT_ALLOWED; + case ServiceErrorCode::GameSaveDataStorageQuotaExceeded: return E_PF_GAME_SAVE_DATA_STORAGE_QUOTA_EXCEEDED; + case ServiceErrorCode::GameSaveNewerManifestExists: return E_PF_GAME_SAVE_NEWER_MANIFEST_EXISTS; case ServiceErrorCode::StateShareForbidden: return E_PF_STATE_SHARE_FORBIDDEN; case ServiceErrorCode::StateShareTitleNotInFlight: return E_PF_STATE_SHARE_TITLE_NOT_IN_FLIGHT; case ServiceErrorCode::StateShareStateNotFound: return E_PF_STATE_SHARE_STATE_NOT_FOUND; diff --git a/Source/PlayFabSharedInternal/Source/HttpRequest.cpp b/Source/PlayFabSharedInternal/Source/HttpRequest.cpp index d5c52f0..0ad06e1 100644 --- a/Source/PlayFabSharedInternal/Source/HttpRequest.cpp +++ b/Source/PlayFabSharedInternal/Source/HttpRequest.cpp @@ -183,9 +183,28 @@ Result HCHttpCall::GetResult(XAsyncBlock* async) noexcept // Ensure response is null terminated before treating as a string m_responseBody.push_back(0); - JsonDocument responseJson{ &JsonUtils::allocator, JsonUtils::kDefaultStackCapacity, &JsonUtils::allocator }; - responseJson.Parse(m_responseBody.data()); - if (responseJson.HasParseError()) + JsonDocument responseJson; + bool parseError = false; + String parseErrorMsg; + + try + { + if (m_responseBody.data()) + { + responseJson = JsonDocument::parse(m_responseBody.data()); + } + else + { + parseError = true; + } + } + catch (const JsonDocument::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (parseError) { // Couldn't parse response body, fall back to Http status code uint32_t httpCode{ 0 }; @@ -195,7 +214,7 @@ Result HCHttpCall::GetResult(XAsyncBlock* async) noexcept // This is an unusual case. We weren't able to parse the response body, but the Http status code indicates that the // call was successful. Return the Json parse error in this case. Stringstream errorMessage; - errorMessage << "Failed to parse PlayFab service response: " << rapidjson::GetParseError_En(responseJson.GetParseError()); + errorMessage << "Failed to parse PlayFab service response: " << parseErrorMsg; TRACE_ERROR(errorMessage.str().data()); return Result{ E_FAIL, errorMessage.str() }; diff --git a/Source/PlayFabSharedInternal/Source/JsonUtils.cpp b/Source/PlayFabSharedInternal/Source/JsonUtils.cpp index 57987ec..3b95ef3 100644 --- a/Source/PlayFabSharedInternal/Source/JsonUtils.cpp +++ b/Source/PlayFabSharedInternal/Source/JsonUtils.cpp @@ -7,61 +7,20 @@ namespace PlayFab namespace JsonUtils { -JsonAllocator allocator{}; - -// Helper class for writing JsonValue directly into a PlayFab::String. Implements rapidjson write-only stream -// concept (see rapidjson/stream.h for details). Avoids additional copy needed when first writing to rapidjson::StringBuffer -class StringOutputStream -{ -public: - using Ch = String::traits_type::char_type; - - StringOutputStream(size_t initialCapacity = kDefaultCapacity) - { - m_string.reserve(initialCapacity); - } - - void Put(Ch c) - { - m_string.push_back(c); - } - - void Flush() - { - // no-op - } - - const String& GetString() const - { - return m_string; - } - - String&& ExtractString() - { - return std::move(m_string); - } - - static const size_t kDefaultCapacity = 256; // use same default capacity as rapidjson::GenericStringBuffer - -private: - String m_string; -}; - String WriteToString(const JsonValue& jsonValue) { - StringOutputStream stream; - JsonWriter writer{ stream, &allocator }; - jsonValue.Accept(writer); - return stream.ExtractString(); + // Convert JSON object to string + return String{ jsonValue.dump() }; } JsonValue ToJson(const char* string) { if (!string) { - return JsonValue{ rapidjson::kNullType }; + return JsonValue::value_t::null; } - return JsonValue{ string, allocator }; + + return string; } JsonValue ToJson(const String& string) @@ -69,9 +28,10 @@ JsonValue ToJson(const String& string) // By design, map empty string to null JsonValue if (string.empty()) { - return JsonValue{ rapidjson::kNullType }; + return JsonValue::value_t::null; } - return JsonValue{ string.data(), allocator }; + + return string.data(); } JsonValue ToJson(const PFJsonObject& jsonObject) @@ -79,16 +39,15 @@ JsonValue ToJson(const PFJsonObject& jsonObject) // By design, map empty jsonObject to null JsonValue if (!jsonObject.stringValue) { - return JsonValue{ rapidjson::kNullType }; + return JsonValue{}; } - JsonDocument document{ &JsonUtils::allocator, JsonUtils::kDefaultStackCapacity, &JsonUtils::allocator }; - document.Parse(jsonObject.stringValue); - return JsonValue{ document, allocator }; + + return JsonValue::parse(jsonObject.stringValue); } JsonValue ToJsonTime(time_t value) { - return JsonValue{ TimeTToIso8601String(value).data(), allocator }; + return TimeTToIso8601String(value).data(); } JsonValue ToJson(const InputModel& value) @@ -98,128 +57,129 @@ JsonValue ToJson(const InputModel& value) HRESULT FromJson(const JsonValue& input, String& output) { - if (!input.IsString()) + if (!input.is_string()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetString(); + output = input.get(); return S_OK; } HRESULT FromJson(const JsonValue& input, bool& output) { - if (!input.IsBool()) + if (!input.is_boolean()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetBool(); + output = input.get(); return S_OK; } HRESULT FromJson(const JsonValue& input, int16_t& output) { - if (!input.IsInt()) + if (!input.is_number_integer()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = static_cast(input.GetInt()); + output = static_cast(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, uint16_t& output) { - if (!input.IsUint()) + if (!input.is_number_unsigned()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = static_cast(input.GetUint()); + output = static_cast(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, int32_t& output) { - if (!input.IsInt()) + if (!input.is_number_integer()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = static_cast(input.GetInt()); + output = static_cast(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, uint32_t& output) { - if (!input.IsUint()) + if (!input.is_number_unsigned()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = static_cast(input.GetUint()); + output = static_cast(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, int64_t& output) { - if (!input.IsInt64()) + if (!input.is_number_integer()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetInt64(); + output = static_cast(input.get()); + return S_OK; } HRESULT FromJson(const JsonValue& input, uint64_t& output) { - if (!input.IsUint64()) + if (!input.is_number_unsigned()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetUint64(); + output = static_cast(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, float& output) { - if (!input.IsFloat()) + if (!input.is_number_float()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetFloat(); + output = input.get(); return S_OK; } HRESULT FromJson(const JsonValue& input, double& output) { - if (!input.IsDouble()) + if (!input.is_number_float()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = input.GetDouble(); + output = input.get(); return S_OK; } HRESULT FromJsonTime(const JsonValue& input, time_t& output) { - if (!input.IsString()) + if (!input.is_string()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - output = Iso8601StringToTimeT(input.GetString()); + output = Iso8601StringToTimeT(input.get()); return S_OK; } HRESULT FromJson(const JsonValue& input, JsonObject& output) { - if (!input.IsObject()) + if (!input.is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; @@ -230,42 +190,45 @@ HRESULT FromJson(const JsonValue& input, JsonObject& output) HRESULT FromJson(const JsonValue& input, JsonValue& output) { - output.CopyFrom(input, allocator); // Deep copy + output = input; return S_OK; } HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue&& name, JsonValue&& value) { - if (!jsonObject.IsObject()) + if (!jsonObject.is_object()) { TRACE_ERROR("Json Error: cannot add member to non-object"); return E_FAIL; } - jsonObject.AddMember(name, value, allocator); + + jsonObject.emplace(name, value); return S_OK; } -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, JsonValue&& value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, JsonValue&& value) { - return ObjectAddMember(jsonObject, JsonValue{ name }, std::move(value)); -} + if (!jsonObject.is_object()) + { + TRACE_ERROR("Json Error: cannot add member to non-object"); + return E_FAIL; + } -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const JsonValue& value) -{ - return ObjectAddMember(jsonObject, name, std::move(JsonValue{}.CopyFrom(value, allocator))); + jsonObject.emplace(name, value); + return S_OK; } -HRESULT ObjectAddMember(JsonValue& jsonObject, JsonValue::StringRefType name, const String& value) +HRESULT ObjectAddMember(JsonValue& jsonObject, StringRefType name, const String& value) { return ObjectAddMember(jsonObject, name, ToJson(value)); } -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, time_t value) +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, time_t value) { return ObjectAddMember(jsonObject, name, ToJsonTime(value)); } -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const std::optional& value) +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const std::optional& value) { if (value.has_value()) { @@ -273,11 +236,11 @@ HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name } else { - return ObjectAddMember(jsonObject, name, JsonValue{ rapidjson::kNullType }); + return ObjectAddMember(jsonObject, name, JsonValue{}); } } -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const time_t* value) +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const time_t* value) { if (value != nullptr) { @@ -285,23 +248,23 @@ HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name } else { - return ObjectAddMember(jsonObject, name, JsonValue{ rapidjson::kNullType }); + return ObjectAddMember(jsonObject, name, JsonValue{}); } } -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const time_t* array, uint32_t arrayCount) +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const time_t* array, uint32_t arrayCount) { - JsonValue member{ rapidjson::kArrayType }; + JsonValue member{}; for (auto i = 0u; i < arrayCount; ++i) { - member.PushBack(ToJsonTime(array[i]), allocator); + member.push_back(ToJsonTime(array[i])); } return ObjectAddMember(jsonObject, name, std::move(member)); } -HRESULT ObjectAddMemberTime(JsonValue& jsonObject, JsonValue::StringRefType name, const PFDateTimeDictionaryEntry* associativeArray, uint32_t arrayCount) +HRESULT ObjectAddMemberTime(JsonValue& jsonObject, StringRefType name, const PFDateTimeDictionaryEntry* associativeArray, uint32_t arrayCount) { - JsonValue member{ rapidjson::kObjectType }; + JsonValue member{}; for (auto i = 0u; i < arrayCount; ++i) { auto& entry{ associativeArray[i] }; @@ -314,10 +277,11 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, JsonValue { auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); - output.SetNull(); - if (findResult.Payload() != jsonObject.MemberEnd()) + output = nullptr; + + if (findResult.Payload() != jsonObject.cend()) { - RETURN_IF_FAILED(FromJson(findResult.Payload()->value, output)); + RETURN_IF_FAILED(FromJson(*findResult.Payload(), output)); } return S_OK; } @@ -327,9 +291,9 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, String& o auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - RETURN_IF_FAILED(FromJson(findResult.Payload()->value, output)); + RETURN_IF_FAILED(FromJson(*findResult.Payload(), output)); } return S_OK; } @@ -339,9 +303,9 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, JsonObjec auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.stringValue.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - RETURN_IF_FAILED(FromJson(findResult.Payload()->value, output)); + RETURN_IF_FAILED(FromJson(*findResult.Payload(), output)); } return S_OK; } @@ -351,17 +315,17 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, CStringVe auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsArray()) + if (!findResult.Payload().value().is_array()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto jsonArray{ findResult.Payload()->value.GetArray() }; - output.reserve(jsonArray.Size()); - for (auto& value : jsonArray) + auto jsonArray{ findResult.Payload()->get>() }; + output.reserve(jsonArray.size()); + for (const auto& value : jsonArray) { String stringValue; RETURN_IF_FAILED(FromJson(value, stringValue)); @@ -376,21 +340,20 @@ HRESULT ObjectGetMember(const JsonValue& jsonObject, const char* name, StringDic auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsObject()) + if (!findResult.Payload().value().is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto memberObject{ findResult.Payload()->value.GetObj()}; - output.reserve(memberObject.MemberCount()); - for (auto& pair : memberObject) - { + auto memberObject{ findResult.Payload()->get() }; + output.reserve(memberObject.size()); + for (auto& [key, value] : memberObject.items()) { String stringValue{}; - RETURN_IF_FAILED(FromJson(pair.value, stringValue)); - output.insert_or_assign(pair.name.GetString(), std::move(stringValue)); + RETURN_IF_FAILED(FromJson(value, stringValue)); + output.insert_or_assign(key.c_str(), std::move(stringValue)); } } return S_OK; @@ -400,12 +363,12 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, time_ { auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); - if (findResult.Payload() == jsonObject.MemberEnd()) + if (findResult.Payload() == jsonObject.cend()) { TRACE_ERROR("Json Parse Error: object missing non-optional member \"%s\"", name); return E_FAIL; } - return FromJsonTime(findResult.Payload()->value, output); + return FromJsonTime(findResult.Payload().value(), output); } HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, std::optional& output) @@ -413,10 +376,10 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, std:: auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.reset(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { output.emplace(); - RETURN_IF_FAILED(FromJsonTime(findResult.Payload()->value, *output)); + RETURN_IF_FAILED(FromJsonTime(findResult.Payload().value(), *output)); } return S_OK; } @@ -426,17 +389,17 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, Vecto auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsArray()) + if (!findResult.Payload().value().is_array()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto jsonArray{ findResult.Payload()->value.GetArray() }; - output.reserve(jsonArray.Size()); - for (auto& value : jsonArray) + auto jsonArray{ findResult.Payload()->get>() }; + output.reserve(jsonArray.size()); + for (const auto& value : jsonArray) { output.emplace_back(); RETURN_IF_FAILED(FromJsonTime(value, output.back())); @@ -450,21 +413,20 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, Dicti auto findResult = Detail::ObjectFindMember(jsonObject, name); RETURN_IF_FAILED(findResult.hr); output.clear(); - if (findResult.Payload() != jsonObject.MemberEnd()) + if (findResult.Payload() != jsonObject.cend()) { - if (!findResult.Payload()->value.IsObject()) + if (!findResult.Payload().value().is_object()) { TRACE_ERROR("Json Parse Error: unexpected token"); return E_FAIL; } - auto memberObject{ findResult.Payload()->value.GetObj() }; - output.reserve(memberObject.MemberCount()); - for (auto& pair : memberObject) - { - time_t value{}; - RETURN_IF_FAILED(FromJsonTime(pair.value, value)); - output.insert_or_assign(pair.name.GetString(), value); + auto memberObject{ findResult.Payload()->get() }; + output.reserve(memberObject.size()); + for (auto& [key, value] : memberObject.items()) { + time_t timeValue{}; + RETURN_IF_FAILED(FromJsonTime(value, timeValue)); + output.insert_or_assign(key.c_str(), timeValue); } } return S_OK; @@ -473,14 +435,14 @@ HRESULT ObjectGetMemberTime(const JsonValue& jsonObject, const char* name, Dicti namespace Detail { -Result ObjectFindMember(const JsonValue& jsonObject, const char* name) +Result ObjectFindMember(const JsonValue& jsonObject, const char* name) { - if (!jsonObject.IsObject()) + if (!jsonObject.is_object()) { TRACE_ERROR("Json Parse Error: cannot get member from a JsonValue that isn't an object"); return E_FAIL; } - return jsonObject.FindMember(name); + return jsonObject.find(name); } } // namespace Detail diff --git a/Source/PlayFabSharedInternal/Source/Memory.cpp b/Source/PlayFabSharedInternal/Source/Memory.cpp index e44ed61..f484541 100644 --- a/Source/PlayFabSharedInternal/Source/Memory.cpp +++ b/Source/PlayFabSharedInternal/Source/Memory.cpp @@ -5,16 +5,16 @@ namespace PlayFab { // Default memory functions -_Ret_maybenull_ _Post_writable_byte_size_(size) void* DefaultAlloc(size_t size) noexcept +_Ret_maybenull_ _Post_writable_byte_size_(size) void* DefaultAlloc(size_t size, uint32_t) noexcept { - if (size > 0) + if (size > 0) { return std::malloc(size); } return static_cast(nullptr); } -void DefaultFree(_In_ _Post_invalid_ void* pointer) noexcept +void DefaultFree(_In_ _Post_invalid_ void* pointer, uint32_t) noexcept { if (pointer) { @@ -52,10 +52,16 @@ HRESULT SetMemoryHooks(PFMemoryHooks& newHooks) return S_OK; } +bool IsUsingCustomMemoryHooks() +{ + PFMemoryHooks& hooks = GetMemoryHooks(); + return hooks.alloc != DefaultAlloc && hooks.free != DefaultFree; +} + void* Alloc(size_t size) { - void* pointer = GetMemoryHooks().alloc(size); - if (size != 0) // RapidJson for example will request 0 size alloc during parsing of "Variants":[] and expects to get nullptr back + void* pointer = GetMemoryHooks().alloc(size, 0); + if (size != 0) { assert(pointer); } @@ -67,7 +73,7 @@ void Free(void* pointer) noexcept { if (pointer) { - GetMemoryHooks().free(pointer); + GetMemoryHooks().free(pointer, 0); } } diff --git a/Source/PlayFabSharedInternal/Source/pch.h b/Source/PlayFabSharedInternal/Source/pch.h index 7cf922a..872604b 100644 --- a/Source/PlayFabSharedInternal/Source/pch.h +++ b/Source/PlayFabSharedInternal/Source/pch.h @@ -20,7 +20,7 @@ #include "ResultMacros.h" #include "Memory.h" -#include "RapidJson.h" +#include "Nlohmann.h" #include "Types.h" #include "Result.h" #include "Error.h" diff --git a/Test/PlayFabCore.UnitTests/Mocks/HttpMock.cpp b/Test/PlayFabCore.UnitTests/Mocks/HttpMock.cpp index d93f9f9..97f4686 100644 --- a/Test/PlayFabCore.UnitTests/Mocks/HttpMock.cpp +++ b/Test/PlayFabCore.UnitTests/Mocks/HttpMock.cpp @@ -37,14 +37,11 @@ void HttpMock::SetResponseBody(const char* responseBodyString) const noexcept } } -void HttpMock::SetResponseBody(const rapidjson::Value& responseBodyJson) const noexcept +void HttpMock::SetResponseBody(const JsonValue& responseBodyJson) const noexcept { - if (!responseBodyJson.IsNull()) + if (!responseBodyJson.is_null()) { - rapidjson::StringBuffer buffer; - rapidjson::Writer writer(buffer); - responseBodyJson.Accept(writer); - SetResponseBody(buffer.GetString()); + SetResponseBody(responseBodyJson.dump()); } } diff --git a/Test/PlayFabCore.UnitTests/Mocks/HttpMock.h b/Test/PlayFabCore.UnitTests/Mocks/HttpMock.h index 79a776f..9b3a1e1 100644 --- a/Test/PlayFabCore.UnitTests/Mocks/HttpMock.h +++ b/Test/PlayFabCore.UnitTests/Mocks/HttpMock.h @@ -4,7 +4,7 @@ #pragma once #include -#include +#include namespace PlayFab { @@ -28,7 +28,7 @@ class HttpMock void SetResponseHttpStatus(uint32_t httpStatus) const noexcept; void SetResponseBody(const char* responseBodyString) const noexcept; - void SetResponseBody(const rapidjson::Value& responseBodyJson) const noexcept; + void SetResponseBody(const JsonValue& responseBodyJson) const noexcept; void SetResponseBody(const uint8_t* responseBodyBytes, size_t responseBodySize) const noexcept; void ClearReponseBody() const noexcept; void SetResponseHeaders(const HttpHeaders& responseHeaders) const noexcept; diff --git a/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.cpp b/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.cpp index bf7a1ee..5b756fb 100644 --- a/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.cpp +++ b/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.cpp @@ -12,12 +12,12 @@ PlayFabServiceMock::~PlayFabServiceMock() std::unique_lock lock{ m_mutex }; } -rapidjson::Value& PlayFabServiceMock::ResponseBody() noexcept +JsonValue& PlayFabServiceMock::ResponseBody() noexcept { return m_responseBody; } -rapidjson::Value& PlayFabServiceMock::ResponseBodyPayload() noexcept +JsonValue& PlayFabServiceMock::ResponseBodyPayload() noexcept { return m_responseBody["data"]; } @@ -28,21 +28,16 @@ void PlayFabServiceMock::SetCallback(Callback callback) noexcept m_callback = std::move(callback); } -rapidjson::Value const& PlayFabServiceMock::ServiceResponses() const noexcept +JsonValue const& PlayFabServiceMock::ServiceResponses() const noexcept { return m_responses; } -rapidjson::Value const& PlayFabServiceMock::ServiceErrors() noexcept +JsonValue const& PlayFabServiceMock::ServiceErrors() noexcept { return s_serviceResponses["errors"]; } -PlayFab::JsonAllocator& PlayFabServiceMock::JsonAllocator() noexcept -{ - return s_serviceResponses.GetAllocator(); -} - void PlayFabServiceMock::HttpMockCallback(HttpMock const& /*mock*/, std::string url, std::string requestBody, uint32_t hitCount) noexcept { std::unique_lock lock{ m_mutex }; @@ -58,18 +53,18 @@ std::string PlayFabServiceMock::GetUrl(const char* apiEndpoint, const char* apiN std::stringstream url; url << apiEndpoint; - assert(s_serviceResponses["calls"].HasMember(apiName)); - assert(s_serviceResponses["calls"][apiName].HasMember("url")); - url << s_serviceResponses["calls"][apiName]["url"].GetString(); + assert(s_serviceResponses["calls"].contains(apiName)); + assert(s_serviceResponses["calls"][apiName].contains("url")); + url << s_serviceResponses["calls"][apiName]["url"].get(); return url.str(); } -rapidjson::Value const& PlayFabServiceMock::GetServiceResponses(const char* apiName) noexcept +JsonValue const& PlayFabServiceMock::GetServiceResponses(const char* apiName) noexcept { - assert(s_serviceResponses["calls"][apiName].HasMember("result")); - const char* resultTypeName = s_serviceResponses["calls"][apiName]["result"].GetString(); - assert(s_serviceResponses["datatypes"].HasMember(resultTypeName)); + assert(s_serviceResponses["calls"][apiName].contains("result")); + const char* resultTypeName = s_serviceResponses["calls"][apiName]["result"].get().c_str(); + assert(s_serviceResponses["datatypes"].contains(resultTypeName)); return s_serviceResponses["datatypes"][resultTypeName]; } @@ -78,11 +73,11 @@ rapidjson::Value const& PlayFabServiceMock::GetServiceResponses(const char* apiN // TODO doc location, schema, etc of MockResponses file // TODO we could get fancy here and use sample responses from service API specs but I've just manually populated a separate // MockResponses.json file for the time being. -rapidjson::Document InitServiceResponses() +JsonValue InitServiceResponses() { constexpr char kMockResponseJsonFile[] = "MockResponses.json"; - rapidjson::Document serviceResponses; + JsonValue serviceResponses; std::ifstream file{ kMockResponseJsonFile, std::ios::binary | std::ios::ate }; assert(file.is_open()); @@ -91,18 +86,36 @@ rapidjson::Document InitServiceResponses() file.seekg(0); file.read(reinterpret_cast(data.data()), static_cast(data.size())); assert(file.good()); + bool parseError = false; + String parseErrorMsg; + + try + { + if (data.data()) + { + serviceResponses = JsonValue::parse(data.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } - serviceResponses.Parse(data.data(), data.size()); // Basic validation. Additional validation for specific mocks done during PlayFabServiceMock construction - assert(!serviceResponses.HasParseError()); - assert(serviceResponses.HasMember("calls")); - assert(serviceResponses.HasMember("datatypes")); - assert(serviceResponses.HasMember("errors")); + assert(!parseError); + assert(serviceResponses.contains("calls")); + assert(serviceResponses.contains("datatypes")); + assert(serviceResponses.contains("errors")); return serviceResponses; } -rapidjson::Document PlayFabServiceMock::s_serviceResponses = InitServiceResponses(); +JsonValue PlayFabServiceMock::s_serviceResponses = InitServiceResponses(); } } diff --git a/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.h b/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.h index 2251c1b..8398bcc 100644 --- a/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.h +++ b/Test/PlayFabCore.UnitTests/Mocks/PlayFabServiceMock.h @@ -21,34 +21,31 @@ class PlayFabServiceMock : protected HttpMock ~PlayFabServiceMock(); // Response body that will be used when the mock is matched. Will be initialized to a default value if one is configured - rapidjson::Value& ResponseBody() noexcept; + JsonValue& ResponseBody() noexcept; // "data" field of a successful service responses. Will cause an assertion if the field isn't present (ex. the response // represents a service error - rapidjson::Value& ResponseBodyPayload() noexcept; + JsonValue& ResponseBodyPayload() noexcept; void SetCallback(Callback callback) noexcept; // All configured service responses for this mock API. See MockResponses.json for details. - rapidjson::Value const& ServiceResponses() const noexcept; + JsonValue const& ServiceResponses() const noexcept; // General PlayFab Service errors - static rapidjson::Value const& ServiceErrors() noexcept; - - // Global allocator to use for rapidjson allocations - static PlayFab::JsonAllocator& JsonAllocator() noexcept; + static JsonValue const& ServiceErrors() noexcept; private: void HttpMockCallback(HttpMock const& mock, std::string url, std::string requestBody, uint32_t hitCount) noexcept; static std::string GetUrl(const char* apiEndpoint, const char* apiName) noexcept; - static rapidjson::Value const& GetServiceResponses(const char* apiName) noexcept; - static rapidjson::Document s_serviceResponses; + static JsonValue const& GetServiceResponses(const char* apiName) noexcept; + static JsonValue s_serviceResponses; std::mutex m_mutex; Callback m_callback; - rapidjson::Value const& m_responses; - rapidjson::Value m_responseBody; + JsonValue const& m_responses; + JsonValue m_responseBody; }; // Template implementations @@ -57,9 +54,9 @@ PlayFabServiceMock::PlayFabServiceMock(Wrappers::ServiceConfig const& ser HttpMock{ "POST", GetUrl(serviceConfig.APIEndpoint().data(), apiName).data() }, m_responses{ GetServiceResponses(apiName) } { - if (m_responses.HasMember("default")) + if (m_responses.contains("default")) { - m_responseBody.CopyFrom(m_responses["default"], JsonAllocator()); + m_responseBody = m_responses["default"]; } HttpMock::SetCallback(std::bind(&PlayFabServiceMock::HttpMockCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); diff --git a/Test/PlayFabCore.UnitTests/Tests/EventPipelineTests.cpp b/Test/PlayFabCore.UnitTests/Tests/EventPipelineTests.cpp index 095f317..62061f3 100644 --- a/Test/PlayFabCore.UnitTests/Tests/EventPipelineTests.cpp +++ b/Test/PlayFabCore.UnitTests/Tests/EventPipelineTests.cpp @@ -53,10 +53,10 @@ TEST_CLASS(EventPipelineTests) //AsyncTestContext tc; //writeEventsMock.SetCallback([&](PlayFabServiceMock& mock, std::string url, std::string requestBody, uint32_t hitCount) // { - // rapidjson::Document requestJson; + // nlohmann::Document requestJson; // requestJson.Parse(requestBody.data()); - // rapidjson::Document payloadJson; - // payloadJson.Parse(requestJson["Events"][0]["PayloadJSON"].GetString()); + // nlohmann::Document payloadJson; + // payloadJson.Parse(requestJson["Events"][0]["PayloadJSON"].get()); // tc.Assert(payloadJson["eventId"].GetInt() == 0); // std::cout << hitCount << url; // mock.JsonAllocator(); @@ -108,14 +108,14 @@ TEST_CLASS(EventPipelineTests) //AsyncTestContext tc; //writeEventsMock.SetCallback([&](PlayFabServiceMock& mock, std::string url, std::string requestBody, uint32_t hitCount) //{ - // rapidjson::Document requestJson; + // nlohmann::Document requestJson; // requestJson.Parse(requestBody.data()); // auto& eventsJson = requestJson["Events"]; // for (auto& eventJson : eventsJson.GetArray()) // { - // rapidjson::Document payloadJson; - // payloadJson.Parse(eventJson["PayloadJSON"].GetString()); + // nlohmann::Document payloadJson; + // payloadJson.Parse(eventJson["PayloadJSON"].get()); // tc.Assert(eventIdsToWrite.find(payloadJson["eventId"].GetInt()) != eventIdsToWrite.end()); // ++eventsWritten; // } @@ -126,7 +126,7 @@ TEST_CLASS(EventPipelineTests) // } //}); - //rapidjson::Document eventPayloadJson; + //nlohmann::Document eventPayloadJson; //eventPayloadJson.Parse(kTestEventTemplate); //PFTelemetryEvent event @@ -146,7 +146,7 @@ TEST_CLASS(EventPipelineTests) // rapidjson::Writer writer(buffer); // eventPayloadJson.Accept(writer); - // event.payloadJson = buffer.GetString(); + // event.payloadJson = buffer.get(); // pipeline.EmitEvent(&event); //} diff --git a/Test/PlayFabCore.UnitTests/Tests/GlobalStateTests.cpp b/Test/PlayFabCore.UnitTests/Tests/GlobalStateTests.cpp index 3794718..04ce1a2 100644 --- a/Test/PlayFabCore.UnitTests/Tests/GlobalStateTests.cpp +++ b/Test/PlayFabCore.UnitTests/Tests/GlobalStateTests.cpp @@ -29,9 +29,11 @@ class MemoryManager private: static _Ret_maybenull_ _Post_writable_byte_size_(dwSize) void* STDAPIVCALLTYPE MemAllocHook( - _In_ size_t dwSize + _In_ size_t dwSize, + _In_ uint32_t memoryTypeId ) { + UNREFERENCED_PARAMETER(memoryTypeId); std::lock_guard lock{ s_mutex }; auto ret = new char[dwSize]; s_allocMap[ret] = s_allocCalls++; @@ -39,9 +41,11 @@ class MemoryManager } static void STDAPIVCALLTYPE MemFreeHook( - _In_ void* pAddress + _In_ void* pAddress, + _In_ uint32_t memoryTypeId ) { + UNREFERENCED_PARAMETER(memoryTypeId); std::lock_guard lock{ s_mutex }; s_freeCalls++; Assert::IsTrue(s_allocMap.erase(pAddress) > 0); diff --git a/Test/PlayFabCore.UnitTests/Tests/RunContextTests.cpp b/Test/PlayFabCore.UnitTests/Tests/RunContextTests.cpp index c2e316a..ac70ca1 100644 --- a/Test/PlayFabCore.UnitTests/Tests/RunContextTests.cpp +++ b/Test/PlayFabCore.UnitTests/Tests/RunContextTests.cpp @@ -79,7 +79,7 @@ class EventList std::shared_ptr m_state; }; -// Default TaskQueue Work timeout if not terminated/cancelled. +// Default TaskQueue Work timeout if not terminated/cancelled. // Don't want a number to large so tests don't hang if cancellation/termiantion doesn't work as expected static constexpr uint32_t kDefaultWorkTimeout{ 10000 }; // 10 seconds in MS @@ -124,7 +124,7 @@ class CancellableWork : public ITaskQueueWork, public ICancellationListener { m_completionEvent->Set(); } - } + } void OnCancellation() noexcept override { @@ -301,7 +301,7 @@ TEST_CLASS(RunContextTests) Event completionEvent; EventList events; RunContext root = RunContext::Root(nullptr); - + // Run work and immediately cancel CancellableWork::Run(root.Derive(), &completionEvent, events); root.CancellationToken().Cancel(); @@ -372,7 +372,7 @@ TEST_CLASS(RunContextTests) auto provider = MakeUnique(rc.DeriveOnQueue(nullptr), &async, &events, 1000000); VERIFY_SUCCEEDED(XAsyncProviderBase::Run(std::move(provider))); - // Terminate + // Terminate rc.Terminate(listener, nullptr); Assert::IsTrue(listener.TerminationEvent().Wait()); @@ -405,7 +405,7 @@ TEST_CLASS(RunContextTests) HRESULT hr = XAsyncGetStatus(&async, true); VERIFY_SUCCEEDED(hr); - // Terminate + // Terminate rc.Terminate(listener, nullptr); Assert::IsFalse(listener.TerminationEvent().Wait(1000)); // Terminate shouldn't complete because XAsync result is pending diff --git a/Test/PlayFabCore.UnitTests/Tests/TokenRefreshTests.cpp b/Test/PlayFabCore.UnitTests/Tests/TokenRefreshTests.cpp index c619806..c1343fb 100644 --- a/Test/PlayFabCore.UnitTests/Tests/TokenRefreshTests.cpp +++ b/Test/PlayFabCore.UnitTests/Tests/TokenRefreshTests.cpp @@ -29,15 +29,15 @@ TEST_CLASS(TokenRefreshTests) // On the initial Login, set token to expire in 1 minute to trigger a refresh time_t tokenExpiration = time(nullptr) + 60; auto tokenExpirationString = TimeTToIso8601String(tokenExpiration); - rapidjson::Value tokenExpirationJson{ tokenExpirationString.data(), PlayFabServiceMock::JsonAllocator() }; - loginMock.ResponseBodyPayload()["EntityToken"].AddMember("TokenExpiration", tokenExpirationJson.Move(), PlayFabServiceMock::JsonAllocator()); + JsonValue tokenExpirationJson{ tokenExpirationString.data() }; + loginMock.ResponseBodyPayload()["EntityToken"].emplace("TokenExpiration", std::move(tokenExpirationJson)); } else if (hitCount == 2) { // On subsequent Login, supply a new, non-expiring token auto& entityTokenJson = mock.ResponseBodyPayload()["EntityToken"]; - entityTokenJson.RemoveMember("TokenExpiration"); - entityTokenJson["EntityToken"] = rapidjson::Value{ refreshedToken }; + entityTokenJson.erase("TokenExpiration"); + entityTokenJson["EntityToken"] = JsonValue{ refreshedToken }; } else { @@ -113,19 +113,19 @@ TEST_CLASS(TokenRefreshTests) // On the initial Login, set token to expire in 1 minute to trigger a refresh time_t tokenExpiration = time(nullptr) + 60; auto tokenExpirationString = TimeTToIso8601String(tokenExpiration); - rapidjson::Value tokenExpirationJson{ tokenExpirationString.data(), PlayFabServiceMock::JsonAllocator() }; - loginMock.ResponseBodyPayload()["EntityToken"].AddMember("TokenExpiration", tokenExpirationJson.Move(), PlayFabServiceMock::JsonAllocator()); + JsonValue tokenExpirationJson{ tokenExpirationString.data() }; + loginMock.ResponseBodyPayload()["EntityToken"].emplace("TokenExpiration", tokenExpirationJson); } else if (hitCount == 2) { // On second Login attempt, respond with error - mock.ResponseBody().CopyFrom(PlayFabServiceMock::ServiceErrors()["ExpiredAuthToken"], PlayFabServiceMock::JsonAllocator()); + mock.ResponseBody() = PlayFabServiceMock::ServiceErrors()["ExpiredAuthToken"]; } else if (hitCount == 3) { // Reset to default response with the new token - mock.ResponseBody().CopyFrom(mock.ServiceResponses()["default"], mock.JsonAllocator()); - mock.ResponseBodyPayload()["EntityToken"]["EntityToken"] = rapidjson::Value{ newToken }; + mock.ResponseBody() = mock.ServiceResponses()["default"]; + mock.ResponseBodyPayload()["EntityToken"]["EntityToken"] = JsonValue{ newToken }; } else { diff --git a/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.cpp b/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.cpp index b596c8c..6286a8d 100644 --- a/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.cpp +++ b/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.cpp @@ -472,6 +472,36 @@ Result ClientGetPlayFabIDs } #endif +#if 0 + +ClientGetPlayFabIDsFromSteamNamesOperation::ClientGetPlayFabIDsFromSteamNamesOperation(Entity entity, RequestType request, PlayFab::RunContext rc) : + XAsyncOperation{ std::move(rc) }, + m_entity{ std::move(entity) }, + m_request{ std::move(request) } +{ +} + +AsyncOp ClientGetPlayFabIDsFromSteamNamesOperation::Run(Entity entity, RequestType request, PlayFab::RunContext rc) noexcept +{ + return RunOperation(MakeUnique(std::move(entity), std::move(request), std::move(rc))); +} + +HRESULT ClientGetPlayFabIDsFromSteamNamesOperation::OnStarted(XAsyncBlock* async) noexcept +{ + return PFAccountManagementClientGetPlayFabIDsFromSteamNamesAsync(m_entity.Handle(), &m_request.Model(), async); +} + +Result ClientGetPlayFabIDsFromSteamNamesOperation::GetResult(XAsyncBlock* async) noexcept +{ + size_t resultSize; + RETURN_IF_FAILED(PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResultSize(async, &resultSize)); + Vector resultBuffer(resultSize); + PFAccountManagementGetPlayFabIDsFromSteamNamesResult* result; + RETURN_IF_FAILED(PFAccountManagementClientGetPlayFabIDsFromSteamNamesGetResult(async, resultBuffer.size(), resultBuffer.data(), &result, nullptr)); + return ResultType{ *result }; +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC ClientGetPlayFabIDsFromTwitchIDsOperation::ClientGetPlayFabIDsFromTwitchIDsOperation(Entity entity, RequestType request, PlayFab::RunContext rc) : @@ -1675,6 +1705,36 @@ Result ServerGetPlayFabIDs } #endif +#if 0 + +ServerGetPlayFabIDsFromSteamNamesOperation::ServerGetPlayFabIDsFromSteamNamesOperation(Entity entity, RequestType request, PlayFab::RunContext rc) : + XAsyncOperation{ std::move(rc) }, + m_entity{ std::move(entity) }, + m_request{ std::move(request) } +{ +} + +AsyncOp ServerGetPlayFabIDsFromSteamNamesOperation::Run(Entity entity, RequestType request, PlayFab::RunContext rc) noexcept +{ + return RunOperation(MakeUnique(std::move(entity), std::move(request), std::move(rc))); +} + +HRESULT ServerGetPlayFabIDsFromSteamNamesOperation::OnStarted(XAsyncBlock* async) noexcept +{ + return PFAccountManagementServerGetPlayFabIDsFromSteamNamesAsync(m_entity.Handle(), &m_request.Model(), async); +} + +Result ServerGetPlayFabIDsFromSteamNamesOperation::GetResult(XAsyncBlock* async) noexcept +{ + size_t resultSize; + RETURN_IF_FAILED(PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResultSize(async, &resultSize)); + Vector resultBuffer(resultSize); + PFAccountManagementGetPlayFabIDsFromSteamNamesResult* result; + RETURN_IF_FAILED(PFAccountManagementServerGetPlayFabIDsFromSteamNamesGetResult(async, resultBuffer.size(), resultBuffer.data(), &result, nullptr)); + return ResultType{ *result }; +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC ServerGetPlayFabIDsFromTwitchIDsOperation::ServerGetPlayFabIDsFromTwitchIDsOperation(Entity entity, RequestType request, PlayFab::RunContext rc) : diff --git a/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.h b/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.h index 3cff6af..23faffa 100644 --- a/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.h +++ b/Test/PlayFabServices.GeneratedApiWrappers/AccountManagementOperations.h @@ -320,6 +320,26 @@ class ClientGetPlayFabIDsFromSteamIDsOperation : public XAsyncOperation> +{ +public: + using RequestType = Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper; + using ResultType = Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper; + + ClientGetPlayFabIDsFromSteamNamesOperation(Entity entity, RequestType request, PlayFab::RunContext rc); + + static AsyncOp> Run(Entity entity, RequestType request, PlayFab::RunContext rc) noexcept; + +private: + HRESULT OnStarted(XAsyncBlock* async) noexcept override; + Result GetResult(XAsyncBlock* async) noexcept override; + + Entity m_entity; + RequestType m_request; +}; +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC class ClientGetPlayFabIDsFromTwitchIDsOperation : public XAsyncOperation> { @@ -1272,6 +1292,26 @@ class ServerGetPlayFabIDsFromSteamIDsOperation : public XAsyncOperation> +{ +public: + using RequestType = Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesRequestWrapper; + using ResultType = Wrappers::PFAccountManagementGetPlayFabIDsFromSteamNamesResultWrapper; + + ServerGetPlayFabIDsFromSteamNamesOperation(Entity entity, RequestType request, PlayFab::RunContext rc); + + static AsyncOp> Run(Entity entity, RequestType request, PlayFab::RunContext rc) noexcept; + +private: + HRESULT OnStarted(XAsyncBlock* async) noexcept override; + Result GetResult(XAsyncBlock* async) noexcept override; + + Entity m_entity; + RequestType m_request; +}; +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC class ServerGetPlayFabIDsFromTwitchIDsOperation : public XAsyncOperation> { diff --git a/Test/PlayFabServices.GeneratedTests/AccountManagementTests.cpp b/Test/PlayFabServices.GeneratedTests/AccountManagementTests.cpp index 6367198..b0222d3 100644 --- a/Test/PlayFabServices.GeneratedTests/AccountManagementTests.cpp +++ b/Test/PlayFabServices.GeneratedTests/AccountManagementTests.cpp @@ -50,6 +50,9 @@ void AccountManagementTests::AddTests() #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC AddTest("TestClientGetPlayFabIDsFromSteamIDs", &AccountManagementTests::TestClientGetPlayFabIDsFromSteamIDs); #endif +#if 0 + AddTest("TestClientGetPlayFabIDsFromSteamNames", &AccountManagementTests::TestClientGetPlayFabIDsFromSteamNames); +#endif #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC AddTest("TestClientGetPlayFabIDsFromTwitchIDs", &AccountManagementTests::TestClientGetPlayFabIDsFromTwitchIDs); #endif @@ -194,6 +197,9 @@ void AccountManagementTests::AddTests() #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC AddTest("TestServerGetPlayFabIDsFromSteamIDs", &AccountManagementTests::TestServerGetPlayFabIDsFromSteamIDs); #endif +#if 0 + AddTest("TestServerGetPlayFabIDsFromSteamNames", &AccountManagementTests::TestServerGetPlayFabIDsFromSteamNames); +#endif #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC AddTest("TestServerGetPlayFabIDsFromTwitchIDs", &AccountManagementTests::TestServerGetPlayFabIDsFromTwitchIDs); #endif diff --git a/Test/PlayFabServices.GeneratedTests/AccountManagementTests.h b/Test/PlayFabServices.GeneratedTests/AccountManagementTests.h index c332341..ca7376f 100644 --- a/Test/PlayFabServices.GeneratedTests/AccountManagementTests.h +++ b/Test/PlayFabServices.GeneratedTests/AccountManagementTests.h @@ -64,6 +64,9 @@ class AccountManagementTests : public ServicesTestClass #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void TestClientGetPlayFabIDsFromSteamIDs(TestContext& testContext); #endif +#if 0 + void TestClientGetPlayFabIDsFromSteamNames(TestContext& testContext); +#endif #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void TestClientGetPlayFabIDsFromTwitchIDs(TestContext& testContext); #endif @@ -208,6 +211,9 @@ class AccountManagementTests : public ServicesTestClass #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void TestServerGetPlayFabIDsFromSteamIDs(TestContext& testContext); #endif +#if 0 + void TestServerGetPlayFabIDsFromSteamNames(TestContext& testContext); +#endif #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void TestServerGetPlayFabIDsFromTwitchIDs(TestContext& testContext); #endif diff --git a/Test/PlayFabServices.GeneratedTests/AccountManagementTestsImpl.stubs b/Test/PlayFabServices.GeneratedTests/AccountManagementTestsImpl.stubs index 54e37b3..482b131 100644 --- a/Test/PlayFabServices.GeneratedTests/AccountManagementTestsImpl.stubs +++ b/Test/PlayFabServices.GeneratedTests/AccountManagementTestsImpl.stubs @@ -123,6 +123,13 @@ void AccountManagementTests::TestClientGetPlayFabIDsFromSteamIDs(TestContext& tc } #endif +#if 0 +void AccountManagementTests::TestClientGetPlayFabIDsFromSteamNames(TestContext& tc) +{ + tc.Skip(); +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AccountManagementTests::TestClientGetPlayFabIDsFromTwitchIDs(TestContext& tc) { @@ -475,6 +482,13 @@ void AccountManagementTests::TestServerGetPlayFabIDsFromSteamIDs(TestContext& tc } #endif +#if 0 +void AccountManagementTests::TestServerGetPlayFabIDsFromSteamNames(TestContext& tc) +{ + tc.Skip(); +} +#endif + #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AccountManagementTests::TestServerGetPlayFabIDsFromTwitchIDs(TestContext& tc) { diff --git a/Test/PlayFabServicesManualTestApp/Linux/CMakeLists.txt b/Test/PlayFabServicesManualTestApp/Linux/CMakeLists.txt index 68ac5e6..369b277 100644 --- a/Test/PlayFabServicesManualTestApp/Linux/CMakeLists.txt +++ b/Test/PlayFabServicesManualTestApp/Linux/CMakeLists.txt @@ -11,9 +11,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_VISIBILITY_PRESET hidden) +# Removing -D_DEBUG flag due to a crash that's happening on Debug, +# The crash seems to be related with RTTI symbols not being loaded despite we're including the -frtti flag message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions("-DDBG -D_DBG -DDEBUG -D_DEBUG") + add_definitions("-DDBG -D_DBG -DDEBUG") endif() ########################################### @@ -48,17 +50,17 @@ set(PlayFabServices.Linux_DIR "${PATH_TO_ROOT}/Int/CMake/PlayFabServices.Linux") find_package(PlayFabServices.Linux REQUIRED) find_package(PlayFabCore.Linux REQUIRED) find_package(libHttpClient.Linux REQUIRED) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${PROJECT_NAME} PRIVATE libHttpClient.Linux PRIVATE PlayFabCore.Linux PRIVATE PlayFabServices.Linux ) -# Set up include directories. Using rapidjson so needed to add that include path +# Set up include directories. Using nlohmann so needed to add that include path target_include_directories( "${PROJECT_NAME}" PRIVATE - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/include" # Required if building against release package ) # ------------------------------------------------------------------------------------------------- @@ -66,19 +68,19 @@ target_include_directories( # ------------------------------------------------------------------------------------------------- # Building against a binary release at ${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/ -# Use the following section rather than the "build from source" section above. +# Use the following section rather than the "build from source" section above. -#target_link_libraries(${PROJECT_NAME} +#target_link_libraries(${PROJECT_NAME} # PRIVATE ${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/bin/libHttpClient.Linux.so # PRIVATE ${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/bin/PlayFabCore.Linux.so # PRIVATE ${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/bin/PlayFabServices.Linux.so # ) -# Set up include directories. Using rapidjson so needed to add that include path +# Set up include directories. Using nlohmann so needed to add that include path #target_include_directories( # "${PROJECT_NAME}" # PRIVATE -# "${PATH_TO_ROOT}/External/rapidjson/include" +# "${PATH_TO_ROOT}/External/nlohmann/include" # "${PATH_TO_ROOT}/../PlayFabServicesLinuxSDK/include" # Required if building against release package # ) # ------------------------------------------------------------------------------------------------- diff --git a/Test/PlayFabServicesManualTestApp/Linux/main.cpp b/Test/PlayFabServicesManualTestApp/Linux/main.cpp index c561b71..1f28f7b 100644 --- a/Test/PlayFabServicesManualTestApp/Linux/main.cpp +++ b/Test/PlayFabServicesManualTestApp/Linux/main.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include @@ -27,12 +27,12 @@ struct TestTitleData }; -std::vector readFileIntoVector(const std::string &filename) +std::vector readFileIntoVector(const std::string &filename) { std::ifstream file(filename, std::ios::binary | std::ios::ate); if (!file.is_open()) { - std::cerr << "Error opening file" << std::endl; + std::cerr << "Error opening file" << std::endl; exit(EXIT_FAILURE); } @@ -56,18 +56,17 @@ std::vector readFileIntoVector(const std::string &filename) HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept { - // the testTitleData JSON file looks something like this: + // the testTitleData JSON file looks something like this: // { // "titleId": "YOUR_TITLE_ID", // "secretKey": "", // "connectionString": "https://YOUR_TITLE_ID.playfabapi.com", - // } + // } auto fileData = readFileIntoVector("../../testTitleData.json"); - // Parse JSON string into output TestTitleData. - rapidjson::Document titleDataJson; + JsonValue titleDataJson; titleDataJson.Parse(fileData.data()); if (titleDataJson.HasParseError()) @@ -75,9 +74,21 @@ HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept return E_FAIL; } - testTitleData.titleId = titleDataJson["titleId"].GetString(); - testTitleData.secretKey = titleDataJson["secretKey"].GetString(); - testTitleData.connectionString = titleDataJson["connectionString"].GetString(); + testTitleData.titleId = titleDataJson["titleId"].get(); + testTitleData.secretKey = titleDataJson["secretKey"].get(); + testTitleData.connectionString = titleDataJson["connectionString"].get(); + testTitleData.allowRetries = titleDataJson["allowRetries"].GetBool(); + testTitleData.runTestList = titleDataJson["runTestList"].GetBool(); + + for (const auto& test : titleDataJson["testList"].GetArray()) + { + testTitleData.testList.insert(test.get()); + } + + for (const auto& hr : titleDataJson["retryableHRs"].GetArray()) + { + testTitleData.retryableHRs.insert(hr.get()); + } return S_OK; } @@ -87,7 +98,7 @@ int main() PFHCSettingsSetTraceLevel(PFHCTraceLevel::Verbose); PFHCTraceSetClientCallback(MyTraceCallback); - HRESULT hr = PFServicesInitialize(nullptr); + HRESULT hr = PFServicesInitialize(nullptr); cout << "PFServicesInitialize: 0x" << setw(8) << setfill('0') << hex << hr << endl; PFServiceConfigHandle serviceConfigHandle{ nullptr }; @@ -104,7 +115,7 @@ int main() PFAuthenticationLoginWithCustomIDRequest request{}; request.createAccount = true; - request.customId = "player1"; // change to per player custom ID + request.customId = "player1"; // change to per player custom ID XAsyncBlock async1{}; hr = PFAuthenticationLoginWithCustomIDAsync(serviceConfigHandle, &request, &async1); // Add your own error handling when FAILED(hr) == true @@ -152,7 +163,7 @@ int main() std::vector getFilesResultBuffer(resultSize); PFDataGetFilesResponse* getFilesResponseResult{ nullptr }; - hr = PFDataGetFilesGetResult(&async2, getFilesResultBuffer.size(), getFilesResultBuffer.data(), &getFilesResponseResult, nullptr); + hr = PFDataGetFilesGetResult(&async2, getFilesResultBuffer.size(), getFilesResultBuffer.data(), &getFilesResponseResult, nullptr); cout << "PFDataGetFilesGetResult: 0x" << setw(8) << setfill('0') << hex << hr << endl; } @@ -168,7 +179,7 @@ int main() PFServiceConfigCloseHandle(serviceConfigHandle); serviceConfigHandle = nullptr; } - + XAsyncBlock async3{}; hr = PFServicesUninitializeAsync(&async3); // Add your own error handling when FAILED(hr) == true cout << "PFServicesUninitializeAsync: 0x" << setw(8) << setfill('0') << hex << hr << endl; diff --git a/Test/PlayFabServicesManualTestApp/PlayFabServicesManualTestApp.Gdk.vcxproj b/Test/PlayFabServicesManualTestApp/PlayFabServicesManualTestApp.Gdk.vcxproj index d7c0e9b..1164a54 100644 --- a/Test/PlayFabServicesManualTestApp/PlayFabServicesManualTestApp.Gdk.vcxproj +++ b/Test/PlayFabServicesManualTestApp/PlayFabServicesManualTestApp.Gdk.vcxproj @@ -186,7 +186,7 @@ - $(PlayFabCoreExternalDir)\rapidjson\include;$(PlayFabServicesManualTestDir);$(PlayFabServicesSourceDir)\source;$(PlayFabServicesSourceDir)\source\Common;%(AdditionalIncludeDirectories) + $(PlayFabCoreExternalDir)\nlohmann\include;$(PlayFabServicesManualTestDir);$(PlayFabServicesSourceDir)\source;$(PlayFabServicesSourceDir)\source\Common;%(AdditionalIncludeDirectories) @@ -472,8 +472,8 @@ - xcopy /Y /I /E "$(PlayFabServicesManualTestDir)\GDK\Assets\*.*" "$(OutDir)Assets" & - xcopy /Y /I /E "$(PlayFabCoreOutDirRoot)Gaming.Desktop.x64\$(Configuration)\$(PlayFabCoreProjectName)\$(PlayFabCoreProjectName).*" "$(OutDir)" & + xcopy /Y /I /E "$(PlayFabServicesManualTestDir)\GDK\Assets\*.*" "$(OutDir)Assets" & + xcopy /Y /I /E "$(PlayFabCoreOutDirRoot)Gaming.Desktop.x64\$(Configuration)\$(PlayFabCoreProjectName)\$(PlayFabCoreProjectName).*" "$(OutDir)" & xcopy /Y /I /E "$(PlayFabServicesOutDirRoot)Gaming.Desktop.x64\$(Configuration)\$(PlayFabServicesProjectName)\$(PlayFabServicesProjectName).*" "$(OutDir)" diff --git a/Test/PlayFabServicesManualTestApp/TestFramework/TestRunner.cpp b/Test/PlayFabServicesManualTestApp/TestFramework/TestRunner.cpp index fb13492..e42dc8e 100644 --- a/Test/PlayFabServicesManualTestApp/TestFramework/TestRunner.cpp +++ b/Test/PlayFabServicesManualTestApp/TestFramework/TestRunner.cpp @@ -497,7 +497,7 @@ void TestRunner::CallPFGetFiles() if (m_offlineTesting) { - bool offlineErrors = + bool offlineErrors = (hr1 == HTTP_E_STATUS_NOT_FOUND || hr2 == HTTP_E_STATUS_NOT_FOUND || hr3 == HTTP_E_STATUS_NOT_FOUND || hr1 == HTTP_E_STATUS_UNEXPECTED || hr2 == HTTP_E_STATUS_UNEXPECTED || hr3 == HTTP_E_STATUS_UNEXPECTED); if (offlineErrors) @@ -529,7 +529,7 @@ void TestRunner::CallPFGetTime() if (m_offlineTesting) { bool offlineErrors = - (hr1 == HTTP_E_STATUS_NOT_FOUND || hr2 == HTTP_E_STATUS_NOT_FOUND || + (hr1 == HTTP_E_STATUS_NOT_FOUND || hr2 == HTTP_E_STATUS_NOT_FOUND || hr1 == HTTP_E_STATUS_UNEXPECTED || hr2 == HTTP_E_STATUS_UNEXPECTED); if (offlineErrors) @@ -914,7 +914,7 @@ std::string FormatStr(_In_z_ _Printf_format_string_ const char* format, ...) std::vector buf(1 + std::vsnprintf(NULL, 0, format, args)); std::vsnprintf(buf.data(), buf.size(), format, args); va_end(args); - + return buf.data(); } @@ -989,7 +989,7 @@ void Tracer::AddLog(LOG_TYPE logType, _In_z_ _Printf_format_string_ const char* OutputDebugStringA(strBuffer.c_str()); WriteLogToFile(strBuffer.c_str(), "PFTestAppSummary.txt"); -#if HC_PLATFORM != HC_PLATFORM_GDK +#if HC_PLATFORM != HC_PLATFORM_GDK puts(strBuffer.c_str()); // Write to STDOUT for Win32 #endif } @@ -1019,9 +1019,9 @@ std::string GetExeDirectory() bool LoadTitleDataJson(std::shared_ptr& testDataJson, size_t& testDataJsonLen) { // Read the title data from the file into the output character array. - std::ifstream titleDataFile; + std::ifstream titleDataFile; SetCurrentDirectoryA(GetExeDirectory().c_str()); - + std::ios_base::iostate exceptionMask = titleDataFile.exceptions() | std::ios::failbit; titleDataFile.exceptions(exceptionMask); @@ -1081,7 +1081,6 @@ bool TestRunner::LoadTitleData(TestTitleData& titleData) return false; } - // Not using rapidJson since that header isn't in the exposed by GDK's PlayFab.C titleData.titleId = GetValueForKey(*titleJsonPtr, "\"titleId\""); titleData.connectionString = GetValueForKey(*titleJsonPtr, "\"connectionString\""); titleData.secretKey = GetValueForKey(*titleJsonPtr, "\"secretKey\""); diff --git a/Test/PlayFabServicesTestApp/Android/app/CMakeLists.txt b/Test/PlayFabServicesTestApp/Android/app/CMakeLists.txt index 09cff2a..2a506f6 100644 --- a/Test/PlayFabServicesTestApp/Android/app/CMakeLists.txt +++ b/Test/PlayFabServicesTestApp/Android/app/CMakeLists.txt @@ -55,7 +55,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" "${PATH_TO_LHC}/Include" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_TEST}/PlayFabServicesTestApp" "${PATH_TO_TEST}/PlayFabServicesTestApp/TestFramework" "${PATH_TO_TEST}/PlayFabServices.GeneratedApiWrappers" @@ -81,7 +81,7 @@ add_library( "${PATH_TO_TEST}/PlayFabServicesTestApp/Platform/Android/PlayFabAndroid.cpp" ) -if (${ANDROID_ABI} STREQUAL "x86_64") +if (${ANDROID_ABI} STREQUAL "x86_64") set(ANDROID_ABI_DIRECTORY "x86_64") else() set(ANDROID_ABI_DIRECTORY "arm8") @@ -104,7 +104,7 @@ set(LIBHTTPCLIENT_PATH ${PATH_TO_LHC}/Binaries/Android/libHttpClient.Android/int find_library(ANDROID_LOG_PATH log) # Android log library target_link_libraries( - ${PROJECT_NAME} + ${PROJECT_NAME} ${PLAYFAB_SERVICES_PATH} ${PLAYFAB_CORE_PATH} ${LIBHTTPCLIENT_PATH} diff --git a/Test/PlayFabServicesTestApp/Android/app/build.gradle b/Test/PlayFabServicesTestApp/Android/app/build.gradle index 0d56b3d..e852737 100644 --- a/Test/PlayFabServicesTestApp/Android/app/build.gradle +++ b/Test/PlayFabServicesTestApp/Android/app/build.gradle @@ -70,9 +70,10 @@ android { // Custom task to copy test json file for test app task copyTestFiles(type: Copy) { + println("Copying testTitleData.json...") from '../../..' into 'src/main/assets' - include '*.json' + include 'testTitleData.json' } // Custom task to copy aar files for test app diff --git a/Test/PlayFabServicesTestApp/Android/app/src/main/java/com/microsoft/playfab/sdk/AndroidTestClient.java b/Test/PlayFabServicesTestApp/Android/app/src/main/java/com/microsoft/playfab/sdk/AndroidTestClient.java index 175b21a..a292a2a 100644 --- a/Test/PlayFabServicesTestApp/Android/app/src/main/java/com/microsoft/playfab/sdk/AndroidTestClient.java +++ b/Test/PlayFabServicesTestApp/Android/app/src/main/java/com/microsoft/playfab/sdk/AndroidTestClient.java @@ -50,14 +50,16 @@ public boolean StartTests() { } public byte[] GetBufferFromFile(String filename) throws IOException { - try { - AssetManager manager = getApplicationContext().getAssets(); - InputStream is = manager.open(filename); + AssetManager assetManager = getApplicationContext().getAssets(); + try (InputStream is = assetManager.open(filename); + ByteArrayOutputStream buffer = new ByteArrayOutputStream()) { int size = is.available(); - byte[] buffer = new byte[size]; - is.read(buffer); - is.close(); - return buffer; + int nRead; + byte[] data = new byte[size]; + while ((nRead = is.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + return buffer.toByteArray(); } catch (IOException e) { return null; diff --git a/Test/PlayFabServicesTestApp/Apple/PlayFabServicesTestApp.Apple/PlayFabServicesTestApp.Apple.xcodeproj/project.pbxproj b/Test/PlayFabServicesTestApp/Apple/PlayFabServicesTestApp.Apple/PlayFabServicesTestApp.Apple.xcodeproj/project.pbxproj index 074c3c2..408cfb8 100644 --- a/Test/PlayFabServicesTestApp/Apple/PlayFabServicesTestApp.Apple/PlayFabServicesTestApp.Apple.xcodeproj/project.pbxproj +++ b/Test/PlayFabServicesTestApp/Apple/PlayFabServicesTestApp.Apple/PlayFabServicesTestApp.Apple.xcodeproj/project.pbxproj @@ -1319,7 +1319,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", "$(SRCROOT)/../../../../Test/PlayFabServicesTestApp", ); "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -1388,7 +1388,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", "$(SRCROOT)/../../../../Test/PlayFabServicesTestApp", ); "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -1495,7 +1495,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; @@ -1569,7 +1569,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; @@ -1609,7 +1609,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", "$(SRCROOT)/../../../../Test/PlayFabServicesTestApp", ); "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -1668,7 +1668,7 @@ "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Apple", "$(SRCROOT)/../../../../Source/PlayFabSharedInternal/Include/Generated", "$(SRCROOT)/../../../../../libHttpClient/Include", - "$(SRCROOT)/../../../../External/rapidjson/include", + "$(SRCROOT)/../../../../External/nlohmann/include", "$(SRCROOT)/../../../../Test/PlayFabServicesTestApp", ); "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; diff --git a/Test/PlayFabServicesTestApp/Linux/CMakeLists.txt b/Test/PlayFabServicesTestApp/Linux/CMakeLists.txt index 7ae3ff5..fb0eace 100644 --- a/Test/PlayFabServicesTestApp/Linux/CMakeLists.txt +++ b/Test/PlayFabServicesTestApp/Linux/CMakeLists.txt @@ -15,17 +15,19 @@ set(CMAKE_C_COMPILER clang) set(CMAKE_CXX_COMPILER clang++) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_FLAGS "-fvisibility=hidden") set(CMAKE_C_FLAGS "-fvisibility=hidden") set(CMAKE_STATIC_LIBRARY_PREFIX "") set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set(CMAKE_CXX_FLAGS "-pthread") set(CMAKE_CXX_LINK_FLAGS "-latomic") +set(CMAKE_CXX_FLAGS "-fvisibility=hidden") +set(CMAKE_CXX_FLAGS "-pthread") +# Removing -D_DEBUG flag due to a crash that's happening on Debug, +# The crash seems to be related with RTTI symbols not being loaded despite we're including the -frtti flag message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions("-DDBG -D_DBG -DDEBUG -D_DEBUG") + add_definitions("-DDBG -D_DBG -DDEBUG") endif() ########################################### @@ -72,7 +74,7 @@ set(COMMON_INCLUDE_DIRS "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include" "${PATH_TO_SOURCE}/PlayFabSharedInternal/Include/Generated" "${PATH_TO_LHC}/Include" - "${PATH_TO_ROOT}/External/rapidjson/include" + "${PATH_TO_ROOT}/External/nlohmann/include" "${PATH_TO_TEST}/PlayFabServicesTestApp" "${PATH_TO_TEST}/PlayFabServicesTestApp/TestFramework" "${PATH_TO_TEST}/PlayFabServices.GeneratedApiWrappers" diff --git a/Test/PlayFabServicesTestApp/Linux/PlayFabTestApp_Linux.bash b/Test/PlayFabServicesTestApp/Linux/PlayFabTestApp_Linux.bash index 1871594..816ca6a 100644 --- a/Test/PlayFabServicesTestApp/Linux/PlayFabTestApp_Linux.bash +++ b/Test/PlayFabServicesTestApp/Linux/PlayFabTestApp_Linux.bash @@ -63,5 +63,5 @@ log "BUILD_PF = ${BUILD_PF}" make TestApp sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../../Int/CMake/PlayFabTestApp.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D LHC_PATH=$LHC_PATH -sudo make -C "$SCRIPT_DIR"/../../../Int/CMake/PlayFabTestApp.Linux +sudo make VERBOSE=1 -C "$SCRIPT_DIR"/../../../Int/CMake/PlayFabTestApp.Linux sudo cp "$TEST_TITLE_JSON" "${SCRIPT_DIR}/../../../Out/x64/$CONFIGURATION/PlayFabTestApp.Linux/" diff --git a/Test/PlayFabServicesTestApp/Platform/Android/AndroidTestApp.cpp b/Test/PlayFabServicesTestApp/Platform/Android/AndroidTestApp.cpp index 3f278ed..1e5d69f 100644 --- a/Test/PlayFabServicesTestApp/Platform/Android/AndroidTestApp.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Android/AndroidTestApp.cpp @@ -6,7 +6,7 @@ #include "Platform/PlayFabPal.h" #include "Platform/Generic/MemoryManager.h" #include "Operations/Core/AuthenticationOperations.h" -#include "RapidJson.h" +#include "Nlohmann.h" #include "TestRunner.h" #include "../PlatformUtils.h" @@ -60,7 +60,7 @@ void TestApp::AppInitialize( ); HCTraceSetTraceToDebugger(true); - + LOGI("AndroidTestApp initialized"); m_initialized = true; @@ -85,7 +85,7 @@ void TestApp::UpdateInstances(JNIEnv* env, jobject activityInstance, jobject con m_context = env->NewGlobalRef(context); } -bool TestApp::RunTests() +bool TestApp::RunTests() { PlayFab::Test::TestRunner testRunner; THROW_IF_FAILED(testRunner.Initialize()); diff --git a/Test/PlayFabServicesTestApp/Platform/Android/PlatformUtilsAndroid.cpp b/Test/PlayFabServicesTestApp/Platform/Android/PlatformUtilsAndroid.cpp index 0fc4461..d559505 100644 --- a/Test/PlayFabServicesTestApp/Platform/Android/PlatformUtilsAndroid.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Android/PlatformUtilsAndroid.cpp @@ -7,6 +7,7 @@ #include #include #include +#include "nlohmann/json.hpp" JNIEnv* JniEnvFromJavaVm(JavaVM* javaVm) { @@ -49,22 +50,44 @@ namespace Platform HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept { std::vector fileBuffer; - AndroidTestApp::TestApp::GetInstance().GetBufferFromFile("testTitleData.json", fileBuffer); - std::string str{ fileBuffer.begin(), fileBuffer.end() }; + AndroidTestApp::TestApp::GetInstance().GetBufferFromFile("testTitleData.json", fileBuffer); // Parse JSON string into output TestTitleData. - rapidjson::Document titleDataJson; - titleDataJson.Parse(fileBuffer.data()); + JsonValue titleDataJson; + bool parseError = false; + String parseErrorMsg; - if (titleDataJson.HasParseError()) + try + { + if (fileBuffer.data()) + { + titleDataJson = JsonValue::parse(fileBuffer.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (parseError) { LOGE("Unable to parse testTitleData.json"); + LOGE("\nError: %s\n", parseErrorMsg.c_str()); return E_FAIL; } - testTitleData.titleId = titleDataJson["titleId"].GetString(); - testTitleData.secretKey = titleDataJson["secretKey"].GetString(); - testTitleData.connectionString = titleDataJson["connectionString"].GetString(); + testTitleData.titleId = titleDataJson["titleId"].get(); + testTitleData.secretKey = titleDataJson["secretKey"].get(); + testTitleData.connectionString = titleDataJson["connectionString"].get(); + testTitleData.allowRetries = titleDataJson["allowRetries"].get(); + testTitleData.runTestList = titleDataJson["runTestList"].get(); + testTitleData.testList = titleDataJson["testList"].get>(); + testTitleData.retryableHRs = titleDataJson["retryableHRs"].get>(); return S_OK; } diff --git a/Test/PlayFabServicesTestApp/Platform/Apple/MainApple.cpp b/Test/PlayFabServicesTestApp/Platform/Apple/MainApple.cpp index 655cb47..2d050cb 100644 --- a/Test/PlayFabServicesTestApp/Platform/Apple/MainApple.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Apple/MainApple.cpp @@ -2,7 +2,7 @@ #include "TestAppPch.h" #include "playfab/services/PFServices.h" -#include "RapidJson.h" +#include "Nlohmann.h" #include "TestRunner.h" #include "../PlatformUtils.h" #include "MainApple.h" @@ -18,7 +18,7 @@ void WriteLogToFile(const char* line, const char* strFileName) //concatenating the path string returned from HOME strcat(buffer,"/Documents/"); strcat(buffer,strFileName); - + FILE *file = fopen(buffer, "a"); // "a" for append mode if (file == NULL) { @@ -34,21 +34,21 @@ int MainApple() { PlayFab::Test::TestRunner testRunner; THROW_IF_FAILED(testRunner.Initialize()); - + while (!testRunner.Update()) { PlayFab::Test::Platform::Sleep(10); } - + bool allTestsPassed = testRunner.Cleanup(); - + // Logging result in a separate file inside the simulator to make it easier for the pipeline script to assess if the test app run was successful or not std::string resultStr = allTestsPassed ? "PASS" : "FAIL"; - + #if HC_PLATFORM == HC_PLATFORM_IOS WriteLogToFile(resultStr.c_str(), "PFTestAppResult.txt"); #endif - + // Return 0 (success) if all tests passed. Otherwise, return 1 (error). return allTestsPassed ? 0 : 1; } diff --git a/Test/PlayFabServicesTestApp/Platform/Apple/PlatformUtilsApple.cpp b/Test/PlayFabServicesTestApp/Platform/Apple/PlatformUtilsApple.cpp index 1c86bb7..8d88b5b 100644 --- a/Test/PlayFabServicesTestApp/Platform/Apple/PlatformUtilsApple.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Apple/PlatformUtilsApple.cpp @@ -41,7 +41,7 @@ auto read_file(std::string_view path) -> std::string { if (not stream) { throw std::ios_base::failure("File does not exist"); } - + auto out = std::string(); auto buf = std::string(read_size, '\0'); while (stream.read(& buf[0], read_size)) { @@ -63,25 +63,46 @@ HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept auto fileData = readFileIntoVector(); // Parse JSON string into output TestTitleData. - rapidjson::Document titleDataJson; - TraceMessage(HCTraceLevel::Verbose, fileData.data()); - titleDataJson.Parse(fileData.data()); + JsonValue titleDataJson; + bool parseError = false; + String parseErrorMsg; - if (titleDataJson.HasParseError()) + try + { + if (fileData.data()) + { + titleDataJson = JsonValue::parse(fileData.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (parseError) { TraceMessage(HCTraceLevel::Error, "Unable to parse testTitleData.json"); return E_FAIL; } - testTitleData.titleId = titleDataJson["titleId"].GetString(); - testTitleData.secretKey = titleDataJson["secretKey"].GetString(); - testTitleData.connectionString = titleDataJson["connectionString"].GetString(); - + testTitleData.titleId = titleDataJson["titleId"].get(); + testTitleData.secretKey = titleDataJson["secretKey"].get(); + testTitleData.connectionString = titleDataJson["connectionString"].get(); + testTitleData.allowRetries = titleDataJson["allowRetries"].get(); + testTitleData.runTestList = titleDataJson["runTestList"].get(); + testTitleData.testList = titleDataJson["testList"].get>(); + testTitleData.retryableHRs = titleDataJson["retryableHRs"].get>(); + #if HC_PLATFORM == HC_PLATFORM_MAC - testTitleData.steamAppId = titleDataJson["steamAppId"].GetString(); - testTitleData.steamPublisherKey = titleDataJson["steamPublisherKey"].GetString(); + testTitleData.steamAppId = titleDataJson["steamAppId"].get(); + testTitleData.steamPublisherKey = titleDataJson["steamPublisherKey"].get(); #endif - + return S_OK; } @@ -112,7 +133,7 @@ void WriteLogToFile(const char* line, const char* strFileName) //concatenating the path string returned from HOME strcat(buffer,"/Documents/"); strcat(buffer,strFileName); - + FILE *file = fopen(buffer, "a"); // "a" for append mode if (file == NULL) { diff --git a/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.cpp b/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.cpp index 7f89bdf..711d228 100644 --- a/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.cpp @@ -38,8 +38,9 @@ String MemoryManager::Summary() return ss.str(); } -void* STDAPIVCALLTYPE MemoryManager::AllocHook(size_t size) +void* STDAPIVCALLTYPE MemoryManager::AllocHook(size_t size, uint32_t memoryTypeId) { + UNREFERENCED_PARAMETER(memoryTypeId); auto& memoryManager = MemoryManager::Instance(); std::unique_lock lock{ memoryManager.m_mutex }; @@ -49,8 +50,9 @@ void* STDAPIVCALLTYPE MemoryManager::AllocHook(size_t size) return ptr; } -void STDAPIVCALLTYPE MemoryManager::FreeHook(void* pointer) +void STDAPIVCALLTYPE MemoryManager::FreeHook(void* pointer, uint32_t memoryTypeId) { + UNREFERENCED_PARAMETER(memoryTypeId); auto& memoryManager = MemoryManager::Instance(); std::unique_lock lock{ memoryManager.m_mutex }; diff --git a/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.h b/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.h index c8c357b..ba126ff 100644 --- a/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.h +++ b/Test/PlayFabServicesTestApp/Platform/Generic/MemoryManager.h @@ -24,8 +24,8 @@ class MemoryManager MemoryManager() = default; // PlayFab SDK Callbacks - static void* STDAPIVCALLTYPE AllocHook(size_t size); - static void STDAPIVCALLTYPE FreeHook(void* pointer); + static void* STDAPIVCALLTYPE AllocHook(size_t size, uint32_t memoryTypeId); + static void STDAPIVCALLTYPE FreeHook(void* pointer, uint32_t memoryTypeId); std::mutex m_mutex; uint64_t m_nextId{ 0 }; diff --git a/Test/PlayFabServicesTestApp/Platform/Linux/MainLinux.cpp b/Test/PlayFabServicesTestApp/Platform/Linux/MainLinux.cpp index 39c5489..6bfb246 100644 --- a/Test/PlayFabServicesTestApp/Platform/Linux/MainLinux.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Linux/MainLinux.cpp @@ -2,7 +2,7 @@ #include "TestAppPch.h" #include "playfab/services/PFServices.h" -#include "RapidJson.h" +#include "Nlohmann.h" #include "TestRunner.h" #include "../PlatformUtils.h" diff --git a/Test/PlayFabServicesTestApp/Platform/Linux/PlatfromUtilsLinux.cpp b/Test/PlayFabServicesTestApp/Platform/Linux/PlatfromUtilsLinux.cpp index 545a6be..aea642d 100644 --- a/Test/PlayFabServicesTestApp/Platform/Linux/PlatfromUtilsLinux.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Linux/PlatfromUtilsLinux.cpp @@ -16,16 +16,16 @@ String GetExeDirectory() char path[256] = {0}; int size = 256; ssize_t len = readlink("/proc/self/exe", path, size - 1); // Linux - if (len == -1) + if (len == -1) { len = readlink("/proc/curproc/file", path, size - 1); // FreeBSD - if (len == -1) + if (len == -1) { len = readlink("/proc/self/path/a.out", path, size - 1); // Solaris } } - if (len != -1) + if (len != -1) { path[len] = '\0'; // Null-terminate the string } @@ -34,7 +34,7 @@ String GetExeDirectory() } -std::vector readFileIntoVector(const std::string &filename) +std::vector readFileIntoVector(const std::string &filename) { std::ifstream file(filename, std::ios::binary | std::ios::ate); @@ -66,18 +66,45 @@ HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept auto fileData = readFileIntoVector("testTitleData.json"); // Parse JSON string into output TestTitleData. - rapidjson::Document titleDataJson; - titleDataJson.Parse(fileData.data()); + JsonValue titleDataJson; + bool parseError = false; + String parseErrorMsg; - if (titleDataJson.HasParseError()) + try + { + if (fileData.data()) + { + titleDataJson = JsonValue::parse(fileData.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (parseError) { TraceMessage(HCTraceLevel::Error, "Unable to parse testTitleData.json"); return E_FAIL; } - testTitleData.titleId = titleDataJson["titleId"].GetString(); - testTitleData.secretKey = titleDataJson["secretKey"].GetString(); - testTitleData.connectionString = titleDataJson["connectionString"].GetString(); + testTitleData.titleId = titleDataJson["titleId"].get(); + testTitleData.secretKey = titleDataJson["secretKey"].get(); + testTitleData.connectionString = titleDataJson["connectionString"].get(); + testTitleData.allowRetries = titleDataJson["allowRetries"].get(); + testTitleData.runTestList = titleDataJson["runTestList"].get(); + testTitleData.testList = titleDataJson["testList"].get>(); + testTitleData.retryableHRs = titleDataJson["retryableHRs"].get>(); + + #if HC_PLATFORM == HC_PLATFORM_WIN32 + testTitleData.steamAppId = titleDataJson["steamAppId"].get(); + testTitleData.steamPublisherKey = titleDataJson["steamPublisherKey"].get(); + #endif return S_OK; } diff --git a/Test/PlayFabServicesTestApp/Platform/Windows/PlatfromUtilsWindows.cpp b/Test/PlayFabServicesTestApp/Platform/Windows/PlatfromUtilsWindows.cpp index 0810fa1..6ffc2db 100644 --- a/Test/PlayFabServicesTestApp/Platform/Windows/PlatfromUtilsWindows.cpp +++ b/Test/PlayFabServicesTestApp/Platform/Windows/PlatfromUtilsWindows.cpp @@ -51,23 +51,44 @@ HRESULT GetTestTitleData(TestTitleData& testTitleData) noexcept titleDataFile.close(); - // Parse JSON string into output TestTitleData. - rapidjson::Document titleDataJson; - titleDataJson.Parse(data.data()); + JsonDocument titleDataJson; + bool parseError = false; + String parseErrorMsg; - if (titleDataJson.HasParseError()) + try + { + if (data.data()) + { + titleDataJson = JsonValue::parse(data.data()); + } + else + { + parseError = true; + } + } + catch (const JsonValue::parse_error& e) + { + parseErrorMsg = e.what(); + parseError = true; + } + + if (parseError) { TraceMessage(HCTraceLevel::Error, "Unable to parse testTitleData.json"); return E_FAIL; } - testTitleData.titleId = titleDataJson["titleId"].GetString(); - testTitleData.secretKey = titleDataJson["secretKey"].GetString(); - testTitleData.connectionString = titleDataJson["connectionString"].GetString(); + testTitleData.titleId = titleDataJson["titleId"].get(); + testTitleData.secretKey = titleDataJson["secretKey"].get(); + testTitleData.connectionString = titleDataJson["connectionString"].get(); + testTitleData.allowRetries = titleDataJson["allowRetries"].get(); + testTitleData.runTestList = titleDataJson["runTestList"].get(); + testTitleData.testList = titleDataJson["testList"].get>(); + testTitleData.retryableHRs = titleDataJson["retryableHRs"].get>(); #if HC_PLATFORM == HC_PLATFORM_WIN32 - testTitleData.steamAppId = titleDataJson["steamAppId"].GetString(); - testTitleData.steamPublisherKey = titleDataJson["steamPublisherKey"].GetString(); + testTitleData.steamAppId = titleDataJson["steamAppId"].get(); + testTitleData.steamPublisherKey = titleDataJson["steamPublisherKey"].get(); #endif return S_OK; diff --git a/Test/PlayFabServicesTestApp/TestFramework/TestContext.cpp b/Test/PlayFabServicesTestApp/TestFramework/TestContext.cpp index bf3da22..408e448 100644 --- a/Test/PlayFabServicesTestApp/TestFramework/TestContext.cpp +++ b/Test/PlayFabServicesTestApp/TestFramework/TestContext.cpp @@ -33,6 +33,16 @@ TestFinishState TestContext::FinishState() const return m_finishState; } +TestFinishState TestContext::IntermediateState() const +{ + return m_intermediateState; +} + +Vector> TestContext::IntermediateResults() const +{ + return m_intermediateResults; +} + int64_t TestContext::StartTime() const { return m_startTime; @@ -88,7 +98,7 @@ void TestContext::AssertTrue(bool statement, const char* errorMessage) RecordFlakyResult(std::move(result)); } else - { + { throw Exception{ errorMessage }; } } @@ -167,6 +177,7 @@ void TestContext::EndTest(TestFinishState state, String resultMsg) noexcept { m_testResultMsg += "\n: " + resultMsg; } + m_intermediateState = m_finishState; m_finishState = TestFinishState::FAILED; } } diff --git a/Test/PlayFabServicesTestApp/TestFramework/TestContext.h b/Test/PlayFabServicesTestApp/TestFramework/TestContext.h index b9b5819..adf8d40 100644 --- a/Test/PlayFabServicesTestApp/TestFramework/TestContext.h +++ b/Test/PlayFabServicesTestApp/TestFramework/TestContext.h @@ -43,6 +43,8 @@ class TestContext String const& TestName() const; TestActiveState ActiveState() const; TestFinishState FinishState() const; + TestFinishState IntermediateState() const; + Vector> IntermediateResults() const; int64_t StartTime() const; int64_t EndTime() const; String const& Summary() const; @@ -96,6 +98,7 @@ class TestContext String const m_testName; TestActiveState m_activeState{ TestActiveState::PENDING }; TestFinishState m_finishState{ TestFinishState::PENDING }; + TestFinishState m_intermediateState{ TestFinishState::PENDING }; String m_testResultMsg; TestFunc m_testFunc; int64_t m_startTime; diff --git a/Test/PlayFabServicesTestApp/TestFramework/TestRunner.cpp b/Test/PlayFabServicesTestApp/TestFramework/TestRunner.cpp index a63983a..e4584ca 100644 --- a/Test/PlayFabServicesTestApp/TestFramework/TestRunner.cpp +++ b/Test/PlayFabServicesTestApp/TestFramework/TestRunner.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace PlayFab @@ -43,6 +42,17 @@ HRESULT TestRunner::Initialize() TestTitleData titleData; RETURN_IF_FAILED(Platform::GetTestTitleData(titleData)); + if (titleData.allowRetries && titleData.retryableHRs.size() > 0) + { + m_allowRetries = titleData.allowRetries; + SetretryableHRs(titleData.retryableHRs); + } + + if (titleData.runTestList && titleData.testList.size() > 0) + { + SetTestList(titleData.testList); + } + // Initialize the list of TestClasses m_testClasses.emplace_back(MakeShared(titleData)); m_testClasses.emplace_back(MakeShared(titleData)); @@ -53,7 +63,7 @@ HRESULT TestRunner::Initialize() m_testClasses.insert(m_testClasses.end(), generatedTests.begin(), generatedTests.end()); m_activeTestClass = m_testClasses.begin(); - + return S_OK; } @@ -62,10 +72,88 @@ void TestRunner::SetTestList(Set testNames) m_testList = std::move(testNames); } +void TestRunner::SetretryableHRs(Set retryableHRs) +{ + for (auto& hr : retryableHRs) + { + Stringstream ss; + ss << std::hex << hr; + + unsigned long result; + ss >> result; + + m_retryableHRs.insert(static_cast(result)); + } +} + +void TestRunner::ProcessRetries() +{ + Set testRetryList = m_testRetryList; + m_testRetryList.clear(); + + for (auto& testClass : m_testClasses) + { + auto& testClassTests = testClass->GetTests(); + for (auto& test : testClassTests) + { + if (TestFinishState::TIMEDOUT == test->IntermediateState() || TestFinishState::TIMEDOUT == test->FinishState()) + { + // Retry timeouts if they haven't been previously retried + bool alreadyRetried = testRetryList.find(test->TestName()) != testRetryList.end(); + + if (!alreadyRetried) + { + m_testRetryList.insert(test->TestName()); + } + } + else if (TestFinishState::FAILED == test->FinishState()) + { + bool retryable = false; + + // Check failures and see if they're allowed to be retried. + Vector> intermediateResults = test->IntermediateResults(); + for (auto& result : intermediateResults) + { + retryable = (m_retryableHRs.find(result.hr) != m_retryableHRs.end() ? true : false); + + if (!retryable) + { + break; + } + } + + if (retryable) + { + bool alreadyRetried = testRetryList.find(test->TestName()) != testRetryList.end(); + + if (!alreadyRetried) + { + m_testRetryList.insert(test->TestName()); + } + } + } + } + } +} + bool TestRunner::Update() { if (m_activeTestClass == m_testClasses.end()) { + if (m_allowRetries) + { + // All Tests done, check for any retries + ProcessRetries(); + + if (m_testRetryList.size() > 0) + { + // Retry the failed tests + m_testList = m_testRetryList; + m_activeTestClass = m_testClasses.begin(); + return false; + } + } + // All tests done, log test summary. Update() should not be called again after this auto testSummary = GenerateTestSummary(); AddLog(HCTraceLevel::Important, testSummary.c_str()); @@ -245,9 +333,7 @@ bool TestRunner::Cleanup() (*m_activeTestClass)->Uninitialize().Wait(); } - - // Reset LHC trace callback - HCTraceSetClientCallback(nullptr); + s_hcTraceCallbackContext = nullptr; return m_testReport.AllTestsPassed(); @@ -325,10 +411,10 @@ void TestRunner::AddLog(HCTraceLevel level, _In_z_ _Printf_format_string_ const va_list args2; va_copy(args2, args1); - + Vector buf(1 + std::vsnprintf(NULL, 0, format, args1)); va_end(args1); - + auto ret = std::vsnprintf(buf.data(), buf.size(), format, args2); va_end(args2); diff --git a/Test/PlayFabServicesTestApp/TestFramework/TestRunner.h b/Test/PlayFabServicesTestApp/TestFramework/TestRunner.h index e17baa7..1ee96d9 100644 --- a/Test/PlayFabServicesTestApp/TestFramework/TestRunner.h +++ b/Test/PlayFabServicesTestApp/TestFramework/TestRunner.h @@ -38,6 +38,8 @@ class TestRunner String GenerateTestSummary(); void AddLog(HCTraceLevel level, _In_z_ _Printf_format_string_ const char* format, ...); static void CALLBACK PFHCTraceCallback(_In_z_ const char* areaName, _In_ HCTraceLevel level, _In_ uint64_t threadId, _In_ uint64_t timestamp, _In_z_ const char* message); + void ProcessRetries(); + void SetretryableHRs(Set retryableHRs); private: std::mutex m_mutex; @@ -60,6 +62,9 @@ class TestRunner List>::iterator m_activeTest; Set m_testList; + Set m_testRetryList; + Set m_retryableHRs; + bool m_allowRetries{ true }; static std::atomic s_hcTraceCallbackContext; }; diff --git a/Test/PlayFabServicesTestApp/TestFramework/TestTypes.h b/Test/PlayFabServicesTestApp/TestFramework/TestTypes.h index 25fddaa..32a3ead 100644 --- a/Test/PlayFabServicesTestApp/TestFramework/TestTypes.h +++ b/Test/PlayFabServicesTestApp/TestFramework/TestTypes.h @@ -25,6 +25,10 @@ struct TestTitleData String titleId; String secretKey; String connectionString; + bool allowRetries; + bool runTestList; + Set testList; + Set retryableHRs; #if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_MAC || HC_PLATFORM == HC_PLATFORM_LINUX String steamAppId; String steamPublisherKey; diff --git a/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.cpp b/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.cpp index cf23a0e..cb86b9d 100644 --- a/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.cpp @@ -12,7 +12,7 @@ namespace Test void AuthenticationTests::AddTests() { -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC AddTest("TestAuthenticateGameServerWithCustomId", &AuthenticationTests::TestAuthenticateGameServerWithCustomId); AddTest("TestDelete", &AuthenticationTests::TestDelete); AddTest("TestGetEntity", &AuthenticationTests::TestGetEntity); @@ -35,7 +35,7 @@ AsyncOp AuthenticationTests::LoginDefaultTitlePlayer() }); } -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestAuthenticateGameServerWithCustomId(TestContext& tc) { SharedPtr> titleEntity = MakeShared>(); @@ -72,7 +72,7 @@ void AuthenticationTests::TestAuthenticateGameServerWithCustomId(TestContext& tc } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestDelete(TestContext& tc) { // Covered by TestAuthenticateGameServerWithCustomId @@ -80,7 +80,7 @@ void AuthenticationTests::TestDelete(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestGetEntity(TestContext& tc) { SharedPtr> defaultTitlePlayer = MakeShared>(); @@ -106,7 +106,7 @@ void AuthenticationTests::TestGetEntity(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC constexpr char kMasterAccountType[]{ "master_player_account" }; void AuthenticationTests::TestGetEntityMasterPlayerAccount(TestContext& tc) @@ -138,7 +138,7 @@ void AuthenticationTests::TestGetEntityMasterPlayerAccount(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC constexpr char kTitleType[]{ "title" }; void AuthenticationTests::TestGetEntityWithSecretKey(TestContext& tc) @@ -158,7 +158,7 @@ void AuthenticationTests::TestGetEntityWithSecretKey(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestServerLoginWithServerCustomId(TestContext& tc) { ServerLoginWithServerCustomIdOperation::RequestType request; @@ -179,7 +179,7 @@ void AuthenticationTests::TestServerLoginWithServerCustomId(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestServerLoginWithSteamId(TestContext& tc) { ServerLoginWithSteamIdOperation::RequestType request; @@ -200,7 +200,7 @@ void AuthenticationTests::TestServerLoginWithSteamId(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestServerLoginWithXbox(TestContext& tc) { ServerLoginWithXboxOperation::RequestType request; @@ -219,7 +219,7 @@ void AuthenticationTests::TestServerLoginWithXbox(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestServerLoginWithXboxId(TestContext& tc) { ServerLoginWithXboxIdOperation::RequestType request; @@ -241,7 +241,7 @@ void AuthenticationTests::TestServerLoginWithXboxId(TestContext& tc) } #endif -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void AuthenticationTests::TestValidateEntityToken(TestContext& tc) { // Covered by TestAuthenticateGameServerWithCustomId diff --git a/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.h b/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.h index 1185e6e..78e1800 100644 --- a/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.h +++ b/Test/PlayFabServicesTestApp/Tests/Core/AuthenticationTests.h @@ -17,7 +17,7 @@ class AuthenticationTests : public CoreTestClass void AddTests() override; // Test Methods -#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX +#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_LINUX || HC_PLATFORM == HC_PLATFORM_MAC void TestAuthenticateGameServerWithCustomId(TestContext& testContext); void TestDelete(TestContext& testContext); void TestGetEntity(TestContext& testContext); diff --git a/Test/PlayFabServicesTestApp/Tests/Services/DataTestsImpl.cpp b/Test/PlayFabServicesTestApp/Tests/Services/DataTestsImpl.cpp index 6e43f97..374e30d 100644 --- a/Test/PlayFabServicesTestApp/Tests/Services/DataTestsImpl.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Services/DataTestsImpl.cpp @@ -17,7 +17,7 @@ const PFJsonObject kObject{ "{ \"testKey\": \"testValue\" }" }; HRESULT UploadFileSync(String url) { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, kTestKey, kTestVal); HCCallHandle callHandle{ nullptr }; @@ -53,7 +53,7 @@ void DataTests::TestAbortFileUploads(TestContext& tc) InitiateFileUploadsOperation::RequestType request; request.SetEntity(DefaultTitlePlayer().EntityKey()); request.SetFileNames({ kTestName }); - + InitiateFileUploadsOperation::Run(DefaultTitlePlayer(), request, RunContext()).Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); @@ -77,7 +77,7 @@ void DataTests::TestAbortFileUploads(TestContext& tc) .Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + tc.AssertEqual(DefaultTitlePlayer().EntityKey().Model().id, result.Payload().Model().entity->id, "entity->id"); return S_OK; @@ -110,11 +110,11 @@ void DataTests::TestGetFiles(TestContext& tc) InitiateFileUploadsOperation::RequestType request; request.SetEntity(DefaultTitlePlayer().EntityKey()); request.SetFileNames({ kTestName }); - + InitiateFileUploadsOperation::Run(DefaultTitlePlayer(), request, RunContext()).Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + auto& model = result.Payload().Model(); tc.AssertEqual(DefaultTitlePlayer().EntityKey().Model().id, model.entity->id, "entity->id"); tc.AssertEqual(1u, model.uploadDetailsCount, "uploadDetailsCount"); @@ -136,20 +136,20 @@ void DataTests::TestGetFiles(TestContext& tc) .Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + auto& model = result.Payload().Model(); tc.AssertEqual(DefaultTitlePlayer().EntityKey().Model().id, model.entity->id, "entity->id"); tc.AssertEqual(1u, model.metadataCount, "metadataCount"); GetFilesOperation::RequestType request; request.SetEntity(DefaultTitlePlayer().EntityKey()); - + return GetFilesOperation::Run(DefaultTitlePlayer(), request, RunContext()); }) .Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + auto& model = result.Payload().Model(); tc.AssertEqual(DefaultTitlePlayer().EntityKey().Model().id, model.entity->id, "entity->id"); tc.AssertEqual(1u, model.metadataCount, "metadataCount"); @@ -164,7 +164,7 @@ void DataTests::TestGetFiles(TestContext& tc) DeleteFilesOperation::RequestType request; request.SetEntity(DefaultTitlePlayer().EntityKey()); request.SetFileNames({ kTestName }); - + return DeleteFilesOperation::Run(DefaultTitlePlayer(), request, RunContext()); }) .Then([&](Result result) -> AsyncOp @@ -222,12 +222,10 @@ void DataTests::TestSetObjects(TestContext& tc) tc.AssertEqual(1u, model.objectsCount, "objectsCount"); tc.AssertEqual(kTestName, model.objects[0].value->objectName, "objects[0].value->objectName"); - JsonDocument expected; - expected.Parse(kObject.stringValue); - JsonDocument actual; - actual.Parse(model.objects[0].value->dataObject.stringValue); - tc.AssertTrue(actual.HasMember(kTestKey), "objects[0].value->dataObject.stringValue.key"); - tc.AssertEqual(expected[kTestKey].GetString(), actual[kTestKey].GetString(), "objects[0].value->dataObject.stringValue.key"); + JsonDocument expected = JsonValue::parse(kObject.stringValue); + JsonDocument actual = JsonValue::parse(model.objects[0].value->dataObject.stringValue); + tc.AssertTrue(actual.contains(kTestKey), "objects[0].value->dataObject.stringValue.key"); + tc.AssertEqual(expected[kTestKey].get(), actual[kTestKey].get(), "objects[0].value->dataObject.stringValue.key"); return S_OK; }) diff --git a/Test/PlayFabServicesTestApp/Tests/Services/MultiplayerServerTestsImpl.cpp b/Test/PlayFabServicesTestApp/Tests/Services/MultiplayerServerTestsImpl.cpp index dee49cd..ab518fc 100644 --- a/Test/PlayFabServicesTestApp/Tests/Services/MultiplayerServerTestsImpl.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Services/MultiplayerServerTestsImpl.cpp @@ -54,14 +54,14 @@ class GetEntityTokenOperation : public XAsyncOperation #if HC_PLATFORM != HC_PLATFORM_GDK AsyncOp CreateBuildAlias(ServiceConfig serviceConfig, Entity title, RunContext rc, TestContext& tc) { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "AliasName", kTestBuildAlias); const char* path{ "/MultiplayerServer/CreateBuildAlias" }; Stringstream headerVal; headerVal << versionString << sdkVersion; UnorderedMap headers{ { kSDKVersionStringHeaderName, headerVal.str() }}; - + Stringstream fullUrl; fullUrl << serviceConfig.APIEndpoint(); @@ -81,12 +81,12 @@ AsyncOp CreateBuildAlias(ServiceConfig serviceConfig, Entity title, RunC (Result result) mutable -> AsyncOp { RETURN_IF_FAILED(result.hr); - + Stringstream headerVal; headerVal << versionString << sdkVersion; UnorderedMap headers{ { kSDKVersionStringHeaderName, headerVal.str() } }; headers[kEntityTokenHeaderName] = result.ExtractPayload(); - + return RunOperation(MakeUnique(kPostMethod, url, std::move(headers), body, std::move(rc))); }) .Then([&](Result result) -> Result @@ -96,11 +96,11 @@ AsyncOp CreateBuildAlias(ServiceConfig serviceConfig, Entity title, RunC auto serviceResponse = result.ExtractPayload(); if (serviceResponse.HttpCode >= 200 && serviceResponse.HttpCode < 300) { - tc.AssertTrue(serviceResponse.Data.HasMember("AliasName"), "AliasName"); - tc.AssertEqual(kTestBuildAlias, serviceResponse.Data["AliasName"].GetString(), "AliasName"); - tc.AssertTrue(serviceResponse.Data.HasMember("AliasId"), "AliasId"); - - return Result(serviceResponse.Data["AliasId"].GetString()); + tc.AssertTrue(serviceResponse.Data.contains("AliasName"), "AliasName"); + tc.AssertEqual(kTestBuildAlias, serviceResponse.Data["AliasName"].get().c_str(), "AliasName"); + tc.AssertTrue(serviceResponse.Data.contains("AliasId"), "AliasId"); + + return Result(serviceResponse.Data["AliasId"].get()); } else { @@ -111,7 +111,7 @@ AsyncOp CreateBuildAlias(ServiceConfig serviceConfig, Entity title, RunC AsyncOp DeleteBuildAlias(ServiceConfig serviceConfig, Entity title, String aliasId, RunContext rc) { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "AliasId", aliasId); const char* path{ "/MultiplayerServer/DeleteBuildAlias" }; @@ -163,7 +163,7 @@ AsyncOp DeleteBuildAlias(ServiceConfig serviceConfig, Entity title, String AsyncOp ShutdownServerSession(ServiceConfig serviceConfig, Entity titlePlayer, RunContext rc) { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "SessionId", kTestSessionId); const char* path{ "/MultiplayerServer/ShutdownMultiplayerServer" }; @@ -228,12 +228,12 @@ void MultiplayerServerTests::TestListBuildAliases(TestContext& tc) { #if HC_PLATFORM == HC_PLATFORM_WIN32 auto aliasId = MakeShared(); - + CreateBuildAlias(ServiceConfig(), TitleEntity(), RunContext(), tc) .Then([&, aliasId](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + *aliasId = result.ExtractPayload(); ListBuildAliasesOperation::RequestType request{}; @@ -242,12 +242,12 @@ void MultiplayerServerTests::TestListBuildAliases(TestContext& tc) .Then([&, aliasId](Result result) -> Result { RETURN_IF_FAILED_PLAYFAB(result); - + //auto& model = result.Payload().Model(); tc.AssertEqual(1u, result.Payload().Model().buildAliasesCount, "buildAliasesCount"); tc.AssertEqual(kTestBuildAlias, result.Payload().Model().buildAliases[0]->aliasName, "aliasName"); tc.AssertEqual(*aliasId, result.Payload().Model().buildAliases[0]->aliasId, "aliasId"); - + return S_OK; }) .Then([&, aliasId](Result result) -> AsyncOp @@ -279,10 +279,10 @@ void MultiplayerServerTests::TestListQosServersForTitle(TestContext& tc) .Then([&](Result result) -> Result { RETURN_IF_FAILED_PLAYFAB(result); - + tc.AssertTrue(1u <= result.Payload().Model().qosServersCount, "qosServersCount"); tc.AssertTrue(result.Payload().Model().qosServers[0]->serverUrl, "serverUrl"); - + return S_OK; }) .Finally([&](Result result) @@ -298,7 +298,7 @@ void MultiplayerServerTests::TestRequestMultiplayerServer(TestContext& tc) constexpr char kTestRegion[]{ "EastUs" }; auto buildId = MakeShared(); - + ListBuildSummariesV2Operation::Run(DefaultTitlePlayer(), ListBuildSummariesV2Operation::RequestType{}, RunContext()) .Then([&, buildId, kTestRegion](Result result) -> AsyncOp { diff --git a/Test/PlayFabServicesTestApp/Tests/Services/PlayerDataManagementTestsImpl.cpp b/Test/PlayFabServicesTestApp/Tests/Services/PlayerDataManagementTestsImpl.cpp index 1e13060..19973d5 100644 --- a/Test/PlayFabServicesTestApp/Tests/Services/PlayerDataManagementTestsImpl.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Services/PlayerDataManagementTestsImpl.cpp @@ -15,7 +15,7 @@ constexpr char kTestVal[]{ "testVal" }; AsyncOp ServerUpdateUserReadonlyData(ServiceConfig serviceConfig, String secretKey, String playFabId, String path, bool cleanup, PlayFab::RunContext rc) noexcept { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "PlayFabId", playFabId); if (cleanup) @@ -31,7 +31,7 @@ AsyncOp ServerUpdateUserReadonlyData(ServiceConfig serviceConfig, String s headerVal << versionString << sdkVersion; UnorderedMap headers{ { kSDKVersionStringHeaderName, headerVal.str() } }; headers[kSecretKeyHeaderName] = secretKey; - + Stringstream fullUrl; fullUrl << serviceConfig.APIEndpoint(); @@ -162,7 +162,7 @@ void PlayerDataManagementTests::TestClientUpdateUserData(TestContext& tc) tc.AssertEqual(1u, result.Payload().Model().dataCount, "dataCount"); tc.AssertEqual(kTestKey, result.Payload().Model().data[0].key, "dataKey"); tc.AssertEqual(kTestVal, result.Payload().Model().data[0].value->value, "dataValue"); - + return S_OK; }) .Then([&](Result result) ->AsyncOp @@ -326,7 +326,7 @@ void PlayerDataManagementTests::TestServerUpdateUserInternalData(TestContext& tc data.insert_or_assign(kTestKey, kTestVal); request.SetData(data); request.SetPlayFabId(DefaultTitlePlayerId()); - + ServerUpdateUserInternalDataOperation::Run(TitleEntity(), request, RunContext()).Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); diff --git a/Test/PlayFabServicesTestApp/Tests/Services/ProfilesTestsImpl.cpp b/Test/PlayFabServicesTestApp/Tests/Services/ProfilesTestsImpl.cpp index 66f7e44..10e26c7 100644 --- a/Test/PlayFabServicesTestApp/Tests/Services/ProfilesTestsImpl.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Services/ProfilesTestsImpl.cpp @@ -86,8 +86,8 @@ void ProfilesTests::TestGetProfiles(TestContext& tc) Wrappers::PFProfilesEntityPermissionStatementWrapper statement; statement.SetEffect(PFProfilesEffectType::Allow); statement.SetAction("Read"); - JsonDocument principalJson{ rapidjson::kObjectType }; - principalJson.AddMember("Friend", "true", principalJson.GetAllocator()); + JsonDocument principalJson{}; + principalJson.emplace("Friend", "true"); statement.SetPrincipal(JsonUtils::WriteToString(principalJson)); Stringstream resource; resource << "pfrn:data--*!*/Profile/*"; @@ -136,8 +136,8 @@ void ProfilesTests::TestGetProfiles(TestContext& tc) Wrappers::PFProfilesEntityPermissionStatementWrapper statement; statement.SetEffect(PFProfilesEffectType::Deny); statement.SetAction("Read"); - JsonDocument principalJson{ rapidjson::kObjectType }; - principalJson.AddMember("Friend", "true", principalJson.GetAllocator()); + JsonDocument principalJson{}; + principalJson.emplace("Friend", "true"); statement.SetPrincipal(JsonUtils::WriteToString(principalJson)); Stringstream resource; resource << "pfrn:data--*!*/Profile/*"; diff --git a/Test/PlayFabServicesTestApp/Tests/Services/TitleDataManagementTestsImpl.cpp b/Test/PlayFabServicesTestApp/Tests/Services/TitleDataManagementTestsImpl.cpp index 5a14b9b..aac9fe2 100644 --- a/Test/PlayFabServicesTestApp/Tests/Services/TitleDataManagementTestsImpl.cpp +++ b/Test/PlayFabServicesTestApp/Tests/Services/TitleDataManagementTestsImpl.cpp @@ -20,13 +20,12 @@ constexpr time_t kTestTime{ 12345u }; AsyncOp ServerSetTitleData(ServiceConfig serviceConfig, String secretKey, String path, bool cleanup, PlayFab::RunContext rc) noexcept { - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "key", kTestKey); if (cleanup) { - JsonValue nullVal{ rapidjson::kNullType }; - JsonUtils::ObjectAddMember(requestBody, "value", nullVal); + JsonUtils::ObjectAddMember(requestBody, "value", nullptr); } else { @@ -59,7 +58,7 @@ AsyncOp InitialAdminAddNews(ServiceConfig serviceConfig, String secretKey, { const char* path{ "/Admin/AddNews" }; - JsonValue requestBody{ rapidjson::kObjectType }; + JsonValue requestBody= JsonValue::object();; JsonUtils::ObjectAddMember(requestBody, "title", kTestKey); JsonUtils::ObjectAddMember(requestBody, "body", kTestVal); JsonUtils::ObjectAddMember(requestBody, "timestamp", JsonUtils::ToJsonTime(kTestTime)); @@ -98,7 +97,7 @@ AsyncOp TitleDataManagementTests::Uninitialize() void TitleDataManagementTests::TestClientGetPublisherData(TestContext& tc) { - // Docs specify it may take results from SetPublisherData up to a couple of minutes to show in Get requests. + // Docs specify it may take results from SetPublisherData up to a couple of minutes to show in Get requests. // Not adding a cleanup step here to ensure consistent results. ServerSetTitleData(ServiceConfig(), m_testTitleData.secretKey, "/Server/SetPublisherData", false, RunContext()).Then([&](Result result) -> AsyncOp { @@ -193,7 +192,7 @@ void TitleDataManagementTests::TestClientGetTitleNews(TestContext& tc) ClientGetTitleNewsOperation::Run(DefaultTitlePlayer(), {}, RunContext()).Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + auto& model = result.Payload().Model(); if (model.newsCount == 0) { @@ -211,7 +210,7 @@ void TitleDataManagementTests::TestClientGetTitleNews(TestContext& tc) .Then([&](Result result) -> Result { RETURN_IF_FAILED_PLAYFAB(result); - + auto& model = result.Payload().Model(); tc.AssertEqual(1u, model.newsCount, "newsCount"); tc.AssertEqual(kTestKey, model.news[0]->title, "news[0]->title"); @@ -463,7 +462,7 @@ void TitleDataManagementTests::TestServerSetTitleData(TestContext& tc) ServerSetTitleDataOperation::Run(TitleEntity(), request, RunContext()).Then([&](Result result) -> AsyncOp { RETURN_IF_FAILED_PLAYFAB(result); - + ServerSetTitleDataOperation::RequestType request; request.SetKey(kTestKey); request.SetValue(kTestNullVal);