* 2102 GDK (#552)

* 2102 GDK rapidjson version (#554)

* Resolve incorrect rapidjson version in 2102

* 2102 GDK QFE 1 (#556)

* 2102 GDK QFE1

* 2102 GDK QFE2 (#562)

* 2102 GDK QFE2
This commit is contained in:
Nathan Iskandar 2021-04-22 15:31:55 -07:00 коммит произвёл GitHub
Родитель 02e1e048fb
Коммит 730f579d41
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
265 изменённых файлов: 7959 добавлений и 5633 удалений

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

@ -229,11 +229,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -250,18 +250,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -269,20 +260,13 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_manager_c.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\errors_c.h" />

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

@ -295,15 +295,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -334,21 +334,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -364,21 +352,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -651,10 +630,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -693,18 +672,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -714,9 +681,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -726,30 +690,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="C Public Includes">

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

@ -229,11 +229,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -250,18 +250,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -269,20 +260,13 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_manager_c.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\errors_c.h" />

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

@ -295,15 +295,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -334,21 +334,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -364,21 +352,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -651,10 +630,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -693,18 +672,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -714,9 +681,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -726,30 +690,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="C Public Includes">

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

@ -236,11 +236,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -257,19 +257,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -277,22 +267,15 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\Win32\local_storage_win32.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\platform_api.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\mock_rta_service.cpp" />
@ -340,7 +323,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\HttpCallTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\LogTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveContextTests.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />

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

@ -286,15 +286,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -325,24 +325,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -358,21 +343,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -484,9 +460,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
@ -756,10 +729,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -798,18 +771,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -819,9 +780,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -831,30 +789,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h">
<Filter>C++ Source\UnitTests\Mocks</Filter>
</ClInclude>

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

@ -273,11 +273,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -294,19 +294,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -314,22 +304,15 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\Win32\local_storage_win32.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\platform_api.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\mock_rta_service.cpp" />
@ -377,7 +360,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\HttpCallTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\LogTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveContextTests.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />

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

@ -286,15 +286,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -325,24 +325,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -358,21 +343,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -484,9 +460,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
@ -756,10 +729,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -798,18 +771,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -819,9 +780,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -831,30 +789,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h">
<Filter>C++ Source\UnitTests\Mocks</Filter>
</ClInclude>

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

@ -236,11 +236,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -257,19 +257,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -277,22 +267,15 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\Win32\local_storage_win32.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\platform_api.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\mock_rta_service.cpp" />
@ -340,7 +323,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\HttpCallTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\LogTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveContextTests.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />

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

@ -286,15 +286,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -325,24 +325,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -358,21 +343,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -484,9 +460,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
@ -756,10 +729,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -798,18 +771,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -819,9 +780,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -831,30 +789,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h">
<Filter>C++ Source\UnitTests\Mocks</Filter>
</ClInclude>

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

@ -273,11 +273,11 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\enum_traits.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_wrapper_internal.cpp" />
@ -294,19 +294,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\public_utils_legacy.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\utils_locales.cpp" />
@ -314,22 +304,15 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\web_socket.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\Win32\local_storage_win32.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\platform_api.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\mock_rta_service.cpp" />
@ -377,7 +360,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\HttpCallTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\LogTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveContextTests.cpp" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Include\xsapi-c\achievements_c.h" />

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

@ -286,15 +286,15 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_api.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -325,24 +325,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
@ -358,21 +343,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.cpp">
<Filter>C++ Source\Shared</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.cpp">
<Filter>C++ Source\System</Filter>
</ClCompile>
@ -484,9 +460,6 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\PlatformTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\ServiceCallLoggerTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Tests\Shared\XboxLiveCallbackTests.cpp">
<Filter>C++ Source\UnitTests\Tests</Filter>
</ClCompile>
@ -756,10 +729,10 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\errors_legacy.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\fault_injection.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_legacy.h">
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\global_state.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\http_call_request_message_internal.h">
@ -798,18 +771,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\ref_counter.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_data.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logger_protocol.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_logging_config.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\service_call_routed_handler.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -819,9 +780,6 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\string_array.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\telemetry.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\user.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
@ -831,30 +789,18 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_app_config_internal.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_live_services_settings.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xbox_system_factory.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_json_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\Shared\xsapi_utils.h">
<Filter>C++ Source\Shared</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\auth_config.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\client_operation.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\local_storage.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Source\System\ppltasks_extra.h">
<Filter>C++ Source\System</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\Tests\UnitTests\Mocks\http_mock.h">
<Filter>C++ Source\UnitTests\Mocks</Filter>
</ClInclude>

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

@ -11,9 +11,7 @@
</Otherwise>
</Choose>
<PropertyGroup Label="Version">
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<PropertyGroup>
<VS_AndroidHome Condition="'$(VS_AndroidHome)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Android SDK Tools@Path)</VS_AndroidHome>
<VS_AndroidHome Condition="'$(VS_AndroidHome)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools@Path)</VS_AndroidHome>
</PropertyGroup>

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

@ -63,6 +63,7 @@ extern "C"
#define E_XAL_NODEFAULTUSER MAKE_E_HC(0x5111L) // 0x89235111
#define E_XAL_FAILEDTORESOLVE MAKE_E_HC(0x5112L) // 0x89235112
#define E_XAL_NOACCOUNTPROVIDER MAKE_E_HC(0x5113L) // 0x89235113
#define E_XAL_MISMATCHEDTITLEANDCLIENTIDS MAKE_E_HC(0x5114L) // 0x89235114
// E_XAL_INTERNAL_* values should never be returned to callers of XAL.
#define E_XAL_INTERNAL_SWITCHUSER MAKE_E_HC(0x5171L) // 0x89235171

2
External/rapidjson поставляемый

@ -1 +1 @@
Subproject commit d87b698d0fcc10a5f632ecbc80a9cb2a8fa094a5
Subproject commit a1116a83bda2313d45d73703932ecf145ae997ec

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

@ -594,7 +594,7 @@ public:
void set_length(int length) { m_length = length; }
private:
static const utility::string_t c_allowed_chars;
static const utility::char_t* c_allowed_chars;
std::mt19937 m_random;
int m_length;
};

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

@ -44,6 +44,7 @@
#pragma warning( disable : 26444 ) // ignore various unnamed objects
#pragma warning( disable : 26498 ) // ignore eof warning
#pragma warning( disable : 26812 ) // enum instead of enum class
#pragma warning( disable : 4365 )
#endif
// Could use C++ standard library if not __GLIBCXX__,
@ -697,12 +698,12 @@ template<typename StringIterator>
uint64_t timeticks_from_second(StringIterator begin, StringIterator end)
{
int size = (int)(end - begin);
_ASSERTE(begin[0] == U('.'));
_ASSERTE(begin[0] == _T('.'));
uint64_t ufrac_second = 0;
for (int i = 1; i <= 7; ++i)
{
ufrac_second *= 10;
int add = i < size ? begin[i] - U('0') : 0;
int add = i < size ? begin[i] - _T('0') : 0;
ufrac_second += add;
}
return ufrac_second;
@ -712,7 +713,7 @@ void extract_fractional_second(const utility::string_t& dateString, utility::str
{
resultString = dateString;
// First, the string must be strictly longer than 2 characters, and the trailing character must be 'Z'
if (resultString.size() > 2 && resultString[resultString.size() - 1] == U('Z'))
if (resultString.size() > 2 && resultString[resultString.size() - 1] == _T('Z'))
{
// Second, find the last non-digit by scanning the string backwards
auto last_non_digit = std::find_if_not(resultString.rbegin() + 1, resultString.rend(), is_digit);
@ -720,7 +721,7 @@ void extract_fractional_second(const utility::string_t& dateString, utility::str
{
// Finally, make sure the last non-digit is a dot:
auto last_dot = last_non_digit.base() - 1;
if (*last_dot == U('.'))
if (*last_dot == _T('.'))
{
// Got it! Now extract the fractional second
auto last_before_Z = std::end(resultString) - 1;
@ -1046,11 +1047,11 @@ utility::seconds __cdecl timespan::xml_duration_to_seconds(const utility::string
return utility::seconds(numSecs);
}
const utility::string_t nonce_generator::c_allowed_chars(_XPLATSTR("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"));
const utility::char_t * nonce_generator::c_allowed_chars = _XPLATSTR("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
utility::string_t nonce_generator::generate()
{
std::uniform_int_distribution<> distr(0, static_cast<int>(c_allowed_chars.length() - 1));
std::uniform_int_distribution<> distr(0, static_cast<int>(ustrlen(c_allowed_chars) - 1));
utility::string_t result;
result.reserve(length());
std::generate_n(std::back_inserter(result), length(), [&]() { return c_allowed_chars[distr(m_random)]; } );

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

@ -28,6 +28,7 @@ using namespace utility;
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( push )
#pragma warning( disable : 28020 ) // ignore expression validation
#pragma warning( disable : 4365 )
#endif
std::vector<unsigned char> _from_base64(const utility::string_t& str);

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

@ -56,6 +56,7 @@ typedef std::wstringstream stringstream_t;
#define ucout std::wcout
#define ucin std::wcin
#define ucerr std::wcerr
#define ustrlen wcslen
#else
//
// On POSIX platforms, all strings are narrow
@ -73,6 +74,7 @@ typedef std::stringstream stringstream_t;
#define ucout std::cout
#define ucin std::cin
#define ucerr std::cerr
#define ustrlen strlen
#endif // endif _UTF16_STRINGS
#ifndef _TURN_OFF_PLATFORM_STRING

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

@ -18,7 +18,10 @@
#if defined(_MSC_VER)
#pragma warning(disable : 4127) // allow expressions like while(true) pass
#pragma warning( disable : 4365 )
#pragma warning( disable : 4061 )
#endif
using namespace web;
using namespace web::json;
using namespace utility::conversions;

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

@ -25,6 +25,11 @@ using namespace web;
using namespace web::json;
using namespace utility::conversions;
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( push )
#pragma warning( disable : 4365 )
#endif
//
// JSON Serialization
//
@ -261,3 +266,7 @@ utility::string_t json::value::serialize() const
#endif
return m_value->to_string();
}
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( pop )
#endif

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

@ -31,6 +31,7 @@ using namespace utility::conversions;
#pragma warning( push )
#pragma warning( disable : 26444 ) // ignore various unnamed objects
#pragma warning( disable : 26812 ) // enum instead of enum class
#pragma warning( disable : 4365 )
#endif
namespace web { namespace details

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

@ -376,7 +376,7 @@ typedef struct XblAchievement
_Field_z_ const char* id;
/// <summary>
/// The UTF-8 encoded ID of the service configuration set associated with the achievement.
/// The Service Configuration ID (SCID) that is associated with the achievement. The SCID is considered case sensitive so paste it directly from the Partner Center
/// </summary>
_Field_z_ const char* serviceConfigurationId;
@ -467,7 +467,7 @@ typedef struct XblAchievement
XblAchievementReward* rewards;
/// <summary>
/// The size of **rewards**>.
/// The size of **rewards**.
/// </summary>
size_t rewardsCount;
@ -535,12 +535,12 @@ typedef struct XblAchievementUnlockEvent
_Field_z_ const char* deepLink;
/// <summary>
/// The ratio of the count of users who have unlocked the achievement / the total number unique users of that title expressed as a float value >= 0.0 and <= 100.0 rounded to 2 decimal places.
/// The ratio of the count of users who have unlocked the achievement / the total number unique users of that title expressed as a fractional value &gt;= 0.0 and &lt;= 1.0 rounded to 2 decimal places.
/// </summary>
float rarityPercentage;
/// <summary>
/// "Rare" or "Common" - where Rare achievements are those with a rarityPercentage < 10% and "Common" is everything else. (This string is not localized).
/// "Rare" or "Common" - where Rare achievements are those with a rarityPercentage &lt;= 9% (or 0.9) and "Common" is everything else. (This string is not localized).
/// </summary>
XblAchievementRarityCategory rarityCategory;
@ -557,7 +557,7 @@ typedef struct XblAchievementUnlockEvent
/// </summary>
/// <remarks>
/// This handle is used by other APIs to get the achievement objects and to get the
/// next page of achievements from the service if there is is one.
/// next page of achievements from the service if there is one.
/// The handle must be closed using <see cref="XblAchievementsResultCloseHandle"/>
/// when the result is no longer needed.
/// </remarks>
@ -594,7 +594,7 @@ STDAPI XblAchievementsResultGetAchievements(
/// Checks if there are more pages of achievements to retrieve from the service.
/// </summary>
/// <param name="resultHandle">Achievement result handle.</param>
/// <param name="hasNext">Passes back True if there are more results to retrieve, false otherwise.</param>
/// <param name="hasNext">Passes back true if there are more results to retrieve, false otherwise.</param>
/// <returns>HRESULT return code for this API operation.</returns>
STDAPI XblAchievementsResultHasNext(
_In_ XblAchievementsResultHandle resultHandle,
@ -716,7 +716,7 @@ STDAPI XblAchievementsUpdateAchievementAsync(
/// <param name="xboxLiveContext">An xbox live context handle created with XblContextCreateHandle.</param>
/// <param name="xboxUserId">The Xbox User ID of the player.</param>
/// <param name="titleId">The title ID.</param>
/// <param name="serviceConfigurationId">The UTF-8 encoded service configuration ID (SCID) for the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="achievementId">The UTF-8 encoded achievement ID as defined by XDP or Dev Center.</param>
/// <param name="percentComplete">The completion percentage of the achievement to indicate progress.
/// Valid values are from 1 to 100. Set to 100 to unlock the achievement.
@ -746,7 +746,7 @@ STDAPI XblAchievementsUpdateAchievementForTitleIdAsync(
/// </summary>
/// <param name="xboxLiveContext">An xbox live context handle created with XblContextCreateHandle.</param>
/// <param name="xboxUserId">The Xbox User ID of the player.</param>
/// <param name="serviceConfigurationId">The UTF-8 encoded service configuration ID (SCID) for the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="achievementId">The UTF-8 encoded unique identifier of the Achievement as defined by XDP or Dev Center.</param>
/// <param name="async">Caller allocated AsyncBlock.</param>
/// <returns>HRESULT return code for this API operation.</returns>
@ -769,7 +769,7 @@ STDAPI XblAchievementsGetAchievementAsync(
/// <param name="async">The same AsyncBlock that passed to XblAchievementsGetAchievementAsync.</param>
/// <param name="result">The achievement result handle.
/// This handle is used by other APIs to get the achievement objects
/// and to get the next page of achievements from the service if there is is one.
/// and to get the next page of achievements from the service if there is one.
/// The handle must be closed using <see cref="XblAchievementsResultCloseHandle"/> when the result is no longer needed.
/// </param>
/// <returns>HRESULT return code for this API operation.</returns>

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

@ -217,8 +217,8 @@ STDAPI XblAchievementsManagerGetAchievement(
/// the result is no longer needed.
/// </param>
/// <remarks>
/// Passing in <see cref="XblAchievementOrderBy::TitleId"/> for sortField yields the same results
/// as passing in <see cref="XblAchievementOrderBy::DefaultOrder"/> since all achievements tracked
/// Passing in XblAchievementOrderBy::TitleId for sortField yields the same results
/// as passing in XblAchievementOrderBy::DefaultOrder since all achievements tracked
/// by achievement manager will have the same TitleId.
/// </remarks>
/// <returns>HRESULT return code for this API operation.</returns>

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

@ -191,7 +191,7 @@ STDAPI XblMatchmakingCreateMatchTicketResult(
/// Deletes a the match ticket on the server.
/// </summary>
/// <param name="xboxLiveContext">Xbox live context for the local user.</param>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="hopperName">The name of the hopper where the match ticket is located.</param>
/// <param name="ticketId">The id of the ticket to delete on the server.</param>
/// <param name="asyncBlock">The AsyncBlock for this operation.</param>
@ -209,7 +209,7 @@ STDAPI XblMatchmakingDeleteMatchTicketAsync(
/// Retrieves the properties of a match ticket from the server.
/// </summary>
/// <param name="xboxLiveContext">Xbox live context for the local user.</param>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="hopperName">The name of the hopper where the match ticket is located.</param>
/// <param name="ticketId">The ticket id of the match ticket to retrieve.</param>
/// <param name="asyncBlock">The AsyncBlock for this operation.</param>
@ -257,7 +257,7 @@ STDAPI XblMatchmakingGetMatchTicketDetailsResult(
/// Gets statistics about a hopper such as how many players are in it.
/// </summary>
/// <param name="xboxLiveContext">Xbox live context for the local user.</param>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="hopperName">The name of the hopper to query stats for.</param>
/// <param name="asyncBlock">The AsyncBlock for this operation.</param>
/// <returns>HRESULT return code for this API operation.</returns>

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

@ -518,7 +518,7 @@ enum class XblMultiplayerSessionMemberStatus : uint32_t
/// <summary>
/// The member is inactive in the current title.
/// The member may be active in another title as specified by ActiveTitleId.
/// If a inactive member doesn't mark themselves as Active within the MemberInactiveTimeout they will be removed from the session.
/// If an inactive member doesn't mark themselves as Active within the MemberInactiveTimeout they will be removed from the session.
/// </summary>
Inactive,
@ -966,7 +966,7 @@ typedef struct XblMultiplayerSessionConstants
uint64_t MemberReservedTimeout;
/// <summary>
/// If a inactive member reservation does not become active within this timeout, then inactive member is removed from the session.
/// If an inactive member reservation does not become active within this timeout, then the inactive member is removed from the session.
/// </summary>
uint64_t MemberInactiveTimeout;
@ -1110,7 +1110,7 @@ typedef struct XblMultiplayerSessionReferenceUri
/// <summary>
/// Creates an XblMultiplayerSessionReference from a scid, session template name, and session name.
/// </summary>
/// <param name="scid">The service configuration id that the session is a part of.</param>
/// <param name="scid">The Service Configuration ID (SCID) that the session is a part of. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="sessionTemplateName">The session template name.</param>
/// <param name="sessionName">The session name.</param>
/// <returns>A reference to the multiplayer session that was created.</returns>
@ -1792,7 +1792,7 @@ typedef struct XblMultiplayerSessionInfo
time_t StartTime;
/// <summary>
/// If any timeouts are in progress, this is the date when the the next timer will fire.
/// If any timeouts are in progress, this is the date when the next timer will fire.
/// </summary>
time_t NextTimer;
@ -2009,6 +2009,7 @@ typedef struct XblMultiplayerSessionNumberAttribute
{
/// <summary>
/// Name of the attribute.
/// Attribute names be lower-case alphanumeric, and start with a letter.
/// </summary>
char name[XBL_MULTIPLAYER_SEARCH_HANDLE_MAX_FIELD_LENGTH];
@ -2141,7 +2142,7 @@ STDAPI_(XblMultiplayerSessionChangeTypes) XblMultiplayerSessionSubscribedChangeT
) XBL_NOEXCEPT;
/// <summary>
/// Host candidates are a ordered list of device tokens, ordered by preference as specified by XblMultiplayerMetrics
/// Host candidates are an ordered list of device tokens, ordered by preference as specified by XblMultiplayerMetrics
/// in the session constants.
/// </summary>
/// <param name="handle">Handle to the multiplayer session.</param>
@ -2784,7 +2785,7 @@ STDAPI XblMultiplayerSessionLeave(
/// <param name="status">Indicates the current user status.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// You cannot set the the user to reserved or ready in this manner.
/// You cannot set the user to reserved or ready in this manner.
/// Use <see cref="XblMultiplayerSessionAddMemberReservation"/> to add a member reservation.
/// </remarks>
STDAPI XblMultiplayerSessionCurrentUserSetStatus(
@ -2838,7 +2839,7 @@ typedef struct XblFormattedSecureDeviceAddress
/// </remarks>
STDAPI XblFormatSecureDeviceAddress(
_In_ const char* deviceId,
_Out_ XblFormattedSecureDeviceAddress* address
_Inout_ XblFormattedSecureDeviceAddress* address
) XBL_NOEXCEPT;
#endif
@ -3194,8 +3195,10 @@ STDAPI XblMultiplayerSearchHandleGetCustomSessionPropertiesJson(
/// <param name="async">The AsyncBlock for this operation.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// Call XblMultiplayerWriteSessionResult() to get the result.
/// Call XblMultiplayerSessionWriteStatus() to get the write status.
/// In the async callback, call XblMultiplayerWriteSessionResult() to get a XblMultiplayerSessionHandle handle.
/// Use that handle to call XblMultiplayerSessionWriteStatus() to get the write status.
/// The call to XblMultiplayerWriteSessionAsync() will only fail if the args passed to it are invalid or in very rare
/// cases where it could not start the async task.
/// </remarks>
/// <rest>Calls V105 PUT /serviceconfigs/{serviceConfigurationId}/sessionTemplates/{sessiontemplateName}/sessions/{sessionName}</rest>
STDAPI XblMultiplayerWriteSessionAsync(
@ -3210,13 +3213,20 @@ STDAPI XblMultiplayerWriteSessionAsync(
/// </summary>
/// <param name="async">The AsyncBlock for this operation.</param>
/// <param name="handle">Passes back a handle to a new instance of a local multiplayer session object.
/// It must be release by the caller with <see cref="XblMultiplayerSessionCloseHandle"/>.
/// The XblMultiplayerSessionHandle must be released by the caller by calling <see cref="XblMultiplayerSessionCloseHandle"/>.
/// Use XblMultiplayerSession* APIs to get session data from the handle.
/// If the updated session object is not needed, passing nullptr will cause the new multiplayer
/// session object to be cleaned up immediately.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// session object to be cleaned up immediately.
/// </param>
/// <returns>HRESULT return code for this API operation.
/// It will be a failure HRESULT if there was a network error or failure HTTP status code unless its a 412 (Precondition Failed).
/// A 412 returns success since the service also returns latest session state, so you must call XblMultiplayerSessionWriteStatus() to get the
/// write status and call XblMultiplayerSession* APIs to get session data from the handle.
/// </returns>
/// <remarks>
/// Note that if you leave a session that you are the the last member of and the sessionEmptyTimeout
/// Note that if you leave a session that you are the last member of and the sessionEmptyTimeout
/// is equal to 0, then the session will be deleted immediately.
/// Call XblMultiplayerSessionWriteStatus() to get the write status.
/// </remarks>
STDAPI XblMultiplayerWriteSessionResult(
_Inout_ XAsyncBlock* async,
@ -3257,7 +3267,7 @@ STDAPI XblMultiplayerWriteSessionByHandleAsync(
/// If the updated session object is not needed, passing nullptr will cause the new multiplayer session object to be cleaned up immediately.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// Note that if you leave a session that you are the the last member of and the sessionEmptyTimeout
/// Note that if you leave a session that you are the last member of and the sessionEmptyTimeout
/// is equal to 0, then the session will be deleted immediately and a nullptr will be returned.
/// </remarks>
STDAPI XblMultiplayerWriteSessionByHandleResult(
@ -3379,7 +3389,7 @@ STDAPI XblMultiplayerSetActivityAsync(
/// Clears the user's current activity session for the specified serviceConfigurationId.
/// </summary>
/// <param name="xblContext">Xbox live context for the local user.</param>
/// <param name="scid">A string containing the serviceConfigurationId in which to clear activity.</param>
/// <param name="scid">The Service Configuration ID (SCID) in which to clear activity. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="async">The AsyncBlock for this operation.</param>
/// <returns>HRESULT return code for this API operation.</returns>
STDAPI XblMultiplayerClearActivityAsync(
@ -3483,7 +3493,7 @@ STDAPI XblMultiplayerDeleteSearchHandleAsync(
/// Search for sessions by their associated search handles.
/// </summary>
/// <param name="xblContext">Xbox live context for the local user.</param>
/// <param name="scid">The scid within which to query for search handles.</param>
/// <param name="scid">The Service Configuration ID (SCID) within which to query for search handles. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="sessionTemplateName">The name of the template to query for search handles.</param>
/// <param name="orderByAttribute">This specifies the attribute to sort the search handles by. Pass empty string to default to ordering by 'Timestamp asc'.</param>
/// <param name="orderAscending">Pass true to order ascending, false to order descending.</param>
@ -3595,7 +3605,7 @@ STDAPI XblMultiplayerSendInvitesAsync(
/// </summary>
/// <param name="async">The AsyncBlock for this operation.</param>
/// <param name="handlesCount">The number of handles in the handles array. Size should be equal to the number of invites requested.</param>
/// <param name="handles">A caller allocated array to pass back the invite handle results
/// <param name="handles">A caller allocated array to pass back the invite handle results.
/// The handle ID strings corresponding to the invites that have been sent.</param>
/// <returns>HRESULT return code for this API operation.</returns>
STDAPI XblMultiplayerSendInvitesResult(
@ -3609,7 +3619,7 @@ STDAPI XblMultiplayerSendInvitesResult(
/// Queries for the current activity for a socialgroup of users associated with a particular "owner" user.
/// </summary>
/// <param name="xboxLiveContext">Xbox live context for the local user.</param>
/// <param name="scid">The scid within which to query for activities.</param>
/// <param name="scid">The Service Configuration ID (SCID) within which to query for activities. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="socialGroupOwnerXuid">The person whose social group will be used for the query.</param>
/// <param name="socialGroup">The social group to use in order to get the list of users. (e.g. "people" or "favorites")</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -3629,7 +3639,7 @@ STDAPI XblMultiplayerGetActivitiesForSocialGroupAsync(
/// Queries for the current activity for a socialgroup of users associated with a particular "owner" user.
/// </summary>
/// <param name="xboxLiveContext">Xbox live context for the local user.</param>
/// <param name="scid">The scid within which to query for activities.</param>
/// <param name="scid">The Service Configuration ID (SCID) within which to query for activities. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="socialGroupOwnerXuid">The person whose social group will be used for the query.</param>
/// <param name="socialGroup">The social group to use in order to get the list of users. (e.g. "people" or "favorites")</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -3705,7 +3715,7 @@ STDAPI XblMultiplayerGetActivitiesWithPropertiesForSocialGroupResult(
/// Queries for the current activity for a set of users specified by xuid.
/// </summary>
/// <param name="xblContext">Xbox live context for the local user.</param>
/// <param name="scid">The scid within which to query for activities.</param>
/// <param name="scid">The Service Configuration ID (SCID) within which to query for activities. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="xuids">The list of user ids to find activities for.</param>
/// <param name="xuidsCount">The size of the xuids array.</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -3725,7 +3735,7 @@ STDAPI XblMultiplayerGetActivitiesForUsersAsync(
/// Queries for the current activity for a set of users specified by xuid.
/// </summary>
/// <param name="xblContext">Xbox live context for the local user.</param>
/// <param name="scid">The scid within which to query for activities.</param>
/// <param name="scid">The Service Configuration ID (SCID) within which to query for activities. The SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="xuids">The list of user ids to find activities for.</param>
/// <param name="xuidsCount">The size of the xuids array.</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -3838,7 +3848,7 @@ typedef void CALLBACK XblMultiplayerSessionChangedHandler(
/// <summary>
/// Registers an event handler for notifications when a multiplayer session changes. If the RTA subscription has not
/// been explicitly enabled with <see cref="XblMultiplayerSetSubscriptionsEnabled">, adding session changed handlers will
/// been explicitly enabled with <see cref="XblMultiplayerSetSubscriptionsEnabled" />, adding session changed handlers will
/// enable it automatically. Use the returned XblFunctionContext to unregister the handler.
/// </summary>
/// <param name="xblContext">Xbox live context for the local user.</param>

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

@ -977,7 +977,7 @@ STDAPI_(const char*) XblMultiplayerManagerGameSessionCorrelationId() XBL_NOEXCEP
/// Object containing identifying information for the session.
/// Returns null if a game session has not yet been established.
/// </summary>
/// <returns>A pointer to the the multiplayer session reference.
/// <returns>A pointer to the multiplayer session reference.
/// The memory for the returned string pointer remains valid until the next call to XblMultiplayerManagerDoWork.</returns>
STDAPI_(const XblMultiplayerSessionReference*) XblMultiplayerManagerGameSessionSessionReference() XBL_NOEXCEPT;

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

@ -663,7 +663,7 @@ STDAPI_XBL_DEPRECATED XblPresenceUnsubscribeFromDevicePresenceChange(
/// <summary>
/// Subscribes to title presence change notifications.
/// DEPRECATED. This API will be removed in a future release. Individual RTA subscription will be managed automatically by XSAPI as
/// titles are tracked with <see cref="XblPresenceTrackTitles"/>.
/// titles are tracked with <see cref="XblPresenceTrackAdditionalTitles"/>.
/// </summary>
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xuid">The Xbox User ID of the person of the subscription.</param>
@ -750,7 +750,7 @@ typedef void CALLBACK XblPresenceTitlePresenceChangedHandler(
/// <summary>
/// Registers an event handler for title presence change notifications. Notifications will
/// only be received for the Users and Titles configured with <see cref="XblPresenceTrackUsers"/> and <see cref="XblPresenceTrackTitles"/>
/// only be received for the Users and Titles configured with <see cref="XblPresenceTrackUsers"/> and <see cref="XblPresenceTrackAdditionalTitles"/>
/// respectively.
/// </summary>
/// <param name="xblContextHandle">Xbox live context for the local user.</param>

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

@ -264,7 +264,7 @@ typedef struct XblSocialRelationshipChangeEventArgs
/// </summary>
/// <remarks>
/// This handle is used by other APIs to get the social relationship objects and to get
/// the next page of results from the service if there is is one.
/// the next page of results from the service if there is one.
/// The handle must be closed using <see cref="XblSocialRelationshipResultCloseHandle"/> when the result is no longer needed.
/// </remarks>
typedef struct XblSocialRelationshipResult* XblSocialRelationshipResultHandle;

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

@ -261,7 +261,7 @@ typedef struct XblSocialManagerPresenceTitleRecord
XblPresenceDeviceType deviceType;
/// <summary>
/// Whether or not this is the primary primary presence record.
/// Whether or not this is the primary presence record.
/// </summary>
bool isPrimary;
} XblSocialManagerPresenceTitleRecord;
@ -515,7 +515,7 @@ typedef const XblSocialManagerUser* const* XblSocialManagerUserPtrArray;
/// </remarks>
STDAPI XblSocialManagerUserGroupGetUsers(
_In_ XblSocialManagerUserGroupHandle group,
_Outptr_ XblSocialManagerUserPtrArray* users,
_Outptr_result_maybenull_ XblSocialManagerUserPtrArray* users,
_Out_ size_t* usersCount
) XBL_NOEXCEPT;
@ -537,7 +537,7 @@ STDAPI XblSocialManagerUserGroupGetUsers(
/// </remarks>
STDAPI XblSocialManagerUserGroupGetUsersTrackedByGroup(
_In_ XblSocialManagerUserGroupHandle group,
_Outptr_ const uint64_t** trackedUsers,
_Outptr_result_maybenull_ const uint64_t** trackedUsers,
_Out_ size_t* trackedUsersCount
) XBL_NOEXCEPT;

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

@ -237,7 +237,7 @@ STDAPI_(void) XblTitleStorageBlobMetadataResultCloseHandle(
/// Gets title storage quota information for the specified service configuration and storage type.
/// </summary>
/// <param name="xboxLiveContext">An xbox live context handle created with XblContextCreateHandle.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="storageType">The storage type to get quota information for.</param>
/// <param name="async">Caller allocated AsyncBlock.</param>
/// <returns>HRESULT return code for this API operation.</returns>
@ -275,7 +275,7 @@ STDAPI XblTitleStorageGetQuotaResult(
/// Gets a list of blob metadata objects under a given path for the specified service configuration, storage type and storage ID.
/// </summary>
/// <param name="xboxLiveContext">An xbox live context handle created with XblContextCreateHandle.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="storageType">The storage type to get blob metadata objects for.</param>
/// <param name="blobPath">The root path to enumerate. Results will be for blobs contained in this path and all subpaths. (Optional)</param>
/// <param name="xboxUserId">The Xbox User ID of the title storage to enumerate. Ignored when enumerating GlobalStorage, so passing 0 is acceptable. (Optional)</param>

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

@ -130,7 +130,7 @@ typedef struct XblStatisticChangeEventArgs
/// </summary>
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserId">The Xbox User ID of the player to get statistics for.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticName">The name of the statistic to return.</param>
/// <param name="async">The AsyncBlock for this operation.</param>
/// <returns>HRESULT return code for this API operation.</returns>
@ -182,7 +182,7 @@ STDAPI XblUserStatisticsGetSingleUserStatisticResult(
/// </summary>
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserId">The Xbox User ID of the player to get statistics for.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticNames">A collection of statistic names to lookup.</param>
/// <param name="statisticNamesCount">The number of statistic names.</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -239,7 +239,7 @@ STDAPI XblUserStatisticsGetSingleUserStatisticsResult(
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserIds">A list of the user Xbox user IDs to get stats for.</param>
/// <param name="xboxUserIdsCount">The number of Xbox user IDs.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticNames">A collection of statistic names to lookup.</param>
/// <param name="statisticNamesCount">The number of statistic names.</param>
/// <param name="async">The AsyncBlock for this operation.</param>
@ -361,7 +361,7 @@ STDAPI XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfiguration
/// </summary>
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserId">The Xbox User ID of the player requesting the subscription.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticName">The name of the statistic to subscribe to.</param>
/// <param name="subscriptionHandle">Passes back an XblRealTimeActivitySubscriptionHandle object that contains the state of the subscription.
/// You can register an event handler for statistic changes by calling XblUserStatisticsAddStatisticChangedHandler().</param>
@ -432,7 +432,7 @@ STDAPI_(void) XblUserStatisticsRemoveStatisticChangedHandler(
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserIds">Array of XboxUserIDs for whom to track the provided stats.</param>
/// <param name="xboxUserIdsCount">Length of xboxUserIds array.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticNames">Array of statistic names for which real-time updates will be received.</param>
/// <param name="statisticNamesCount">Length of statisticNames array.</param>
/// <returns>HRESULT return code for this API operation.</returns>
@ -456,7 +456,7 @@ STDAPI XblUserStatisticsTrackStatistics(
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
/// <param name="xboxUserIds">Array of XboxUserIDs for whom to stop tracking the provided stats.</param>
/// <param name="xboxUserIdsCount">Length of xboxUserIds array.</param>
/// <param name="serviceConfigurationId">The service configuration ID (SCID) of the title.</param>
/// <param name="serviceConfigurationId">The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.</param>
/// <param name="statisticNames">Array of statistic names for which real-time updates are no longer needed.</param>
/// <param name="statisticNamesCount">Length of statisticNames array.</param>
/// <returns>HRESULT return code for this API operation.</returns>

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

@ -53,7 +53,7 @@ STDAPI XblContextSettingsSetLongHttpTimeout(
/// The default for http_timeout_window is 20 seconds and can be changed using XblContextSettingsSetHttpTimeoutWindow.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// If the service returns an an HTTP error with a "Retry-After" header, then all future calls to that API will
/// If the service returns an HTTP error with a "Retry-After" header, then all future calls to that API will
/// immediately fail with the original error without contacting the service until the "Retry-After" time has been reached.
/// <br/>
/// Idempotent service calls are retried when a network error occurs or the server responds with one of these HTTP status codes:<br/>
@ -74,7 +74,7 @@ STDAPI XblContextSettingsGetHttpRetryDelay(
/// </summary>
/// <param name="context">Xbox live context that the settings are associated with.</param>
/// <param name="delayInSeconds">The retry delay in seconds.
/// Retries are delayed using a exponential back off.
/// Retries are delayed using an exponential back off.
/// By default, it will delay 2 seconds then the next retry will delay 4 seconds, then 8 seconds,
/// and so on up to a max of 1 min until either the call succeeds or the http_timeout_window
/// is reached, at which point the call will fail.
@ -82,7 +82,7 @@ STDAPI XblContextSettingsGetHttpRetryDelay(
/// The default for http_timeout_window is 20 seconds and can be changed using XblContextSettingsSetHttpTimeoutWindow.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// If the service returns an an HTTP error with a "Retry-After" header, then all future calls to that API will
/// If the service returns an HTTP error with a "Retry-After" header, then all future calls to that API will
/// immediately fail with the original error without contacting the service until the "Retry-After" time has been reached.
/// <br/>
/// Idempotent service calls are retried when a network error occurs or the server responds with one of these HTTP status codes:<br/>

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

@ -90,7 +90,7 @@ STDAPI XblMemSetFunctions(
/// </summary>
/// <param name="memAllocFunc">Set to the current allocation callback.
/// Returns the default routine if not previously set.</param>
/// <param name="memFreeFunc">Set to the to the current memory free callback.
/// <param name="memFreeFunc">Set to the current memory free callback.
/// Returns the default routine if not previously set.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
@ -120,7 +120,9 @@ typedef struct XblInitArgs
#if !(HC_PLATFORM == HC_PLATFORM_XDK || HC_PLATFORM == HC_PLATFORM_UWP)
/// <summary>
/// The service configuration Id for the app.
/// The Service Configuration ID (SCID) for the app.
/// You can find it on Partner Center in the Game Setup page under Identity details.
/// This string is considered case sensitive so paste it directly from the Partner Center
/// </summary>
_Field_z_ const char* scid;
@ -270,7 +272,7 @@ enum class XblConfigSetting : uint32_t
/// <param name="setting">The config settings value to be passed down.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>
/// The asserts will not fire in RETAIL sandbox, and this setting has has no affect in RETAIL sandboxes.
/// The asserts will not fire in RETAIL sandbox, and this setting has no affect in RETAIL sandboxes.
/// It is best practice to not call this API, and instead adjust the calling pattern but this is provided
/// as a temporary way to get unblocked while in early stages of game development.
/// </remarks>
@ -279,9 +281,9 @@ STDAPI_(void) XblDisableAssertsForXboxLiveThrottlingInDevSandboxes(
) XBL_NOEXCEPT;
/// <summary>
/// For advanced scenarios where a common scid and title Id are needed for cross platform experiences.
/// For advanced scenarios where a common Service Configuration ID (SCID) and title Id are needed for cross platform experiences.
/// </summary>
/// <param name="overrideScid">Override scid to be used by multiplayer manager.</param>
/// <param name="overrideScid">Override Service Configuration ID (SCID) to be used by multiplayer manager. This SCID is considered case sensitive so paste it directly from the Partner Center</param>
/// <param name="overrideTitleId">Override title Id to be used by multiplayer manager.</param>
/// <returns>HRESULT return code for this API operation.</returns>
/// <remarks>

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

@ -298,12 +298,18 @@ bool achievement::is_revoked() const
achievements_result::achievements_result(XblAchievementsResultHandle handle)
{
XblAchievementsResultDuplicateHandle(handle, &m_handle);
if (handle != nullptr)
{
XblAchievementsResultDuplicateHandle(handle, &m_handle);
}
}
achievements_result::achievements_result(const achievements_result& other)
{
XblAchievementsResultDuplicateHandle(other.m_handle, &m_handle);
if (other.m_handle != nullptr)
{
XblAchievementsResultDuplicateHandle(other.m_handle, &m_handle);
}
}
achievements_result& achievements_result::operator=(achievements_result other)

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

@ -307,12 +307,14 @@ void http_call::set_request_body(
_In_ const string_t& value
)
{
XblHttpCallRequestSetRequestBodyString(m_callHandle, Utils::StringFromStringT(value).c_str());
auto convertedValue = Utils::StringFromStringT(value);
XblHttpCallRequestSetRequestBodyString(m_callHandle, convertedValue.c_str());
}
void http_call::set_request_body( _In_ const web::json::value& value )
{
XblHttpCallRequestSetRequestBodyString(m_callHandle, Utils::StringFromStringT(value.serialize()).c_str());
auto convertedValue = Utils::StringFromStringT(value.serialize());
XblHttpCallRequestSetRequestBodyString(m_callHandle, convertedValue.c_str());
}
void http_call::set_request_body(
@ -331,10 +333,13 @@ void http_call::set_custom_header(
_In_ const string_t& Value
)
{
const auto headerName = Utils::StringFromStringT(Name);
const auto headerValue = Utils::StringFromStringT(Value);
XblHttpCallRequestSetHeader(
m_callHandle,
Utils::StringFromStringT(Name).c_str(),
Utils::StringFromStringT(Value).c_str(),
headerName.c_str(),
headerValue.c_str(),
false
);
}

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

@ -295,7 +295,7 @@ struct Utils
{
if (jsonString)
{
return web::json::value::parse(StringTFromUtf8(jsonString));
return web::json::value::parse(Utils::StringTFromUtf8(jsonString));
}
}
catch (web::json::json_exception)

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

@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#pragma once
#include "public_utils.h"
NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN
#if HC_PLATFORM_IS_MICROSOFT
std::shared_ptr<service_call_logging_config> service_call_logging_config::get_singleton_instance()
{
static std::shared_ptr<service_call_logging_config> s_instance = std::shared_ptr<service_call_logging_config>(new service_call_logging_config);
return s_instance;
}
void service_call_logging_config::enable() {}
void service_call_logging_config::disable() {}
#if HC_PLATFORM == HC_PLATFORM_XDK || HC_PLATFORM == HC_PLATFORM_UWP || XSAPI_UNIT_TESTS
void service_call_logging_config::_Register_for_protocol_activation() {}
#endif
#endif
NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_END

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

@ -0,0 +1,104 @@
// Copyright (c) Microsoft Corporation
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#pragma once
#include "public_utils.h"
NAMESPACE_MICROSOFT_XBOX_SERVICES_SYSTEM_CPP_BEGIN
std::shared_ptr<xbox_live_services_settings> xbox_live_services_settings::get_singleton_instance(_In_ bool createIfRequired)
{
UNREFERENCED_PARAMETER(createIfRequired);
static std::shared_ptr<xbox_live_services_settings> instance = std::shared_ptr<xbox_live_services_settings>(new xbox_live_services_settings);
return instance;
}
void xbox_live_services_settings::set_memory_allocation_hooks(
_In_ const std::function<_Ret_maybenull_ _Post_writable_byte_size_(dwSize) void*(_In_ size_t dwSize)>& memAllocHandler,
_In_ const std::function<void(_In_ void* pAddress)>& memFreeHandler
)
{
static std::function<void*(size_t)> allocHook{ nullptr };
static std::function<void(void*)> freeHook{ nullptr };
if (memAllocHandler != nullptr && memFreeHandler != nullptr)
{
allocHook = memAllocHandler;
freeHook = memFreeHandler;
XblMemSetFunctions(
[](size_t size, HCMemoryType)
{
return allocHook(size);
},
[](void* pointer, HCMemoryType)
{
freeHook(pointer);
}
);
}
else if (memAllocHandler == nullptr && memFreeHandler == nullptr)
{
XblMemSetFunctions(nullptr, nullptr);
}
}
function_context xbox_live_services_settings::add_logging_handler(
std::function<void(xbox_services_diagnostics_trace_level, const std::string&, const std::string&)> handler
)
{
UNREFERENCED_PARAMETER(handler);
return function_context{};
}
void xbox_live_services_settings::remove_logging_handler(_In_ function_context context)
{
UNREFERENCED_PARAMETER(context);
}
xbox_services_diagnostics_trace_level xbox_live_services_settings::diagnostics_trace_level() const
{
HCTraceLevel traceLevel{};
HCSettingsGetTraceLevel(&traceLevel);
switch (traceLevel)
{
case HCTraceLevel::Off: return xbox_services_diagnostics_trace_level::off;
case HCTraceLevel::Error: return xbox_services_diagnostics_trace_level::error;
case HCTraceLevel::Warning: return xbox_services_diagnostics_trace_level::warning;
case HCTraceLevel::Important: return xbox_services_diagnostics_trace_level::info;
case HCTraceLevel::Verbose: return xbox_services_diagnostics_trace_level::verbose;
default: return xbox_services_diagnostics_trace_level::off;
}
}
void xbox_live_services_settings::set_diagnostics_trace_level(_In_ xbox_services_diagnostics_trace_level value)
{
HCTraceLevel traceLevel{ HCTraceLevel::Off };
switch (value)
{
case xbox_services_diagnostics_trace_level::off: traceLevel = HCTraceLevel::Off; break;
case xbox_services_diagnostics_trace_level::error: traceLevel = HCTraceLevel::Error; break;
case xbox_services_diagnostics_trace_level::warning: traceLevel = HCTraceLevel::Warning; break;
case xbox_services_diagnostics_trace_level::info: traceLevel = HCTraceLevel::Information; break;
case xbox_services_diagnostics_trace_level::verbose: traceLevel = HCTraceLevel::Verbose; break;
default: break;
}
HCSettingsSetTraceLevel(traceLevel);
}
function_context xbox_live_services_settings::add_wns_handler(_In_ const std::function<void(const xbox_live_wns_event_args&)>& handler)
{
UNREFERENCED_PARAMETER(handler);
return function_context{};
}
void xbox_live_services_settings::remove_wns_handler(_In_ function_context context)
{
UNREFERENCED_PARAMETER(context);
}
NAMESPACE_MICROSOFT_XBOX_SERVICES_SYSTEM_CPP_END

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

@ -252,7 +252,7 @@ enum class multiplayer_session_member_status
/// <summary>
/// The member is inactive in the current title.
/// The member may be active in another title as specified by ActiveTitleId.
/// If a inactive member doesn't mark themselves as Active within the MemberInactiveTimeout they will be removed from the session.
/// If an inactive member doesn't mark themselves as Active within the MemberInactiveTimeout they will be removed from the session.
/// </summary>
inactive,
@ -741,7 +741,7 @@ public:
inline std::chrono::milliseconds member_reserved_time_out() const;
/// <summary>
/// If a inactive member reservation does not become active within this timeout, then inactive member is removed from the session.
/// If an inactive member reservation does not become active within this timeout, then the inactive member is removed from the session.
/// </summary>
inline std::chrono::milliseconds member_inactive_timeout() const;
@ -1689,7 +1689,7 @@ public:
inline utility::datetime start_time() const;
/// <summary>
/// If any timeouts are in progress, this is the date when the the next timer will fire.
/// If any timeouts are in progress, this is the date when the next timer will fire.
/// </summary>
inline utility::datetime date_of_next_timer() const;
@ -1727,7 +1727,7 @@ public:
inline multiplayer_session_change_types subscribed_change_types() const;
/// <summary>
/// Host candidates are a ordered list of device tokens, ordered by preference as specified by MultiplayerSessionConstants::PeerToHostRequirements::HostSelectionMetric.
/// Host candidates are an ordered list of device tokens, ordered by preference as specified by MultiplayerSessionConstants::PeerToHostRequirements::HostSelectionMetric.
/// </summary>
inline std::vector<string_t> host_candidates() const;
@ -2085,7 +2085,7 @@ public:
/// Call multiplayer_service::write_session after this to write batched local changes to the service.
/// If this is called without multiplayer_service::write_session, this will only change the local session object but does not commit it to the service.
/// Set the current user to active or inactive.
/// You cannot set the the user to reserved or ready in this manner.
/// You cannot set the user to reserved or ready in this manner.
/// Use AddMemberReservation() to add a member reservation.
/// The member must first be joined to the session.
/// </summary>

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

@ -12,34 +12,34 @@ class service_call_logging_config
public:
/// <summary>
/// Gets the service_call_logger singleton instance
/// Deprecated. Service call logging feature is no longer supported.
/// </summary>
static std::shared_ptr<service_call_logging_config> get_singleton_instance();
_XSAPICPP_DEPRECATED inline static std::shared_ptr<service_call_logging_config> get_singleton_instance();
/// <summary>
/// Enables the tracking of service calls
/// Deprecated. Service call logging feature is no longer supported.
/// </summary>
void enable();
_XSAPICPP_DEPRECATED inline void enable();
/// <summary>
/// Disables the tracking of service calls
/// Deprecated. Service call logging feature is no longer supported.
/// </summary>
void disable();
_XSAPICPP_DEPRECATED inline void disable();
#if HC_PLATFORM == HC_PLATFORM_XDK || HC_PLATFORM == HC_PLATFORM_UWP || XSAPI_UNIT_TESTS
/// <summary>
/// Internal API
/// Enables Logs to be enabled/disabled through protocol activation
/// Deprecated
/// </summary>
void _Register_for_protocol_activation();
_XSAPICPP_DEPRECATED inline void _Register_for_protocol_activation();
#endif
private:
service_call_logging_config();
service_call_logging_config(const service_call_logging_config&);
void operator=(const service_call_logging_config&);
friend struct ::XblContext;
service_call_logging_config() = default;
service_call_logging_config(const service_call_logging_config&) = delete;
void operator=(const service_call_logging_config&) = delete;
};
#endif // HC_PLATFORM_IS_MICROSOFT
NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_END
#include "impl/service_call_logging_config.hpp"

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

@ -34,14 +34,6 @@ NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN
/// </summary>
namespace system {
// Forward declaration
class sign_out_completed_event_args;
class user_impl;
class token_and_signature_result_internal;
class user_factory;
class xbox_live_server_impl;
class auth_config;
class xbox_live_wns_event_args
{
public:
@ -85,15 +77,12 @@ NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN
/// <summary>
/// Gets the singleton instance
/// </summary>
static std::shared_ptr<xbox_live_services_settings> get_singleton_instance(_In_ bool createIfRequired = true);
inline static std::shared_ptr<xbox_live_services_settings> get_singleton_instance(_In_ bool createIfRequired = true);
/// <summary>
/// Used by titles to register memory allocation hooks that are used by XSAPI when it
/// needs to allocate a large block of memory such as SocialManager which uses a large block
/// of memory to keep track of the friends list.
///
/// Note that not all memory that XSAPI uses goes through this allocator (for example std::string),
/// but these allocations are typically small and transient.
/// </summary>
/// <param name="memAllocHandler">The title's allocation function. Input is size of memory block that's being requested. Return is pointer to the allocated memory block</param>
/// <param name="memFreeHandler">The title's memory free function. Input is address of memory to free</param>
@ -103,86 +92,48 @@ NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN
/// It is important to provide an implementation for both memAllocHandler and memFreeHandler if you hook them;
/// hooking only one of them will be considered an error.
/// </remarks>
static void set_memory_allocation_hooks(
inline static void set_memory_allocation_hooks(
_In_ const std::function<_Ret_maybenull_ _Post_writable_byte_size_(dwSize) void*(_In_ size_t dwSize)>& memAllocHandler,
_In_ const std::function<void(_In_ void* pAddress)>& memFreeHandler
);
/// <summary>
/// Registers to receive logging messages for levels that are enabled. Event handlers will receive the level, category, and content of the message.
/// Deprecated. XSAPI is using libHttpClient logging. A logging handler can be added using HCTraceSetClientCallback.
/// </summary>
/// <param name="handler">The event handler function to call.</param>
/// <returns>
/// A function_context object that can be used to unregister the event handler.
/// </returns>
function_context add_logging_handler(_In_ std::function<void(xbox_services_diagnostics_trace_level, const std::string&, const std::string&)> handler);
_XSAPICPP_DEPRECATED inline function_context add_logging_handler(_In_ std::function<void(xbox_services_diagnostics_trace_level, const std::string&, const std::string&)> handler);
/// <summary>
/// Unregisters from receiving logging messages.
/// Deprecated. See above.
/// </summary>
/// <param name="context">The function_context object that was returned when the event handler was registered. </param>
void remove_logging_handler(_In_ function_context context);
_XSAPICPP_DEPRECATED inline void remove_logging_handler(_In_ function_context context);
/// <summary>
/// Indicates the level of debug messages to send to the debugger's Output window.
/// </summary>
xbox_services_diagnostics_trace_level diagnostics_trace_level() const;
inline xbox_services_diagnostics_trace_level diagnostics_trace_level() const;
/// <summary>
/// Sets the level of debug messages to send to the debugger's Output window.
/// </summary>
void set_diagnostics_trace_level(_In_ xbox_services_diagnostics_trace_level value);
inline void set_diagnostics_trace_level(_In_ xbox_services_diagnostics_trace_level value);
/// <summary>
/// Registers to receive Windows Push Notification Service(WNS) events. Event handlers will receive the xbox user id and notification type.
/// Deprecated. Registering WNS callbacks though XSAPI is no longer supported.
/// </summary>
/// <param name="handler">The event handler function to call.</param>
/// <returns>
/// A function_context object that can be used to unregister the event handler.
/// </returns>
function_context add_wns_handler(_In_ const std::function<void(const xbox_live_wns_event_args&)>& handler);
_XSAPICPP_DEPRECATED inline function_context add_wns_handler(_In_ const std::function<void(const xbox_live_wns_event_args&)>& handler);
/// <summary>
/// Unregisters from receiving Windows Push Notification Service(WNS) events.
/// Deprecated. Registering WNS callbacks though XSAPI is no longer supported.
/// </summary>
/// <param name="context">The function_context object that was returned when the event handler was registered. </param>
void remove_wns_handler(_In_ function_context context);
/// <summary>
/// Internal function
/// </summary>
void _Raise_logging_event(_In_ xbox_services_diagnostics_trace_level level, _In_ const std::string& category, _In_ const std::string& message);
/// <summary>
/// Internal function
/// </summary>
void _Raise_wns_event(_In_ const string_t& xbox_user_id, _In_ const string_t& nofitication_type, _In_ const string_t& content);
/// <summary>
/// Internal function
/// </summary>
bool _Is_at_diagnostics_trace_level(_In_ xbox_services_diagnostics_trace_level level);
_XSAPICPP_DEPRECATED inline void remove_wns_handler(_In_ function_context context);
private:
xbox_live_services_settings();
void set_log_level_from_diagnostics_trace_level();
xbox_services_diagnostics_trace_level m_traceLevel;
std::mutex m_loggingWriteLock;
std::unordered_map<uint32_t, std::function<void(xbox_services_diagnostics_trace_level, const std::string&, const std::string&)>> m_loggingHandlers;
uint32_t m_loggingHandlersCounter{ 1 };
std::mutex m_wnsEventLock;
std::unordered_map<uint32_t, std::function<void(const xbox_live_wns_event_args&)>> m_wnsHandlers;
uint32_t m_wnsHandlersCounter{ 1 };
friend class xsapi_memory;
friend void *custom_mem_alloc_wrapper(_In_ size_t size, _In_ uint32_t memoryType);
friend void custom_mem_free_wrapper(_In_ void *pointer, _In_ uint32_t memoryType);
xbox_live_services_settings() = default;
};
} // namespace system
NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_END
#if !XSAPI_NO_PPL
#include "impl/system.hpp"
#endif

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

@ -111,13 +111,13 @@ public:
/// <summary>
/// Gets the HTTP retry delay in seconds.
///
/// Retries are delayed using a exponential back off. By default, it will delay 2 seconds then the
/// Retries are delayed using an exponential back off. By default, it will delay 2 seconds then the
/// next retry will delay 4 seconds, then 8 seconds, and so on up to a max of 1 min until either
/// the call succeeds or the http_timeout_window is reached, at which point the call will fail.
/// The delay is also jittered between the current and next delay to spread out service load.
/// The default for http_timeout_window is 20 seconds and can be changed using set_http_timeout_window()
///
/// If the service returns an an HTTP error with a "Retry-After" header, then all future calls to that API
/// If the service returns an HTTP error with a "Retry-After" header, then all future calls to that API
/// will immediately fail with the original error without contacting the service until the "Retry-After"
/// time has been reached.
///
@ -134,13 +134,13 @@ public:
/// <summary>
/// Sets the HTTP retry delay in seconds. The default and minimum delay is 2 seconds.
///
/// Retries are delayed using a exponential back off. By default, it will delay 2 seconds then the
/// Retries are delayed using an exponential back off. By default, it will delay 2 seconds then the
/// next retry will delay 4 seconds, then 8 seconds, and so on up to a max of 1 min until either
/// the call succeeds or the http_timeout_window is reached, at which point the call will fail.
/// The delay is also jittered between the current and next delay to spread out service load.
/// The default for http_timeout_window is 20 seconds and can be changed using set_http_timeout_window()
///
/// If the service returns an an HTTP error with a "Retry-After" header, then all future calls to that API
/// If the service returns an HTTP error with a "Retry-After" header, then all future calls to that API
/// will immediately fail with the original error without contacting the service until the "Retry-After"
/// time has been reached.
///
@ -211,7 +211,7 @@ public:
/// <summary>
/// Disables asserts for Xbox Live throttling in dev sandboxes.
/// The asserts will not fire in RETAIL sandbox, and this setting has has no affect in RETAIL sandboxes.
/// The asserts will not fire in RETAIL sandbox, and this setting has no affect in RETAIL sandboxes.
/// It is best practice to not call this API, and instead adjust the calling pattern but this is provided
/// as a temporary way to get unblocked while in early stages of game development.
/// </summary>

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

@ -156,12 +156,12 @@ STDAPI XblAchievementsManagerGetAchievement(
_Outptr_result_maybenull_ XblAchievementsManagerResultHandle* achievementResult
) XBL_NOEXCEPT
{
RETURN_HR_INVALIDARGUMENT_IF(achievementId == nullptr || achievementResult == nullptr);
RETURN_HR_INVALIDARGUMENT_IF_EMPTY_STRING(achievementId);
*achievementResult = nullptr;
return ApiImpl([&](AchievementsManager& achievementsManager)
{
RETURN_HR_INVALIDARGUMENT_IF(achievementId == nullptr || achievementResult == nullptr);
RETURN_HR_INVALIDARGUMENT_IF_EMPTY_STRING(achievementId);
*achievementResult = nullptr;
auto achievement = achievementsManager.GetAchievement(xboxUserId, achievementId);
if (Failed(achievement))
{

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

@ -8,7 +8,7 @@
using namespace xbox::services;
XblAchievementsManagerResult::XblAchievementsManagerResult(const XblAchievement & achievement)
XblAchievementsManagerResult::XblAchievementsManagerResult(_In_ const XblAchievement & achievement)
: m_achievements({ achievement }),
m_explicitCleanup(false),
m_achievementsData(nullptr),
@ -16,7 +16,7 @@ XblAchievementsManagerResult::XblAchievementsManagerResult(const XblAchievement
{
}
XblAchievementsManagerResult::XblAchievementsManagerResult(Vector<XblAchievement>& achievements, bool explicitCleanup)
XblAchievementsManagerResult::XblAchievementsManagerResult(_In_ Vector<XblAchievement>& achievements, _In_ bool explicitCleanup)
: m_achievements(std::move(achievements)),
m_achievementsData(m_achievements.data()),
m_achievementsCount(m_achievements.size()),
@ -24,7 +24,7 @@ XblAchievementsManagerResult::XblAchievementsManagerResult(Vector<XblAchievement
{
}
XblAchievementsManagerResult::XblAchievementsManagerResult(XblAchievement* achievements, size_t achievementCount, bool explicitCleanup)
XblAchievementsManagerResult::XblAchievementsManagerResult(_In_ XblAchievement* achievements, _In_ size_t achievementCount, _In_ bool explicitCleanup)
: m_achievements(achievements, achievements + achievementCount),
m_achievementsData(achievements),
m_achievementsCount(achievementCount),
@ -256,7 +256,7 @@ uint64_t AchievementsManagerUser::Xuid() const
return m_xuid;
}
Result<XblAchievement> AchievementsManagerUser::GetAchievement(const String & id)
Result<XblAchievement> AchievementsManagerUser::GetAchievement(_In_ const String & id)
{
if (m_userAchievements.find(id) == m_userAchievements.end())
{
@ -346,7 +346,7 @@ uint64_t AchievementsManagerUser::GetAchievementCount() const
return m_userAchievements.size();
}
Result<void> AchievementsManagerUser::CanUpdateAchievement(const String & achievementId, uint8_t progress)
Result<void> AchievementsManagerUser::CanUpdateAchievement(_In_ const String & achievementId, _In_ uint8_t progress)
{
if (m_userAchievements.find(achievementId) == m_userAchievements.end())
{
@ -386,10 +386,10 @@ Result<void> AchievementsManagerUser::CanUpdateAchievement(const String & achiev
);
return { E_INVALIDARG, errorMsg };
}
return true;
return S_OK;
}
Result<void> AchievementsManagerUser::UpdateAchievement(const String& achievementId, uint8_t percent)
Result<void> AchievementsManagerUser::UpdateAchievement(_In_ const String& achievementId, _In_ uint8_t percent)
{
return m_xblContext->AchievementsService()->UpdateAchievement(
m_xuid,
@ -422,21 +422,21 @@ ProgressValueType IsNumber(const char* str)
{
char* p = nullptr;
strtoul(str, &p, 0);
(void)strtoul(str, &p, 0);
if (p == nullptr)
{
return ProgressValueType::UnsignedLong;
}
// If it couldn't be represented as an unsigned long, check to see if it can be signed next.
strtol(str, &p, 0);
(void)strtol(str, &p, 0);
if (p == nullptr)
{
return ProgressValueType::SignedLong;
}
// If neither of those, then either it is a floating point number, or it is non-numeric.
strtod(str, &p);
(void)strtod(str, &p);
if (p == nullptr)
{
return ProgressValueType::FloatingPoint;
@ -789,7 +789,7 @@ Vector<XblAchievementsManagerEvent> GenerateEventFromAchievementDiff(uint64_t xu
return generatedEvents;
}
HRESULT AchievementsManagerUser::FetchAchievements(AsyncContext<HRESULT> async)
HRESULT AchievementsManagerUser::FetchAchievements(_In_ AsyncContext<HRESULT> async)
{
constexpr uint32_t achievementsPerFetch = 100;
@ -818,10 +818,10 @@ HRESULT AchievementsManagerUser::FetchAchievements(AsyncContext<HRESULT> async)
}
HRESULT AchievementsManagerUser::HandleAchievementsResults(
Result<std::shared_ptr<XblAchievementsResult>> result,
uint32_t achievementsPerFetch,
AsyncContext<HRESULT> async,
Vector<XblAchievement> fetchedAchievements
_In_ Result<std::shared_ptr<XblAchievementsResult>> result,
_In_ uint32_t achievementsPerFetch,
_In_ AsyncContext<HRESULT> async,
_In_ Vector<XblAchievement> fetchedAchievements
)
{
if (Succeeded(result))
@ -1015,7 +1015,7 @@ HRESULT AchievementsManager::CleanUpAchievementCopyForResult(XblAchievement& ach
return S_OK;
}
XblAchievement AchievementsManager::DeepCopyAchievement(const XblAchievement & other)
XblAchievement AchievementsManager::DeepCopyAchievement(_In_ const XblAchievement & other)
{
XblAchievement copy
{
@ -1144,7 +1144,7 @@ Vector<XblAchievement> AchievementsManager::DeepCopyAchievements(const Vector<Xb
return achievementsCopy;
}
HRESULT AchievementsManager::CleanUpDeepCopyAchievement(XblAchievement& achievement)
HRESULT AchievementsManager::CleanUpDeepCopyAchievement(_In_ XblAchievement& achievement)
{
Delete(achievement.id);
Delete(achievement.serviceConfigurationId);
@ -1258,7 +1258,7 @@ HRESULT AchievementsManager::AddLocalUser(
}
HRESULT AchievementsManager::RemoveLocalUser(
const User& user
_In_ const User & user
) noexcept
{
std::lock_guard<std::mutex> lock{ m_mutex };
@ -1321,7 +1321,7 @@ Result<XblAchievement> AchievementsManager::GetAchievement(
return m_localUsers[xuid]->GetAchievement(achievementId);
}
Result<std::pair<XblAchievement*, size_t>> AchievementsManager::GetAchievements(uint64_t xuid)
Result<std::pair<XblAchievement*, size_t>> AchievementsManager::GetAchievements(_In_ uint64_t xuid)
{
if (m_localUsers.find(xuid) == m_localUsers.end())
{
@ -1390,17 +1390,17 @@ Result<void> AchievementsManager::UpdateAchievement(
return localUser->UpdateAchievement(achievementId, progress);
}
bool AchievementsManager::HasUser(uint64_t xuid) const
bool AchievementsManager::HasUser(_In_ uint64_t xuid) const
{
return m_localUsers.find(xuid) != m_localUsers.end();
}
bool AchievementsManager::IsUserInitialized(uint64_t xuid)
bool AchievementsManager::IsUserInitialized(_In_ uint64_t xuid)
{
return m_localUsers[xuid]->IsInitialized();
}
uint64_t AchievementsManager::GetUserAchievementCount(uint64_t xuid)
uint64_t AchievementsManager::GetUserAchievementCount(_In_ uint64_t xuid)
{
return m_localUsers[xuid]->GetAchievementCount();
}

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

@ -22,8 +22,8 @@ struct XblAchievementsManagerResult : public xbox::services::RefCounter, public
{
public:
XblAchievementsManagerResult(_In_ const XblAchievement& achievement);
XblAchievementsManagerResult(_In_ Vector<XblAchievement>& achievements, bool explicitCleanup = false);
XblAchievementsManagerResult(_In_ XblAchievement* achievements, _In_ size_t achievementCount, bool explicitCleanup = false);
XblAchievementsManagerResult(_In_ Vector<XblAchievement>& achievements, _In_ bool explicitCleanup = false);
XblAchievementsManagerResult(_In_ XblAchievement* achievements, _In_ size_t achievementCount, _In_ bool explicitCleanup = false);
virtual ~XblAchievementsManagerResult();
const Vector<XblAchievement>& Achievements() const;
@ -151,17 +151,17 @@ private:
bool m_isInitialized = false;
Map<String, XblAchievement*> m_userAchievements;
XblAchievement* m_achievementCache;
uint64_t m_xuid;
XblAchievement* m_achievementCache{ nullptr };
uint64_t m_xuid{ 0 };
Vector<XblAchievementsManagerEvent> m_eventsToProcess;
Vector<XblAchievementsManagerEvent> m_generatedEvents;
std::shared_ptr<XblContext> m_xblContext;
XblFunctionContext m_achievementProgressToken;
XblFunctionContext m_rtaResyncToken;
XblFunctionContext m_rtaConnectionToken;
XblFunctionContext m_achievementProgressToken{ 0 };
XblFunctionContext m_rtaResyncToken{ 0 };
XblFunctionContext m_rtaConnectionToken{ 0 };
std::shared_ptr<real_time_activity::RealTimeActivityManager> m_rtaManager;

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

@ -117,20 +117,14 @@ HRESULT AchievementsService::UpdateAchievement(
#if HC_PLATFORM == HC_PLATFORM_XDK
{
auto xsapiSingleton = get_xsapi_singleton();
if (!xsapiSingleton)
auto state = GlobalState::Get();
if (!state)
{
return utils::convert_xbox_live_error_code_to_hresult(xbl_error_code::runtime_error);
return E_XBL_NOT_INITIALIZED;
}
std::lock_guard<std::mutex> lock(xsapiSingleton->m_achievementServiceInitLock);
if (!xsapiSingleton->m_bHasAchievementServiceInitialized)
// Register ETX provider if it hasn't been registered yet
if (XSAPI_Update_Achievement_Handle == 0)
{
HRESULT hr = CoCreateGuid(&xsapiSingleton->m_eventPlayerSessionId);
if (FAILED(hr))
{
return hr;
}
string_t wScid = utils::string_t_from_internal_string(lowercaseScid);
std::error_code errC = utils::guid_from_string(wScid, const_cast<GUID*>(&XSAPI_Update_Achievement_Provider.Guid), false);
if (errC)
@ -138,23 +132,10 @@ HRESULT AchievementsService::UpdateAchievement(
return utils::convert_xbox_live_error_code_to_hresult(errC);
}
CHAR strTitleId[16] = "";
sprintf_s(strTitleId, "%0.8X", titleId);
std::stringstream ss;
ss << "XSAPI_";
ss << strTitleId;
xsapiSingleton->m_eventProviderName = ss.str();
XSAPI_Update_Achievement_Provider.Name = xsapiSingleton->m_eventProviderName.c_str();
XSAPI_Update_Achievement_Provider.Name = state->AchievementsProviderName().data();
ULONG errorCode = EtxRegister(&XSAPI_Update_Achievement_Provider, &XSAPI_Update_Achievement_Handle);
hr = HRESULT_FROM_WIN32(errorCode);
if (FAILED(hr))
{
return hr;
}
xsapiSingleton->m_bHasAchievementServiceInitialized = true;
RETURN_HR_IF_FAILED(HRESULT_FROM_WIN32(errorCode));
}
}
#endif
@ -277,7 +258,7 @@ ULONG AchievementsService::EventWriteAchievementUpdate(
EtxFillCommonFields_v7(&eventData[0], scratch, EventWriteAchievementUpdate_ScratchSize);
EventDataDescCreate(&eventData[1], userId, (ULONG)((wcslen(userId) + 1) * sizeof(WCHAR)));
EventDataDescCreate(&eventData[2], &get_xsapi_singleton()->m_eventPlayerSessionId, sizeof(GUID));
EventDataDescCreate(&eventData[2], &GlobalState::Get()->AchievementsSessionId(), sizeof(GUID));
EventDataDescCreate(&eventData[3], achievementId, (ULONG)((wcslen(achievementId) + 1) * sizeof(WCHAR)));
EventDataDescCreate(&eventData[4], &percentComplete, sizeof(percentComplete));
@ -299,7 +280,7 @@ AchievementsService::WriteOfflineUpdateAchievement(
{
ULONG errorCode = EventWriteAchievementUpdate(
utils::uint64_to_string_t(xboxLiveContextImpl->Xuid()).c_str(),
utils::string_t_from_internal_string(achievementId).c_str(),
convert::utf8_to_utf16(achievementId).c_str(),
percentComplete
);
HRESULT hr = HRESULT_FROM_WIN32(errorCode);
@ -559,7 +540,7 @@ String AchievementsService::GetAchievementsSubpath(
path << xboxUserId;
path << (")/achievements");
subPathBuilder.append_path(utils::string_t_from_internal_string(path.str()));
subPathBuilder.append_path(path.str());
Stringstream titleQuery;
auto &last = titleIds.back();
@ -571,28 +552,28 @@ String AchievementsService::GetAchievementsSubpath(
titleQuery << (",");
}
}
subPathBuilder.append_query(_T("titleId"), utils::string_t_from_internal_string(titleQuery.str()));
subPathBuilder.append_query("titleId", titleQuery.str());
if (type != XblAchievementType::All)
{
subPathBuilder.append_query(_T("types"), utils::string_t_from_internal_string(EnumName(type)));
subPathBuilder.append_query("types", EnumName(type));
}
if (unlockedOnly)
{
subPathBuilder.append_query(_T("unlockedOnly=true"));
subPathBuilder.append_query("unlockedOnly=true");
}
switch (orderBy)
{
case XblAchievementOrderBy::TitleId:
{
subPathBuilder.append_query(_T("orderBy"), _T("title"));
subPathBuilder.append_query("orderBy", "title");
break;
}
case XblAchievementOrderBy::UnlockTime:
{
subPathBuilder.append_query(_T("orderBy"), _T("unlocktime"));
subPathBuilder.append_query("orderBy", "unlocktime");
break;
}
default: break;
@ -605,7 +586,7 @@ String AchievementsService::GetAchievementsSubpath(
continuationToken
);
return utils::internal_string_from_string_t(subPathBuilder.to_string());
return subPathBuilder.to_string();
}
void AchievementsService::CleanupAchievement(XblAchievement& a)
@ -874,7 +855,7 @@ Result<XblAchievementReward> AchievementsService::DeserializeReward(
auto mediaAssetResult = DeserializeMediaAsset(json["mediaAsset"]);
reward.mediaAsset = Make<XblAchievementMediaAsset>(mediaAssetResult.ExtractPayload());
if (Failed(mediaAssetResult) || errc)
if (Failed(mediaAssetResult) || FAILED(errc))
{
return Result<XblAchievementReward>{ reward, E_FAIL };
}
@ -971,7 +952,7 @@ Result<XblAchievement> AchievementsService::DeserializeAchievement(
a.rewards = MakeArray(rewardsVector);
a.rewardsCount = rewardsVector.size();
std::chrono::seconds seconds;
std::chrono::seconds seconds{};
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringTimespanInSeconds(json, "estimatedTime", seconds, true));
a.estimatedUnlockTime = seconds.count();
xsapi_internal_string deeplink;
@ -992,7 +973,7 @@ Result<XblAchievement> AchievementsService::DeserializeAchievement(
}
a.progression = progressionResult.ExtractPayload();
if (Failed(progressionResult) || Failed(timeWindowResult) || errCode)
if (Failed(progressionResult) || Failed(timeWindowResult) || FAILED(errCode))
{
CleanupAchievement(a);
return Result<XblAchievement>{ E_FAIL };

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

@ -43,7 +43,7 @@ Result<std::shared_ptr<XblAchievementsResult>> XblAchievementsResult::Deserializ
}
}
if (errCode)
if (FAILED(errCode))
{
return Result<std::shared_ptr<XblAchievementsResult>>{ errCode };
}

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

@ -3,6 +3,8 @@
#include "pch.h"
#ifndef _LINK_WITH_CPPRESTSDK
#if !_LINK_WITH_CPPRESTSDK && HC_PLATFORM != HC_PLATFORM_GDK
#include "cpprestsdk_impl.h"
#endif
#include <rapidjson/allocators.hpp>
#include "uri_impl.h"

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

@ -69,6 +69,9 @@
#include <list>
#include <assert.h>
#include <array>
#if HC_PLATFORM_IS_MICROSOFT
#include <objbase.h>
#endif
#include "httpClient/pal.h"
#include "httpClient/httpClient.h"
@ -83,10 +86,23 @@
#include <Xal/xal.h>
#include "http_headers.h"
#if HC_PLATFORM != HC_PLATFORM_GDK
#include "cpprest/http_msg.h"
#endif
#include "http_utils.h"
#if HC_PLATFORM == HC_PLATFORM_GDK
#include "HookedUri/uri.h"
#endif
#undef max // needed for the version of RapidJson we're using to avoid warnings
#undef min
#define RAPIDJSON_NAMESPACE xbox::services::rapidjson
#define RAPIDJSON_NAMESPACE_BEGIN namespace xbox { namespace services { namespace rapidjson {
#define RAPIDJSON_NAMESPACE_END } } }
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#include "async_helpers.h"
#include "xsapi_utils.h"
@ -95,7 +111,6 @@
#include "ref_counter.h"
#include "internal_errors.h"
#include "Logger/log.h"
#include "telemetry.h"
#include "xbox_live_app_config_internal.h"
#include "user.h"
#include "http_call_wrapper_internal.h"

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

@ -2,8 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "pch.h"
#include "shared_macros.h"
#include "xbox_system_factory.h"
#include "xbox_live_context_internal.h"
#include "presence_internal.h"
@ -25,10 +23,9 @@ using namespace xbox::services::system;
) noexcept
{
auto xblContext = std::shared_ptr<XblContext>(
new (Alloc(sizeof(XblContext))) XblContext
{
std::move(user)
}
new (Alloc(sizeof(XblContext))) XblContext{ std::move(user) },
Deleter<XblContext>(),
Allocator<XblContext>()
);
return xblContext;
}
@ -58,6 +55,14 @@ HRESULT XblContext::Initialize(
m_xboxLiveContextSettings = MakeShared<xbox::services::XboxLiveContextSettings>();
std::weak_ptr<XblContext> thisWeakPtr = shared_from_this();
TaskQueue globalQueue;
{
auto state = GlobalState::Get();
if (state)
{
globalQueue = state->Queue();
}
}
{
Result<xbox::services::User> userResult = m_user.Copy();
@ -140,7 +145,7 @@ HRESULT XblContext::Initialize(
{
Result<xbox::services::User> userResult = m_user.Copy();
RETURN_HR_IF_FAILED(userResult.Hresult());
m_multiplayerActivityService = MakeShared<multiplayer_activity::MultiplayerActivityService>(userResult.ExtractPayload(), get_xsapi_singleton_async_queue(), m_xboxLiveContextSettings);
m_multiplayerActivityService = MakeShared<multiplayer_activity::MultiplayerActivityService>(userResult.ExtractPayload(), globalQueue, m_xboxLiveContextSettings);
}
{
@ -150,7 +155,7 @@ HRESULT XblContext::Initialize(
m_eventsService = MakeShared<events::EventsService>(
userResult.ExtractPayload()
#if XSAPI_INTERNAL_EVENTS_SERVICE
, get_xsapi_singleton_async_queue()
, globalQueue
#endif
);
RETURN_HR_IF_FAILED(m_eventsService->Initialize());
@ -168,14 +173,16 @@ HRESULT XblContext::Initialize(
m_notificationService = MakeShared<xbox::services::notification::MobileNotificationService>(userResult.ExtractPayload(), m_xboxLiveContextSettings);
#elif HC_PLATFORM == HC_PLATFORM_UWP
m_notificationService = MakeShared<xbox::services::notification::UWPNotificationService>(userResult.ExtractPayload(), m_xboxLiveContextSettings);
m_notificationService->RegisterWithNotificationService(AsyncContext<HRESULT>{TaskQueue{ get_xsapi_singleton_async_queue() }});
m_notificationService->RegisterWithNotificationService(AsyncContext<HRESULT>{ globalQueue });
#endif
#endif
}
#if XSAPI_NOTIFICATION_SERVICE
auto userChangedRegistrationResult = User::RegisterChangeEventHandler(
[
thisWeakPtr
thisWeakPtr,
queue{ globalQueue.DeriveWorkerQueue() }
]
(UserLocalId localId, UserChangeType changeType)
{
@ -184,18 +191,16 @@ HRESULT XblContext::Initialize(
{
if (sharedThis->m_user.LocalId() == localId.value && changeType == XalUserChange_SignedOut)
{
#if XSAPI_NOTIFICATION_SERVICE
sharedThis->NotificationService()->UnregisterFromNotificationService(
AsyncContext<HRESULT>
{
TaskQueue{ get_xsapi_singleton_async_queue() }
});
#endif
sharedThis->NotificationService()->UnregisterFromNotificationService(AsyncContext<HRESULT>{ queue });
}
}
});
return userChangedRegistrationResult.Hresult();
RETURN_HR_IF_FAILED(userChangedRegistrationResult.Hresult());
m_userChangeEventToken = userChangedRegistrationResult.Payload();
#endif
return S_OK;
}
uint64_t XblContext::Xuid() const

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

@ -89,9 +89,9 @@ void XblSetApiType(
_In_ XblApiType apiType
) XBL_NOEXCEPT
{
auto singleton = get_xsapi_singleton();
if (singleton)
auto state = GlobalState::Get();
if (state)
{
singleton->m_apiType = apiType;
state->ApiType = apiType;
}
}

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

@ -95,13 +95,6 @@ public:
/// </summary>
std::shared_ptr<xbox::services::leaderboard::LeaderboardService> LeaderboardService();
#if !XSAPI_NO_PPL
/// <summary>
/// A service for managing matchmaking sessions.
/// </summary>
xbox::services::matchmaking::legacy::matchmaking_service& matchmaking_service();
#endif // !XSAPI_NO_PPL
/// <summary>
/// A service for managing Rich Presence.
/// </summary>

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

@ -3,7 +3,6 @@
#include "pch.h"
#include "xbox_live_context_internal.h"
#include "xbox_system_factory.h"
#include "xbox_live_app_config_internal.h"
#if HC_PLATFORM == HC_PLATFORM_ANDROID

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

@ -88,10 +88,10 @@ XblGetAsyncQueue() XBL_NOEXCEPT
try
{
XTaskQueueHandle duplicatedHandle{ nullptr };
auto queue{ get_xsapi_singleton_async_queue() };
if (queue)
auto state = GlobalState::Get();
if (state && state->Queue().GetHandle())
{
XTaskQueueDuplicateHandle(queue, &duplicatedHandle);
XTaskQueueDuplicateHandle(state->Queue().GetHandle(), &duplicatedHandle);
}
return duplicatedHandle;
}
@ -217,3 +217,4 @@ STDAPI_(void) XblRemoveServiceCallRoutedHandler(
state->RemoveServiceCallRoutedHandler(token);
}
}

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

@ -91,7 +91,7 @@ Result<Event> Event::Deserialize(
// tab-separated (0x0A)
// xuid | event name | timestamp | dimensions json | measurements json
auto parts = utils::string_split(inputData, '\t');
auto parts = utils::string_split_internal(inputData, '\t');
if (parts.size() < 5)
{
@ -100,7 +100,7 @@ Result<Event> Event::Deserialize(
auto xuid = utils::internal_string_to_uint64(parts[0]);
auto& eventName = parts[1];
auto timestamp = xbox::services::datetime::from_string(utils::string_t_from_internal_string(parts[2]), xbox::services::datetime::ISO_8601);
auto timestamp = xbox::services::datetime::from_string(parts[2], xbox::services::datetime::ISO_8601);
JsonDocument dimensionsJson;
dimensionsJson.Parse(parts[3].data());
@ -158,7 +158,7 @@ xsapi_internal_string Event::Serialize() const
ss << m_xuid << seperator;
ss << m_eventName << seperator;
ss << utils::internal_string_from_string_t(m_timestamp.to_string(xbox::services::datetime::ISO_8601)) << seperator;
ss << m_timestamp.to_string(xbox::services::datetime::ISO_8601) << seperator;
ss << JsonUtils::SerializeJson(m_dimensions) << seperator;
ss << JsonUtils::SerializeJson(m_measurements);

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

@ -36,7 +36,7 @@ void EventQueue::Initialize()
if (sharedThis && Succeeded(result))
{
auto& bytes = result.Payload();
auto fileMetadata = utils::string_split(xsapi_internal_string{ bytes.begin(), bytes.end() }, '\n');
auto fileMetadata = utils::string_split_internal(xsapi_internal_string{ bytes.begin(), bytes.end() }, '\n');
std::lock_guard<std::mutex> lock{ sharedThis->m_mutex };
for (auto& metadata : fileMetadata)
@ -184,7 +184,7 @@ HRESULT EventQueue::Populate()
if (sharedThis && Succeeded(readResult) && sharedThis->m_mode == Mode::Normal)
{
auto& bytes = readResult.Payload();
auto serializedEvents = utils::string_split(xsapi_internal_string{ bytes.begin(), bytes.end() }, '\n');
auto serializedEvents = utils::string_split_internal(xsapi_internal_string{ bytes.begin(), bytes.end() }, '\n');
for (const auto& serializedEvent : serializedEvents)
{

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

@ -66,7 +66,7 @@ HRESULT EventUploadPayload::GetRequestData(
EventsService::IKey(),
event.FullEventName(),
event.Data(),
StringFromStringT(event.Timestamp().to_string(xbox::services::datetime::date_format::ISO_8601)),
event.Timestamp().to_string(xbox::services::datetime::date_format::ISO_8601).c_str(),
cll::LatencyNormal,
cll::PersistenceUnspecified,
cll::SensitivityUnspecified,

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

@ -6,8 +6,6 @@
#if XSAPI_WRL_EVENTS_SERVICE
#include "events_service_etw.h"
#include "service_call_logger_data.h"
#include "service_call_logger.h"
#include <initguid.h>
#include <wrl.h>
@ -160,23 +158,6 @@ HRESULT EventsService::WriteInGameEventHelper(
{
try
{
//Log service call
if (xbox::services::service_call_logger::get_singleton_instance()->is_enabled())
{
std::shared_ptr<service_call_logger> tracker = service_call_logger::get_singleton_instance();
service_call_logger_data logData(
m_user.Xuid(),
eventName,
m_playSession,
JsonUtils::SerializeJson(dimensions),
JsonUtils::SerializeJson(measurements),
chrono_clock_t::now()
);
tracker->log(logData.to_string());
}
auto fields = CreateLoggingFields(eventName, dimensions, measurements);
//m_loggingChannel->loge
@ -225,8 +206,8 @@ ComPtr<ILoggingFields> EventsService::CreateLoggingFields(
fields->BeginStruct(HStringReference(L"properties").Get());
for (const auto& jsonPair : dimensions.GetObject())
{
std::pair<string_t, JsonDocument> pair;
pair.first = utils::string_t_from_internal_string(jsonPair.name.GetString());
std::pair<xsapi_internal_string, JsonDocument> pair;
pair.first = jsonPair.name.GetString();
JsonUtils::CopyFrom(pair.second, jsonPair.value);
AddValuePair(fields, pair);
}
@ -239,8 +220,8 @@ ComPtr<ILoggingFields> EventsService::CreateLoggingFields(
fields->BeginStruct(HStringReference(L"measurements").Get());
for (const auto& jsonPair : measurements.GetObject())
{
std::pair<string_t, JsonDocument> pair;
pair.first = utils::string_t_from_internal_string(jsonPair.name.GetString());
std::pair<xsapi_internal_string, JsonDocument> pair;
pair.first = jsonPair.name.GetString();
JsonUtils::CopyFrom(pair.second, jsonPair.value);
AddValuePair(fields, pair);
}
@ -254,21 +235,22 @@ ComPtr<ILoggingFields> EventsService::CreateLoggingFields(
void EventsService::AddValuePair(
_Inout_ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Diagnostics::ILoggingFields> fields,
_In_ const std::pair<string_t, JsonDocument>& pair
_In_ const std::pair<xsapi_internal_string, JsonDocument>& pair
)
{
// check property name.
const auto& name = pair.first;
THROW_CPP_INVALIDARGUMENT_IF_STRING_EMPTY(name);
regex_t regex(L"[A-Za-z]+[A-Za-z0-9]*");
std::regex regex("[A-Za-z]+[A-Za-z0-9]*");
bool matchFound = std::regex_match(name, regex);
if (!matchFound)
{
throw std::invalid_argument("Invalid properties or measurements name");
}
HStringReference propertyName{ name.data() };
auto s = utility::conversions::utf8_to_utf16(name.data());
HStringReference propertyName{ s.c_str() };
const auto& value = pair.second;
switch (value.GetType())

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

@ -46,7 +46,7 @@ private:
void AddValuePair(
_Inout_ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Diagnostics::ILoggingFields> fields,
_In_ const std::pair<string_t, JsonDocument>& pair
_In_ const std::pair<xsapi_internal_string, JsonDocument>& pair
);
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Diagnostics::ILoggingFields> CreateLoggingFields(

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

@ -5,7 +5,6 @@
#include "xsapi-c/events_c.h"
#include "events_service_xsapi.h"
#include "xbox_live_context_internal.h"
#include "xbox_system_factory.h"
#include <cll/Windows7PartA.h>
using namespace xbox::services;

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

@ -37,7 +37,7 @@ struct LeaderboardGlobalQuery
xsapi_internal_string xuid;
xsapi_internal_string socialGroup;
xsapi_internal_vector<xsapi_internal_string> columns;
bool isTitleManaged;
bool isTitleManaged{ false };
};
struct LeaderboardSocialQuery
@ -47,7 +47,7 @@ struct LeaderboardSocialQuery
xsapi_internal_string statName;
xsapi_internal_string socialGroup;
xsapi_internal_string sortOrder;
bool isTitleManaged;
bool isTitleManaged{ false };
};
class LeaderboardColumn
@ -117,7 +117,7 @@ private:
xsapi_internal_string m_modernGamertagSuffix;
xsapi_internal_string m_uniqueModernGamertag;
uint64_t m_xuid{ 0 };
double m_percentile{ 0 };
double m_percentile{ 0.0 };
uint32_t m_rank{ 0 };
uint32_t m_globalRank{ 0 };
xsapi_internal_vector<xsapi_internal_string> m_columnValues;

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

@ -225,11 +225,11 @@ LeaderboardResult::ParseSocialGroup(xsapi_internal_string socialGroupStr)
{
XblSocialGroupType socialGroup = XblSocialGroupType::None;
if (utils::str_icmp_internal(socialGroupStr, utils::internal_string_from_string_t(xbox::services::social::legacy::social_group_constants::people())) == 0)
if (utils::str_icmp_internal(socialGroupStr, xbox::services::social::legacy::social_group_constants::people()) == 0)
{
socialGroup = XblSocialGroupType::People;
}
else if (utils::str_icmp_internal(socialGroupStr, utils::internal_string_from_string_t(xbox::services::social::legacy::social_group_constants::favorite())) == 0)
else if (utils::str_icmp_internal(socialGroupStr, xbox::services::social::legacy::social_group_constants::favorite()) == 0)
{
socialGroup = XblSocialGroupType::Favorites;
}

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

@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "pch.h"
#include "shared_macros.h"
#include "xbox_system_factory.h"
#include "xsapi_utils.h"
#include "xbox_live_context_internal.h"
#include "leaderboard_internal.h"
@ -59,33 +56,33 @@ CreateLeaderboardUrl(
xsapi_internal_stringstream path;
path << "/scids/";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(scid), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(scid, xbox::services::uri::components::path);
if (isTitleManaged)
{
path << "/leaderboards/stat(";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(name), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(name, xbox::services::uri::components::path);
path << ")";
}
else
{
path << "/leaderboards/";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(name), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(name, xbox::services::uri::components::path);
}
builder.set_path(utils::string_t_from_internal_string(path.str()));
builder.set_path(path.str());
if (metadata)
{
builder.append_query(_T("include"), _T("valuemetadata"));
builder.append_query("include", "valuemetadata");
}
if (!xuid.empty())
{
builder.append_query(_T("xuid"), utils::string_t_from_internal_string(xuid));
builder.append_query("xuid", xuid);
}
if (maxItems > 0)
{
builder.append_query(_T("maxItems"), maxItems);
builder.append_query("maxItems", maxItems);
}
if (!skipToXuid.empty())
@ -95,27 +92,27 @@ CreateLeaderboardUrl(
return xbl_result<xsapi_internal_string>(xbl_error_code::invalid_argument, "Cannot skip to XUID and rank");
}
builder.append_query(_T("skipToUser"), utils::string_t_from_internal_string(skipToXuid));
builder.append_query("skipToUser", skipToXuid);
}
else
{
if (!continuationToken.empty())
{
builder.append_query(_T("continuationToken"), utils::string_t_from_internal_string(continuationToken));
builder.append_query("continuationToken", continuationToken);
}
else if (skipToRank > 0)
{
builder.append_query(_T("skipToRank"), skipToRank);
builder.append_query("skipToRank", skipToRank);
}
}
if (!socialGroup.empty())
{
builder.append_query(_T("view"), _T("People"));
builder.append_query(_T("viewTarget"), utils::string_t_from_internal_string(socialGroup));
builder.append_query("view", "People");
builder.append_query("viewTarget", socialGroup);
}
return xbl_result<xsapi_internal_string>(utils::internal_string_from_string_t(builder.to_string()));
return xbl_result<xsapi_internal_string>(builder.to_string());
}
HRESULT
@ -151,7 +148,7 @@ LeaderboardService::GetLeaderboard(
if (url.err()) return utils::convert_xbox_live_error_code_to_hresult(url.err());
std::shared_ptr<LeaderboardGlobalQuery> query = std::make_shared<LeaderboardGlobalQuery>();
std::shared_ptr<LeaderboardGlobalQuery> query = MakeShared<LeaderboardGlobalQuery>();
query->scid = scid;
query->name = name;
query->xuid = xuid;
@ -267,42 +264,42 @@ CreateLeaderboardForSocialGroupUrl(
xsapi_internal_stringstream path;
path << "/users/xuid(";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(xuid), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(xuid, xbox::services::uri::components::path);
path << ")/scids/";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(scid), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(scid, xbox::services::uri::components::path);
path << "/stats/";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(statName), xbox::services::uri::components::path));
path << xbox::services::uri::encode_uri(statName, xbox::services::uri::components::path);
path << "/people/";
path << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(socialGroup), xbox::services::uri::components::path));
builder.set_path(utils::string_t_from_internal_string(path.str()));
path << xbox::services::uri::encode_uri(socialGroup, xbox::services::uri::components::path);
builder.set_path(path.str());
if (!sortOrder.empty())
{
builder.append_query(_T("sort"), utils::string_t_from_internal_string(sortOrder));
builder.append_query("sort", sortOrder);
}
if (maxItems > 0)
{
builder.append_query(_T("maxItems"), maxItems);
builder.append_query("maxItems", maxItems);
}
if (!skipToXuid.empty())
{
builder.append_query(_T("skipToUser"), utils::string_t_from_internal_string(skipToXuid));
builder.append_query("skipToUser", skipToXuid);
}
else
{
if (!continuationToken.empty())
{
builder.append_query(_T("continuationToken"), utils::string_t_from_internal_string(continuationToken));
builder.append_query("continuationToken", continuationToken);
}
else if (skipToRank > 0)
{
builder.append_query(_T("skipToRank"), skipToRank);
builder.append_query("skipToRank", skipToRank);
}
}
return xbl_result<xsapi_internal_string>(utils::internal_string_from_string_t(builder.to_string()));
return xbl_result<xsapi_internal_string>(builder.to_string());
}
HRESULT
@ -345,7 +342,7 @@ LeaderboardService::GetLeaderboardForSocialGroup(
if (url.err()) return utils::convert_xbox_live_error_code_to_hresult(url.err());
auto query = std::make_shared<LeaderboardSocialQuery>();
auto query = MakeShared<LeaderboardSocialQuery>();
query->xuid = xuid;
query->scid = scid;
query->statName = statName;
@ -460,11 +457,11 @@ STDAPI XblLeaderboardGetLeaderboardAsync(
xsapi_internal_string socialGroup("");
if (leaderboardQuery.socialGroup == XblSocialGroupType::People)
{
socialGroup = utils::internal_string_from_string_t(xbox::services::social::legacy::social_group_constants::people());
socialGroup = xbox::services::social::legacy::social_group_constants::people();
}
else if (leaderboardQuery.socialGroup == XblSocialGroupType::Favorites)
{
socialGroup = utils::internal_string_from_string_t(xbox::services::social::legacy::social_group_constants::favorite());
socialGroup = xbox::services::social::legacy::social_group_constants::favorite();
}
if ((leaderboardQuery.queryType == XblLeaderboardQueryType::UserStatBacked && leaderboardQuery.leaderboardName) ||
@ -505,7 +502,7 @@ STDAPI XblLeaderboardGetLeaderboardAsync(
{
if (socialGroup.empty())
{
socialGroup = utils::internal_string_from_string_t(xbox::services::social::legacy::social_group_constants::people());
socialGroup = xbox::services::social::legacy::social_group_constants::people();
}
xsapi_internal_string statName("");

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

@ -198,279 +198,4 @@ private:
};
#if !defined(XBOX_LIVE_CREATORS_SDK)
#if !XSAPI_NO_PPL
namespace legacy
{
/// <summary>
/// Defines values used to indicate whether a match ticket is for a new
/// game session or an existing session.
/// </summary>
enum class preserve_session_mode
{
/// <summary>
/// The server returned an unrecognized response.
/// </summary>
unknown,
/// <summary>
/// Always use an existing game session. This is for matching more players
/// for a game session that is already created or in progress.
/// </summary>
always,
/// <summary>
/// Never use an existing game session. This is for matching players
/// for a new game session.
/// </summary>
never
};
/// <summary>
/// Defines values used to indicate the status of the match request.
/// </summary>
enum class ticket_status
{
/// <summary>
/// The status of the match request has not been returned by the server yet
/// or the server returned an unrecognized response.
/// </summary>
unknown,
/// <summary>
/// Matchmaking has not found a match and the search
/// request has expired according to its give up duration.
/// </summary>
expired,
/// <summary>
/// Matchmaking has not found a match yet and it is
/// still searching.
/// </summary>
searching,
/// <summary>
/// Matchmaking has found a match and the ticket contains a
/// reference to the session that is to be created.
/// </summary>
found,
/// <summary>
/// Matchmaking has been canceled for this ticket.
/// </summary>
canceled
};
/// <summary>
/// Represents a server response to a create match ticket request.
/// </summary>
class create_match_ticket_response
{
public:
/// <summary>
/// Internal function
/// </summary>
create_match_ticket_response();
/// <summary>
/// Internal function
/// </summary>
create_match_ticket_response(
XblCreateMatchTicketResponse response
);
/// <summary>
/// Ticket ID of a match request.
/// </summary>
string_t match_ticket_id() const;
/// <summary>
/// Estimated wait time for a match request to be matched with other players.
/// </summary>
std::chrono::seconds estimated_wait_time() const;
private:
XblCreateMatchTicketResponse m_createMatchTicketResponse;
};
/// <summary>
/// Represents a server response to a request for match ticket details.
/// </summary>
class match_ticket_details_response
{
public:
/// <summary>
/// Internal function
/// </summary>
match_ticket_details_response();
/// <summary>
/// Internal function
/// </summary>
match_ticket_details_response(
std::shared_ptr<char> buffer
);
/// <summary>
/// Status of a match request.
/// </summary>
ticket_status match_status() const;
/// <summary>
/// Estimated wait time for a match request to be matched with other players.
/// </summary>
std::chrono::seconds estimated_wait_time() const;
/// <summary>
/// An enum value to specify whether the match should preserve the session on which the match has been requested.
/// </summary>
preserve_session_mode preserve_session() const;
/// <summary>
/// The session on which the match was requested.
/// </summary>
xbox::services::multiplayer::legacy::multiplayer_session_reference ticket_session() const;
/// <summary>
/// The session on which a match request has been found.
/// </summary>
xbox::services::multiplayer::legacy::multiplayer_session_reference target_session() const;
/// <summary>
/// The attributes of a match request.
/// </summary>
web::json::value ticket_attributes() const;
private:
static ticket_status convert_string_to_ticket_status(_In_ const string_t& value);
static preserve_session_mode convert_string_to_preserve_session_mode(_In_ const string_t& value);
std::shared_ptr<char> m_buffer;
XblMatchTicketDetailsResponse m_matchTicketDetailsResponse;
};
/// <summary>
/// Represents a server response to a hopper statistics request.
/// </summary>
class hopper_statistics_response
{
public:
/// <summary>
/// Internal function
/// </summary>
hopper_statistics_response();
/// <summary>
/// Internal function
/// </summary>
hopper_statistics_response(
std::shared_ptr<char> buffer
);
/// <summary>
/// Name of the hopper in which a match was requested.
/// </summary>
string_t hopper_name() const;
/// <summary>
/// Estimated wait time for a match request to be matched with other players.
/// </summary>
std::chrono::seconds estimated_wait_time() const;
/// <summary>
/// The number of players in the hopper waiting to be matched.
/// </summary>
uint32_t players_waiting_to_match() const;
private:
std::shared_ptr<char> m_buffer;
XblHopperStatisticsResponse m_hopperStatisticsResponse;
};
/// <summary>
/// Represents the Matchmaking Service.
/// </summary>
class matchmaking_service
{
public:
/// <summary>
/// Sends a matchmaking request to the server and returns the match ticket with a ticket id.
/// </summary>
/// <param name="ticketSessionReference">The multiplayer session to use for the match.</param>
/// <param name="matchmakingServiceConfigurationId">The service configuration ID for the match.</param>
/// <param name="hopperName">The name of the hopper.</param>
/// <param name="ticketTimeout">The maximum time to wait for players to join the session.</param>
/// <param name="preserveSession">Indicates if the session should be preserved.</param>
/// <param name="ticketAttributesJson">The ticket attributes for the session. (Optional)</param>
/// <returns>The async object for notifying when the operation is completed. With the handler, a new match ticket
/// object is returned. The match ticket object contains server returned information such as ticket id and wait
/// time, and also contains copies of the title specified data from the ticket data object.</returns>
/// <remarks>Calls V103 POST /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}</remarks>
pplx::task<xbl_result<create_match_ticket_response>> create_match_ticket(
_In_ const xbox::services::multiplayer::legacy::multiplayer_session_reference& ticketSessionReference,
_In_ const string_t& matchmakingServiceConfigurationId,
_In_ const string_t& hopperName,
_In_ const std::chrono::seconds& ticketTimeout,
_In_ preserve_session_mode preserveSession,
_In_ const web::json::value& ticketAttributesJson = web::json::value()
);
/// <summary>
/// Deletes a the match ticket on the server.
/// </summary>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="hopperName">The name of the hopper where the match ticket is located.</param>
/// <param name="ticketId">The id of the ticket to delete on the server.</param>
/// <returns>The async object for notifying when the operation has been completed.</returns>
/// <remarks>Calls V103 DELETE /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}/tickets/{ticketId}</remarks>
pplx::task<xbl_result<void>> delete_match_ticket(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName,
_In_ const string_t& ticketId
);
/// <summary>
/// Retrieves the properties of a match ticket from the server.
/// </summary>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="hopperName">The name of the hopper where the match ticket is located.</param>
/// <param name="ticketId">The ticket id of the match ticket to retrieve.</param>
/// <returns>The async object for notifying when the operation is completed. With the handler, the match
/// ticket object with the data for the ticket, including ticket id and wait time information, is returned
/// returned from the server.</returns>
/// <remarks>Calls V103 GET /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}/tickets/{ticketId}</remarks>
pplx::task<xbl_result<match_ticket_details_response>> get_match_ticket_details(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName,
_In_ const string_t& ticketId
);
/// <summary>
/// Gets statistics about a hopper such as how many players are in it.
/// </summary>
/// <param name="serviceConfigurationId">The service config id that is specific for the title.</param>
/// <param name="hopperName">The name of the hopper to query stats for.</param>
/// <returns>The async object for notifying when the operation is completed. With the handler, an object
/// containing statistics about the hopper is returned.</returns>
/// <remarks>Calls V103 GET /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}/stats</remarks>
pplx::task<xbl_result<hopper_statistics_response>> get_hopper_statistics(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName
);
matchmaking_service(const matchmaking_service& other);
matchmaking_service& operator=(matchmaking_service other);
~matchmaking_service();
private:
matchmaking_service(_In_ XblContextHandle contextHandle);
XblContextHandle m_xblContext;
};
}
#endif // !XSAPI_NO_PPL
#endif // !defined(XBOX_LIVE_CREATORS_SDK)
NAMESPACE_MICROSOFT_XBOX_SERVICES_MATCHMAKING_CPP_END

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

@ -3,13 +3,11 @@
#include "pch.h"
#include "shared_macros.h"
#include "xbox_system_factory.h"
#include "matchmaking_internal.h"
#include "xbox_live_app_config_internal.h"
#include "xbox_live_context_internal.h"
using namespace xbox::services;
using namespace xbox::services::legacy;
NAMESPACE_MICROSOFT_XBOX_SERVICES_MATCHMAKING_CPP_BEGIN
@ -143,7 +141,7 @@ xsapi_internal_string MatchmakingService::ConvertPreserveSessionModeToString(
);
}
if (errc)
if (FAILED(errc))
{
return WEB_E_INVALID_JSON_STRING;
}
@ -173,7 +171,7 @@ xsapi_internal_string MatchmakingService::ConvertPreserveSessionModeToString(
result.estimatedWaitTime = waitTime;
}
if (errc)
if (FAILED(errc))
{
return WEB_E_INVALID_JSON_STRING;
}
@ -236,7 +234,7 @@ xsapi_internal_string MatchmakingService::ConvertPreserveSessionModeToString(
}
if (errc)
if (FAILED(errc))
{
return WEB_E_INVALID_JSON_STRING;
}
@ -554,330 +552,6 @@ HRESULT MatchmakingService::GetHopperStatistics(
});
}
#if !defined(XBOX_LIVE_CREATORS_SDK)
#if !XSAPI_NO_PPL
namespace legacy
{
match_ticket_details_response::match_ticket_details_response() :
m_buffer(),
m_matchTicketDetailsResponse()
{
}
match_ticket_details_response::match_ticket_details_response(std::shared_ptr<char> buffer) :
m_buffer(buffer),
m_matchTicketDetailsResponse(*reinterpret_cast<XblMatchTicketDetailsResponse*>(m_buffer.get()))
{
}
ticket_status
match_ticket_details_response::match_status() const
{
return static_cast<ticket_status>(m_matchTicketDetailsResponse.matchStatus);
}
std::chrono::seconds
match_ticket_details_response::estimated_wait_time() const
{
return std::chrono::seconds(m_matchTicketDetailsResponse.estimatedWaitTime);
}
preserve_session_mode
match_ticket_details_response::preserve_session() const
{
return static_cast<preserve_session_mode>(m_matchTicketDetailsResponse.preserveSession);
}
xbox::services::multiplayer::legacy::multiplayer_session_reference
match_ticket_details_response::ticket_session() const
{
return xbox::services::multiplayer::legacy::multiplayer_session_reference(
StringTFromUtf8(m_matchTicketDetailsResponse.ticketSession.Scid),
StringTFromUtf8(m_matchTicketDetailsResponse.ticketSession.SessionTemplateName),
StringTFromUtf8(m_matchTicketDetailsResponse.ticketSession.SessionName));
}
xbox::services::multiplayer::legacy::multiplayer_session_reference
match_ticket_details_response::target_session() const
{
return xbox::services::multiplayer::legacy::multiplayer_session_reference(
StringTFromUtf8(m_matchTicketDetailsResponse.targetSession.Scid),
StringTFromUtf8(m_matchTicketDetailsResponse.targetSession.SessionTemplateName),
StringTFromUtf8(m_matchTicketDetailsResponse.targetSession.SessionName));
}
web::json::value
match_ticket_details_response::ticket_attributes() const
{
return web::json::value(StringTFromUtf8(m_matchTicketDetailsResponse.ticketAttributes));
}
ticket_status match_ticket_details_response::convert_string_to_ticket_status(
_In_ const string_t& value
)
{
ticket_status ticketStatus = ticket_status::unknown;
if (!value.empty())
{
if (Stricmp(value, _T("expired")) == 0)
{
ticketStatus = ticket_status::expired;
}
else if (Stricmp(value, _T("searching")) == 0)
{
ticketStatus = ticket_status::searching;
}
else if (Stricmp(value, _T("found")) == 0)
{
ticketStatus = ticket_status::found;
}
else if (Stricmp(value, _T("canceled")) == 0)
{
ticketStatus = ticket_status::canceled;
}
}
return ticketStatus;
}
preserve_session_mode match_ticket_details_response::convert_string_to_preserve_session_mode(
_In_ const string_t& value
)
{
preserve_session_mode preserve_session_mode = preserve_session_mode::unknown;
if (!value.empty())
{
if (Stricmp(value, _T("always")) == 0)
{
preserve_session_mode = preserve_session_mode::always;
}
else if (Stricmp(value, _T("never")) == 0)
{
preserve_session_mode = preserve_session_mode::never;
}
}
return preserve_session_mode;
}
hopper_statistics_response::hopper_statistics_response() :
m_buffer(),
m_hopperStatisticsResponse()
{
}
hopper_statistics_response::hopper_statistics_response(std::shared_ptr<char> buffer) :
m_buffer(buffer),
m_hopperStatisticsResponse(*reinterpret_cast<XblHopperStatisticsResponse*>(m_buffer.get()))
{
}
/// <summary>
/// Name of the hopper in which a match was requested.
/// </summary>
string_t
hopper_statistics_response::hopper_name() const
{
return StringTFromUtf8(m_hopperStatisticsResponse.hopperName);
}
/// <summary>
/// Estimated wait time for a match request to be matched with other players.
/// </summary>
std::chrono::seconds hopper_statistics_response::estimated_wait_time() const
{
return std::chrono::seconds(m_hopperStatisticsResponse.estimatedWaitTime);
}
/// <summary>
/// The number of players in the hopper waiting to be matched.
/// </summary>
uint32_t hopper_statistics_response::players_waiting_to_match() const
{
return m_hopperStatisticsResponse.playersWaitingToMatch;
}
create_match_ticket_response::create_match_ticket_response() :
m_createMatchTicketResponse{ }
{
}
create_match_ticket_response::create_match_ticket_response(
XblCreateMatchTicketResponse response
) :
m_createMatchTicketResponse(response)
{
}
string_t
create_match_ticket_response::match_ticket_id() const
{
return StringTFromUtf8(m_createMatchTicketResponse.matchTicketId);
}
std::chrono::seconds
create_match_ticket_response::estimated_wait_time() const
{
return std::chrono::seconds(m_createMatchTicketResponse.estimatedWaitTime);
}
matchmaking_service::matchmaking_service(_In_ XblContextHandle contextHandle)
{
XblContextDuplicateHandle(contextHandle, &m_xblContext);
}
matchmaking_service::matchmaking_service(const matchmaking_service& other)
{
XblContextDuplicateHandle(other.m_xblContext, &m_xblContext);
}
matchmaking_service& matchmaking_service::operator=(matchmaking_service other)
{
std::swap(m_xblContext, other.m_xblContext);
return *this;
}
matchmaking_service::~matchmaking_service()
{
XblContextCloseHandle(m_xblContext);
}
pplx::task<xbl_result<create_match_ticket_response>> matchmaking_service::create_match_ticket(
_In_ const xbox::services::multiplayer::legacy::multiplayer_session_reference& ticketSessionReference,
_In_ const string_t& matchmakingServiceConfigurationId,
_In_ const string_t& hopperName,
_In_ const std::chrono::seconds& ticketTimeout,
_In_ preserve_session_mode preserveSession,
_In_ const web::json::value& ticketAttributesJson
)
{
auto xblContext = m_xblContext;
auto asyncWrapper = new xbox::services::legacy::AsyncWrapper<create_match_ticket_response>(
[](XAsyncBlock* async, create_match_ticket_response& result)
{
XblCreateMatchTicketResponse resultResponse;
auto hr = XblMatchmakingCreateMatchTicketResult(async, &resultResponse);
if (SUCCEEDED(hr))
{
result = create_match_ticket_response(resultResponse);
}
return hr;
});
XblMultiplayerSessionReference _ticketSessionReference;
Utf8FromCharT(ticketSessionReference.service_configuration_id().data(), _ticketSessionReference.Scid, sizeof(_ticketSessionReference.Scid));
Utf8FromCharT(ticketSessionReference.session_template_name().data(), _ticketSessionReference.SessionTemplateName, sizeof(_ticketSessionReference.SessionTemplateName));
Utf8FromCharT(ticketSessionReference.session_name().data(), _ticketSessionReference.SessionName, sizeof(_ticketSessionReference.SessionName));
auto hr = XblMatchmakingCreateMatchTicketAsync(
xblContext,
_ticketSessionReference,
StringFromStringT(matchmakingServiceConfigurationId).c_str(),
StringFromStringT(hopperName).c_str(),
ticketTimeout.count(),
static_cast<XblPreserveSessionMode>(preserveSession),
StringFromStringT(ticketAttributesJson.serialize()).c_str(),
&asyncWrapper->async
);
return asyncWrapper->Task(hr);
}
pplx::task<xbl_result<void>> matchmaking_service::delete_match_ticket(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName,
_In_ const string_t& ticketId
)
{
auto xblContext = m_xblContext;
auto asyncWrapper = new xbox::services::legacy::AsyncWrapper<void>();
auto hr = XblMatchmakingDeleteMatchTicketAsync(
xblContext,
StringFromStringT(serviceConfigurationId).c_str(),
StringFromStringT(hopperName).c_str(),
StringFromStringT(ticketId).c_str(),
&asyncWrapper->async);
return asyncWrapper->Task(hr);
}
pplx::task<xbl_result<match_ticket_details_response>> matchmaking_service::get_match_ticket_details(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName,
_In_ const string_t& ticketId
)
{
auto xblContext = m_xblContext;
auto asyncWrapper = new xbox::services::legacy::AsyncWrapper<match_ticket_details_response>(
[](XAsyncBlock* async, match_ticket_details_response& result)
{
size_t bufferSize;
auto hr = XblMatchmakingGetMatchTicketDetailsResultSize(async, &bufferSize);
if (SUCCEEDED(hr))
{
std::shared_ptr<char> buffer(new char[bufferSize], std::default_delete<char[]>());
XblMatchTicketDetailsResponse* resultPtr;
hr = XblMatchmakingGetMatchTicketDetailsResult(async, bufferSize, buffer.get(), &resultPtr, nullptr);
if (SUCCEEDED(hr))
{
result = match_ticket_details_response(buffer);
}
}
return hr;
});
auto hr = XblMatchmakingGetMatchTicketDetailsAsync(
xblContext,
StringFromStringT(serviceConfigurationId).c_str(),
StringFromStringT(hopperName).c_str(),
StringFromStringT(ticketId).c_str(),
&asyncWrapper->async);
return asyncWrapper->Task(hr);
}
pplx::task<xbl_result<hopper_statistics_response>> matchmaking_service::get_hopper_statistics(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& hopperName
)
{
auto xblContext = m_xblContext;
auto asyncWrapper = new xbox::services::legacy::AsyncWrapper<hopper_statistics_response>(
[](XAsyncBlock* async, hopper_statistics_response& result)
{
size_t bufferSize;
auto hr = XblMatchmakingGetHopperStatisticsResultSize(async, &bufferSize);
if (SUCCEEDED(hr))
{
std::shared_ptr<char> buffer(new char[bufferSize], std::default_delete<char[]>());
XblHopperStatisticsResponse* resultPtr;
hr = XblMatchmakingGetHopperStatisticsResult(async, bufferSize, buffer.get(), &resultPtr, nullptr);
if (SUCCEEDED(hr))
{
result = hopper_statistics_response(buffer);
}
}
return hr;
});
auto hr = XblMatchmakingGetHopperStatisticsAsync(
xblContext,
StringFromStringT(serviceConfigurationId).c_str(),
StringFromStringT(hopperName).c_str(),
&asyncWrapper->async);
return asyncWrapper->Task(hr);
}
}
#endif // !XSAPI_NO_PPL
#endif // !defined(XBOX_LIVE_CREATORS_SDK)
NAMESPACE_MICROSOFT_XBOX_SERVICES_MATCHMAKING_CPP_END

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

@ -9,7 +9,11 @@
#include "multiplayer_manager_internal.h"
#include "multiplayer_internal.h"
#include "xbox_live_app_config_internal.h"
#if HC_PLATFORM != HC_PLATFORM_WIN32 && !XSAPI_NO_PPL
#include "xsapi-cpp/title_callable_ui.h"
#endif
#if HC_PLATFORM == HC_PLATFORM_GDK
#include "XGameUI.h"
@ -97,16 +101,17 @@ MultiplayerClientManager::Initialize()
{
if (m_multiplayerLocalUserManager == nullptr)
{
m_multiplayerLocalUserManager = std::make_shared<MultiplayerLocalUserManager>();
m_multiplayerLocalUserManager = MakeShared<MultiplayerLocalUserManager>();
RegisterLocalUserManagerEvents();
}
m_latestPendingRead = std::make_shared<MultiplayerClientPendingReader>(
m_latestPendingRead = MakeShared<MultiplayerClientPendingReader>(
m_queue,
m_lobbySessionTemplateName,
m_multiplayerLocalUserManager
);
m_lastPendingRead = std::make_shared<MultiplayerClientPendingReader>();
m_lastPendingRead = MakeShared<MultiplayerClientPendingReader>(m_queue);
m_subscriptionsLostFired.store(false);
m_latestPendingRead->SetAutoFillMembersDuringMatchmaking(m_autoFillMembers);
}
@ -286,7 +291,7 @@ MultiplayerClientManager::JoinLobby(
if (!invitedUserFound)
{
// The invited user hasn't been added.
std::shared_ptr<JoinLobbyCompletedEventArgs> joinLobbyEventArgs = std::make_shared<JoinLobbyCompletedEventArgs>(invitedXuid);
std::shared_ptr<JoinLobbyCompletedEventArgs> joinLobbyEventArgs = MakeShared<JoinLobbyCompletedEventArgs>(invitedXuid);
// Since m_latestPendingRead hasn't been initialized yet, this will ensure
// the event is still returned correctly through multiplayer_manager::do_work();
@ -376,7 +381,7 @@ MultiplayerClientManager::JoinGame(
initArgs.InitiatorXuids = xboxUserIds.data();
initArgs.InitiatorXuidsCount = static_cast<uint32_t>(xboxUserIds.size());
auto gameSession = std::make_shared<XblMultiplayerSession>(
auto gameSession = MakeShared<XblMultiplayerSession>(
primaryContext->Xuid(),
&gameSessionRef,
&initArgs
@ -537,8 +542,8 @@ MultiplayerClientManager::InviteFriends(
#elif HC_PLATFORM == HC_PLATFORM_GDK
XAsyncBlock* asyncBlock = utils::MakeAsyncBlock();
asyncBlock->queue = get_xsapi_singleton_async_queue();
XAsyncBlock* asyncBlock = Make<XAsyncBlock>();
asyncBlock->queue = m_queue.GetHandle();
asyncBlock->context = utils::store_shared_ptr(shared_from_this());
asyncBlock->callback = [](_In_ XAsyncBlock* asyncBlock)
{
@ -778,7 +783,7 @@ MultiplayerClientManager::OnMultiplayerConnectionIdChanged()
if (lobbySession && lobbyClientSessionSafe.CurrentUser() && lobbyClientSessionSafe.CurrentUser()->Status == XblMultiplayerSessionMemberStatus::Active)
{
MultiplayerSessionMember::Get(lobbyClientSessionSafe.CurrentUser())->SetStatus(lobbyClientSessionSafe.CurrentUser()->Status);
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
lobbyClient->AddToPendingQueue(pendingRequest);
}
@ -788,7 +793,7 @@ MultiplayerClientManager::OnMultiplayerConnectionIdChanged()
if (gameSession && gameClientSessionSafe.CurrentUser() && gameClientSessionSafe.CurrentUser()->Status == XblMultiplayerSessionMemberStatus::Active)
{
MultiplayerSessionMember::Get(gameClientSessionSafe.CurrentUser())->SetStatus(gameClientSessionSafe.CurrentUser()->Status);
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
gameClient->AddToPendingQueue(pendingRequest);
}
}
@ -1030,7 +1035,7 @@ MultiplayerClientManager::HandleMemberListChanged(
gameMembers.push_back(latestPendingRead->ConvertToGameMember(member));
}
std::shared_ptr<MemberJoinedEventArgs> memberJoinedEventArgs = std::make_shared<MemberJoinedEventArgs>(gameMembers);
std::shared_ptr<MemberJoinedEventArgs> memberJoinedEventArgs = MakeShared<MemberJoinedEventArgs>(gameMembers);
AddToLatestPendingReadEventQueue(
XblMultiplayerEventType::MemberJoined,
@ -1047,7 +1052,7 @@ MultiplayerClientManager::HandleMemberListChanged(
gameMembers.push_back(latestPendingRead->ConvertToGameMember(member));
}
std::shared_ptr<MemberLeftEventArgs> memberLeftEventArgs = std::make_shared<MemberLeftEventArgs>(
std::shared_ptr<MemberLeftEventArgs> memberLeftEventArgs = MakeShared<MemberLeftEventArgs>(
gameMembers
);
@ -1107,7 +1112,7 @@ MultiplayerClientManager::HandleMemberPropertiesChanged(
{
continue;
}
std::shared_ptr<MemberPropertyChangedEventArgs> memberPropertiesChangedArgs = std::make_shared<MemberPropertyChangedEventArgs>(
std::shared_ptr<MemberPropertyChangedEventArgs> memberPropertiesChangedArgs = MakeShared<MemberPropertyChangedEventArgs>(
latestPendingRead->ConvertToGameMember(member),
member->CustomPropertiesJson
);
@ -1157,7 +1162,7 @@ MultiplayerClientManager::HandleSessionPropertiesChanged(
}
XblMultiplayerSessionReadLockGuard currentSessionSafe(currentSession);
auto gamePropertiesChangedArgs = std::make_shared<SessionPropertyChangedEventArgs>(
auto gamePropertiesChangedArgs = MakeShared<SessionPropertyChangedEventArgs>(
currentSessionSafe.SessionProperties().SessionCustomPropertiesJson
);
@ -1186,7 +1191,7 @@ MultiplayerClientManager::HandleHostChanged(
}
}
std::shared_ptr<HostChangedEventArgs> hostChangedEventArgs = std::make_shared<HostChangedEventArgs>(
std::shared_ptr<HostChangedEventArgs> hostChangedEventArgs = MakeShared<HostChangedEventArgs>(
hostMember
);

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

@ -44,13 +44,14 @@ void MultiplayerClientPendingReader::deep_copy_if_updated(
}
}
MultiplayerClientPendingReader::MultiplayerClientPendingReader() :
MultiplayerClientPendingReader::MultiplayerClientPendingReader(const TaskQueue& queue) :
m_queue{ queue.DeriveWorkerQueue() },
m_autoFillMembers(false)
{
m_multiplayerLocalUserManager = std::make_shared<MultiplayerLocalUserManager>();
m_lobbyClient = std::make_shared<MultiplayerLobbyClient>(get_xsapi_singleton_async_queue());
m_gameClient = std::make_shared<MultiplayerGameClient>(get_xsapi_singleton_async_queue());
m_matchClient = std::make_shared<manager::MultiplayerMatchClient>(get_xsapi_singleton_async_queue(), m_multiplayerLocalUserManager);
m_multiplayerLocalUserManager = MakeShared<MultiplayerLocalUserManager>();
m_lobbyClient = MakeShared<MultiplayerLobbyClient>(m_queue);
m_gameClient = MakeShared<MultiplayerGameClient>(m_queue);
m_matchClient = MakeShared<manager::MultiplayerMatchClient>(m_queue, m_multiplayerLocalUserManager);
}
MultiplayerClientPendingReader::~MultiplayerClientPendingReader()
@ -62,15 +63,17 @@ MultiplayerClientPendingReader::~MultiplayerClientPendingReader()
}
MultiplayerClientPendingReader::MultiplayerClientPendingReader(
_In_ const TaskQueue& queue,
_In_ const xsapi_internal_string& lobbySessionTemplateName,
_In_ std::shared_ptr<MultiplayerLocalUserManager> localUserManager
) :
m_queue{ queue.DeriveWorkerQueue() },
m_autoFillMembers(false),
m_multiplayerLocalUserManager(localUserManager)
{
m_lobbyClient = std::make_shared<MultiplayerLobbyClient>(get_xsapi_singleton_async_queue(), lobbySessionTemplateName, m_multiplayerLocalUserManager);
m_gameClient = std::make_shared<MultiplayerGameClient>(get_xsapi_singleton_async_queue(), m_multiplayerLocalUserManager);
m_matchClient = std::make_shared<manager::MultiplayerMatchClient>(get_xsapi_singleton_async_queue(), m_multiplayerLocalUserManager);
m_lobbyClient = MakeShared<MultiplayerLobbyClient>(m_queue, lobbySessionTemplateName, m_multiplayerLocalUserManager);
m_gameClient = MakeShared<MultiplayerGameClient>(m_queue, m_multiplayerLocalUserManager);
m_matchClient = MakeShared<manager::MultiplayerMatchClient>(m_queue, m_multiplayerLocalUserManager);
m_lobbyClient->Initialize();
m_gameClient->Initialize();
}
@ -291,7 +294,7 @@ MultiplayerClientPendingReader::SetProperties(
_In_opt_ context_t context
)
{
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetSessionProperties(name, valueJson, context);
AddToPendingQueue(sessionRef, pendingRequest);
return S_OK;
@ -304,7 +307,7 @@ MultiplayerClientPendingReader::SetSynchronizedHost(
_In_opt_ context_t context
)
{
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetSynchronizedHostDeviceToken(hostDeviceToken, context);
AddToPendingQueue(sessionRef, pendingRequest);
return S_OK;
@ -318,7 +321,7 @@ MultiplayerClientPendingReader::SetSynchronizedProperties(
_In_opt_ context_t context
)
{
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetSynchronizedSessionProperties(name, valueJson, context);
AddToPendingQueue(sessionRef, pendingRequest);
return S_OK;

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

@ -202,7 +202,7 @@ MultiplayerGameClient::ConvertToMultiplayerGame(
gameMembers.push_back(gameMember);
}
return std::make_shared<MultiplayerGameSession>(
return MakeShared<MultiplayerGameSession>(
sessionToConvert,
hostMember,
gameMembers
@ -500,7 +500,7 @@ MultiplayerGameClient::RemoveStaleUsersFromRemoteSession()
{
std::weak_ptr<MultiplayerGameClient> weakSessionWriter = shared_from_this();
auto sessionToCommit = std::make_shared<XblMultiplayerSession>(localUser->Xuid(), &gameSession->SessionReference(), nullptr);
auto sessionToCommit = MakeShared<XblMultiplayerSession>(localUser->Xuid(), &gameSession->SessionReference(), nullptr);
sessionToCommit->Leave();
m_sessionWriter->WriteSession(localUser->Context(), sessionToCommit, XblMultiplayerSessionWriteMode::UpdateExisting, true,
[weakSessionWriter](Result<std::shared_ptr<XblMultiplayerSession>> result)
@ -716,7 +716,7 @@ HRESULT MultiplayerGameClient::JoinGameForAllLocalMembers(
if (joinResult.Hresult() == HTTP_E_STATUS_NOT_FOUND && !m_handleIdToJoin.empty())
{
// We tried to join an existing session but it didn't exist. Create a new game session
// from the lobby and clear the the existing handleId since it must be invalid.
// from the lobby and clear the existing handleId since it must be invalid.
if (m_createGameIfFailedToJoin)
{
m_callback(lobbyClient->CreateGameFromLobby());
@ -780,8 +780,16 @@ HRESULT MultiplayerGameClient::JoinGameFromLobbyHelper(
// Check if the lobby has a game session associated with it to join.
XblMultiplayerSessionReadLockGuard lobbySessionSafe(lobbySession);
auto lobbyProperties = ParseJson(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
if (!lobbyProperties.has_field(utils::string_t_from_internal_string(MultiplayerLobbyClient_TransferHandlePropertyName)))
JsonDocument jsonDoc;
jsonDoc.Parse(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
xsapi_internal_string transferHandle;
if (!jsonDoc.HasParseError())
{
JsonUtils::ExtractJsonString(jsonDoc, MultiplayerLobbyClient_TransferHandlePropertyName, transferHandle, false);
}
if (transferHandle.empty()) // aka the field isn't there
{
return lobbyClient->CreateGameFromLobby();
}
@ -806,7 +814,7 @@ void MultiplayerGameClient::LeaveRemoteSession(
_In_ bool triggerCompletionEvent
) noexcept
{
auto processingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto processingRequest = MakeShared<MultiplayerClientPendingRequest>();
m_processingQueue.push_back(processingRequest);
m_sessionWriter->LeaveRemoteSession(session,

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

@ -240,7 +240,7 @@ MultiplayerLobbyClient::ConvertToMultiplayerLobby(
gameMembers.push_back(gameMember);
}
return std::make_shared<MultiplayerLobbySession>(
return MakeShared<MultiplayerLobbySession>(
sessionToConvert,
hostMember,
gameMembers,
@ -333,7 +333,7 @@ MultiplayerLobbyClient::AddLocalUser(
localUser = localUserResult.ExtractPayload();
}
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUser(localUser);
pendingRequest->SetLobbyState(userState);
if (userState == MultiplayerLocalUserLobbyState::Join)
@ -383,7 +383,7 @@ MultiplayerLobbyClient::RemoveLocalUser(
auto localUser = m_multiplayerLocalUserManager->GetLocalUserHelper(user);
RETURN_HR_IF_LOG_DEBUG(localUser == nullptr || localUser->Context() == nullptr, E_UNEXPECTED, "Call add_local_user() first.");
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUser(localUser);
pendingRequest->SetLobbyState(MultiplayerLocalUserLobbyState::Leave);
AddToPendingQueue(pendingRequest);
@ -404,7 +404,7 @@ MultiplayerLobbyClient::RemoveAllLocalUsers()
const auto& localUser = xboxLiveContext.second;
if (localUser != nullptr)
{
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUser(localUser);
pendingRequest->SetLobbyState(MultiplayerLocalUserLobbyState::Leave);
AddToPendingQueue(pendingRequest);
@ -427,7 +427,7 @@ MultiplayerLobbyClient::SetLocalMemberProperties(
auto localUser = m_multiplayerLocalUserManager->GetLocalUserHelper(user);
RETURN_HR_IF_LOG_DEBUG(localUser == nullptr || localUser->Context() == nullptr, E_UNEXPECTED, "Call add_local_user() before setting local member properties.");
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUserProperties(localUser, name, valueJson, context);
AddToPendingQueue(pendingRequest);
@ -447,7 +447,7 @@ MultiplayerLobbyClient::DeleteLocalMemberProperties(
auto localUser = m_multiplayerLocalUserManager->GetLocalUserHelper(user);
RETURN_HR_IF_LOG_DEBUG(localUser == nullptr || localUser->Context() == nullptr, E_UNEXPECTED, "Call add_local_user() before deleting local member properties.");
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUserProperties(localUser, name, JsonValue(), context);
AddToPendingQueue(pendingRequest);
@ -467,7 +467,7 @@ MultiplayerLobbyClient::SetLocalMemberConnectionAddress(
auto localUser = m_multiplayerLocalUserManager->GetLocalUserHelper(user);
RETURN_HR_IF_LOG_DEBUG(localUser == nullptr || localUser->Context() == nullptr, E_UNEXPECTED, "Call add_local_user() before setting local member connection address.");
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetLocalUserConnectionAddress(localUser, address, context);
AddToPendingQueue(pendingRequest);
@ -481,7 +481,7 @@ HRESULT MultiplayerLobbyClient::SetJoinability(
{
RETURN_HR_INVALIDARGUMENT_IF(value < XblMultiplayerJoinability::JoinableByFriends || value > XblMultiplayerJoinability::Closed);
auto pendingRequest = std::make_shared<MultiplayerClientPendingRequest>();
auto pendingRequest = MakeShared<MultiplayerClientPendingRequest>();
pendingRequest->SetJoinability(value, context);
AddToPendingQueue(pendingRequest);
@ -606,7 +606,10 @@ MultiplayerLobbyClient::DoWork()
// than the join fails for the whole list of users.
for (auto pendingRequest : processingQueue)
{
xuidsInOrder.push_back(pendingRequest->LocalUser()->Xuid());
if (pendingRequest->LocalUser())
{
xuidsInOrder.push_back(pendingRequest->LocalUser()->Xuid());
}
}
}
@ -1358,7 +1361,7 @@ void MultiplayerLobbyClient::AdvertiseGameSession() noexcept
void CreateTransferHandle(std::shared_ptr<XblMultiplayerSession> lobbySession) noexcept
{
rapidjson::Document lobbyProperties;
JsonDocument lobbyProperties;
{
XblMultiplayerSessionReadLockGuard lobbySessionSafe(lobbySession);
lobbyProperties.Parse(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
@ -1533,18 +1536,22 @@ MultiplayerLobbyClient::IsTransferHandleState(
}
XblMultiplayerSessionReadLockGuard lobbySessionSafe(lobbySession);
auto lobbyProperties = ParseJson(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
auto propertyName = utils::string_t_from_internal_string(MultiplayerLobbyClient_TransferHandlePropertyName);
if (lobbyProperties.has_field(propertyName))
JsonDocument jsonDoc;
jsonDoc.Parse(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
if (!jsonDoc.HasParseError())
{
auto transferHandleProp = utils::internal_string_from_string_t(lobbyProperties.at(propertyName).as_string());
xsapi_internal_vector<xsapi_internal_string> transferHandleSplit = utils::string_split(transferHandleProp, '~');
if (transferHandleSplit.size() > 0 &&
utils::str_icmp_internal(transferHandleSplit[0], state) == 0)
xsapi_internal_string transferHandleProp;
if (SUCCEEDED(JsonUtils::ExtractJsonString(jsonDoc, MultiplayerLobbyClient_TransferHandlePropertyName, transferHandleProp, true)))
{
return true;
xsapi_internal_vector<xsapi_internal_string> transferHandleSplit = utils::string_split_internal(transferHandleProp, '~');
if (transferHandleSplit.size() > 0 &&
utils::str_icmp_internal(transferHandleSplit[0], state) == 0)
{
return true;
}
}
}
@ -1561,22 +1568,26 @@ MultiplayerLobbyClient::GetTransferHandle()
}
XblMultiplayerSessionReadLockGuard lobbySessionSafe(lobbySession);
auto lobbyProperties = ParseJson(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
auto propertyName = utils::string_t_from_internal_string(MultiplayerLobbyClient_TransferHandlePropertyName);
JsonDocument jsonDoc;
jsonDoc.Parse(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
if (lobbyProperties.has_field(propertyName))
if (!jsonDoc.HasParseError())
{
auto transferHandleProp = utils::internal_string_from_string_t(lobbyProperties.at(propertyName).as_string());
xsapi_internal_vector<xsapi_internal_string> transferHandleSplit = utils::string_split(transferHandleProp, '~');
if (transferHandleSplit.size() == 2)
xsapi_internal_string transferHandleProp;
if (SUCCEEDED(JsonUtils::ExtractJsonString(jsonDoc, MultiplayerLobbyClient_TransferHandlePropertyName, transferHandleProp, true)))
{
return transferHandleSplit[1];
xsapi_internal_vector<xsapi_internal_string> transferHandleSplit = utils::string_split_internal(transferHandleProp, '~');
if (transferHandleSplit.size() == 2)
{
return transferHandleSplit[1];
}
}
}
return xsapi_internal_string();
}
void
MultiplayerLobbyClient::LeaveRemoteSession(
_In_ std::shared_ptr<XblMultiplayerSession> session
@ -1731,22 +1742,28 @@ MultiplayerLobbyClient::HandleJoinLobbyCompleted(
// Join game via the transfer handle.
XblMultiplayerSessionReadLockGuard lobbySessionSafe(lobbySession);
auto lobbyProperties = ParseJson(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
if (lobbyProperties.size() > 0)
JsonDocument lobbyProperties;
lobbyProperties.Parse(lobbySessionSafe.SessionProperties().SessionCustomPropertiesJson);
if (!lobbyProperties.HasParseError())
{
xsapi_internal_string transferHandle;
if (IsTransferHandleState("completed"))
if (lobbyProperties.IsObject() && lobbyProperties.MemberCount() > 0)
{
transferHandle = GetTransferHandle();
}
else
{
// No existing game session
return;
}
xsapi_internal_string transferHandle;
gameClient->JoinGameByHandle(transferHandle, false, nullptr);
if (IsTransferHandleState("completed"))
{
transferHandle = GetTransferHandle();
}
else
{
// No existing game session
return;
}
gameClient->JoinGameByHandle(transferHandle, false, nullptr);
}
}
}
}
@ -1757,7 +1774,7 @@ MultiplayerLobbyClient::JoinLobbyCompleted(
_In_ uint64_t invitedXboxUserId
)
{
std::shared_ptr<JoinLobbyCompletedEventArgs> joinLobbyEventArgs = std::make_shared<JoinLobbyCompletedEventArgs>(
std::shared_ptr<JoinLobbyCompletedEventArgs> joinLobbyEventArgs = MakeShared<JoinLobbyCompletedEventArgs>(
invitedXboxUserId
);

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

@ -49,7 +49,7 @@ void MultiplayerManager::Initialize(
m_multiplayerClientManager = MakeShared<MultiplayerClientManager>(lobbySessionTemplateName, m_queue);
m_multiplayerClientManager->RegisterLocalUserManagerEvents();
m_multiplayerLobbySession = std::make_shared<MultiplayerLobbySession>(m_multiplayerClientManager);
m_multiplayerLobbySession = MakeShared<MultiplayerLobbySession>(m_multiplayerClientManager);
}
bool MultiplayerManager::IsDirty()
@ -153,7 +153,7 @@ MultiplayerManager::SetMultiplayerLobbySession(
}
// Don't set the lobby to null so that the title can add local users whenever it chooses.
m_multiplayerLobbySession = std::make_shared<MultiplayerLobbySession>(m_multiplayerClientManager);
m_multiplayerLobbySession = MakeShared<MultiplayerLobbySession>(m_multiplayerClientManager);
}
else
{

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

@ -281,7 +281,10 @@ STDAPI XblMultiplayerManagerLobbySessionLocalMembers(
RETURN_HR_INVALIDARGUMENT_IF(localMembers == nullptr && localMembersCount > 0);
for (size_t i = 0; i < localMembersVector.size(); ++i)
{
DISABLE_WARNING_PUSH;
SUPPRESS_WARNING_NULL_PTR_DEREFERENCE; // null pointer deref
localMembers[i] = localMembersVector[i]->GetReference();
DISABLE_WARNING_POP;
}
return S_OK;
});
@ -649,7 +652,10 @@ STDAPI XblMultiplayerManagerGameSessionMembers(
RETURN_HR_INVALIDARGUMENT_IF(members == nullptr && membersCount > 0);
for (size_t i = 0; i < membersVector.size(); ++i)
{
DISABLE_WARNING_PUSH;
SUPPRESS_WARNING_NULL_PTR_DEREFERENCE;
members[i] = membersVector[i]->GetReference();
DISABLE_WARNING_POP;
}
return S_OK;
});

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

@ -311,9 +311,9 @@ private:
xsapi_internal_vector<std::shared_ptr<MultiplayerMember>> m_localMembers;
xsapi_internal_string m_customPropertiesJson;
XblMultiplayerSessionConstants m_sessionConstants;
XblMultiplayerSessionConstants m_sessionConstants{};
xsapi_internal_vector<uint64_t> m_initiatorXuids;
XblMultiplayerMemberInitialization m_memberInitialization;
XblMultiplayerMemberInitialization m_memberInitialization{};
xsapi_internal_string m_constantsCustomJson;
xsapi_internal_string m_constantsCloudComputePackageJson;
xsapi_internal_string m_constantsMeasurementServerAddressesJson;
@ -1133,9 +1133,10 @@ private:
class MultiplayerClientPendingReader : public std::enable_shared_from_this<MultiplayerClientPendingReader>
{
public:
MultiplayerClientPendingReader();
MultiplayerClientPendingReader(const TaskQueue& queue);
~MultiplayerClientPendingReader();
MultiplayerClientPendingReader(
_In_ const TaskQueue& queue,
_In_ const xsapi_internal_string& lobbySessionTemplateName,
_In_ std::shared_ptr<MultiplayerLocalUserManager> localUserManager
);
@ -1215,6 +1216,7 @@ private:
static bool IsLocal(_In_ uint64_t xuid, _In_ const xsapi_internal_map<uint64_t, std::shared_ptr<MultiplayerLocalUser>>& xboxLiveContextMap);
TaskQueue m_queue;
bool m_autoFillMembers;
MultiplayerEventQueue m_multiplayerEventQueue;
mutable std::mutex m_clientRequestLock;
@ -1544,12 +1546,12 @@ private:
std::mutex m_synchronizeWriteWithTapLock;
std::atomic<bool> m_subscriptionsLostFired;
bool m_autoFillMembers;
bool m_autoFillMembers{ false };
xsapi_internal_string m_lobbySessionTemplateName;
XblFunctionContext m_sessionChangedContext;
XblFunctionContext m_connectionIdChangedContext;
XblFunctionContext m_subscriptionLostContext;
XblFunctionContext m_rtaResyncContext;
XblFunctionContext m_sessionChangedContext{ 0 };
XblFunctionContext m_connectionIdChangedContext{ 0 };
XblFunctionContext m_subscriptionLostContext{ 0 };
XblFunctionContext m_rtaResyncContext{ 0 };
MultiplayerEventQueue m_multiplayerEventQueue;
std::shared_ptr<XblContext> m_primaryXboxLiveContext;

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

@ -65,12 +65,12 @@ XblMultiplayerJoinability MultiplayerManagerUtils::GetJoinability(
)
{
xsapi_internal_string joinableStr;
auto customPropertiesjson = ParseJson(sessionProperties.SessionCustomPropertiesJson);
auto propertyName = utils::string_t_from_internal_string(MultiplayerLobbyClient_JoinabilityPropertyName);
JsonDocument jsonDoc;
jsonDoc.Parse(sessionProperties.SessionCustomPropertiesJson);
if (customPropertiesjson.has_field(propertyName))
if (!jsonDoc.HasParseError())
{
joinableStr = utils::internal_string_from_string_t(customPropertiesjson.at(propertyName).as_string());
JsonUtils::ExtractJsonString(jsonDoc, MultiplayerLobbyClient_JoinabilityPropertyName, joinableStr, false);
}
return ConvertStringToJoinability(joinableStr);

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

@ -18,7 +18,7 @@ using namespace Windows::Xbox::Networking;
NAMESPACE_MICROSOFT_XBOX_SERVICES_MULTIPLAYER_MANAGER_CPP_BEGIN
MultiplayerMatchClient::MultiplayerMatchClient(
const TaskQueue& queue,
_In_ const TaskQueue& queue,
_In_ std::shared_ptr<MultiplayerLocalUserManager> localUserManager
) noexcept :
m_queue{ queue.DeriveWorkerQueue() },
@ -164,14 +164,14 @@ MultiplayerMatchClient::CheckNextTimer()
void
MultiplayerMatchClient::HandleQosMeasurements()
{
std::shared_ptr<PerformQosMeasurementsEventArgs> performQosEventArgs = std::make_shared<PerformQosMeasurementsEventArgs>();
std::shared_ptr<PerformQosMeasurementsEventArgs> performQosEventArgs = MakeShared<PerformQosMeasurementsEventArgs>();
XblMultiplayerSessionReadLockGuard sessionSafe(Session());
for (const auto& member : sessionSafe.Members())
{
if (!member.IsCurrentUser)
{
std::vector<unsigned char> base64ConnectionAddress(xbox::services::convert::from_base64(utils::string_t_from_internal_string(member.SecureDeviceBaseAddress64)));
std::vector<unsigned char> base64ConnectionAddress(xbox::services::convert::from_base64(member.SecureDeviceBaseAddress64));
const xsapi_internal_string& secureDeviceAddress = xsapi_internal_string(base64ConnectionAddress.begin(), base64ConnectionAddress.end());
if (!secureDeviceAddress.empty())
{
@ -215,7 +215,7 @@ MultiplayerMatchClient::HandleFindMatchCompleted(
failure = matchSessionSafe.CurrentUser()->InitializationFailureCause;
}
std::shared_ptr<FindMatchCompletedEventArgs> findMatchEventArgs = std::make_shared<FindMatchCompletedEventArgs>(
std::shared_ptr<FindMatchCompletedEventArgs> findMatchEventArgs = MakeShared<FindMatchCompletedEventArgs>(
m_matchStatus,
failure
);
@ -564,7 +564,7 @@ void MultiplayerMatchClient::HandleMatchFound(
m_matchStatus = XblMultiplayerMatchStatus::Found;
auto& targetSessionRef = currentSession->MatchmakingServer()->TargetSessionRef;
auto targetGameSession = std::make_shared<XblMultiplayerSession>(
auto targetGameSession = MakeShared<XblMultiplayerSession>(
primaryXboxLiveContext->Xuid(),
&targetSessionRef,
nullptr

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

@ -626,7 +626,7 @@ MultiplayerSessionWriter::HandleEvents(
eventQueue.AddEvent(
XblMultiplayerEventType::SynchronizedHostWriteCompleted,
sessionType,
std::make_shared<XblMultiplayerEventArgs>(),
MakeShared<XblMultiplayerEventArgs>(),
error,
request->Context()
);

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

@ -21,7 +21,7 @@ MultiplayerActivityHandlePostRequest::SessionReference() const
}
void
MultiplayerActivityHandlePostRequest::Serialize(_Out_ JsonValue& json, JsonDocument::AllocatorType& allocator) const
MultiplayerActivityHandlePostRequest::Serialize(_Out_ JsonValue& json, _In_ JsonDocument::AllocatorType& allocator) const
{
json.SetObject();

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

@ -54,7 +54,7 @@ MultiplayerActivityQueryPostRequest::SocialGroupXuid() const
}
void
MultiplayerActivityQueryPostRequest::Serialize(_Out_ JsonValue& json, JsonDocument::AllocatorType& allocator)
MultiplayerActivityQueryPostRequest::Serialize(_Out_ JsonValue& json, _In_ JsonDocument::AllocatorType& allocator)
{
XSAPI_ASSERT(m_socialGroup.empty() || m_xuids.empty());
XSAPI_ASSERT(!m_socialGroup.empty() || !m_xuids.empty());

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

@ -198,6 +198,31 @@ STDAPI XblMultiplayerCreateSearchHandleAsync(
RETURN_HR_INVALIDARGUMENT_IF(numberAttributesCount > 0 && numberAttributes == nullptr);
RETURN_HR_INVALIDARGUMENT_IF(stringAttributesCount > 0 && stringAttributes == nullptr);
//ensure all attributes are properly terminated, otherwise we'll write a property
//longer than is allowed into the json, which will crash eventually on deserialization
if (tagsCount > 0)
{
for (size_t i = 0; i < tagsCount; i++)
{
RETURN_HR_INVALIDARGUMENT_IF(utils::EnsureLessThanMaxLength(tags[i].value, XBL_MULTIPLAYER_SEARCH_HANDLE_MAX_FIELD_LENGTH) == false);
}
}
if (numberAttributesCount > 0)
{
for (size_t i = 0; i < numberAttributesCount; i++)
{
RETURN_HR_INVALIDARGUMENT_IF(utils::EnsureLessThanMaxLength(numberAttributes[i].name, XBL_MULTIPLAYER_SEARCH_HANDLE_MAX_FIELD_LENGTH) == false);
}
}
if (stringAttributesCount > 0)
{
for (size_t i = 0; i < stringAttributesCount; i++)
{
RETURN_HR_INVALIDARGUMENT_IF(utils::EnsureLessThanMaxLength(stringAttributes[i].name, XBL_MULTIPLAYER_SEARCH_HANDLE_MAX_FIELD_LENGTH) == false);
RETURN_HR_INVALIDARGUMENT_IF(utils::EnsureLessThanMaxLength(stringAttributes[i].value, XBL_MULTIPLAYER_SEARCH_HANDLE_MAX_FIELD_LENGTH) == false);
}
}
MultiplayerSearchHandleRequest request{ *sessionRef };
if (tagsCount > 0)
{

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

@ -117,7 +117,7 @@ private:
xsapi_internal_vector<const char*> m_encounters; // TODO these never get deserialized
xsapi_internal_vector<uint32_t> m_membersInGroupIds;
XblMultiplayerSessionChangeTypes m_subscribedChangeTypes;
XblMultiplayerSessionChangeTypes m_subscribedChangeTypes{ XblMultiplayerSessionChangeTypes::None };
xsapi_internal_string m_matchmakingResultServerMeasurementsJson;
xsapi_internal_string m_serverMeasurementsJson;
xsapi_internal_string m_qosMeasurementsJson;
@ -572,78 +572,6 @@ private:
Vector<XblMultiplayerRoleType> m_values{};
};
#if !XSAPI_NO_PPL
namespace legacy
{
/// <summary>
/// Represents a reference to a multiplayer session.
/// </summary>
class multiplayer_session_reference
{
public:
/// <summary>
/// Constructs a null MultiplayerSession object.
/// </summary>
multiplayer_session_reference();
/// <summary>
/// Constructs the MultiplayerSession object with data about the session.
/// </summary>
/// <param name="serviceConfigurationId">A service configuration ID appropriate for the title.</param>
/// <param name="sessionTemplateName">The name of the template for the session to be based on.</param>
/// <param name="sessionName">A unique name for the session.</param>
multiplayer_session_reference(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& sessionTemplateName,
_In_ const string_t& sessionName
);
/// <summary>
/// The service configuration ID specific to the title.
/// </summary>
string_t service_configuration_id() const;
/// <summary>
/// The name of the template for the session.
/// </summary>
string_t session_template_name() const;
/// <summary>
/// The name of the session.
/// </summary>
string_t session_name() const;
/// <summary>
/// Whether this object has been properly constructed
/// </summary>
bool is_null() const;
/// <summary>
/// Returns a URI path representation of the session reference.
/// </summary>
string_t to_uri_path() const;
/// <summary>
/// Returns the session reference parsed from URI.
/// </summary>
static multiplayer_session_reference parse_from_uri_path(_In_ const string_t& path);
/// <summary>
/// Internal function
/// </summary>
multiplayer_session_reference(_In_ const XblMultiplayerSessionReference& reference);
private:
mutable XblMultiplayerSessionReference m_reference;
//friend class multiplayer_session;
//friend class multiplayer_service;
//friend class multiplayer_search_handle_request;
//friend class social::reputation_service;
};
}
#endif
NAMESPACE_MICROSOFT_XBOX_SERVICES_MULTIPLAYER_CPP_END
struct XblMultiplayerSession : public xbox::services::RefCounter, public std::enable_shared_from_this<XblMultiplayerSession>

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

@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "pch.h"
#include "xbox_system_factory.h"
#include "multiplayer_internal.h"
#include "xbox_live_context_internal.h"
#include "real_time_activity_manager.h"
@ -260,7 +259,7 @@ String SessionQuery::PathAndQuery() const noexcept
{
Stringstream param;
param << "xuid=";
param << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::uint64_to_string_t(XuidFilters[0])));
param << xbox::services::uri::encode_uri(utils::uint64_to_internal_string(XuidFilters[0]));
params.push_back(param.str());
}
@ -268,7 +267,7 @@ String SessionQuery::PathAndQuery() const noexcept
{
Stringstream param;
param << "keyword=";
param << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_utf8(KeywordFilter)));
param << xbox::services::uri::encode_uri(KeywordFilter);
params.push_back(param.str());
}
@ -276,7 +275,7 @@ String SessionQuery::PathAndQuery() const noexcept
{
Stringstream param;
param << "visibility=";
param << utils::internal_string_from_string_t(xbox::services::uri::encode_uri(utils::string_t_from_internal_string(Serializers::StringFromMultiplayerSessionVisibility(VisibilityFilter))));
param << xbox::services::uri::encode_uri(Serializers::StringFromMultiplayerSessionVisibility(VisibilityFilter));
params.push_back(param.str());
}
@ -486,7 +485,7 @@ HRESULT MultiplayerService::SetTransferHandle(
auto result = Serializers::DeserializeMultiplayerInvite(httpResult.Payload()->GetResponseBodyJson());
auto multiplayerInvite = result.Payload();
if (result.Hresult())
if (Failed(result))
{
return async.Complete(result.Hresult());
}
@ -648,7 +647,7 @@ HRESULT MultiplayerService::DeleteSearchHandle(
m_xboxLiveContextSettings,
"DELETE",
XblHttpCall::BuildUrl("sessiondirectory", handleStr),
xbox_live_api::set_activity
xbox_live_api::delete_search_handle
));
RETURN_HR_IF_FAILED(httpCall->SetXblServiceContractVersion(MULTIPLAYER_SERVICE_CONTRACT_VERSION));
@ -1077,7 +1076,8 @@ HRESULT MultiplayerService::WriteSessionUsingSubpath(
}
else if (statusCode == 204)
{
return async.Complete({ xbl_error_code::no_error });
// Consistent with XDK behavior, return success on 204 when writing session
return async.Complete(S_OK);
}
auto responseJson = httpResult.Payload()->GetResponseBodyJson();
@ -1110,7 +1110,7 @@ HRESULT MultiplayerService::WriteSessionUsingSubpath(
httpResult.Payload()->GetResponseBodyJson()
);
if (session->DeserializationError() && SUCCEEDED(hr))
if (FAILED(session->DeserializationError()) && SUCCEEDED(hr))
{
// WriteSession failed due to deserialization error
hr = session->DeserializationError();
@ -1316,7 +1316,7 @@ void MultiplayerService::RemoveMultiplayerSubscriptionLostHandler(
}
XblFunctionContext MultiplayerService::AddMultiplayerConnectionIdChangedHandler(
MultiplayerSubscription::ConnectionIdChangedHandler handler
_In_ MultiplayerSubscription::ConnectionIdChangedHandler handler
) noexcept
{
std::lock_guard<std::mutex> lock{ m_mutexMultiplayerService };

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

@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "pch.h"
#include "xbox_system_factory.h"
#include "xsapi_utils.h"
#include "multiplayer_internal.h"
using namespace xbox::services;
@ -61,7 +58,7 @@ XblMultiplayerSession::XblMultiplayerSession(
m_writeConstants(false),
m_memberRequestIndex(0)
{
auto sessionDatetime = xbox::services::datetime::from_string(utils::string_t_from_internal_string(responseDate), xbox::services::datetime::date_format::RFC_1123);
auto sessionDatetime = xbox::services::datetime::from_string(responseDate, xbox::services::datetime::date_format::RFC_1123);
m_sessionRetrievedTime = utils::time_t_from_datetime(sessionDatetime);
Initialize();
Deserialize(json);
@ -1466,7 +1463,7 @@ HRESULT XblMultiplayerSession::Deserialize(
{
return Result<XblDeviceToken>(WEB_E_INVALID_JSON_STRING);
}
XblDeviceToken token;
XblDeviceToken token{};
utils::strcpy(token.Value, sizeof(token.Value), json.GetString());
return Result<XblDeviceToken>(token);
}, json, "hostCandidates", m_hostCandidates, false));
@ -1991,21 +1988,32 @@ bool XblMultiplayerSession::HasSessionPropertyChanged(
return false;
}
auto propertyName = utils::string_t_from_internal_string(_propertyName);
auto propertyName = _propertyName;
auto customProp1 = ParseJson(session1->m_sessionCustomPropertiesJson.data());
auto customProp2 = ParseJson(session2->m_sessionCustomPropertiesJson.data());
if ((customProp1.has_field(propertyName) && !customProp2.has_field(propertyName)) ||
(!customProp1.has_field(propertyName) && customProp2.has_field(propertyName)))
{
return true;
}
JsonDocument customProp1;
JsonDocument customProp2;
customProp1.Parse(session1->m_sessionCustomPropertiesJson.data());
customProp2.Parse(session2->m_sessionCustomPropertiesJson.data());
if (customProp1.has_field(propertyName) && customProp2.has_field(propertyName))
if (!customProp1.HasParseError() &&
!customProp2.HasParseError())
{
const auto& prop1 = customProp1.at(propertyName).as_string();
const auto& prop2 = customProp2.at(propertyName).as_string();
return utils::str_icmp(prop1, prop2) != 0;
xsapi_internal_string prop1;
xsapi_internal_string prop2;
bool isInProp1 = SUCCEEDED(JsonUtils::ExtractJsonString(customProp1, propertyName, prop1, true));
bool isInProp2 = SUCCEEDED(JsonUtils::ExtractJsonString(customProp2, propertyName, prop2, true));
if ((isInProp1 && !isInProp2) ||
(!isInProp1 && isInProp2))
{
return true;
}
if (isInProp1 && isInProp2)
{
return utils::str_icmp(prop1.c_str(), prop2.c_str()) != 0;
}
}
return false;
@ -3113,7 +3121,7 @@ STDAPI XblMultiplayerSessionCurrentUserSetSecureDeviceAddressBase64(
#if HC_PLATFORM != HC_PLATFORM_XDK && HC_PLATFORM != HC_PLATFORM_UWP
STDAPI XblFormatSecureDeviceAddress(
_In_ const char* deviceId,
_Out_ XblFormattedSecureDeviceAddress* address
_Inout_ XblFormattedSecureDeviceAddress* address
) XBL_NOEXCEPT
{
RETURN_HR_INVALIDARGUMENT_IF_NULL(address);

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

@ -705,8 +705,10 @@ void MultiplayerSessionMember::SetExternalMemberPointer(XblMultiplayerSessionMem
auto internalMember = Get(&member);
internalMember->m_member = &member;
member.InitialTeam = internalMember->m_initialTeam.empty() ? nullptr : internalMember->m_initialTeam.data();
member.CustomConstantsJson = internalMember->m_customConstantsJson.empty() ? nullptr :internalMember->m_customConstantsJson.data();
member.SecureDeviceBaseAddress64 = internalMember->m_secureDeviceAddressBase64.empty() ? nullptr : internalMember->m_secureDeviceAddressBase64.data();
member.Roles = internalMember->m_roles.empty() ? nullptr : internalMember->m_roles.data();
member.CustomPropertiesJson = internalMember->m_customPropertiesString.empty() ? nullptr : internalMember->m_customPropertiesString.data();
member.MatchmakingResultServerMeasurementsJson = internalMember->m_matchmakingResultServerMeasurementsJson.empty() ? nullptr : internalMember->m_matchmakingResultServerMeasurementsJson.data();
member.ServerMeasurementsJson = internalMember->m_serverMeasurementsJson.empty() ? nullptr : internalMember->m_serverMeasurementsJson.data();
@ -714,7 +716,6 @@ void MultiplayerSessionMember::SetExternalMemberPointer(XblMultiplayerSessionMem
member.QosMeasurementsJson = internalMember->m_qosMeasurementsJson.empty() ? nullptr : internalMember->m_qosMeasurementsJson.data();
member.Groups = internalMember->m_groups.empty() ? nullptr : internalMember->m_groups.data();
member.Encounters = internalMember->m_encounters.empty() ? nullptr : internalMember->m_encounters.data();
member.Roles = internalMember->m_roles.empty() ? nullptr : internalMember->m_roles.data();
}
NAMESPACE_MICROSOFT_XBOX_SERVICES_MULTIPLAYER_CPP_END

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

@ -19,7 +19,7 @@ STDAPI XblMultiplayerSessionReferenceParseFromUriPath(
// / 0 / 1 / 2 / 3 / 4 / 5
// /serviceconfigs/{scid}/sessiontemplates/{session-template-name}/sessions/{session-name}
xsapi_internal_vector<xsapi_internal_string> pathComponents = utils::string_split(xsapi_internal_string(path), '/');
xsapi_internal_vector<xsapi_internal_string> pathComponents = utils::string_split_internal(xsapi_internal_string(path), '/');
if (pathComponents.size() < 6)
{
return E_INVALIDARG;
@ -103,68 +103,4 @@ bool operator==(const XblMultiplayerSessionReference& lhs, const XblMultiplayerS
utils::str_icmp(lhs.SessionTemplateName, rhs.SessionTemplateName) == 0;
}
#if !XSAPI_NO_PPL
namespace legacy
{
multiplayer_session_reference::multiplayer_session_reference() : m_reference{}
{
}
multiplayer_session_reference::multiplayer_session_reference(
_In_ const string_t& serviceConfigurationId,
_In_ const string_t& sessionTemplateName,
_In_ const string_t& sessionName
)
{
Utf8FromCharT(serviceConfigurationId.data(), m_reference.Scid, sizeof(m_reference.Scid));
Utf8FromCharT(sessionTemplateName.data(), m_reference.SessionTemplateName, sizeof(m_reference.SessionTemplateName));
Utf8FromCharT(sessionName.data(), m_reference.SessionName, sizeof(m_reference.SessionName));
}
multiplayer_session_reference::multiplayer_session_reference(
_In_ const XblMultiplayerSessionReference& reference
)
: m_reference(reference)
{
}
string_t multiplayer_session_reference::service_configuration_id() const
{
return StringTFromUtf8(m_reference.Scid);
}
string_t multiplayer_session_reference::session_template_name() const
{
return StringTFromUtf8(m_reference.SessionTemplateName);
}
string_t multiplayer_session_reference::session_name() const
{
return StringTFromUtf8(m_reference.SessionName);
}
bool multiplayer_session_reference::is_null() const
{
return m_reference.Scid[0] == 0 ||
m_reference.SessionName[0] == 0 ||
m_reference.SessionTemplateName[0] == 0;
}
string_t multiplayer_session_reference::to_uri_path() const
{
XblMultiplayerSessionReferenceUri uri{};
XblMultiplayerSessionReferenceToUriPath(&m_reference, &uri);
return StringTFromUtf8(uri.value);
}
multiplayer_session_reference multiplayer_session_reference::parse_from_uri_path(_In_ const string_t& path)
{
XblMultiplayerSessionReference reference;
XblMultiplayerSessionReferenceParseFromUriPath(StringFromStringT(path).data(), &reference);
return multiplayer_session_reference(reference);
}
}
#endif
NAMESPACE_MICROSOFT_XBOX_SERVICES_MULTIPLAYER_CPP_END

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

@ -95,7 +95,7 @@ void MultiplayerSubscription::OnEvent(
{
String resourceName;
JsonUtils::ExtractJsonString(tapValue, "resource", resourceName, true);
Vector<String> nameComponents = utils::string_split(resourceName, '~');
Vector<String> nameComponents = utils::string_split_internal(resourceName, '~');
if (nameComponents.size() != 3)
{

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

@ -244,7 +244,7 @@ HRESULT MultiplayerActivityService::SetActivity(
m_xboxLiveContextSettings,
"PUT",
XblHttpCall::BuildUrl(MPA_SERVICE_NAME, path.str()),
xbox_live_api::update_activity
xbox_live_api::set_activity
));
RETURN_HR_IF_FAILED(httpCall->SetRequestBody(requestBody));

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

@ -70,7 +70,7 @@ AchievementUnlockSubscription::OnResync() noexcept
LOGS_ERROR << __FUNCTION__ << ": Achievement Unlock event may have been discarded by RTA service";
}
AchievementUnlockEvent::AchievementUnlockEvent( AchievementUnlockEvent&& event ) :
AchievementUnlockEvent::AchievementUnlockEvent( AchievementUnlockEvent&& event ) noexcept:
m_achievementId(std::move(event.m_achievementId)),
m_achievementName(std::move(event.m_achievementName)),
m_achievementDescription(std::move(event.m_achievementDescription)),
@ -126,7 +126,7 @@ Result<AchievementUnlockEvent> AchievementUnlockEvent::Deserialize( _In_ const J
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "achievementId", result.m_achievementId, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "achievementDescription", result.m_achievementDescription, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "achievementDescription", result.m_achievementDescription, false));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "achievementName", result.m_achievementName, true));
@ -136,15 +136,16 @@ Result<AchievementUnlockEvent> AchievementUnlockEvent::Deserialize( _In_ const J
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonUInt64( json, "gamerscore", result.gamerscore, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonInt(json, "xuid", result.xboxUserId, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonXuid(json, "xuid", result.xboxUserId, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "extendedInfoUrl", result.m_deepLink, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonDouble( json, "rarityPercentage", rarityPercentage, true));
// RarityPercentage and rarityCategory are only in payload version 2 so make them optional
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonDouble(json, "rarityPercentage", rarityPercentage, false));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString( json, "rarityCategory", rarityCategory, true));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "rarityCategory", rarityCategory, false));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonTimeT( json, "unlockTime", result.timeUnlocked));
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonTimeT(json, "unlockTime", result.timeUnlocked));
result.titleId = static_cast<uint32_t>(titleId);
result.rarityPercentage = static_cast<float>(rarityPercentage);
@ -153,7 +154,10 @@ Result<AchievementUnlockEvent> AchievementUnlockEvent::Deserialize( _In_ const J
// strings for the C API
result.achievementId = result.m_achievementId.c_str();
result.achievementName = result.m_achievementName.c_str();
result.achievementDescription = result.m_achievementDescription.c_str();
if (!result.m_achievementDescription.empty())
{
result.achievementDescription = result.m_achievementDescription.c_str();
}
result.achievementIcon = result.m_achievementIconUri.c_str();
result.m_deepLink = result.m_deepLink.c_str();

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

@ -14,10 +14,10 @@ NAMESPACE_MICROSOFT_XBOX_SERVICES_NOTIFICATION_CPP_BEGIN
public:
AchievementUnlockEvent() = default;
AchievementUnlockEvent( AchievementUnlockEvent&& event);
AchievementUnlockEvent( AchievementUnlockEvent&& event) noexcept;
AchievementUnlockEvent(const AchievementUnlockEvent& event);
static Result<AchievementUnlockEvent> Deserialize( const JsonValue& json ) noexcept;
static Result<AchievementUnlockEvent> Deserialize(_In_ const JsonValue& json ) noexcept;
private:

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

@ -51,7 +51,7 @@ size_t GameInviteSubscription::RemoveHandler(
std::lock_guard<std::mutex> lock{ m_mutex };
m_mpaInviteHandlers.erase(token);
m_mpsdInviteHandlers.erase(token);
return m_mpaInviteHandlers.size() + m_mpaInviteHandlers.size();
return m_mpaInviteHandlers.size() + m_mpsdInviteHandlers.size();
}
void GameInviteSubscription::OnEvent(

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

@ -149,15 +149,6 @@ void UWPNotificationService::OnPushNotificationReceived(
{
LOGS_INFO << "Received WNS notification, type: " << notificationTypeString << ", xuid: " << xuid;
auto xsapiSingleton = get_xsapi_singleton();
if (!xsapiSingleton)
{
LOGS_ERROR << "Receiving WNS notification error: xsapi_singleton is null.";
}
xsapiSingleton->m_xboxServiceSettingsSingleton->_Raise_wns_event(utils::string_t_from_internal_string(xuid), utils::string_t_from_internal_string(notificationTypeString), content);
if (utils::str_icmp(notificationTypeString.c_str(), "spop") == 0)
{
User::SetTokenExpired(utils::internal_string_to_uint64(xuid));

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

@ -40,7 +40,7 @@ public:
PendingUnregistration,
Registered,
Registering
} m_registrationStatus;
} m_registrationStatus{ RegistrationStatus::Unregistered };
NotificationService(
_In_ User&& user,
@ -78,7 +78,7 @@ protected:
std::shared_ptr<xbox::services::XboxLiveContextSettings> m_contextSettings;
String m_endpointId;
bool m_isInitialized;
bool m_isInitialized{ false };
std::recursive_mutex m_mutex;
};
@ -108,7 +108,7 @@ public:
GameInviteNotificationEventArgs& operator=(GameInviteNotificationEventArgs other) noexcept = delete;
static Result<GameInviteNotificationEventArgs> Deserialize(
const JsonValue& json
_In_ const JsonValue& json
) noexcept;
private:

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

@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "pch.h"
#include "shared_macros.h"
#include "xbox_system_factory.h"
#include "xbox_live_app_config_internal.h"
#include "xbox_live_context_internal.h"
#include "notification_internal.h"
@ -180,10 +177,11 @@ HRESULT NotificationService::RegisterForNotificationsHelper(
payload.AddMember("transportPath", JsonValue(AppConfig::Instance()->APNSEnvironment().c_str(), allocator).Move(), allocator);
#elif HC_PLATFORM == HC_PLATFORM_ANDROID
payload.AddMember("transport", "FCM", allocator);
#elif HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK
#elif HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK || HC_PLATFORM_IS_EXTERNAL
payload.AddMember("transport", "RTA", allocator);
#endif
payload.AddMember("locale", JsonValue(utils::get_locales().c_str(), allocator).Move(), allocator);
xsapi_internal_string locale = utils::get_locales();
payload.AddMember("locale", JsonValue(locale.c_str(), allocator).Move(), allocator);
payload.AddMember("titleId", JsonValue(titleId.c_str(), allocator).Move(), allocator);
if (!deviceName.empty())

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

@ -49,7 +49,7 @@ void DevicePresenceChangeSubscription::OnEvent(
auto presenceService{ m_presenceService.lock() };
if (presenceService && data.IsString())
{
auto devicePresenceValues = utils::string_split(String{ data.GetString() }, ':');
auto devicePresenceValues = utils::string_split_internal(String{ data.GetString() }, ':');
if (devicePresenceValues.size() == 2)
{
presenceService->HandleDevicePresenceChanged(

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

@ -125,7 +125,7 @@ Result<XblPresenceTitleRecord> DeviceRecord::DeserializeTitleRecord(_In_ const J
}
}
if (!errc)
if (SUCCEEDED(errc))
{
titleRecord.titleName = Make(titleName);
titleRecord.richPresenceString = Make(richPresenceString);
@ -154,7 +154,7 @@ Result<XblPresenceBroadcastRecord> DeviceRecord::DeserializeBroadcastRecord(_In_
xsapi_internal_string broadcastId;
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonString(json, "id", broadcastId));
if (!errc)
if (SUCCEEDED(errc))
{
broadcastRecord.broadcastId = Make(broadcastId);
}

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

@ -91,7 +91,7 @@ public:
protected:
void OnSubscribe(const JsonValue& data) noexcept override;
void OnEvent(const JsonValue& event) noexcept override;
void OnEvent(_In_ const JsonValue& event) noexcept override;
void OnResync() noexcept override;
private:

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

@ -309,12 +309,6 @@ HRESULT PresenceService::SetPresence(
{
heartbeatDelayInMins = 5;
}
auto xsapiSingleton = get_xsapi_singleton();
if (xsapiSingleton && xsapiSingleton->m_onSetPresenceFinish)
{
xsapiSingleton->m_onSetPresenceFinish(heartbeatDelayInMins);
}
}
async.Complete(hr);
} });

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

@ -95,7 +95,7 @@ Result<PermissionCheckResult> PermissionCheckResult::Deserialize(
result.reasons = result.m_reasons.data();
result.reasonsCount = result.m_reasons.size();
if (errc)
if (FAILED(errc))
{
return WEB_E_INVALID_JSON_STRING;
}

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

@ -354,7 +354,7 @@ STDAPI XblPrivacyBatchCheckPermissionResult(
RETURN_HR_INVALIDARGUMENT_IF(results == nullptr || resultsCount == nullptr);
// bufferUsed is needed to calculate resultsCount
auto bufferUsedPtr = std::make_unique<size_t>();
auto bufferUsedPtr = MakeUnique<size_t>();
if (bufferUsed == nullptr)
{
bufferUsed = bufferUsedPtr.get();

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

@ -122,12 +122,12 @@ HRESULT PrivacyService::CheckPermission(
{
// users/xuid({xuid})/permission/validate?setting={setting}&target={target})
xbox::services::uri_builder subPathBuilder;
stringstream_t path;
path << _T("/users/xuid(") << m_user.Xuid() << _T(")/permission/validate");
xsapi_internal_stringstream path;
path << "/users/xuid(" << m_user.Xuid() << ")/permission/validate";
subPathBuilder.append_path(path.str());
subPathBuilder.append_query(_T("setting"), StringTFromUtf8(XblPermissionName(permission).data()));
subPathBuilder.append_query(_T("target"), StringTFromUtf8(targetQuery.data()));
subPathBuilder.append_query("setting", XblPermissionName(permission).data());
subPathBuilder.append_query("target", targetQuery);
Result<User> userResult = m_user.Copy();
RETURN_HR_IF_FAILED(userResult.Hresult());
@ -136,7 +136,7 @@ HRESULT PrivacyService::CheckPermission(
RETURN_HR_IF_FAILED(httpCall->Init(
m_contextSettings,
"GET",
XblHttpCall::BuildUrl("privacy", utils::internal_string_from_string_t(subPathBuilder.to_string())),
XblHttpCall::BuildUrl("privacy", subPathBuilder.to_string()),
xbox_live_api::check_permission_with_target_user
));
@ -261,7 +261,7 @@ Result<xsapi_internal_vector<uint64_t>> PrivacyService::DeserializeUserList(
uint64_t xuid = 0;
HRESULT tempErr = JsonUtils::ExtractJsonXuid(json, "xuid", xuid, true);
if (tempErr)
if (FAILED(tempErr))
{
errc = tempErr;
}
@ -271,7 +271,7 @@ Result<xsapi_internal_vector<uint64_t>> PrivacyService::DeserializeUserList(
json, ("users"), xuids, true
));
if (errc)
if (FAILED(errc))
{
return WEB_E_INVALID_JSON_STRING;
}

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

@ -116,7 +116,8 @@ Result<std::shared_ptr<Connection>> Connection::Make(
std::move(stateChangedHandler),
std::move(resyncHandler)
},
Deleter<Connection>()
Deleter<Connection>(),
Allocator<Connection>()
);
auto hr = rtaConnection->InitializeWebsocket();
@ -171,12 +172,15 @@ void Connection::Cleanup()
m_unsubscribeAsyncContexts.clear();
lock.unlock();
m_queue.Terminate(true);
for (auto& async : pendingAsyncContexts)
{
async.Complete(E_ABORT);
}
m_queue.Terminate(
false,
[pendingAsyncContexts = std::move(pendingAsyncContexts)]() {
for (auto& async : pendingAsyncContexts)
{
async.Complete(E_ABORT);
}
}
);
}
#if HC_PLATFORM == HC_PLATFORM_GDK

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше