Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#200121
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFabJenkinsBot committed Feb 7, 2020
2 parents c62c512 + 41fda52 commit db0a0f6
Show file tree
Hide file tree
Showing 25 changed files with 175 additions and 57 deletions.
2 changes: 1 addition & 1 deletion build/Linux/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ $(LINK_TARGET) : $(OBJS)
g++ -o $@ $^ -ljsoncpp -lcurl -lssl -lpthread
# Here is the compilation command Make Macro:
COMPILE_CMD = \
g++ -I $(PROJ_DIR)/code -I $(PROJ_DIR)/code/include -I $(PROJ_DIR)/test/TestApp/ -include $(PROJ_DIR)/test/TestApp/TestAppPch.h -D ENABLE_PLAYFABADMIN_API -D ENABLE_PLAYFABSERVER_API -o $@ -c $<
g++ -include $(PROJ_DIR)/code/stdafx.h -I $(PROJ_DIR)/code -I $(PROJ_DIR)/code/include -I $(PROJ_DIR)/test/TestApp/ -include $(PROJ_DIR)/test/TestApp/TestAppPch.h -D ENABLE_PLAYFABADMIN_API -D ENABLE_PLAYFABSERVER_API -o $@ -c $<
# Here is a Pattern Rule, often used for compile-line.
# It says how to create a file with a .o suffix, given a file with a .cpp suffix.
# The rule's command uses some built-in Make Macros:
Expand Down
2 changes: 1 addition & 1 deletion build/Xbox/TestXboxApp/MainXBO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ref class ViewProvider sealed : public IFrameworkView

void OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args)
{
SuspendingDeferral deferral = args->SuspendingOperation->GetDeferral();
SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral();

create_task([this, deferral]()
{
Expand Down
10 changes: 5 additions & 5 deletions build/Xbox/XPlatXbox.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
<ClCompile>
<PrecompiledHeader />
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<Optimization>MaxSpeed</Optimization>
Expand Down Expand Up @@ -127,7 +127,7 @@
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
<ClCompile>
<PrecompiledHeader />
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<Optimization>MaxSpeed</Optimization>
Expand All @@ -152,8 +152,8 @@
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeader />
<MinimalRebuild>false</MinimalRebuild>
<AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<WarningLevel>Level4</WarningLevel>
Expand Down Expand Up @@ -218,8 +218,8 @@
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabEventPipeline.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabEventRouter.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabError.h" />
<ClCompile Include="$(SdkSourceDir)\include\playfab\PlayFabIXHR2HttpPlugin.h" />
<ClCompile Include="$(SdkSourceDir)\include\playfab\PlayFabIXHR2HttpRequest.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabIXHR2HttpPlugin.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabIXHR2HttpRequest.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabSettings.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabCallRequestContainer.h" />
<ClInclude Include="$(SdkSourceDir)\include\playfab\PlayFabCallRequestContainerBase.h" />
Expand Down
1 change: 1 addition & 0 deletions code/include/playfab/PlayFabBaseModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <assert.h>
#include <functional>
#include <list>
#include <memory>

namespace PlayFab
{
Expand Down
3 changes: 3 additions & 0 deletions code/include/playfab/PlayFabCallRequestContainerBase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once

#include <unordered_map>
#include <memory>

namespace PlayFab
{
class CallRequestContainerBase;
Expand Down
4 changes: 3 additions & 1 deletion code/include/playfab/PlayFabIXHR2HttpPlugin.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#if defined(PLAYFAB_PLATFORM_XBOX)

#include <playfab/PlayFabCallRequestContainer.h>
#include <playfab/PlayFabPluginManager.h>
Expand Down Expand Up @@ -44,4 +45,5 @@ namespace PlayFab
std::deque<std::unique_ptr<CallRequestContainerBase>> pendingRequests;
std::deque<std::unique_ptr<CallRequestContainerBase>> pendingResults;
};
}
}
#endif // defined(PLAYFAB_PLATFORM_XBOX)
6 changes: 4 additions & 2 deletions code/include/playfab/PlayFabIXHR2HttpRequest.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once
#if defined(PLAYFAB_PLATFORM_XBOX)
//------------------------------------------------------------------------------
// HttpRequest.h
//
Expand All @@ -8,7 +10,6 @@
// Copyright (C) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------

#pragma once

#include <objbase.h>
#include <windows.h>
Expand Down Expand Up @@ -164,4 +165,5 @@ namespace PlayFab
ComPtr<RequestStream> m_requestStream;
};

} // namespace PlayFab
} // namespace PlayFab
#endif // defined(PLAYFAB_PLATFORM_XBOX)
4 changes: 3 additions & 1 deletion code/include/playfab/QoS/PingResult.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <cstdint>

