Adding MSA constent offer for Creators SDK (#85)

This commit is contained in:
Jason Sandlin 2017-02-25 01:30:54 -08:00 коммит произвёл GitHub
Родитель 05400926d9
Коммит bf64cecbbc
7 изменённых файлов: 31 добавлений и 16 удалений

Просмотреть файл

@ -63,7 +63,7 @@
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">_NO_ASYNCRTIMP;_NO_PPLXIMP;_NO_XSAPIIMP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">_NO_ASYNCRTIMP;_NO_PPLXIMP;_NO_XSAPIIMP;XSAPI_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_XSAPIIMP_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>/bigobj /Zm300 %(AdditionalOptions)</AdditionalOptions>

Просмотреть файл

@ -67,9 +67,6 @@
<Filter Include="C++ Source\Social\Manager">
<UniqueIdentifier>{f5c7d6bd-2bf5-4adb-ab7a-e5c1a1a77b73}</UniqueIdentifier>
</Filter>
<Filter Include="C++ Source\EntertainmentProfile">
<UniqueIdentifier>{abf9b438-2d5f-4eeb-a1da-5afe2f282511}</UniqueIdentifier>
</Filter>
<Filter Include="C++ Source\Tournaments">
<UniqueIdentifier>{dbe50f14-df74-4c7f-ad72-b5b0307db128}</UniqueIdentifier>
</Filter>
@ -929,12 +926,6 @@
<ClInclude Include="..\..\Source\Shared\logger\etw_output.h">
<Filter>C++ Source\Shared\Logger</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\System\Sidecar\app_service_messages.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\System\Sidecar\app_service_provider.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="..\..\Include\xsapi\stats_manager.h">
<Filter>C++ Public Includes</Filter>
</ClInclude>

Просмотреть файл

@ -63,7 +63,7 @@
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">_NO_ASYNCRTIMP;_NO_PPLXIMP;_NO_XSAPIIMP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">_NO_ASYNCRTIMP;_NO_PPLXIMP;_NO_XSAPIIMP;XSAPI_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_XSAPIIMP_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>/bigobj /Zm250 %(AdditionalOptions)</AdditionalOptions>

Просмотреть файл

@ -141,6 +141,25 @@ typedef void* user_creation_context;
typedef Windows::Xbox::System::User^ xbox_live_user_t;
#endif
#if UWP_API
#if defined(XSAPI_CPPWINRT)
bool g_is_xbox_live_creators_sdk = false;
#else
// The same C++ binary is shared to titles with and without XBOX_LIVE_CREATORS_SDK defined
// XSAPI uses an external bool that will be defined at the time of when the title includes this header
extern bool g_is_xbox_live_creators_sdk;
#if !defined(XSAPI_BUILD)
#if defined(XBOX_LIVE_CREATORS_SDK)
bool g_is_xbox_live_creators_sdk = true;
#else
bool g_is_xbox_live_creators_sdk = false;
#endif
#endif
#endif
#endif
#if defined(XSAPI_CPPWINRT)
#if TV_API
inline Windows::Xbox::System::User^ convert_user_to_cppcx(_In_ const winrt::Windows::Xbox::System::User& user)
@ -320,4 +339,5 @@ inline std::vector<winrt::Windows::Xbox::System::User> convert_user_vector_to_cp
#define NAMESPACE_MICROSOFT_XBOX_SERVICES_PLAYER_STATE_CPP_BEGIN NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN namespace player_state {
#define NAMESPACE_MICROSOFT_XBOX_SERVICES_PLAYER_STATE_CPP_END NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_END }
#define NAMESPACE_MICROSOFT_XBOX_SERVICES_PLAYER_STATE_BEGIN NAMESPACE_MICROSOFT_XBOX_SERVICES_BEGIN namespace PlayerState {
#define NAMESPACE_MICROSOFT_XBOX_SERVICES_PLAYER_STATE_END NAMESPACE_MICROSOFT_XBOX_SERVICES_END }
#define NAMESPACE_MICROSOFT_XBOX_SERVICES_PLAYER_STATE_END NAMESPACE_MICROSOFT_XBOX_SERVICES_END }

Просмотреть файл

@ -41,7 +41,8 @@ auth_config::auth_config(
_In_ string_t sandbox,
_In_ string_t environmentPrefix,
_In_ string_t environment,
_In_ bool useCompactTicket) :
_In_ bool useCompactTicket,
_In_ bool isCreatorsSDK) :
m_useCompactTicket(useCompactTicket),
m_sandbox(std::move(sandbox)),
m_detailError(0),
@ -57,7 +58,7 @@ auth_config::auth_config(
m_serviceTokenEndpoint = get_endpoint_path(_T("service.auth"), environmentPrefix, environment);
m_xTokenEndpoint = get_endpoint_path(_T("xsts.auth"), environmentPrefix, environment);
m_userTokenSiteName = get_endpoint_path(_T("user.auth"), _T(""), environment, false);
m_rpsTicketService = useCompactTicket ? m_userTokenSiteName : _T("xboxlive.signin");
m_rpsTicketService = isCreatorsSDK ? _T("xbl.signin xbl.friends") : (useCompactTicket ? m_userTokenSiteName : _T("xboxlive.signin"));
m_xtokenComposition = { token_identity_type::u_token, token_identity_type::d_token, token_identity_type::t_token };
}

Просмотреть файл

@ -29,7 +29,8 @@ public:
_In_ string_t sandbox,
_In_ string_t environmentPrefix,
_In_ string_t environment,
_In_ bool useCompactTicket
_In_ bool useCompactTicket,
_In_ bool isCreatorsSDK
);
const string_t& xbox_live_endpoint() const;

Просмотреть файл

@ -23,6 +23,7 @@ function_context user_impl::s_signOutCompletedHandlerIndexer = 0;
function_context user_impl::s_signInCompletedHandlerIndexer = 0;
XBOX_LIVE_NAMESPACE::system::xbox_live_mutex user_impl::s_trackingUsersLock;
std::shared_ptr<user_impl>
user_factory::create_user_impl(user_creation_context userCreationContext)
{
@ -49,7 +50,8 @@ user_impl::user_impl(
m_localConfig->sandbox(),
m_localConfig->environment_prefix(),
m_localConfig->environment(),
m_localConfig->use_first_party_token()
m_localConfig->use_first_party_token(),
g_is_xbox_live_creators_sdk
);
#endif
}