namespace PlayFab
Expand All @@ -25,4 +26,5 @@ namespace PlayFab
}
};
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
2 changes: 2 additions & 0 deletions code/include/playfab/QoS/PlayFabQoSApi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)

#include <playfab/QoS/QoS.h>
#include <playfab/QoS/QoSResult.h>
Expand Down Expand Up @@ -60,3 +61,4 @@ namespace PlayFab
};
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
5 changes: 4 additions & 1 deletion code/include/playfab/QoS/QoS.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/// </summary>

#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <iostream>

// define body for logging or debug output
Expand Down Expand Up @@ -34,4 +36,5 @@ namespace PlayFab
Timeout = 4
};
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
4 changes: 3 additions & 1 deletion code/include/playfab/QoS/QoSResult.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <vector>

#include <playfab/QoS/RegionResult.h>
Expand Down Expand Up @@ -27,4 +28,5 @@ namespace PlayFab
int errorCode;
};
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
12 changes: 3 additions & 9 deletions code/include/playfab/QoS/QoSSocket.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <playfab/QoS/XPlatSocket.h>
#include <playfab/QoS/PingResult.h>

#if defined(PLAYFAB_PLATFORM_WINDOWS)
#pragma warning (disable: 4309) // Suppress static cast conversion of const value (line 54)
#endif // defined(PLAYFAB_PLATFORM_WINDOWS)

namespace PlayFab
{
namespace QoS
{
constexpr int BUFLEN = 512; // Length of the message send and received

constexpr int MSGHEADER = 255; // Header of the message send over UDP
constexpr unsigned int MSGHEADER = 255; // Header of the message send over UDP
// The message must start with 2 bytes of all bits set to 1

constexpr char BUFFER_VALUE = '1'; // Clear the buffer with this value before receiving the reply.
Expand Down Expand Up @@ -56,7 +53,4 @@ namespace PlayFab
};
}
}

#if defined(PLAYFAB_PLATFORM_WINDOWS)
#pragma warning (default: 4309) // Suppress static cast conversion of const value (line 54)
#endif // defined(PLAYFAB_PLATFORM_WINDOWS)
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
4 changes: 3 additions & 1 deletion code/include/playfab/QoS/RegionResult.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <string>
#include <playfab/PlayFabMultiplayerDataModels.h>

Expand All @@ -26,4 +27,5 @@ namespace PlayFab
int errorCode;
};
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
4 changes: 3 additions & 1 deletion code/include/playfab/QoS/XPlatSocket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#if defined(PLAYFAB_PLATFORM_WINDOWS) || defined(PLAYFAB_PLATFORM_XBOX)
#include <winsock2.h>
#include <Windows.h>
Expand Down Expand Up @@ -80,4 +81,5 @@ namespace PlayFab
#endif
};
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
2 changes: 2 additions & 0 deletions code/source/playfab/PlayFabIXHR2HttpPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdafx.h>

#if defined(PLAYFAB_PLATFORM_XBOX)
#include <playfab/PlayFabIXHR2HttpPlugin.h>
#include <playfab/PlayFabSettings.h>

Expand Down Expand Up @@ -274,3 +275,4 @@ namespace PlayFab
}
}
}
#endif // defined(PLAYFAB_PLATFORM_XBOX)
5 changes: 4 additions & 1 deletion code/source/playfab/PlayFabIXHR2HttpRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include <stdafx.h>

#if defined(PLAYFAB_PLATFORM_XBOX)

#include <playfab/PlayFabIXHR2HttpRequest.h>
#include <string>
#include <sstream>
Expand Down Expand Up @@ -819,4 +821,5 @@ HRESULT RequestStream::Invoke(

return S_OK;
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
#endif // defined(PLAYFAB_PLATFORM_XBOX)
2 changes: 1 addition & 1 deletion code/source/playfab/PlayFabSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace PlayFab
// Control whether all callbacks are threaded or whether the user manually controls callback timing from their main-thread
bool PlayFabSettings::threadedCallbacks = false;
const std::string PlayFabSettings::sdkVersion = "3.23.200121";
const std::string PlayFabSettings::buildIdentifier = "jbuild_xplatcppsdk__sdk-genericslave-3_0";
const std::string PlayFabSettings::buildIdentifier = "jbuild_xplatcppsdk__sdk-genericslave-1_0";
const std::string PlayFabSettings::versionString = "XPlatCppSdk-3.23.200121";
std::string PlayFabSettings::productionEnvironmentURL = ".playfabapi.com";
ErrorCallback PlayFabSettings::globalErrorHandler = nullptr;
Expand Down
2 changes: 2 additions & 0 deletions code/source/playfab/QoS/PlayFabQoSApi.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdafx.h>

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <cstdint>

#include <playfab/QoS/QoS.h>
Expand Down Expand Up @@ -392,3 +393,4 @@ namespace PlayFab
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
5 changes: 4 additions & 1 deletion code/source/playfab/QoS/QoSSocket.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <stdafx.h>

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)

#include <chrono>
#include <thread>
#include <iostream>
Expand Down Expand Up @@ -87,4 +89,5 @@ namespace PlayFab
return result;
}
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
4 changes: 3 additions & 1 deletion code/source/playfab/QoS/RegionResult.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdafx.h>

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <playfab/QoS/RegionResult.h>

namespace PlayFab
Expand All @@ -11,4 +12,5 @@ namespace PlayFab
{
}
}
}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
2 changes: 2 additions & 0 deletions code/source/playfab/QoS/XPlatSocket.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdafx.h>

#if defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
#include <playfab/QoS/XPlatSocket.h>
#include <playfab/QoS/QoS.h>

Expand Down Expand Up @@ -218,3 +219,4 @@ namespace PlayFab

}
}
#endif // defined (PLAYFAB_PLATFORM_WINDOWS) || defined (PLAYFAB_PLATFORM_XBOX)
26 changes: 0 additions & 26 deletions test/TestApp/PlayFabEventTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <playfab/PlayFabEventsDataModels.h>
#include <playfab/PlayFabEventsInstanceApi.h>
#include <playfab/PlayFabSettings.h>
#include <playfab/QoS/PlayFabQoSApi.h>
#include "PlayFabEventTest.h"
#include "TestContext.h"
#include "TestDataTypes.h"
Expand All @@ -22,25 +21,6 @@ using namespace EventsModels;

namespace PlayFabUnit
{
#if (!UNITY_IOS && !UNITY_ANDROID) && (!defined(PLAYFAB_PLATFORM_IOS) && !defined(PLAYFAB_PLATFORM_ANDROID) && !defined(PLAYFAB_PLATFORM_SWITCH))
/// QoS API
void PlayFabEventTest::QosResultApi(TestContext& testContext)
{
QoS::PlayFabQoSApi api;

QoS::QoSResult result = api.GetQoSResult(5, 200);

if (result.errorCode == 0)
{
testContext.Pass();
}
else
{
testContext.Fail("Error Code:" + std::to_string(result.errorCode));
}
}
#endif

void PlayFabEventTest::OnErrorSharedCallback(const PlayFab::PlayFabError& error, void* customData)
{
TestContext* testContext = static_cast<TestContext*>(customData);
Expand Down Expand Up @@ -295,12 +275,6 @@ namespace PlayFabUnit
void PlayFabEventTest::AddTests()
{
AddTest("BasicLogin", &PlayFabEventTest::BasicLogin);

// It is not appropriate for this test to block infinitely until the QoS result is returned
// Not the least of which is because it frequently blocks forever
// This needs to switch to the async mechanism, and allow the test to time out if QoS never completes
// AddTest("QosResultApi", &PlayFabEventTest::QosResultApi);

AddTest("EventsApi", &PlayFabEventTest::EventsApi);
AddTest("HeavyweightEvents", &PlayFabEventTest::HeavyweightEvents);
AddTest("LightweightEvents", &PlayFabEventTest::LightweightEvents);
Expand Down
3 changes: 0 additions & 3 deletions test/TestApp/PlayFabEventTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ namespace PlayFabUnit
std::shared_ptr<PlayFab::PlayFabClientInstanceAPI> clientApi;
std::shared_ptr<PlayFab::PlayFabEventsInstanceAPI> eventsApi;

/// QoS API
void QosResultApi(TestContext& testContext);

// Initial Login
void OnErrorSharedCallback(const PlayFab::PlayFabError& error, void* customData);
void BasicLogin(TestContext& testContext);
Expand Down
Loading

0 comments on commit db0a0f6

Please sign in to comment.