Repository: microsoft/xbox-live-api
Branch: main
Commit: dd61050a9503
Files: 994
Total size: 12.3 MB
Directory structure:
gitextract_y7zsxcyl/
├── .gitattributes
├── .gitignore
├── .gitmodules
├── Build/
│ ├── GetXsapiAndroidBinaryDir.cmake
│ ├── Microsoft.Xbox.Services.141.GDK.C/
│ │ └── Microsoft.Xbox.Services.141.GDK.C.vcxproj
│ ├── Microsoft.Xbox.Services.141.GDK.C.Thunks/
│ │ ├── Microsoft.Xbox.Services.141.GDK.C.Thunks.vcxproj
│ │ ├── Microsoft.Xbox.Services.141.GDK.C.Thunks.vcxproj.filters
│ │ ├── dll/
│ │ │ ├── Microsoft.Xbox.Services.141.GDK.C.Thunks.def
│ │ │ ├── dllmain.cpp
│ │ │ ├── pch.cpp
│ │ │ └── pch.h
│ │ └── generator/
│ │ └── ThunksGenerator/
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ └── ThunksGenerator.csproj
│ ├── Microsoft.Xbox.Services.142.GDK.C/
│ │ └── Microsoft.Xbox.Services.142.GDK.C.vcxproj
│ ├── Microsoft.Xbox.Services.Common/
│ │ ├── Microsoft.Xbox.Services.Common.vcxitems
│ │ └── Microsoft.Xbox.Services.Common.vcxitems.filters
│ ├── Microsoft.Xbox.Services.GDK/
│ │ ├── Microsoft.Xbox.Services.GDK.vcxitems
│ │ └── Microsoft.Xbox.Services.GDK.vcxitems.filters
│ ├── Microsoft.Xbox.Services.Win32.C.Dll.def
│ ├── xsapi.gdk.bwoi.props
│ ├── xsapi.gdk.props
│ └── xsapi.win32.props
├── CONTRIBUTING.md
├── Custom.props
├── Directory.Packages.props
├── External/
│ └── Xal/
│ ├── README
│ └── Source/
│ └── Xal/
│ └── Include/
│ └── Xal/
│ ├── xal.h
│ ├── xal_android.h
│ ├── xal_apple.h
│ ├── xal_generic.h
│ ├── xal_gsdk.h
│ ├── xal_gsdk_impl.h
│ ├── xal_internal_marketing.h
│ ├── xal_internal_telemetry.h
│ ├── xal_internal_types.h
│ ├── xal_internal_web_account.h
│ ├── xal_platform.h
│ ├── xal_platform_types.h
│ ├── xal_types.h
│ ├── xal_user.h
│ ├── xal_uwp.h
│ ├── xal_uwp_user.h
│ ├── xal_version.h
│ ├── xal_win32.h
│ ├── xal_xdk.h
│ └── xal_xdk_ext.h
├── Include/
│ ├── cpprestinclude/
│ │ ├── cpprest/
│ │ │ ├── astreambuf.h
│ │ │ ├── asyncrt_utils.h
│ │ │ ├── base_uri.h
│ │ │ ├── containerstream.h
│ │ │ ├── details/
│ │ │ │ ├── SafeInt3.hpp
│ │ │ │ ├── asyncrt_utils.hpp
│ │ │ │ ├── base64.hpp
│ │ │ │ ├── basic_types.h
│ │ │ │ ├── cpprest_compat.h
│ │ │ │ ├── http_client_msg.hpp
│ │ │ │ ├── http_helpers.h
│ │ │ │ ├── http_helpers.hpp
│ │ │ │ ├── http_msg.hpp
│ │ │ │ ├── json.hpp
│ │ │ │ ├── json_parsing.hpp
│ │ │ │ ├── json_serialization.hpp
│ │ │ │ ├── nosal.h
│ │ │ │ ├── uri.hpp
│ │ │ │ ├── uri_builder.hpp
│ │ │ │ ├── uri_parser.h
│ │ │ │ ├── uri_parser.hpp
│ │ │ │ └── web_utilities.h
│ │ │ ├── http_headers.h
│ │ │ ├── http_msg.h
│ │ │ ├── json.h
│ │ │ ├── producerconsumerstream.h
│ │ │ ├── streams.h
│ │ │ ├── uri.h
│ │ │ └── uri_builder.h
│ │ ├── cpprestsdk_impl.h
│ │ └── pplx/
│ │ ├── details/
│ │ │ ├── pplx.hpp
│ │ │ ├── pplxapple.hpp
│ │ │ ├── pplxlinux.hpp
│ │ │ ├── pplxwin.hpp
│ │ │ └── threadpool.hpp
│ │ ├── pplx.h
│ │ ├── pplxcancellation_token.h
│ │ ├── pplxinterface.h
│ │ ├── pplxlinux.h
│ │ ├── pplxtasks.110.h
│ │ ├── pplxtasks.140.h
│ │ ├── pplxtasks.h
│ │ ├── pplxwin.h
│ │ └── threadpool.h
│ ├── xsapi-c/
│ │ ├── achievements_c.h
│ │ ├── achievements_manager_c.h
│ │ ├── errors_c.h
│ │ ├── events_c.h
│ │ ├── game_invite_c.h
│ │ ├── http_call_c.h
│ │ ├── leaderboard_c.h
│ │ ├── matchmaking_c.h
│ │ ├── multiplayer_activity_c.h
│ │ ├── multiplayer_c.h
│ │ ├── multiplayer_manager_c.h
│ │ ├── notification_c.h
│ │ ├── pal.h
│ │ ├── platform_c.h
│ │ ├── presence_c.h
│ │ ├── privacy_c.h
│ │ ├── profile_c.h
│ │ ├── real_time_activity_c.h
│ │ ├── services_c.h
│ │ ├── social_c.h
│ │ ├── social_manager_c.h
│ │ ├── string_verify_c.h
│ │ ├── title_managed_statistics_c.h
│ │ ├── title_storage_c.h
│ │ ├── types_c.h
│ │ ├── user_statistics_c.h
│ │ ├── xbox_live_context_c.h
│ │ ├── xbox_live_context_settings_c.h
│ │ └── xbox_live_global_c.h
│ └── xsapi-cpp/
│ ├── achievements.h
│ ├── errors.h
│ ├── events.h
│ ├── http_call.h
│ ├── http_call_request_message.h
│ ├── impl/
│ │ ├── achievements.hpp
│ │ ├── errors.hpp
│ │ ├── events.hpp
│ │ ├── http_call.hpp
│ │ ├── http_call_request_message.hpp
│ │ ├── leaderboard.hpp
│ │ ├── matchmaking.hpp
│ │ ├── mem.hpp
│ │ ├── multiplayer.hpp
│ │ ├── multiplayer_manager.hpp
│ │ ├── notification.hpp
│ │ ├── presence.hpp
│ │ ├── privacy.hpp
│ │ ├── profile.hpp
│ │ ├── public_utils.h
│ │ ├── real_time_activity.hpp
│ │ ├── service_call_logging_config.hpp
│ │ ├── social.hpp
│ │ ├── social_manager.hpp
│ │ ├── string_verify.hpp
│ │ ├── system.hpp
│ │ ├── title_storage.hpp
│ │ ├── user_statistics.hpp
│ │ ├── xbox_live_app_config.hpp
│ │ ├── xbox_live_context.hpp
│ │ ├── xbox_live_context_settings.hpp
│ │ └── xbox_service_call_routed_event_args.hpp
│ ├── leaderboard.h
│ ├── matchmaking.h
│ ├── mem.h
│ ├── multiplayer.h
│ ├── multiplayer_manager.h
│ ├── notification_helper.h
│ ├── notification_service.h
│ ├── presence.h
│ ├── privacy.h
│ ├── profile.h
│ ├── real_time_activity.h
│ ├── service_call_logging_config.h
│ ├── services.h
│ ├── social.h
│ ├── social_manager.h
│ ├── string_verify.h
│ ├── system.h
│ ├── title_callable_ui.h
│ ├── title_storage.h
│ ├── types.h
│ ├── user_statistics.h
│ ├── xbox_live_app_config.h
│ ├── xbox_live_context.h
│ ├── xbox_live_context_settings.h
│ └── xbox_service_call_routed_event_args.h
├── LICENSE.md
├── LINKTOSOURCE.md
├── Microsoft.Xbox.Services.GDK.VS2017.sln
├── Microsoft.Xbox.Services.GDK.VS2019.sln
├── Microsoft.Xbox.Services.GDK.VS2022.sln
├── NuGet.config
├── README.md
├── SECURITY.md
├── Source/
│ ├── Services/
│ │ ├── Achievements/
│ │ │ ├── Manager/
│ │ │ │ ├── achievements_manager_api.cpp
│ │ │ │ ├── achievements_manager_internal.cpp
│ │ │ │ └── achievements_manager_internal.h
│ │ │ ├── achievement_service_internal.cpp
│ │ │ ├── achievements_api.cpp
│ │ │ ├── achievements_internal.h
│ │ │ ├── achievements_result.cpp
│ │ │ └── achievements_subscription.cpp
│ │ ├── Common/
│ │ │ ├── Cpp/
│ │ │ │ ├── pch.cpp
│ │ │ │ └── pch.h
│ │ │ ├── Unix/
│ │ │ │ ├── pch.cpp
│ │ │ │ └── pch.h
│ │ │ ├── iOS/
│ │ │ │ ├── pch.cpp
│ │ │ │ └── pch.h
│ │ │ ├── pch_common.h
│ │ │ ├── xbox_live_context.cpp
│ │ │ ├── xbox_live_context_api.cpp
│ │ │ ├── xbox_live_context_internal.h
│ │ │ ├── xbox_live_context_settings.cpp
│ │ │ ├── xbox_live_context_settings_internal.h
│ │ │ └── xbox_live_global_api.cpp
│ │ ├── Events/
│ │ │ ├── Android/
│ │ │ │ └── events_service_android.cpp
│ │ │ ├── Generic/
│ │ │ │ └── events_service_generic.cpp
│ │ │ ├── Windows/
│ │ │ │ └── events_service_windows.cpp
│ │ │ ├── event.cpp
│ │ │ ├── event_queue.cpp
│ │ │ ├── event_upload_payload.cpp
│ │ │ ├── events_service.h
│ │ │ ├── events_service_api.cpp
│ │ │ ├── events_service_etw.cpp
│ │ │ ├── events_service_etw.h
│ │ │ ├── events_service_gdk.cpp
│ │ │ ├── events_service_gdk.h
│ │ │ ├── events_service_xsapi.cpp
│ │ │ ├── events_service_xsapi.h
│ │ │ └── iOS/
│ │ │ └── events_service_ios.mm
│ │ ├── Leaderboard/
│ │ │ ├── leaderboard_column.cpp
│ │ │ ├── leaderboard_internal.h
│ │ │ ├── leaderboard_result.cpp
│ │ │ ├── leaderboard_row.cpp
│ │ │ └── leaderboard_service.cpp
│ │ ├── Matchmaking/
│ │ │ ├── hopper_statistics_response.cpp
│ │ │ ├── match_ticket_details_response.cpp
│ │ │ ├── matchmaking_internal.h
│ │ │ └── matchmaking_service.cpp
│ │ ├── Multiplayer/
│ │ │ ├── Manager/
│ │ │ │ ├── multiplayer_client_manager.cpp
│ │ │ │ ├── multiplayer_client_pending_reader.cpp
│ │ │ │ ├── multiplayer_client_pending_request.cpp
│ │ │ │ ├── multiplayer_event_args.cpp
│ │ │ │ ├── multiplayer_event_queue.cpp
│ │ │ │ ├── multiplayer_game_client.cpp
│ │ │ │ ├── multiplayer_game_session.cpp
│ │ │ │ ├── multiplayer_lobby_client.cpp
│ │ │ │ ├── multiplayer_lobby_session.cpp
│ │ │ │ ├── multiplayer_local_user.cpp
│ │ │ │ ├── multiplayer_local_user_manager.cpp
│ │ │ │ ├── multiplayer_manager.cpp
│ │ │ │ ├── multiplayer_manager_api.cpp
│ │ │ │ ├── multiplayer_manager_internal.h
│ │ │ │ ├── multiplayer_manager_utils.cpp
│ │ │ │ ├── multiplayer_match_client.cpp
│ │ │ │ ├── multiplayer_member.cpp
│ │ │ │ └── multiplayer_session_writer.cpp
│ │ │ ├── multiplayer_activity_handle_post_request.cpp
│ │ │ ├── multiplayer_activity_query_post_request.cpp
│ │ │ ├── multiplayer_api.cpp
│ │ │ ├── multiplayer_internal.h
│ │ │ ├── multiplayer_invite_handle_post_request.cpp
│ │ │ ├── multiplayer_query_search_handle_request.cpp
│ │ │ ├── multiplayer_search_handle_details.cpp
│ │ │ ├── multiplayer_search_handle_request.cpp
│ │ │ ├── multiplayer_serializers.cpp
│ │ │ ├── multiplayer_service.cpp
│ │ │ ├── multiplayer_session.cpp
│ │ │ ├── multiplayer_session_member.cpp
│ │ │ ├── multiplayer_session_reference.cpp
│ │ │ ├── multiplayer_subscription.cpp
│ │ │ └── multiplayer_transfer_handle_post_request.cpp
│ │ ├── MultiplayerActivity/
│ │ │ ├── multiplayer_activity_api.cpp
│ │ │ ├── multiplayer_activity_info.cpp
│ │ │ ├── multiplayer_activity_internal.h
│ │ │ └── multiplayer_activity_service.cpp
│ │ ├── Notification/
│ │ │ ├── Mobile/
│ │ │ │ └── notification_service_mobile.cpp
│ │ │ ├── RTA/
│ │ │ │ ├── notification_service_rta.cpp
│ │ │ │ ├── notification_subscription.cpp
│ │ │ │ └── notification_subscription.h
│ │ │ ├── UWP/
│ │ │ │ └── notification_service_uwp.cpp
│ │ │ ├── iOS/
│ │ │ │ └── notification_helper.mm
│ │ │ ├── notification_api.cpp
│ │ │ ├── notification_internal.h
│ │ │ └── notification_service.cpp
│ │ ├── Presence/
│ │ │ ├── device_presence_change_subscription.cpp
│ │ │ ├── presence_api.cpp
│ │ │ ├── presence_device_record.cpp
│ │ │ ├── presence_internal.h
│ │ │ ├── presence_record.cpp
│ │ │ ├── presence_service.cpp
│ │ │ ├── presence_title_request.cpp
│ │ │ ├── presence_user_batch_request.cpp
│ │ │ └── title_presence_change_subscription.cpp
│ │ ├── Privacy/
│ │ │ ├── permission_check_result.cpp
│ │ │ ├── privacy_api.cpp
│ │ │ ├── privacy_service.cpp
│ │ │ └── privacy_service_internal.h
│ │ ├── RealTimeActivityManager/
│ │ │ ├── real_time_activity_api.cpp
│ │ │ ├── real_time_activity_connection.cpp
│ │ │ ├── real_time_activity_connection.h
│ │ │ ├── real_time_activity_manager.cpp
│ │ │ ├── real_time_activity_manager.h
│ │ │ └── real_time_activity_subscription.h
│ │ ├── Social/
│ │ │ ├── Manager/
│ │ │ │ ├── peoplehub_service.cpp
│ │ │ │ ├── peoplehub_service.h
│ │ │ │ ├── social_graph.cpp
│ │ │ │ ├── social_graph.h
│ │ │ │ ├── social_manager.cpp
│ │ │ │ ├── social_manager_api.cpp
│ │ │ │ ├── social_manager_internal.h
│ │ │ │ ├── social_manager_user_group.cpp
│ │ │ │ └── social_manager_user_group.h
│ │ │ ├── profile_api.cpp
│ │ │ ├── profile_internal.h
│ │ │ ├── profile_service.cpp
│ │ │ ├── reputation_feedback_request.cpp
│ │ │ ├── reputation_service.cpp
│ │ │ ├── social_api.cpp
│ │ │ ├── social_internal.h
│ │ │ ├── social_relationship_change_subscription.cpp
│ │ │ ├── social_relationship_result.cpp
│ │ │ └── social_service.cpp
│ │ ├── Stats/
│ │ │ ├── requested_statistics.cpp
│ │ │ ├── service_configuration_statistic.cpp
│ │ │ ├── statistic.cpp
│ │ │ ├── statistic_change_subscription.cpp
│ │ │ ├── title_managed_statistics_api.cpp
│ │ │ ├── title_managed_statistics_internal.h
│ │ │ ├── title_managed_statistics_service.cpp
│ │ │ ├── user_statistics_api.cpp
│ │ │ ├── user_statistics_internal.h
│ │ │ ├── user_statistics_result.cpp
│ │ │ └── user_statistics_service.cpp
│ │ ├── StringVerify/
│ │ │ ├── string_service.cpp
│ │ │ ├── string_service_internal.h
│ │ │ └── verify_string_result.cpp
│ │ ├── TCUI/
│ │ │ ├── Android/
│ │ │ │ ├── title_callable_static_glue.h
│ │ │ │ ├── title_callable_ui_android.cpp
│ │ │ │ ├── title_callable_ui_jni.h
│ │ │ │ └── title_callable_ui_static_glue.cpp
│ │ │ └── iOS/
│ │ │ └── title_callable_ui.mm
│ │ └── TitleStorage/
│ │ ├── title_storage_api.cpp
│ │ ├── title_storage_blob_metadata_result.cpp
│ │ ├── title_storage_internal.h
│ │ └── title_storage_service.cpp
│ ├── Shared/
│ │ ├── HookedUri/
│ │ │ ├── asyncrt_utils.h
│ │ │ ├── base_uri.h
│ │ │ ├── details/
│ │ │ │ ├── asyncrt_utils.hpp
│ │ │ │ ├── basic_types.h
│ │ │ │ ├── cpprest_compat.h
│ │ │ │ ├── nosal.h
│ │ │ │ ├── uri.hpp
│ │ │ │ ├── uri_builder.hpp
│ │ │ │ ├── uri_parser.h
│ │ │ │ └── uri_parser.hpp
│ │ │ ├── uri.h
│ │ │ └── uri_builder.h
│ │ ├── Logger/
│ │ │ ├── log.cpp
│ │ │ ├── log.h
│ │ │ ├── log_entry.cpp
│ │ │ ├── log_hc_output.cpp
│ │ │ ├── log_hc_output.h
│ │ │ └── log_output.cpp
│ │ ├── a/
│ │ │ ├── android_utils.cpp
│ │ │ ├── android_utils.h
│ │ │ ├── guid.cpp
│ │ │ ├── http_call_jni.cpp
│ │ │ ├── http_call_jni.h
│ │ │ ├── http_call_static_glue.cpp
│ │ │ ├── http_call_static_glue.h
│ │ │ ├── interop_jni.cpp
│ │ │ ├── interop_jni.h
│ │ │ ├── jni_utils.h
│ │ │ ├── rwlock_guard.cpp
│ │ │ ├── rwlock_guard.h
│ │ │ ├── utils_a.cpp
│ │ │ ├── utils_a.h
│ │ │ ├── xbox_live_app_config_jni.cpp
│ │ │ └── xbox_live_app_config_static_glue.h
│ │ ├── async_helpers.cpp
│ │ ├── async_helpers.h
│ │ ├── build_version.h
│ │ ├── enum_traits.h
│ │ ├── errors.cpp
│ │ ├── errors_legacy.h
│ │ ├── fault_injection.cpp
│ │ ├── fault_injection.h
│ │ ├── global_state.cpp
│ │ ├── global_state.h
│ │ ├── http_call_api.cpp
│ │ ├── http_call_legacy.cpp
│ │ ├── http_call_legacy.h
│ │ ├── http_call_request_message.cpp
│ │ ├── http_call_request_message_internal.h
│ │ ├── http_call_wrapper_internal.cpp
│ │ ├── http_call_wrapper_internal.h
│ │ ├── http_headers.h
│ │ ├── http_utils.cpp
│ │ ├── http_utils.h
│ │ ├── i/
│ │ │ ├── guid.mm
│ │ │ └── utils_locales_ios.mm
│ │ ├── internal_errors.h
│ │ ├── internal_mem.cpp
│ │ ├── internal_mem.h
│ │ ├── internal_types.h
│ │ ├── mem.cpp
│ │ ├── perf_tester.h
│ │ ├── public_utils_legacy.cpp
│ │ ├── public_utils_legacy.h
│ │ ├── ref_counter.cpp
│ │ ├── ref_counter.h
│ │ ├── service_call_routed_handler.cpp
│ │ ├── service_call_routed_handler.h
│ │ ├── shared_macros.h
│ │ ├── string_array.h
│ │ ├── u/
│ │ │ └── xbl_guid.h
│ │ ├── uri_impl.h
│ │ ├── user.cpp
│ │ ├── user.h
│ │ ├── utils_locales.cpp
│ │ ├── web_socket.cpp
│ │ ├── web_socket.h
│ │ ├── xbox_live_app_config.cpp
│ │ ├── xbox_live_app_config_internal.h
│ │ ├── xsapi_json_utils.cpp
│ │ ├── xsapi_json_utils.h
│ │ ├── xsapi_utils.cpp
│ │ └── xsapi_utils.h
│ └── System/
│ ├── Android/
│ │ └── local_storage_android.cpp
│ ├── Win32/
│ │ └── local_storage_win32.cpp
│ ├── a/
│ │ ├── java_interop.cpp
│ │ └── java_interop.h
│ ├── client_operation.h
│ ├── iOS/
│ │ ├── XBLDictionaryToJSON.h
│ │ ├── XBLDictionaryToJSON.mm
│ │ ├── XBLKeychainStorage.h
│ │ ├── XBLKeychainStorage.mm
│ │ ├── XBLiOSGlobalState.h
│ │ ├── XBLiOSGlobalState.mm
│ │ ├── local_storage_ios.mm
│ │ └── xbox_live_app_config_ios.mm
│ ├── local_storage.cpp
│ ├── local_storage.h
│ └── platform_api.cpp
├── Tests/
│ ├── ApiExplorer/
│ │ ├── APIExplorer.Shared.vcxitems
│ │ ├── APIExplorer.Shared.vcxitems.filters
│ │ ├── APIs/
│ │ │ ├── api_xblc_multiplayer_activity.cpp
│ │ │ ├── apis.cpp
│ │ │ ├── apis.h
│ │ │ ├── apis_async.cpp
│ │ │ ├── apis_cpp_achievements.cpp
│ │ │ ├── apis_cpp_events.cpp
│ │ │ ├── apis_cpp_leaderboard.cpp
│ │ │ ├── apis_cpp_multiplayer.cpp
│ │ │ ├── apis_cpp_presence.cpp
│ │ │ ├── apis_cpp_privacy.cpp
│ │ │ ├── apis_cpp_profile.cpp
│ │ │ ├── apis_cpp_real_time_activity.cpp
│ │ │ ├── apis_cpp_social.cpp
│ │ │ ├── apis_cpp_social_manager.cpp
│ │ │ ├── apis_cpp_statistics.cpp
│ │ │ ├── apis_cpp_stringverify.cpp
│ │ │ ├── apis_cpp_title_storage.cpp
│ │ │ ├── apis_docs.cpp
│ │ │ ├── apis_grts_gameinvite.cpp
│ │ │ ├── apis_libhttp.cpp
│ │ │ ├── apis_xal.cpp
│ │ │ ├── apis_xblc.cpp
│ │ │ ├── apis_xblc_achievement_unlock_notification.cpp
│ │ │ ├── apis_xblc_achievements.cpp
│ │ │ ├── apis_xblc_achievements_manager.cpp
│ │ │ ├── apis_xblc_achievements_progress_notification.cpp
│ │ │ ├── apis_xblc_events.cpp
│ │ │ ├── apis_xblc_gameinvite_notifications.cpp
│ │ │ ├── apis_xblc_grts.cpp
│ │ │ ├── apis_xblc_leaderboard.cpp
│ │ │ ├── apis_xblc_multiplayer.cpp
│ │ │ ├── apis_xblc_multiplayer_manager.cpp
│ │ │ ├── apis_xblc_presence.cpp
│ │ │ ├── apis_xblc_privacy.cpp
│ │ │ ├── apis_xblc_profile.cpp
│ │ │ ├── apis_xblc_real_time_activity.cpp
│ │ │ ├── apis_xblc_social.cpp
│ │ │ ├── apis_xblc_social_manager.cpp
│ │ │ ├── apis_xblc_statistics.cpp
│ │ │ ├── apis_xblc_stats2017.cpp
│ │ │ ├── apis_xblc_stringVerify.cpp
│ │ │ ├── apis_xblc_title_storage.cpp
│ │ │ └── apis_xblc_xblhttp.cpp
│ │ ├── Android/
│ │ │ └── pch.h
│ │ ├── Include/
│ │ │ ├── api_explorer.h
│ │ │ ├── multidevice.h
│ │ │ └── runner.h
│ │ ├── Shared/
│ │ │ ├── Win/
│ │ │ │ └── pal.cpp
│ │ │ ├── commands.cpp
│ │ │ ├── log.cpp
│ │ │ ├── lua-include.cpp
│ │ │ ├── mem_hook.cpp
│ │ │ ├── mem_hook.h
│ │ │ ├── multidevice.cpp
│ │ │ ├── pal.h
│ │ │ ├── pch_apicommon.cpp
│ │ │ ├── pch_common.cpp
│ │ │ ├── pch_common.h
│ │ │ ├── utils.cpp
│ │ │ ├── utils.h
│ │ │ └── xboxservices.config
│ │ ├── Tests/
│ │ │ ├── MultiplayerActivity/
│ │ │ │ ├── receive_invite_gsdk.lua
│ │ │ │ ├── receive_invite_win32.lua
│ │ │ │ ├── send_invite.lua
│ │ │ │ ├── set_activity.lua
│ │ │ │ ├── update_activity.lua
│ │ │ │ └── update_recent_players.lua
│ │ │ ├── _luasetup_/
│ │ │ │ ├── u-test/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── u-test.lua
│ │ │ │ ├── uwp/
│ │ │ │ │ └── setup.lua
│ │ │ │ └── xal/
│ │ │ │ ├── common.lua
│ │ │ │ └── setup.lua
│ │ │ ├── achievements/
│ │ │ │ ├── PerformanceTestMockResponse.json
│ │ │ │ ├── achievements-cpp.lua
│ │ │ │ ├── achievements.lua
│ │ │ │ ├── achievements_manager.lua
│ │ │ │ ├── achievements_manager_performance_test.lua
│ │ │ │ ├── achievements_manager_update_achievements.lua
│ │ │ │ ├── achievements_progress_notification.lua
│ │ │ │ ├── update-achievements-cpp.lua
│ │ │ │ └── update-achievements.lua
│ │ │ ├── cmds.json
│ │ │ ├── events/
│ │ │ │ ├── events-cpp.lua
│ │ │ │ ├── events.lua
│ │ │ │ ├── offline-cpp.lua
│ │ │ │ ├── offline.lua
│ │ │ │ ├── offline2-cpp.lua
│ │ │ │ └── offline2.lua
│ │ │ ├── gdk-gameinvite/
│ │ │ │ ├── game-invite-listen.lua
│ │ │ │ ├── game-invite-send.lua
│ │ │ │ └── game-mpainvite-send.lua
│ │ │ ├── leaderboard/
│ │ │ │ ├── leaderboard-2017.lua
│ │ │ │ ├── leaderboard-bvt.lua
│ │ │ │ ├── leaderboard-cpp.lua
│ │ │ │ └── leaderboard.lua
│ │ │ ├── libHttp/
│ │ │ │ ├── httpHandle.lua
│ │ │ │ ├── httpPerform.lua
│ │ │ │ ├── libHCTrace.lua
│ │ │ │ ├── manualDispatchTest.lua
│ │ │ │ ├── websocket_cleanup_while_connected.lua
│ │ │ │ ├── websocket_cleanup_while_connecting.lua
│ │ │ │ ├── websocket_closehandle_while_connected.lua
│ │ │ │ ├── websocket_disconnect_while_connecting.lua
│ │ │ │ └── websocket_send.lua
│ │ │ ├── misc/
│ │ │ │ ├── global_state.lua
│ │ │ │ ├── null_task_queue.lua
│ │ │ │ ├── override_locale.lua
│ │ │ │ ├── simpletest.lua
│ │ │ │ └── xbox_live_context.lua
│ │ │ ├── mp/
│ │ │ │ ├── MP_JoinLobbyViaActivity.lua
│ │ │ │ ├── matchmaking_single_device-cpp.lua
│ │ │ │ ├── matchmaking_single_device.lua
│ │ │ │ ├── mp-cpp.lua
│ │ │ │ ├── mp.lua
│ │ │ │ ├── mp_multiple_contexts.lua
│ │ │ │ ├── mp_partial_invite_flow.lua
│ │ │ │ ├── mp_search-cpp.lua
│ │ │ │ ├── mp_search.lua
│ │ │ │ ├── mp_transfer-cpp.lua
│ │ │ │ └── mp_transfer.lua
│ │ │ ├── multiplayerManager/
│ │ │ │ ├── MPM_Invite.lua
│ │ │ │ ├── MPM_InviteUI.lua
│ │ │ │ ├── MPM_JoinFixedGameSession.lua
│ │ │ │ ├── MPM_JoinLobbyViaActivity.lua
│ │ │ │ ├── MPM_Match.lua
│ │ │ │ ├── MPM_SingleDevice_JoinLeaveGame.lua
│ │ │ │ └── MPM_SingleDevice_SyncHostWrite.lua
│ │ │ ├── notification/
│ │ │ │ ├── achievement_unlock_notification.lua
│ │ │ │ ├── gameinvitenotifications.lua
│ │ │ │ └── multiple_notification_subscriptions.lua
│ │ │ ├── presence/
│ │ │ │ ├── presence-cpp.lua
│ │ │ │ ├── presence.lua
│ │ │ │ └── presence_rta.lua
│ │ │ ├── privacy/
│ │ │ │ ├── privacy-cpp.lua
│ │ │ │ └── privacy.lua
│ │ │ ├── profile/
│ │ │ │ ├── GetUserProfile-cpp.lua
│ │ │ │ ├── GetUserProfile.lua
│ │ │ │ ├── GetUserProfiles-cpp.lua
│ │ │ │ ├── GetUserProfiles.lua
│ │ │ │ ├── GetUserProfilesForSocialGroup-cpp.lua
│ │ │ │ └── GetUserProfilesForSocialGroupAsync.lua
│ │ │ ├── rta/
│ │ │ │ ├── RTAResync.lua
│ │ │ │ ├── RTASuspendResume.lua
│ │ │ │ ├── RTA_MP_SM.lua
│ │ │ │ ├── RTA_activation.lua
│ │ │ │ ├── simpleRTA-cpp.lua
│ │ │ │ ├── simpleRTA.lua
│ │ │ │ └── simpleRTA_legacy.lua
│ │ │ ├── social/
│ │ │ │ ├── reputation-cpp.lua
│ │ │ │ ├── reputation.lua
│ │ │ │ ├── social-cpp.lua
│ │ │ │ ├── social.lua
│ │ │ │ ├── social_manager_1-cpp.lua
│ │ │ │ ├── social_manager_1.lua
│ │ │ │ ├── social_manager_2-cpp.lua
│ │ │ │ ├── social_manager_2.lua
│ │ │ │ ├── social_manager_filter-cpp.lua
│ │ │ │ ├── social_manager_filter.lua
│ │ │ │ ├── social_manager_list-cpp.lua
│ │ │ │ ├── social_manager_list.lua
│ │ │ │ ├── social_manager_remove_realloc-cpp.lua
│ │ │ │ ├── social_manager_remove_realloc.lua
│ │ │ │ ├── social_manager_wait.lua
│ │ │ │ ├── social_relationship_changed.lua
│ │ │ │ └── social_sub_unsub.lua
│ │ │ ├── stats/
│ │ │ │ ├── stats-bvt.lua
│ │ │ │ ├── stats-cpp.lua
│ │ │ │ ├── stats.lua
│ │ │ │ └── stats_legacy.lua
│ │ │ ├── stats2017/
│ │ │ │ ├── stats2017-test429.lua
│ │ │ │ └── stats2017.lua
│ │ │ ├── stringVerify/
│ │ │ │ ├── stringVerify-cpp.lua
│ │ │ │ └── stringVerify.lua
│ │ │ ├── tests.root
│ │ │ ├── titleStorage/
│ │ │ │ ├── title_storage-cpp.lua
│ │ │ │ ├── title_storage-restCalls.lua
│ │ │ │ └── title_storage.lua
│ │ │ ├── xal/
│ │ │ │ ├── addfirst.lua
│ │ │ │ └── signOut.lua
│ │ │ └── xblHttp/
│ │ │ ├── XBLHttpCall.lua
│ │ │ └── XBLHttpCallPerform.lua
│ │ └── lua/
│ │ ├── Makefile
│ │ ├── README
│ │ ├── doc/
│ │ │ ├── contents.html
│ │ │ ├── index.css
│ │ │ ├── lua.1
│ │ │ ├── lua.css
│ │ │ ├── luac.1
│ │ │ ├── manual.css
│ │ │ ├── manual.html
│ │ │ └── readme.html
│ │ └── src/
│ │ ├── Makefile
│ │ ├── lapi.c
│ │ ├── lapi.h
│ │ ├── lauxlib.c
│ │ ├── lauxlib.h
│ │ ├── lbaselib.c
│ │ ├── lbitlib.c
│ │ ├── lcode.c
│ │ ├── lcode.h
│ │ ├── lcorolib.c
│ │ ├── lctype.c
│ │ ├── lctype.h
│ │ ├── ldblib.c
│ │ ├── ldebug.c
│ │ ├── ldebug.h
│ │ ├── ldo.c
│ │ ├── ldo.h
│ │ ├── ldump.c
│ │ ├── lfunc.c
│ │ ├── lfunc.h
│ │ ├── lgc.c
│ │ ├── lgc.h
│ │ ├── linit.c
│ │ ├── liolib.c
│ │ ├── llex.c
│ │ ├── llex.h
│ │ ├── llimits.h
│ │ ├── lmathlib.c
│ │ ├── lmem.c
│ │ ├── lmem.h
│ │ ├── loadlib.c
│ │ ├── lobject.c
│ │ ├── lobject.h
│ │ ├── lopcodes.c
│ │ ├── lopcodes.h
│ │ ├── loslib.c
│ │ ├── lparser.c
│ │ ├── lparser.h
│ │ ├── lprefix.h
│ │ ├── lstate.c
│ │ ├── lstate.h
│ │ ├── lstring.c
│ │ ├── lstring.h
│ │ ├── lstrlib.c
│ │ ├── ltable.c
│ │ ├── ltable.h
│ │ ├── ltablib.c
│ │ ├── ltm.c
│ │ ├── ltm.h
│ │ ├── lua.h
│ │ ├── lua.hpp
│ │ ├── luaconf.h
│ │ ├── lualib.h
│ │ ├── lundump.c
│ │ ├── lundump.h
│ │ ├── lutf8lib.c
│ │ ├── lvm.c
│ │ ├── lvm.h
│ │ ├── lzio.c
│ │ └── lzio.h
│ ├── GDK/
│ │ ├── APIRunner.GDK/
│ │ │ ├── .gitignore
│ │ │ ├── APIRunner.143.GDK.Src.vcxproj
│ │ │ ├── APIRunner.143.GDK.Src.vcxproj.filters
│ │ │ ├── APIRunner.GDK.Bin.vcxproj
│ │ │ ├── APIRunner.GDK.Bin.vcxproj.filters
│ │ │ ├── APIRunner.GDK.Src.vcxproj
│ │ │ ├── APIRunner.GDK.Src.vcxproj.filters
│ │ │ ├── APIRunner.GDK.cpp
│ │ │ ├── APIRunner.GDK.h
│ │ │ ├── APIRunnerBin-MicrosoftGame.Config
│ │ │ ├── APIRunnerSrc-MicrosoftGame.Config
│ │ │ ├── APIRunnerSrc143-MicrosoftGame.Config
│ │ │ ├── APIRunnerStats2017-MicrosoftGame.Config
│ │ │ ├── AppxManifest.xml
│ │ │ ├── Assets/
│ │ │ │ ├── ATGConsoleBlack.DDS
│ │ │ │ ├── ATGSampleBackground.DDS
│ │ │ │ └── SampleUI.csv
│ │ │ ├── CopyLogFromConsole.cmd
│ │ │ ├── DeviceResources.cpp
│ │ │ ├── DeviceResources.h
│ │ │ ├── Kits/
│ │ │ │ ├── ATGTK/
│ │ │ │ │ ├── ATGColors.h
│ │ │ │ │ ├── CSVReader.h
│ │ │ │ │ ├── ControllerFont.h
│ │ │ │ │ ├── FindMedia.h
│ │ │ │ │ ├── Json.h
│ │ │ │ │ ├── SampleGUI.cpp
│ │ │ │ │ ├── SampleGUI.h
│ │ │ │ │ ├── StringUtil.cpp
│ │ │ │ │ ├── StringUtil.h
│ │ │ │ │ ├── TextConsole.cpp
│ │ │ │ │ ├── TextConsole.h
│ │ │ │ │ ├── d3dx12.h
│ │ │ │ │ └── json/
│ │ │ │ │ ├── LICENSE.MIT
│ │ │ │ │ ├── commit_id.txt
│ │ │ │ │ ├── documentation.txt
│ │ │ │ │ ├── json.hpp
│ │ │ │ │ └── repo.txt
│ │ │ │ ├── ATGTelemetry/
│ │ │ │ │ └── GDK/
│ │ │ │ │ ├── ATGTelemetry.cpp
│ │ │ │ │ └── ATGTelemetry.h
│ │ │ │ ├── DirectXTK12/
│ │ │ │ │ ├── Audio/
│ │ │ │ │ │ ├── AudioEngine.cpp
│ │ │ │ │ │ ├── DynamicSoundEffectInstance.cpp
│ │ │ │ │ │ ├── SoundCommon.cpp
│ │ │ │ │ │ ├── SoundCommon.h
│ │ │ │ │ │ ├── SoundEffect.cpp
│ │ │ │ │ │ ├── SoundEffectInstance.cpp
│ │ │ │ │ │ ├── SoundStreamInstance.cpp
│ │ │ │ │ │ ├── WAVFileReader.cpp
│ │ │ │ │ │ ├── WAVFileReader.h
│ │ │ │ │ │ ├── WaveBank.cpp
│ │ │ │ │ │ ├── WaveBankReader.cpp
│ │ │ │ │ │ └── WaveBankReader.h
│ │ │ │ │ ├── DirectXTK12_GDK_2017.vcxproj
│ │ │ │ │ ├── DirectXTK12_GDK_2017.vcxproj.filters
│ │ │ │ │ ├── Inc/
│ │ │ │ │ │ ├── Audio.h
│ │ │ │ │ │ ├── BufferHelpers.h
│ │ │ │ │ │ ├── CommonStates.h
│ │ │ │ │ │ ├── DDSTextureLoader.h
│ │ │ │ │ │ ├── DescriptorHeap.h
│ │ │ │ │ │ ├── DirectXHelpers.h
│ │ │ │ │ │ ├── EffectPipelineStateDescription.h
│ │ │ │ │ │ ├── Effects.h
│ │ │ │ │ │ ├── GamePad.h
│ │ │ │ │ │ ├── GeometricPrimitive.h
│ │ │ │ │ │ ├── GraphicsMemory.h
│ │ │ │ │ │ ├── Keyboard.h
│ │ │ │ │ │ ├── Model.h
│ │ │ │ │ │ ├── Mouse.h
│ │ │ │ │ │ ├── PostProcess.h
│ │ │ │ │ │ ├── PrimitiveBatch.h
│ │ │ │ │ │ ├── RenderTargetState.h
│ │ │ │ │ │ ├── ResourceUploadBatch.h
│ │ │ │ │ │ ├── ScreenGrab.h
│ │ │ │ │ │ ├── SimpleMath.h
│ │ │ │ │ │ ├── SimpleMath.inl
│ │ │ │ │ │ ├── SpriteBatch.h
│ │ │ │ │ │ ├── SpriteFont.h
│ │ │ │ │ │ ├── VertexTypes.h
│ │ │ │ │ │ ├── WICTextureLoader.h
│ │ │ │ │ │ └── XboxDDSTextureLoader.h
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── Src/
│ │ │ │ │ ├── AlignedNew.h
│ │ │ │ │ ├── AlphaTestEffect.cpp
│ │ │ │ │ ├── BasicEffect.cpp
│ │ │ │ │ ├── BasicPostProcess.cpp
│ │ │ │ │ ├── Bezier.h
│ │ │ │ │ ├── BinaryReader.cpp
│ │ │ │ │ ├── BinaryReader.h
│ │ │ │ │ ├── BufferHelpers.cpp
│ │ │ │ │ ├── CommonStates.cpp
│ │ │ │ │ ├── DDS.h
│ │ │ │ │ ├── DDSTextureLoader.cpp
│ │ │ │ │ ├── DebugEffect.cpp
│ │ │ │ │ ├── DemandCreate.h
│ │ │ │ │ ├── DescriptorHeap.cpp
│ │ │ │ │ ├── DirectXHelpers.cpp
│ │ │ │ │ ├── DualPostProcess.cpp
│ │ │ │ │ ├── DualTextureEffect.cpp
│ │ │ │ │ ├── EffectCommon.cpp
│ │ │ │ │ ├── EffectCommon.h
│ │ │ │ │ ├── EffectFactory.cpp
│ │ │ │ │ ├── EffectPipelineStateDescription.cpp
│ │ │ │ │ ├── EffectTextureFactory.cpp
│ │ │ │ │ ├── EnvironmentMapEffect.cpp
│ │ │ │ │ ├── GamePad.cpp
│ │ │ │ │ ├── GeometricPrimitive.cpp
│ │ │ │ │ ├── Geometry.cpp
│ │ │ │ │ ├── Geometry.h
│ │ │ │ │ ├── GraphicsMemory.cpp
│ │ │ │ │ ├── Keyboard.cpp
│ │ │ │ │ ├── LinearAllocator.cpp
│ │ │ │ │ ├── LinearAllocator.h
│ │ │ │ │ ├── LoaderHelpers.h
│ │ │ │ │ ├── Model.cpp
│ │ │ │ │ ├── ModelLoadSDKMESH.cpp
│ │ │ │ │ ├── ModelLoadVBO.cpp
│ │ │ │ │ ├── Mouse.cpp
│ │ │ │ │ ├── NormalMapEffect.cpp
│ │ │ │ │ ├── PBREffect.cpp
│ │ │ │ │ ├── PBREffectFactory.cpp
│ │ │ │ │ ├── PlatformHelpers.h
│ │ │ │ │ ├── PrimitiveBatch.cpp
│ │ │ │ │ ├── ResourceUploadBatch.cpp
│ │ │ │ │ ├── SDKMesh.h
│ │ │ │ │ ├── ScreenGrab.cpp
│ │ │ │ │ ├── Shaders/
│ │ │ │ │ │ ├── AlphaTestEffect.fx
│ │ │ │ │ │ ├── BasicEffect.fx
│ │ │ │ │ │ ├── Common.fxh
│ │ │ │ │ │ ├── CompileShaders.cmd
│ │ │ │ │ │ ├── DebugEffect.fx
│ │ │ │ │ │ ├── DualTextureEffect.fx
│ │ │ │ │ │ ├── EnvironmentMapEffect.fx
│ │ │ │ │ │ ├── GenerateMips.hlsl
│ │ │ │ │ │ ├── Lighting.fxh
│ │ │ │ │ │ ├── NormalMapEffect.fx
│ │ │ │ │ │ ├── PBRCommon.fxh
│ │ │ │ │ │ ├── PBREffect.fx
│ │ │ │ │ │ ├── PixelPacking_Velocity.hlsli
│ │ │ │ │ │ ├── PostProcess.fx
│ │ │ │ │ │ ├── RootSig.fxh
│ │ │ │ │ │ ├── SkinnedEffect.fx
│ │ │ │ │ │ ├── SpriteEffect.fx
│ │ │ │ │ │ ├── Structures.fxh
│ │ │ │ │ │ ├── ToneMap.fx
│ │ │ │ │ │ └── Utilities.fxh
│ │ │ │ │ ├── SharedResourcePool.h
│ │ │ │ │ ├── SimpleMath.cpp
│ │ │ │ │ ├── SkinnedEffect.cpp
│ │ │ │ │ ├── SpriteBatch.cpp
│ │ │ │ │ ├── SpriteFont.cpp
│ │ │ │ │ ├── TeapotData.inc
│ │ │ │ │ ├── ToneMapPostProcess.cpp
│ │ │ │ │ ├── VertexTypes.cpp
│ │ │ │ │ ├── WICTextureLoader.cpp
│ │ │ │ │ ├── XboxDDSTextureLoader.cpp
│ │ │ │ │ ├── d3dx12.h
│ │ │ │ │ ├── pch.cpp
│ │ │ │ │ ├── pch.h
│ │ │ │ │ └── vbo.h
│ │ │ │ └── LiveTK/
│ │ │ │ ├── LiveInfoHUD.cpp
│ │ │ │ ├── LiveInfoHUD.h
│ │ │ │ ├── LiveResources.cpp
│ │ │ │ ├── LiveResources.h
│ │ │ │ ├── UITwist.cpp
│ │ │ │ └── UITwist.h
│ │ │ ├── Main.cpp
│ │ │ ├── Media/
│ │ │ │ └── Fonts/
│ │ │ │ ├── SegoeUI_18.spritefont
│ │ │ │ ├── SegoeUI_18_Bold.spritefont
│ │ │ │ ├── SegoeUI_18_Italic.spritefont
│ │ │ │ ├── SegoeUI_22.spritefont
│ │ │ │ ├── SegoeUI_22_Bold.spritefont
│ │ │ │ ├── SegoeUI_22_Italic.spritefont
│ │ │ │ ├── SegoeUI_36.spritefont
│ │ │ │ ├── SegoeUI_36_Bold.spritefont
│ │ │ │ ├── SegoeUI_36_Italic.spritefont
│ │ │ │ ├── XboxOneControllerLegend.spritefont
│ │ │ │ └── XboxOneControllerLegendSmall.spritefont
│ │ │ ├── MicrosoftGame.Config
│ │ │ ├── StepTimer.h
│ │ │ ├── pch.cpp
│ │ │ └── pch.h
│ │ └── ManualTest.GDK/
│ │ ├── Assets/
│ │ │ └── SampleUI.csv
│ │ ├── DeviceResources.cpp
│ │ ├── DeviceResources.h
│ │ ├── Main.cpp
│ │ ├── ManualTest.cpp
│ │ ├── ManualTest.h
│ │ ├── ManualTest.sln
│ │ ├── ManualTest.vcxproj
│ │ ├── ManualTest.vcxproj.filters
│ │ ├── Media/
│ │ │ ├── Fonts/
│ │ │ │ ├── Courier_16.spritefont
│ │ │ │ ├── Courier_36.spritefont
│ │ │ │ ├── SegoeUI_18.spritefont
│ │ │ │ ├── SegoeUI_18_Bold.spritefont
│ │ │ │ ├── SegoeUI_18_Italic.spritefont
│ │ │ │ ├── SegoeUI_22.spritefont
│ │ │ │ ├── SegoeUI_22_Bold.spritefont
│ │ │ │ ├── SegoeUI_22_Italic.spritefont
│ │ │ │ ├── SegoeUI_36.spritefont
│ │ │ │ ├── SegoeUI_36_Bold.spritefont
│ │ │ │ ├── SegoeUI_36_Italic.spritefont
│ │ │ │ ├── XboxOneController.spritefont
│ │ │ │ ├── XboxOneControllerLegend.spritefont
│ │ │ │ ├── XboxOneControllerLegendSmall.spritefont
│ │ │ │ └── XboxOneControllerSmall.spritefont
│ │ │ └── Textures/
│ │ │ └── ATGSampleBackground.DDS
│ │ ├── MicrosoftGameConfig.mgc
│ │ ├── SampleLiveInfoHUD.cpp
│ │ ├── SampleLiveInfoHUD.h
│ │ ├── StepTimer.h
│ │ ├── pch.cpp
│ │ └── pch.h
│ └── UnitTests/
│ ├── Mocks/
│ │ ├── http_mock.cpp
│ │ ├── http_mock.h
│ │ ├── mock_rta_service.cpp
│ │ ├── mock_rta_service.h
│ │ ├── mock_user.cpp
│ │ ├── mock_web_socket.cpp
│ │ ├── mock_web_socket.h
│ │ └── xal_mocks.cpp
│ ├── Scripts/
│ │ ├── ETWProfile.wprp
│ │ ├── repeat-all-except-ignored.cmd
│ │ ├── repeat-focused.cmd
│ │ ├── repeat-single-with-etw.cmd
│ │ ├── repeat-single.cmd
│ │ ├── run-all-tests-once-skip-ignore.cmd
│ │ ├── run-all-tests-once.cmd
│ │ └── run-focused-once.cmd
│ ├── Support/
│ │ ├── DefineTestMacros.h
│ │ ├── TAEF/
│ │ │ ├── UnitTestBase.cpp
│ │ │ ├── UnitTestBase.h
│ │ │ ├── UnitTestIncludes_TAEF.h
│ │ │ ├── inc/
│ │ │ │ ├── ITestResource.h
│ │ │ │ ├── Interruption.h
│ │ │ │ ├── Log.h
│ │ │ │ ├── LogTestResults.h
│ │ │ │ ├── Logcontext.h
│ │ │ │ ├── Logcontroller.h
│ │ │ │ ├── PreserveLastError.h
│ │ │ │ ├── RuntimeParameters.h
│ │ │ │ ├── TE.Common.h
│ │ │ │ ├── TestData.h
│ │ │ │ ├── Throw.h
│ │ │ │ ├── Verify.h
│ │ │ │ ├── Wex.Common.h
│ │ │ │ ├── Wex.Logger.h
│ │ │ │ ├── WexAssert.h
│ │ │ │ ├── WexDebug.h
│ │ │ │ ├── WexException.h
│ │ │ │ ├── WexString.h
│ │ │ │ ├── WexTestClass.h
│ │ │ │ ├── WexTypes.h
│ │ │ │ └── WppDefs.h
│ │ │ └── lib/
│ │ │ ├── x64/
│ │ │ │ ├── Te.Common.lib
│ │ │ │ ├── Wex.Common.lib
│ │ │ │ └── Wex.Logger.lib
│ │ │ └── x86/
│ │ │ ├── Te.Common.lib
│ │ │ ├── Wex.Common.lib
│ │ │ └── Wex.Logger.lib
│ │ ├── TE/
│ │ │ ├── UnitTestHelpers_TE.cpp
│ │ │ ├── UnitTestHelpers_TE.h
│ │ │ └── UnitTestIncludes_TE.h
│ │ ├── UnitTestIncludes.h
│ │ ├── event.cpp
│ │ ├── event.h
│ │ ├── iso8601.cpp
│ │ ├── iso8601.h
│ │ ├── unit_test_helpers.cpp
│ │ └── unit_test_helpers.h
│ └── Tests/
│ ├── Services/
│ │ ├── AchievementsManagerTests.cpp
│ │ ├── AchievementsTests.cpp
│ │ ├── ErrorTests.cpp
│ │ ├── LeaderboardTests.cpp
│ │ ├── MatchmakingTests.cpp
│ │ ├── MultiplayerActivityTests.cpp
│ │ ├── MultiplayerManagerTests.cpp
│ │ ├── MultiplayerTests.cpp
│ │ ├── PeoplehubTests.cpp
│ │ ├── PresenceTests.cpp
│ │ ├── PrivacyTests.cpp
│ │ ├── ProfileTests.cpp
│ │ ├── RealTimeActivityManagerTests.cpp
│ │ ├── ReputationTests.cpp
│ │ ├── SocialManagerTests.cpp
│ │ ├── SocialTests.cpp
│ │ ├── StatsTests.cpp
│ │ ├── StringVerifyTests.cpp
│ │ ├── TestResponses/
│ │ │ ├── Clubs.json
│ │ │ ├── Matchmaking.json
│ │ │ ├── Multiplayer.json
│ │ │ └── MultiplayerManager.json
│ │ ├── TitleManagedStatsTests.cpp
│ │ └── TitleStorageTests.cpp
│ └── Shared/
│ ├── GlobalTests.cpp
│ ├── HttpCallSettingsTests.cpp
│ ├── HttpCallTests.cpp
│ ├── LogTests.cpp
│ ├── PlatformTests.cpp
│ ├── XboxLiveCallbackTests.cpp
│ └── XboxLiveContextTests.cpp
├── ThirdPartyNotices.txt
├── hc_settings.props
├── xsapi.paths.props
└── xsapi.staticlib.props
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
.gitconfig
.git-credentials
# Ignore iOS Framework binarie
Frameworks/
# Ignore OpenSSL and Boost build files for iOS
.gitk
.config/git/gitk
**/.vs/
**/project.lock.json
Casablanca*/Build_iOS/OpenSSL-for-iPhone/
Casablanca*/Build_iOS/boostoniphone/
Casablanca*/Build_iOS/openssl/
Casablanca*/Build_iOS/boost.framework/
Casablanca*/Build_iOS/build.ios/
Casablanca*/Build_iOS/ios-cmake/
#nuget packages
External/Packages/*
#mobile
External/sdk.mobile
# Xcode - from github
## User settings
xcuserdata
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
# Mac
.DS_Store
# VS temp files
**/*.sln.ide/
**/*.opensdf
**/*.sdf
**/*.suo
**/*.opendb
**/*.VC.db
**/*.user
**/ipch/
**/Generated Files/
**/AppPackages/*
**/*.orig
**/pingme.txt
**/*.cache
**/dlldata.c
**/*_i.c
**/*_p.c
**/*.metaproj
**/*.metaproj.tmp
**/*.opendb
**/*.coveragexml
**/Durango/
**/Gaming.Xbox.Desktop.x64/
**/Gaming.Xbox.XboxOne.x64/
**/Gaming.Xbox.Scarlett.x64/
**/XboxOne.x64/
Samples/**/bin/
Samples/**/Debug/
Samples/**/Release/
Samples/**/Profile/
Samples/**/Lib/
Samples/**/.workspace/
Source/**/bin/
Source/**/gen/
Source/**/Debug/
Source/**/Release/
Archive/**/Debug/
Archive/**/Release/
Archive/**/Durango/
Archive/**/Lib/
Archive/**/*.winmd
Build/**/Debug/
Build/**/Release/
External/**/lib/
!External/xal/External/OneDS/lib/
External/**/bin/
External/**/Debug/
External/**/Release/
tests/**/bin/
tests/**/Debug/
tests/**/Release/
Tools/**/bin/
Tools/**/obj/
**/*.classpath
APIExplorer.Win32.PrebuiltBins.sln
**/local.properties
**/.workspace/
#Doxygen temp files
Docs/xblsdk_cpp/
Docs/xblsdk_winrt/
Docs/External/
Docs/xim_cpp/
# Unit Test
FakesAssemblies/
TestResults/
# Build objects
Casablanca/Intermediate/
Obj/
Binaries/
Debug/
Release/
ARM/
Built/
Bins/
# Allow files in our /Build folder
!/Build
!/Casablanca
**/.vs/
xbox-live-samples/
Tests/StressUnitTest/
*.pdb
Maven/
output/
ClockSkew.json
.idea
*.iml
.externalNativeBuild
**/XblEvents*.json
**/XblEvents*.dir
Tests/AndroidTestApp/MavenBinary/*
Tests/APIExplorer/XDK/Kits/DirectXTK/Src/Shaders/Compiled/*
Microsoft.Xbox.Services.*.sln.log
Microsoft.Xbox.Services.*.sln.out
**/apirunner-log.txt
# Android and Android Studio files
**/.idea
**/*.iml
**/.cxx
**/local.properties
**/.gradle/*
================================================
FILE: .gitmodules
================================================
[submodule "External/Xal/External/libHttpClient"]
path = External/Xal/External/libHttpClient
url = https://github.com/microsoft/libHttpClient
[submodule "External/rapidjson"]
path = External/rapidjson
url = https://github.com/jasonsandlin/rapidjson
================================================
FILE: Build/GetXsapiAndroidBinaryDir.cmake
================================================
cmake_minimum_required(VERSION 3.6)
function(GET_XSAPI_ANDROID_BINARY_DIR PATH_TO_ROOT OUT_BINARY_DIR)
string(TOLOWER "${CMAKE_BUILD_TYPE}" PATH_FLAVOR)
set(${OUT_BINARY_DIR} "${PATH_TO_ROOT}/Built/Android/${ANDROID_ABI}/${PATH_FLAVOR}" PARENT_SCOPE)
endfunction()
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C/Microsoft.Xbox.Services.141.GDK.C.vcxproj
================================================
{60139F62-BF37-4F11-BD93-5FBF4E92100C}
StaticLibrary
v141
true
Microsoft.Xbox.Services.141.GDK.C.$(Configuration)
Microsoft.Xbox.Services.141.GDK.C
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/Microsoft.Xbox.Services.141.GDK.C.Thunks.vcxproj
================================================
{e538394b-68cb-4597-87ad-7b6841cc1278}
DynamicLibrary
v141
true
true
Microsoft.Xbox.Services.141.GDK.C.Thunks.$(Configuration)
Microsoft.Xbox.Services.141.GDK.C.Thunks
Create
pch.h
%(XboxExtensionsDependencies)Appnotify.lib;crypt32.lib;xgameruntime.lib;WINHTTP.LIB;RUNTIMEOBJECT.LIB;ADVAPI32.LIB;ole32.lib;
$(ProjectDir)dll\Microsoft.Xbox.Services.141.GDK.C.Thunks.def
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/Microsoft.Xbox.Services.141.GDK.C.Thunks.vcxproj.filters
================================================
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/dll/Microsoft.Xbox.Services.141.GDK.C.Thunks.def
================================================
LIBRARY Microsoft.Xbox.Services.141.GDK.C.Thunks.dll
EXPORTS
XblAchievementsGetAchievementAsync
XblAchievementsGetAchievementResult
XblAchievementsGetAchievementsForTitleIdAsync
XblAchievementsGetAchievementsForTitleIdResult
XblAchievementsResultCloseHandle
XblAchievementsResultDuplicateHandle
XblAchievementsResultGetAchievements
XblAchievementsResultGetNextAsync
XblAchievementsResultGetNextResult
XblAchievementsResultHasNext
XblAchievementsUpdateAchievementAsync
XblAchievementsUpdateAchievementForTitleIdAsync
XblAddServiceCallRoutedHandler
XblCleanupAsync
XblContextCloseHandle
XblContextCreateHandle
XblContextDuplicateHandle
XblContextGetUser
XblContextGetXboxUserId
XblContextSettingsGetHttpRetryDelay
XblContextSettingsGetHttpTimeoutWindow
XblContextSettingsGetLongHttpTimeout
XblContextSettingsGetUseCrossPlatformQosServers
XblContextSettingsGetWebsocketTimeoutWindow
XblContextSettingsSetHttpRetryDelay
XblContextSettingsSetHttpTimeoutWindow
XblContextSettingsSetLongHttpTimeout
XblContextSettingsSetUseCrossPlatformQosServers
XblContextSettingsSetWebsocketTimeoutWindow
XblDisableAssertsForXboxLiveThrottlingInDevSandboxes
XblEventsWriteInGameEvent
XblFormatSecureDeviceAddress
XblGetAsyncQueue
XblGetErrorCondition
XblGetScid
XblHttpCallCloseHandle
XblHttpCallCreate
XblHttpCallDuplicateHandle
XblHttpCallGetHeader
XblHttpCallGetHeaderAtIndex
XblHttpCallGetNetworkErrorCode
XblHttpCallGetNumHeaders
XblHttpCallGetPlatformNetworkErrorMessage
XblHttpCallGetRequestUrl
XblHttpCallGetResponseBodyBytes
XblHttpCallGetResponseBodyBytesSize
XblHttpCallGetResponseString
XblHttpCallGetStatusCode
XblHttpCallPerformAsync
XblHttpCallRequestSetHeader
XblHttpCallRequestSetLongHttpCall
XblHttpCallRequestSetRequestBodyBytes
XblHttpCallRequestSetRequestBodyString
XblHttpCallRequestSetRetryAllowed
XblHttpCallRequestSetRetryCacheId
XblHttpCallSetTracing
XblInitialize
XblLeaderboardGetLeaderboardAsync
XblLeaderboardGetLeaderboardResult
XblLeaderboardGetLeaderboardResultSize
XblLeaderboardResultGetNextAsync
XblLeaderboardResultGetNextResult
XblLeaderboardResultGetNextResultSize
XblMatchmakingCreateMatchTicketAsync
XblMatchmakingCreateMatchTicketResult
XblMatchmakingDeleteMatchTicketAsync
XblMatchmakingGetHopperStatisticsAsync
XblMatchmakingGetHopperStatisticsResult
XblMatchmakingGetHopperStatisticsResultSize
XblMatchmakingGetMatchTicketDetailsAsync
XblMatchmakingGetMatchTicketDetailsResult
XblMatchmakingGetMatchTicketDetailsResultSize
XblMemGetFunctions
XblMemSetFunctions
XblMultiplayerActivityDeleteActivityAsync
XblMultiplayerActivityFlushRecentPlayersAsync
XblMultiplayerActivityGetActivityAsync
XblMultiplayerActivityGetActivityResult
XblMultiplayerActivityGetActivityResultSize
XblMultiplayerActivitySendInvitesAsync
XblMultiplayerActivitySetActivityAsync
XblMultiplayerActivityUpdateRecentPlayers
XblMultiplayerAddConnectionIdChangedHandler
XblMultiplayerAddSessionChangedHandler
XblMultiplayerAddSubscriptionLostHandler
XblMultiplayerClearActivityAsync
XblMultiplayerCreateSearchHandleAsync
XblMultiplayerCreateSearchHandleResult
XblMultiplayerDeleteSearchHandleAsync
XblMultiplayerEventArgsFindMatchCompleted
XblMultiplayerEventArgsMember
XblMultiplayerEventArgsMembers
XblMultiplayerEventArgsMembersCount
XblMultiplayerEventArgsPerformQoSMeasurements
XblMultiplayerEventArgsPropertiesJson
XblMultiplayerEventArgsTournamentGameSessionReady
XblMultiplayerEventArgsTournamentRegistrationStateChanged
XblMultiplayerEventArgsXuid
XblMultiplayerGetActivitiesForSocialGroupAsync
XblMultiplayerGetActivitiesForSocialGroupResult
XblMultiplayerGetActivitiesForSocialGroupResultCount
XblMultiplayerGetActivitiesForUsersAsync
XblMultiplayerGetActivitiesForUsersResult
XblMultiplayerGetActivitiesForUsersResultCount
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupAsync
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupResult
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupResultSize
XblMultiplayerGetActivitiesWithPropertiesForUsersAsync
XblMultiplayerGetActivitiesWithPropertiesForUsersResult
XblMultiplayerGetActivitiesWithPropertiesForUsersResultSize
XblMultiplayerGetSearchHandlesAsync
XblMultiplayerGetSearchHandlesResult
XblMultiplayerGetSearchHandlesResultCount
XblMultiplayerGetSessionAsync
XblMultiplayerGetSessionByHandleAsync
XblMultiplayerGetSessionByHandleResult
XblMultiplayerGetSessionResult
XblMultiplayerManagerAutoFillMembersDuringMatchmaking
XblMultiplayerManagerCancelMatch
XblMultiplayerManagerDoWork
XblMultiplayerManagerEstimatedMatchWaitTime
XblMultiplayerManagerFindMatch
XblMultiplayerManagerGameSessionActive
XblMultiplayerManagerGameSessionConstants
XblMultiplayerManagerGameSessionCorrelationId
XblMultiplayerManagerGameSessionHost
XblMultiplayerManagerGameSessionIsHost
XblMultiplayerManagerGameSessionMembers
XblMultiplayerManagerGameSessionMembersCount
XblMultiplayerManagerGameSessionPropertiesJson
XblMultiplayerManagerGameSessionSessionReference
XblMultiplayerManagerGameSessionSetProperties
XblMultiplayerManagerGameSessionSetSynchronizedHost
XblMultiplayerManagerGameSessionSetSynchronizedProperties
XblMultiplayerManagerInitialize
XblMultiplayerManagerJoinability
XblMultiplayerManagerJoinGame
XblMultiplayerManagerJoinGameFromLobby
XblMultiplayerManagerJoinLobby
XblMultiplayerManagerLeaveGame
XblMultiplayerManagerLobbySessionAddLocalUser
XblMultiplayerManagerLobbySessionConstants
XblMultiplayerManagerLobbySessionCorrelationId
XblMultiplayerManagerLobbySessionDeleteLocalMemberProperties
XblMultiplayerManagerLobbySessionHost
XblMultiplayerManagerLobbySessionInviteFriends
XblMultiplayerManagerLobbySessionInviteUsers
XblMultiplayerManagerLobbySessionIsHost
XblMultiplayerManagerLobbySessionLastTournamentTeamResult
XblMultiplayerManagerLobbySessionLocalMembers
XblMultiplayerManagerLobbySessionLocalMembersCount
XblMultiplayerManagerLobbySessionMembers
XblMultiplayerManagerLobbySessionMembersCount
XblMultiplayerManagerLobbySessionPropertiesJson
XblMultiplayerManagerLobbySessionRemoveLocalUser
XblMultiplayerManagerLobbySessionSessionReference
XblMultiplayerManagerLobbySessionSetLocalMemberConnectionAddress
XblMultiplayerManagerLobbySessionSetLocalMemberProperties
XblMultiplayerManagerLobbySessionSetProperties
XblMultiplayerManagerLobbySessionSetSynchronizedHost
XblMultiplayerManagerLobbySessionSetSynchronizedProperties
XblMultiplayerManagerMatchStatus
XblMultiplayerManagerMemberAreMembersOnSameDevice
XblMultiplayerManagerSetAutoFillMembersDuringMatchmaking
XblMultiplayerManagerSetJoinability
XblMultiplayerManagerSetQosMeasurements
XblMultiplayerQuerySessionsAsync
XblMultiplayerQuerySessionsResult
XblMultiplayerQuerySessionsResultCount
XblMultiplayerRemoveConnectionIdChangedHandler
XblMultiplayerRemoveSessionChangedHandler
XblMultiplayerRemoveSubscriptionLostHandler
XblMultiplayerSearchHandleCloseHandle
XblMultiplayerSearchHandleDuplicateHandle
XblMultiplayerSearchHandleGetCreationTime
XblMultiplayerSearchHandleGetCustomSessionPropertiesJson
XblMultiplayerSearchHandleGetId
XblMultiplayerSearchHandleGetJoinRestriction
XblMultiplayerSearchHandleGetMemberCounts
XblMultiplayerSearchHandleGetNumberAttributes
XblMultiplayerSearchHandleGetSessionClosed
XblMultiplayerSearchHandleGetSessionOwnerXuids
XblMultiplayerSearchHandleGetSessionReference
XblMultiplayerSearchHandleGetStringAttributes
XblMultiplayerSearchHandleGetTags
XblMultiplayerSearchHandleGetVisibility
XblMultiplayerSendInvitesAsync
XblMultiplayerSendInvitesResult
XblMultiplayerSessionAddMemberReservation
XblMultiplayerSessionArbitrationServer
XblMultiplayerSessionArbitrationStatus
XblMultiplayerSessionCloseHandle
XblMultiplayerSessionCompare
XblMultiplayerSessionConstantsSetArbitrationTimeouts
XblMultiplayerSessionConstantsSetCapabilities
XblMultiplayerSessionConstantsSetCloudComputePackageJson
XblMultiplayerSessionConstantsSetMaxMembersInSession
XblMultiplayerSessionConstantsSetMeasurementServerAddressesJson
XblMultiplayerSessionConstantsSetMemberInitialization
XblMultiplayerSessionConstantsSetPeerToHostRequirements
XblMultiplayerSessionConstantsSetPeerToPeerRequirements
XblMultiplayerSessionConstantsSetQosConnectivityMetrics
XblMultiplayerSessionConstantsSetTimeouts
XblMultiplayerSessionConstantsSetVisibility
XblMultiplayerSessionCreateHandle
XblMultiplayerSessionCurrentUser
XblMultiplayerSessionCurrentUserDeleteCustomPropertyJson
XblMultiplayerSessionCurrentUserSetCustomPropertyJson
XblMultiplayerSessionCurrentUserSetEncounters
XblMultiplayerSessionCurrentUserSetGroups
XblMultiplayerSessionCurrentUserSetMembersInGroup
XblMultiplayerSessionCurrentUserSetQosMeasurements
XblMultiplayerSessionCurrentUserSetRoles
XblMultiplayerSessionCurrentUserSetSecureDeviceAddressBase64
XblMultiplayerSessionCurrentUserSetServerQosMeasurements
XblMultiplayerSessionCurrentUserSetStatus
XblMultiplayerSessionDeleteCustomPropertyJson
XblMultiplayerSessionDuplicateHandle
XblMultiplayerSessionEtag
XblMultiplayerSessionGetInfo
XblMultiplayerSessionGetInitializationInfo
XblMultiplayerSessionGetMember
XblMultiplayerSessionGetRoleByName
XblMultiplayerSessionHostCandidates
XblMultiplayerSessionJoin
XblMultiplayerSessionLeave
XblMultiplayerSessionMatchmakingServer
XblMultiplayerSessionMembers
XblMultiplayerSessionMembersAccepted
XblMultiplayerSessionPropertiesSetJoinRestriction
XblMultiplayerSessionPropertiesSetKeywords
XblMultiplayerSessionPropertiesSetReadRestriction
XblMultiplayerSessionPropertiesSetTurnCollection
XblMultiplayerSessionRawServersJson
XblMultiplayerSessionReferenceCreate
XblMultiplayerSessionReferenceIsValid
XblMultiplayerSessionReferenceParseFromUriPath
XblMultiplayerSessionReferenceToUriPath
XblMultiplayerSessionRoleTypes
XblMultiplayerSessionSessionConstants
XblMultiplayerSessionSessionProperties
XblMultiplayerSessionSessionReference
XblMultiplayerSessionSetAllocateCloudCompute
XblMultiplayerSessionSetClosed
XblMultiplayerSessionSetCustomPropertyJson
XblMultiplayerSessionSetHostDeviceToken
XblMultiplayerSessionSetInitializationSucceeded
XblMultiplayerSessionSetLocked
XblMultiplayerSessionSetMatchmakingResubmit
XblMultiplayerSessionSetMatchmakingServerConnectionPath
XblMultiplayerSessionSetMatchmakingTargetSessionConstantsJson
XblMultiplayerSessionSetMutableRoleSettings
XblMultiplayerSessionSetRawServersJson
XblMultiplayerSessionSetServerConnectionStringCandidates
XblMultiplayerSessionSetSessionChangeSubscription
XblMultiplayerSessionSubscribedChangeTypes
XblMultiplayerSessionTimeOfSession
XblMultiplayerSessionTournamentsServer
XblMultiplayerSessionWriteStatus
XblMultiplayerSetActivityAsync
XblMultiplayerSetSubscriptionsEnabled
XblMultiplayerSetTransferHandleAsync
XblMultiplayerSetTransferHandleResult
XblMultiplayerSubscriptionsEnabled
XblMultiplayerWriteSessionAsync
XblMultiplayerWriteSessionByHandleAsync
XblMultiplayerWriteSessionByHandleResult
XblMultiplayerWriteSessionResult
XblPresenceAddDevicePresenceChangedHandler
XblPresenceAddTitlePresenceChangedHandler
XblPresenceGetPresenceAsync
XblPresenceGetPresenceForMultipleUsersAsync
XblPresenceGetPresenceForMultipleUsersResult
XblPresenceGetPresenceForMultipleUsersResultCount
XblPresenceGetPresenceForSocialGroupAsync
XblPresenceGetPresenceForSocialGroupResult
XblPresenceGetPresenceForSocialGroupResultCount
XblPresenceGetPresenceResult
XblPresenceRecordCloseHandle
XblPresenceRecordDuplicateHandle
XblPresenceRecordGetDeviceRecords
XblPresenceRecordGetUserState
XblPresenceRecordGetXuid
XblPresenceRemoveDevicePresenceChangedHandler
XblPresenceRemoveTitlePresenceChangedHandler
XblPresenceSetPresenceAsync
XblPresenceSubscribeToDevicePresenceChange
XblPresenceSubscribeToTitlePresenceChange
XblPresenceUnsubscribeFromDevicePresenceChange
XblPresenceUnsubscribeFromTitlePresenceChange
XblPrivacyBatchCheckPermissionAsync
XblPrivacyBatchCheckPermissionResult
XblPrivacyBatchCheckPermissionResultSize
XblPrivacyCheckPermissionAsync
XblPrivacyCheckPermissionForAnonymousUserAsync
XblPrivacyCheckPermissionForAnonymousUserResult
XblPrivacyCheckPermissionForAnonymousUserResultSize
XblPrivacyCheckPermissionResult
XblPrivacyCheckPermissionResultSize
XblPrivacyGetAvoidListAsync
XblPrivacyGetAvoidListResult
XblPrivacyGetAvoidListResultCount
XblPrivacyGetMuteListAsync
XblPrivacyGetMuteListResult
XblPrivacyGetMuteListResultCount
XblProfileGetUserProfileAsync
XblProfileGetUserProfileResult
XblProfileGetUserProfilesAsync
XblProfileGetUserProfilesForSocialGroupAsync
XblProfileGetUserProfilesForSocialGroupResult
XblProfileGetUserProfilesForSocialGroupResultCount
XblProfileGetUserProfilesResult
XblProfileGetUserProfilesResultCount
XblRealTimeActivityActivate
XblRealTimeActivityAddConnectionStateChangeHandler
XblRealTimeActivityAddResyncHandler
XblRealTimeActivityAddSubscriptionErrorHandler
XblRealTimeActivityDeactivate
XblRealTimeActivityRemoveConnectionStateChangeHandler
XblRealTimeActivityRemoveResyncHandler
XblRealTimeActivityRemoveSubscriptionErrorHandler
XblRealTimeActivitySubscriptionGetId
XblRealTimeActivitySubscriptionGetState
XblRemoveServiceCallRoutedHandler
XblSetOverrideConfiguration
XblSocialAddSocialRelationshipChangedHandler
XblSocialGetSocialRelationshipsAsync
XblSocialGetSocialRelationshipsResult
XblSocialManagerAddLocalUser
XblSocialManagerCreateSocialUserGroupFromFilters
XblSocialManagerCreateSocialUserGroupFromList
XblSocialManagerDestroySocialUserGroup
XblSocialManagerDoWork
XblSocialManagerGetLocalUserCount
XblSocialManagerGetLocalUsers
XblSocialManagerPresenceRecordIsUserPlayingTitle
XblSocialManagerRemoveLocalUser
XblSocialManagerSetRichPresencePollingStatus
XblSocialManagerUpdateSocialUserGroup
XblSocialManagerUserGroupGetFilters
XblSocialManagerUserGroupGetLocalUser
XblSocialManagerUserGroupGetType
XblSocialManagerUserGroupGetUsers
XblSocialManagerUserGroupGetUsersTrackedByGroup
XblSocialRelationshipResultCloseHandle
XblSocialRelationshipResultDuplicateHandle
XblSocialRelationshipResultGetNextAsync
XblSocialRelationshipResultGetNextResult
XblSocialRelationshipResultGetRelationships
XblSocialRelationshipResultGetTotalCount
XblSocialRelationshipResultHasNext
XblSocialRemoveSocialRelationshipChangedHandler
XblSocialSubmitBatchReputationFeedbackAsync
XblSocialSubmitReputationFeedbackAsync
XblSocialSubscribeToSocialRelationshipChange
XblSocialUnsubscribeFromSocialRelationshipChange
XblStringVerifyStringAsync
XblStringVerifyStringResult
XblStringVerifyStringResultSize
XblStringVerifyStringsAsync
XblStringVerifyStringsResult
XblStringVerifyStringsResultSize
XblTitleManagedStatsDeleteStatsAsync
XblTitleManagedStatsUpdateStatsAsync
XblTitleManagedStatsWriteAsync
XblTitleStorageBlobMetadataResultCloseHandle
XblTitleStorageBlobMetadataResultDuplicateHandle
XblTitleStorageBlobMetadataResultGetItems
XblTitleStorageBlobMetadataResultGetNextAsync
XblTitleStorageBlobMetadataResultGetNextResult
XblTitleStorageBlobMetadataResultHasNext
XblTitleStorageDeleteBlobAsync
XblTitleStorageDownloadBlobAsync
XblTitleStorageDownloadBlobResult
XblTitleStorageGetBlobMetadataAsync
XblTitleStorageGetBlobMetadataResult
XblTitleStorageGetQuotaAsync
XblTitleStorageGetQuotaResult
XblTitleStorageUploadBlobAsync
XblTitleStorageUploadBlobResult
XblUserStatisticsAddStatisticChangedHandler
XblUserStatisticsGetMultipleUserStatisticsAsync
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsAsync
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsResult
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsResultSize
XblUserStatisticsGetMultipleUserStatisticsResult
XblUserStatisticsGetMultipleUserStatisticsResultSize
XblUserStatisticsGetSingleUserStatisticAsync
XblUserStatisticsGetSingleUserStatisticResult
XblUserStatisticsGetSingleUserStatisticResultSize
XblUserStatisticsGetSingleUserStatisticsAsync
XblUserStatisticsGetSingleUserStatisticsResult
XblUserStatisticsGetSingleUserStatisticsResultSize
XblUserStatisticsRemoveStatisticChangedHandler
XblUserStatisticsSubscribeToStatisticChange
XblUserStatisticsUnsubscribeFromStatisticChange
XblWrapper_XblInitialize
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/dll/dllmain.cpp
================================================
#include "pch.h"
#include
#include
#include
extern "C"
{
BOOL APIENTRY DllMain(HMODULE /* hModule */, DWORD ul_reason_for_call, LPVOID /* lpReserved */)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
XBL_DLLEXPORT HRESULT XBL_CALLING_CONV XblWrapper_XblInitialize(
_In_z_ const char* scid,
_In_ XTaskQueueHandle internalWorkQueue
) noexcept
{
XGameRuntimeInitialize();
// xal must be initialized to be used by xsapi
XalInitArgs xalInitArgs = { };
XalInitialize(&xalInitArgs, internalWorkQueue);
XblInitArgs xblInitArgs = { };
xblInitArgs.scid = scid;
xblInitArgs.queue = internalWorkQueue;
return XblInitialize(&xblInitArgs);
}
}
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/dll/pch.cpp
================================================
#include "pch.h"
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/dll/pch.h
================================================
#pragma once
#include
#define _WIN32_WINNT 0x0A00
#include
// Use the C++ standard templated min/max
#define NOMINMAX
// DirectX apps don't need GDI
#define NODRAWTEXT
#define NOGDI
#define NOBITMAP
// Include if you need this
#define NOMCX
// Include if you need this
#define NOSERVICE
// WinHelp is deprecated
#define NOHELP
#include
#if HC_PLATFORM_IS_MICROSOFT
#define XBL_DLLEXPORT __declspec(dllexport)
#define XBL_CALLING_CONV __stdcall
#else
#define XBL_DLLEXPORT
#define XBL_CALLING_CONV
#endif
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/generator/ThunksGenerator/App.config
================================================
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/generator/ThunksGenerator/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace ThunksGenerator
{
class Program
{
static void Main(string[] args)
{
var thunksDefFile = new FileInfo("../../../../dll/Microsoft.Xbox.Services.141.GDK.C.Thunks.def");
Console.WriteLine(thunksDefFile.FullName);
string xsapiReproFolder = thunksDefFile.Directory.Parent.Parent.Parent.FullName;
string cHeadersFolder = Path.Combine(xsapiReproFolder, @"Include\xsapi-c\");
var headerFiles = Directory.EnumerateFiles(cHeadersFolder, "*.h", SearchOption.AllDirectories);
Console.WriteLine("Finding apis");
List fns = new List();
foreach (string curHeader in headerFiles)
{
ProcessHeader(curHeader, fns);
}
fns.Sort();
Console.WriteLine($"Writing apis to {thunksDefFile.FullName}");
string content = "LIBRARY Microsoft.Xbox.Services.141.GDK.C.Thunks.dll\n";
content += "EXPORTS\n";
foreach (string fn in fns)
{
string apiName = fn.Substring(0, fn.Length - 1);
content += " " + apiName + "\n";
}
content += "\n XblWrapper_XblInitialize";
File.WriteAllText(thunksDefFile.FullName, content);
}
static void ProcessHeader(string curHeader, List fns)
{
System.IO.StreamReader file = new System.IO.StreamReader(curHeader);
while (true)
{
string line = file.ReadLine();
if (line == null)
break;
if (line.Contains("STDAPI"))
{
line = line.Replace("STDAPI ", "");
line = line.Replace(") XBL_NOEXCEPT", "");
Regex regex = new Regex("STDAPI_(.+) ");
line = regex.Replace(line, "");
if (line.Contains(")"))
{
// Remove all the handlers
line = string.Empty;
}
int index = line.IndexOf("(");
if (index > 0)
line = line.Substring(0, index + 1);
if (!string.IsNullOrWhiteSpace(line))
{
line = line.Trim();
fns.Add(line);
}
}
}
}
}
}
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/generator/ThunksGenerator/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ThunksGenerator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ThunksGenerator")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("21c651d1-61d7-46c5-bd23-128e40329aa5")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: Build/Microsoft.Xbox.Services.141.GDK.C.Thunks/generator/ThunksGenerator/ThunksGenerator.csproj
================================================
Debug
AnyCPU
{21C651D1-61D7-46C5-BD23-128E40329AA5}
Exe
ThunksGenerator
ThunksGenerator
v4.6.1
512
true
true
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
================================================
FILE: Build/Microsoft.Xbox.Services.142.GDK.C/Microsoft.Xbox.Services.142.GDK.C.vcxproj
================================================
{60139F62-BF37-4F11-BD93-5FBF4E92100C}
StaticLibrary
v142
true
10.0.19041.0
Microsoft.Xbox.Services.142.GDK.C.$(Configuration)
Microsoft.Xbox.Services.142.GDK.C
/Zi %(AdditionalOptions)
/Zi %(AdditionalOptions)
================================================
FILE: Build/Microsoft.Xbox.Services.Common/Microsoft.Xbox.Services.Common.vcxitems
================================================
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
true
{cf3350e5-00a2-4647-a996-baf7542b0327}
_NO_ASYNCRTIMP;_NO_PPLXIMP;_NO_XSAPIIMP;XBL_API_NONE;%(PreprocessorDefinitions)
_XSAPIIMP_EXPORT;XBL_API_EXPORT;%(PreprocessorDefinitions)
$(MSBuildThisFileDirectory)..\..\Source\Services;
$(MSBuildThisFileDirectory)..\..\Source\Services\Achievements;
$(MSBuildThisFileDirectory)..\..\Source\Services\Common;
$(MSBuildThisFileDirectory)..\..\Source\Services\Common\Cpp;
$(MSBuildThisFileDirectory)..\..\Source\Services\Clubs;
$(MSBuildThisFileDirectory)..\..\Source\Services\Leaderboard;
$(MSBuildThisFileDirectory)..\..\Source\Services\Matchmaking;
$(MSBuildThisFileDirectory)..\..\Source\Services\MultiplayerActivity;
$(MSBuildThisFileDirectory)..\..\Source\Services\Multiplayer;
$(MSBuildThisFileDirectory)..\..\Source\Services\Multiplayer\Manager;
$(MSBuildThisFileDirectory)..\..\Source\Services\Notification;
$(MSBuildThisFileDirectory)..\..\Source\Services\Presence;
$(MSBuildThisFileDirectory)..\..\Source\Services\RealTimeActivityManager;
$(MSBuildThisFileDirectory)..\..\Source\Services\Social;
$(MSBuildThisFileDirectory)..\..\Source\Services\Social\Manager;
$(MSBuildThisFileDirectory)..\..\Source\Services\StringVerify;
$(MSBuildThisFileDirectory)..\..\Source\Services\TCUI;
$(MSBuildThisFileDirectory)..\..\Source\Services\TitleStorage;
$(MSBuildThisFileDirectory)..\..\Source\Services\Privacy;
$(MSBuildThisFileDirectory)..\..\Source\Services\Stats;
$(MSBuildThisFileDirectory)..\..\Source\Services\Events;
$(MSBuildThisFileDirectory)..\..\Source\Shared;
$(MSBuildThisFileDirectory)..\..\Source\Shared\WinRT;
$(MSBuildThisFileDirectory)..\..\Source\Shared\Logger;
$(MSBuildThisFileDirectory)..\..\Source\System;
$(MSBuildThisFileDirectory)..\..\Source\System\WinRT;
%(AdditionalIncludeDirectories)
Create
================================================
FILE: Build/Microsoft.Xbox.Services.Common/Microsoft.Xbox.Services.Common.vcxitems.filters
================================================
{a406adf2-c55d-4dda-9078-40715f2340f8}
{df1d4c6b-2405-4205-853b-d6a74d02a8d6}
{3bad286c-8e6c-4279-8fdd-8cf021ffac05}
{cf5cf662-fb8f-428f-a1b9-0b6632f1112d}
{2973c22a-1e58-4f23-b9d3-b8d37dac8eb7}
{a5cc23d7-d8f1-40a6-83a4-cc1a4a322f85}
{4caaf7af-cdaf-4799-927f-54ed23a9403e}
{1b81eaa4-c07b-453d-a413-f63bec7e4989}
{a067c625-5007-4b3f-af24-28c1dc6e06b8}
{7a7c2dc9-30fe-48e3-b99d-546b987a1902}
{ae9acc62-cd7b-4a6f-914c-dae1b6e5fe5e}
{2f1e64b7-6471-4901-bc8c-cbca627e53fd}
{537c4093-465f-40cd-acb8-f7c88e561389}
{84c91bfd-7d59-4ea9-b6ca-dfdeadae3dad}
{32a525db-8eb2-4265-8044-605b4e2a59b2}
{2df84b4c-09ea-4757-855d-d838b00cd0b1}
{376dffea-8ca7-498b-8779-ce2cf762c84f}
{29d52a87-80be-445c-a447-3bf4e232fb64}
{4f01071d-6a71-405c-90e2-d8e88e335625}
{420eb5db-c38b-4936-a465-06dde3ab0570}
{b9ce0a0e-799b-4570-b36d-df5691b38434}
{25e21202-08d9-49b7-80ca-f265b8297f15}
{2de0f5c8-d34e-4261-9380-19b5475e0672}
{c67122a4-c2a6-44df-9145-d2600e70ba8a}
{9a02f6ba-2a95-404d-b2a0-55cc395fd788}
{61611672-3a9c-4e60-90e7-61f29510918c}
{0d3e06c3-440d-441b-b3cb-c3f02eae8ec5}
{17ebfdba-54f7-442c-851f-3ae11db585e5}
{dcb2c672-4ee9-46df-9eb0-f4dfdb0638a2}
{a5780ccd-5941-47bb-8f3d-5925e7d49b98}
{1aaa9d6c-c806-4d77-bd9b-209ea4bab896}
{a67e3ff0-7b8a-4756-b0a8-a5ae2c85d0ee}
{862cb430-0f45-4462-a242-1a0e1c42e8ce}
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-c
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\xsapi-cpp\impl
Include\cpprestinclude
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx
Include\cpprestinclude\pplx\details
Include\cpprestinclude\pplx\details
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Include\cpprestinclude\cpprest\details
Source\Services\Achievements\Manager
Source\Services\Achievements
Source\Services\Common
Source\Services\Common
Source\Services\Common
Source\Services\Common\Cpp
Source\Services\Leaderboard
Source\Services\Matchmaking
Source\Services\Multiplayer
Source\Services\Multiplayer\Manager
Source\Services\MultiplayerActivity
Source\Services\TitleStorage
Source\Services\StringVerify
Source\Services\Stats
Source\Services\Stats
Source\Services\Social
Source\Services\Social
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\RealTimeActivityManager
Source\Services\RealTimeActivityManager
Source\Services\RealTimeActivityManager
Source\Services\Privacy
Source\Services\Presence
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri\details
Source\Shared\HookedUri
Source\Shared\HookedUri
Source\Shared\HookedUri
Source\Shared\HookedUri
Source\Shared\Logger
Source\Shared\Logger
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\System
Source\System
Include\cpprestinclude\cpprest\details
Source\Services\Achievements\Manager
Source\Services\Achievements\Manager
Source\Services\Achievements
Source\Services\Achievements
Source\Services\Achievements
Source\Services\Achievements
Source\Services\Common
Source\Services\Common
Source\Services\Common
Source\Services\Common
Source\Services\Common\Cpp
Source\Services\Leaderboard
Source\Services\Leaderboard
Source\Services\Leaderboard
Source\Services\Leaderboard
Source\Services\Matchmaking
Source\Services\Matchmaking
Source\Services\Matchmaking
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\Multiplayer\Manager
Source\Services\MultiplayerActivity
Source\Services\MultiplayerActivity
Source\Services\MultiplayerActivity
Source\Services\TitleStorage
Source\Services\TitleStorage
Source\Services\TitleStorage
Source\Services\StringVerify
Source\Services\StringVerify
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Stats
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\Social\Manager
Source\Services\RealTimeActivityManager
Source\Services\RealTimeActivityManager
Source\Services\RealTimeActivityManager
Source\Services\Privacy
Source\Services\Privacy
Source\Services\Privacy
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Services\Presence
Source\Shared\Logger
Source\Shared\Logger
Source\Shared\Logger
Source\Shared\Logger
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\Shared
Source\System
================================================
FILE: Build/Microsoft.Xbox.Services.GDK/Microsoft.Xbox.Services.GDK.vcxitems
================================================
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
true
{1e320494-894e-4feb-90ca-df4fe20499f4}
XSAPI_NO_PPL=1;%(PreprocessorDefinitions)
%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)
================================================
FILE: Build/Microsoft.Xbox.Services.GDK/Microsoft.Xbox.Services.GDK.vcxitems.filters
================================================
{a7468e1e-9c65-4f1a-97db-702dd3013d46}
{83fa3d12-617a-48df-9de0-edffcc78503e}
{7758f7f5-95ff-453a-a531-200c4dec6794}
{b451b690-ab47-47b5-a948-e9a544907b98}
{4593c653-a41d-403c-90d3-098726781331}
Source\Services\Events
Source\Services\Events
Source\Services\Events
Source\Services\Events
Source\Services\Events
Source\Services\Events
================================================
FILE: Build/Microsoft.Xbox.Services.Win32.C.Dll.def
================================================
LIBRARY xsapi
EXPORTS
HCAddCallRoutedHandler
HCAddWebSocketRoutedHandler
HCCleanup
HCCleanupAsync
HCGetHttpCallPerformFunction
HCGetLibVersion
HCGetWebSocketConnectResult
HCGetWebSocketFunctions
HCGetWebSocketSendMessageResult
HCHttpCallCloseHandle
HCHttpCallCreate
HCHttpCallDuplicateHandle
HCHttpCallGetContext
HCHttpCallGetId
HCHttpCallGetRequestUrl
HCHttpCallPerformAsync
HCHttpCallRequestGetHeader
HCHttpCallRequestGetHeaderAtIndex
HCHttpCallRequestGetNumHeaders
HCHttpCallRequestGetRequestBodyBytes
HCHttpCallRequestGetRequestBodyReadFunction
HCHttpCallRequestGetRequestBodyString
HCHttpCallRequestGetRetryAllowed
HCHttpCallRequestGetRetryCacheId
HCHttpCallRequestGetRetryDelay
HCHttpCallRequestGetTimeout
HCHttpCallRequestGetTimeoutWindow
HCHttpCallRequestGetUrl
HCHttpCallRequestSetHeader
HCHttpCallRequestSetRequestBodyBytes
HCHttpCallRequestSetRequestBodyReadFunction
HCHttpCallRequestSetRequestBodyString
HCHttpCallRequestSetRetryAllowed
HCHttpCallRequestSetRetryCacheId
HCHttpCallRequestSetRetryDelay
HCHttpCallRequestSetSSLValidation
HCHttpCallRequestSetTimeout
HCHttpCallRequestSetTimeoutWindow
HCHttpCallRequestSetUrl
HCHttpCallResponseAppendResponseBodyBytes
HCHttpCallResponseGetHeader
HCHttpCallResponseGetHeaderAtIndex
HCHttpCallResponseGetNetworkErrorCode
HCHttpCallResponseGetNumHeaders
HCHttpCallResponseGetPlatformNetworkErrorMessage
HCHttpCallResponseGetResponseBodyBytes
HCHttpCallResponseGetResponseBodyBytesSize
HCHttpCallResponseGetResponseBodyWriteFunction
HCHttpCallResponseGetResponseString
HCHttpCallResponseGetStatusCode
HCHttpCallResponseSetHeader
HCHttpCallResponseSetHeaderWithLength
HCHttpCallResponseSetNetworkErrorCode
HCHttpCallResponseSetPlatformNetworkErrorMessage
HCHttpCallResponseSetResponseBodyBytes
HCHttpCallResponseSetResponseBodyWriteFunction
HCHttpCallResponseSetStatusCode
HCHttpCallSetContext
HCHttpCallSetTracing
HCInitialize
HCIsInitialized
HCMemGetFunctions
HCMemSetFunctions
HCMockAddMock
HCMockCallCloseHandle
HCMockCallCreate
HCMockCallDuplicateHandle
HCMockClearMocks
HCMockRemoveMock
HCMockResponseSetHeader
HCMockResponseSetNetworkErrorCode
HCMockResponseSetResponseBodyBytes
HCMockResponseSetStatusCode
HCMockSetMockMatchedCallback
HCRemoveCallRoutedHandler
HCRemoveWebSocketRoutedHandler
HCSetGlobalProxy
HCSetHttpCallPerformFunction
HCSettingsGetTraceLevel
HCSettingsSetTraceLevel
HCSetWebSocketFunctions
HCTraceImplMessage
HCTraceImplMessage_v
HCTraceImplScopeId
HCTraceSetClientCallback
HCTraceSetEtwEnabled
HCTraceSetPlatformCallbacks
HCTraceSetTraceToDebugger
HCWebSocketCloseHandle
HCWebSocketConnectAsync
HCWebSocketCreate
HCWebSocketDisconnect
HCWebSocketDuplicateHandle
HCWebSocketGetBinaryMessageFragmentEventFunction
HCWebSocketGetEventFunctions
HCWebSocketGetHeader
HCWebSocketGetHeaderAtIndex
HCWebSocketGetNumHeaders
HCWebSocketGetProxyUri
HCWebSocketSendBinaryMessageAsync
HCWebSocketSendMessageAsync
HCWebSocketSetBinaryMessageFragmentEventFunction
HCWebSocketSetHeader
HCWebSocketSetMaxReceiveBufferSize
HCWebSocketSetProxyDecryptsHttps
HCWebSocketSetProxyUri
XalAddUserWithUiAsync
XalAddUserWithUiResult
XalCheckUcsConsentForAllUsers
XalCleanupAsync
XalCleanupResult
XalCompareUsers
XalFindUserByLocalId
XalGetDeviceUser
XalGetDeviceUserIsPresent
XalGetMaxUsers
XalGetSandbox
XalGetSandboxSize
XalGetTitleId
XalInitialize
XalMemGetFunctions
XalMemSetFunctions
XalPlatformCryptoSetCallbacks
XalPlatformDateTimeSetCallbacks
XalPlatformRemoteConnectCancelPrompt
XalPlatformRemoteConnectClearEventHandlers
XalPlatformRemoteConnectSetEventHandlers
XalPlatformStorageClearComplete
XalPlatformStorageClearEventHandlers
XalPlatformStorageReadComplete
XalPlatformStorageSetEventHandlers
XalPlatformStorageWriteComplete
XalPlatformWebClearEventHandler
XalPlatformWebSetEventHandler
XalPlatformWebShowUrlComplete
XalSignOutUserAsync
XalSignOutUserAsyncIsPresent
XalSignOutUserResult
XalTryAddDefaultUserSilentlyAsync
XalTryAddDefaultUserSilentlyResult
XalTryAddUserByIdAsync
XalTryAddUserByIdResult
XalUserCheckPrivilege
XalUserCheckUcsConsent
XalUserCloseHandle
XalUserCloseSignoutDeferral
XalUserDuplicateHandle
XalUserGetAgeGroup
XalUserGetGamerPictureAsync
XalUserGetGamerPictureResult
XalUserGetGamerPictureResultSize
XalUserGetGamertag
XalUserGetGamertagSize
XalUserGetId
XalUserGetLocalId
XalUserGetSignoutDeferral
XalUserGetState
XalUserGetTokenAndSignatureSilentlyAsync
XalUserGetTokenAndSignatureSilentlyResult
XalUserGetTokenAndSignatureSilentlyResultSize
XalUserIsDevice
XalUserIsGuest
XalUserManageUcsConsentWithUiAsync
XalUserManageUcsConsentWithUiResult
XalUserRegisterChangeEventHandler
XalUserResolveIssueWithUiAsync
XalUserResolveIssueWithUiResult
XalUserResolvePrivilegeWithUiIsPresent
XalUserResolveUserPrivilegeWithUiAsync
XalUserResolveUserPrivilegeWithUiResult
XalUserUnregisterChangeEventHandler
XAsyncBegin
XAsyncCancel
XAsyncComplete
XAsyncGetResult
XAsyncGetResultSize
XAsyncGetStatus
XAsyncRun
XAsyncSchedule
XblAchievementsAddAchievementProgressChangeHandler
XblAchievementsGetAchievementAsync
XblAchievementsGetAchievementResult
XblAchievementsGetAchievementsForTitleIdAsync
XblAchievementsGetAchievementsForTitleIdResult
XblAchievementsManagerAddLocalUser
XblAchievementsManagerDoWork
XblAchievementsManagerGetAchievement
XblAchievementsManagerGetAchievements
XblAchievementsManagerGetAchievementsByState
XblAchievementsManagerIsUserInitialized
XblAchievementsManagerRemoveLocalUser
XblAchievementsManagerResultCloseHandle
XblAchievementsManagerResultDuplicateHandle
XblAchievementsManagerResultGetAchievements
XblAchievementsManagerUpdateAchievement
XblAchievementsRemoveAchievementProgressChangeHandler
XblAchievementsResultCloseHandle
XblAchievementsResultDuplicateHandle
XblAchievementsResultGetAchievements
XblAchievementsResultGetNextAsync
XblAchievementsResultGetNextResult
XblAchievementsResultHasNext
XblAchievementsUpdateAchievementAsync
XblAchievementsUpdateAchievementForTitleIdAsync
XblAchievementUnlockAddNotificationHandler
XblAchievementUnlockRemoveNotificationHandler
XblAddServiceCallRoutedHandler
XblCleanupAsync
XblContextCloseHandle
XblContextCreateHandle
XblContextDuplicateHandle
XblContextGetUser
XblContextGetXboxUserId
XblContextSettingsGetHttpRetryDelay
XblContextSettingsGetHttpTimeoutWindow
XblContextSettingsGetLongHttpTimeout
XblContextSettingsGetUseCrossPlatformQosServers
XblContextSettingsGetWebsocketTimeoutWindow
XblContextSettingsSetHttpRetryDelay
XblContextSettingsSetHttpTimeoutWindow
XblContextSettingsSetLongHttpTimeout
XblContextSettingsSetUseCrossPlatformQosServers
XblContextSettingsSetWebsocketTimeoutWindow
XblDisableAssertsForXboxLiveThrottlingInDevSandboxes
XblEventsSetMaxFileSize
XblEventsSetStorageAllotment
XblEventsWriteInGameEvent
XblFormatSecureDeviceAddress
XblGameInviteAddNotificationHandler
XblGameInviteRemoveNotificationHandler
XblGetAsyncQueue
XblGetErrorCondition
XblGetScid
XblHttpCallCloseHandle
XblHttpCallCreate
XblHttpCallDuplicateHandle
XblHttpCallGetHeader
XblHttpCallGetHeaderAtIndex
XblHttpCallGetNetworkErrorCode
XblHttpCallGetNumHeaders
XblHttpCallGetPlatformNetworkErrorMessage
XblHttpCallGetRequestUrl
XblHttpCallGetResponseBodyBytes
XblHttpCallGetResponseBodyBytesSize
XblHttpCallGetResponseString
XblHttpCallGetStatusCode
XblHttpCallPerformAsync
XblHttpCallRequestSetHeader
XblHttpCallRequestSetLongHttpCall
XblHttpCallRequestSetRequestBodyBytes
XblHttpCallRequestSetRequestBodyString
XblHttpCallRequestSetRetryAllowed
XblHttpCallRequestSetRetryCacheId
XblHttpCallSetTracing
XblInitialize
XblLeaderboardGetLeaderboardAsync
XblLeaderboardGetLeaderboardResult
XblLeaderboardGetLeaderboardResultSize
XblLeaderboardResultGetNextAsync
XblLeaderboardResultGetNextResult
XblLeaderboardResultGetNextResultSize
XblLocalStorageClearComplete
XblLocalStorageReadComplete
XblLocalStorageSetHandlers
XblLocalStorageWriteComplete
XblMatchmakingCreateMatchTicketAsync
XblMatchmakingCreateMatchTicketResult
XblMatchmakingDeleteMatchTicketAsync
XblMatchmakingGetHopperStatisticsAsync
XblMatchmakingGetHopperStatisticsResult
XblMatchmakingGetHopperStatisticsResultSize
XblMatchmakingGetMatchTicketDetailsAsync
XblMatchmakingGetMatchTicketDetailsResult
XblMatchmakingGetMatchTicketDetailsResultSize
XblMemGetFunctions
XblMemSetFunctions
XblMultiplayerActivityAddInviteHandler
XblMultiplayerActivityDeleteActivityAsync
XblMultiplayerActivityFlushRecentPlayersAsync
XblMultiplayerActivityGetActivityAsync
XblMultiplayerActivityGetActivityResult
XblMultiplayerActivityGetActivityResultSize
XblMultiplayerActivityRemoveInviteHandler
XblMultiplayerActivitySendInvitesAsync
XblMultiplayerActivitySetActivityAsync
XblMultiplayerActivityUpdateRecentPlayers
XblMultiplayerAddConnectionIdChangedHandler
XblMultiplayerAddSessionChangedHandler
XblMultiplayerAddSubscriptionLostHandler
XblMultiplayerClearActivityAsync
XblMultiplayerCreateSearchHandleAsync
XblMultiplayerCreateSearchHandleResult
XblMultiplayerDeleteSearchHandleAsync
XblMultiplayerEventArgsFindMatchCompleted
XblMultiplayerEventArgsMember
XblMultiplayerEventArgsMembers
XblMultiplayerEventArgsMembersCount
XblMultiplayerEventArgsPerformQoSMeasurements
XblMultiplayerEventArgsPropertiesJson
XblMultiplayerEventArgsXuid
XblMultiplayerGetActivitiesForSocialGroupAsync
XblMultiplayerGetActivitiesForSocialGroupResult
XblMultiplayerGetActivitiesForSocialGroupResultCount
XblMultiplayerGetActivitiesForUsersAsync
XblMultiplayerGetActivitiesForUsersResult
XblMultiplayerGetActivitiesForUsersResultCount
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupAsync
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupResult
XblMultiplayerGetActivitiesWithPropertiesForSocialGroupResultSize
XblMultiplayerGetActivitiesWithPropertiesForUsersAsync
XblMultiplayerGetActivitiesWithPropertiesForUsersResult
XblMultiplayerGetActivitiesWithPropertiesForUsersResultSize
XblMultiplayerGetSearchHandlesAsync
XblMultiplayerGetSearchHandlesResult
XblMultiplayerGetSearchHandlesResultCount
XblMultiplayerGetSessionAsync
XblMultiplayerGetSessionByHandleAsync
XblMultiplayerGetSessionByHandleResult
XblMultiplayerGetSessionResult
XblMultiplayerManagerAutoFillMembersDuringMatchmaking
XblMultiplayerManagerCancelMatch
XblMultiplayerManagerDoWork
XblMultiplayerManagerEstimatedMatchWaitTime
XblMultiplayerManagerFindMatch
XblMultiplayerManagerGameSessionActive
XblMultiplayerManagerGameSessionConstants
XblMultiplayerManagerGameSessionCorrelationId
XblMultiplayerManagerGameSessionHost
XblMultiplayerManagerGameSessionIsHost
XblMultiplayerManagerGameSessionMembers
XblMultiplayerManagerGameSessionMembersCount
XblMultiplayerManagerGameSessionPropertiesJson
XblMultiplayerManagerGameSessionSessionReference
XblMultiplayerManagerGameSessionSetProperties
XblMultiplayerManagerGameSessionSetSynchronizedHost
XblMultiplayerManagerGameSessionSetSynchronizedProperties
XblMultiplayerManagerInitialize
XblMultiplayerManagerJoinability
XblMultiplayerManagerJoinGame
XblMultiplayerManagerJoinGameFromLobby
XblMultiplayerManagerJoinLobby
XblMultiplayerManagerLeaveGame
XblMultiplayerManagerLobbySessionAddLocalUser
XblMultiplayerManagerLobbySessionConstants
XblMultiplayerManagerLobbySessionCorrelationId
XblMultiplayerManagerLobbySessionDeleteLocalMemberProperties
XblMultiplayerManagerLobbySessionHost
XblMultiplayerManagerLobbySessionInviteFriends
XblMultiplayerManagerLobbySessionInviteUsers
XblMultiplayerManagerLobbySessionIsHost
XblMultiplayerManagerLobbySessionLocalMembers
XblMultiplayerManagerLobbySessionLocalMembersCount
XblMultiplayerManagerLobbySessionMembers
XblMultiplayerManagerLobbySessionMembersCount
XblMultiplayerManagerLobbySessionPropertiesJson
XblMultiplayerManagerLobbySessionRemoveLocalUser
XblMultiplayerManagerLobbySessionSessionReference
XblMultiplayerManagerLobbySessionSetLocalMemberConnectionAddress
XblMultiplayerManagerLobbySessionSetLocalMemberProperties
XblMultiplayerManagerLobbySessionSetProperties
XblMultiplayerManagerLobbySessionSetSynchronizedHost
XblMultiplayerManagerLobbySessionSetSynchronizedProperties
XblMultiplayerManagerMatchStatus
XblMultiplayerManagerMemberAreMembersOnSameDevice
XblMultiplayerManagerSetAutoFillMembersDuringMatchmaking
XblMultiplayerManagerSetJoinability
XblMultiplayerManagerSetQosMeasurements
XblMultiplayerQuerySessionsAsync
XblMultiplayerQuerySessionsResult
XblMultiplayerQuerySessionsResultCount
XblMultiplayerRemoveConnectionIdChangedHandler
XblMultiplayerRemoveSessionChangedHandler
XblMultiplayerRemoveSubscriptionLostHandler
XblMultiplayerSearchHandleCloseHandle
XblMultiplayerSearchHandleDuplicateHandle
XblMultiplayerSearchHandleGetCreationTime
XblMultiplayerSearchHandleGetCustomSessionPropertiesJson
XblMultiplayerSearchHandleGetId
XblMultiplayerSearchHandleGetJoinRestriction
XblMultiplayerSearchHandleGetMemberCounts
XblMultiplayerSearchHandleGetNumberAttributes
XblMultiplayerSearchHandleGetSessionClosed
XblMultiplayerSearchHandleGetSessionOwnerXuids
XblMultiplayerSearchHandleGetSessionReference
XblMultiplayerSearchHandleGetStringAttributes
XblMultiplayerSearchHandleGetTags
XblMultiplayerSearchHandleGetVisibility
XblMultiplayerSendInvitesAsync
XblMultiplayerSendInvitesResult
XblMultiplayerSessionAddMemberReservation
XblMultiplayerSessionCloseHandle
XblMultiplayerSessionCompare
XblMultiplayerSessionConstantsSetCapabilities
XblMultiplayerSessionConstantsSetCloudComputePackageJson
XblMultiplayerSessionConstantsSetMaxMembersInSession
XblMultiplayerSessionConstantsSetMeasurementServerAddressesJson
XblMultiplayerSessionConstantsSetMemberInitialization
XblMultiplayerSessionConstantsSetPeerToHostRequirements
XblMultiplayerSessionConstantsSetPeerToPeerRequirements
XblMultiplayerSessionConstantsSetQosConnectivityMetrics
XblMultiplayerSessionConstantsSetTimeouts
XblMultiplayerSessionConstantsSetVisibility
XblMultiplayerSessionCreateHandle
XblMultiplayerSessionCurrentUser
XblMultiplayerSessionCurrentUserDeleteCustomPropertyJson
XblMultiplayerSessionCurrentUserSetCustomPropertyJson
XblMultiplayerSessionCurrentUserSetEncounters
XblMultiplayerSessionCurrentUserSetGroups
XblMultiplayerSessionCurrentUserSetMembersInGroup
XblMultiplayerSessionCurrentUserSetQosMeasurements
XblMultiplayerSessionCurrentUserSetRoles
XblMultiplayerSessionCurrentUserSetSecureDeviceAddressBase64
XblMultiplayerSessionCurrentUserSetServerQosMeasurements
XblMultiplayerSessionCurrentUserSetStatus
XblMultiplayerSessionDeleteCustomPropertyJson
XblMultiplayerSessionDuplicateHandle
XblMultiplayerSessionEtag
XblMultiplayerSessionGetInfo
XblMultiplayerSessionGetInitializationInfo
XblMultiplayerSessionGetMember
XblMultiplayerSessionGetRoleByName
XblMultiplayerSessionHostCandidates
XblMultiplayerSessionJoin
XblMultiplayerSessionLeave
XblMultiplayerSessionMatchmakingServer
XblMultiplayerSessionMembers
XblMultiplayerSessionMembersAccepted
XblMultiplayerSessionPropertiesSetJoinRestriction
XblMultiplayerSessionPropertiesSetKeywords
XblMultiplayerSessionPropertiesSetReadRestriction
XblMultiplayerSessionPropertiesSetTurnCollection
XblMultiplayerSessionRawServersJson
XblMultiplayerSessionReferenceCreate
XblMultiplayerSessionReferenceIsValid
XblMultiplayerSessionReferenceParseFromUriPath
XblMultiplayerSessionReferenceToUriPath
XblMultiplayerSessionRoleTypes
XblMultiplayerSessionSessionConstants
XblMultiplayerSessionSessionProperties
XblMultiplayerSessionSessionReference
XblMultiplayerSessionSetAllocateCloudCompute
XblMultiplayerSessionSetClosed
XblMultiplayerSessionSetCustomPropertyJson
XblMultiplayerSessionSetHostDeviceToken
XblMultiplayerSessionSetInitializationSucceeded
XblMultiplayerSessionSetLocked
XblMultiplayerSessionSetMatchmakingResubmit
XblMultiplayerSessionSetMatchmakingServerConnectionPath
XblMultiplayerSessionSetMatchmakingTargetSessionConstantsJson
XblMultiplayerSessionSetMutableRoleSettings
XblMultiplayerSessionSetRawServersJson
XblMultiplayerSessionSetServerConnectionStringCandidates
XblMultiplayerSessionSetSessionChangeSubscription
XblMultiplayerSessionSubscribedChangeTypes
XblMultiplayerSessionTimeOfSession
XblMultiplayerSessionWriteStatus
XblMultiplayerSetActivityAsync
XblMultiplayerSetSubscriptionsEnabled
XblMultiplayerSetTransferHandleAsync
XblMultiplayerSetTransferHandleResult
XblMultiplayerSubscriptionsEnabled
XblMultiplayerWriteSessionAsync
XblMultiplayerWriteSessionByHandleAsync
XblMultiplayerWriteSessionByHandleResult
XblMultiplayerWriteSessionResult
XblPresenceAddDevicePresenceChangedHandler
XblPresenceAddTitlePresenceChangedHandler
XblPresenceGetPresenceAsync
XblPresenceGetPresenceForMultipleUsersAsync
XblPresenceGetPresenceForMultipleUsersResult
XblPresenceGetPresenceForMultipleUsersResultCount
XblPresenceGetPresenceForSocialGroupAsync
XblPresenceGetPresenceForSocialGroupResult
XblPresenceGetPresenceForSocialGroupResultCount
XblPresenceGetPresenceResult
XblPresenceRecordCloseHandle
XblPresenceRecordDuplicateHandle
XblPresenceRecordGetDeviceRecords
XblPresenceRecordGetUserState
XblPresenceRecordGetXuid
XblPresenceRemoveDevicePresenceChangedHandler
XblPresenceRemoveTitlePresenceChangedHandler
XblPresenceSetPresenceAsync
XblPresenceStopTrackingAdditionalTitles
XblPresenceStopTrackingUsers
XblPresenceTrackAdditionalTitles
XblPresenceTrackUsers
XblPrivacyBatchCheckPermissionAsync
XblPrivacyBatchCheckPermissionResult
XblPrivacyBatchCheckPermissionResultSize
XblPrivacyCheckPermissionAsync
XblPrivacyCheckPermissionForAnonymousUserAsync
XblPrivacyCheckPermissionForAnonymousUserResult
XblPrivacyCheckPermissionForAnonymousUserResultSize
XblPrivacyCheckPermissionResult
XblPrivacyCheckPermissionResultSize
XblPrivacyGetAvoidListAsync
XblPrivacyGetAvoidListResult
XblPrivacyGetAvoidListResultCount
XblPrivacyGetMuteListAsync
XblPrivacyGetMuteListResult
XblPrivacyGetMuteListResultCount
XblProfileGetUserProfileAsync
XblProfileGetUserProfileResult
XblProfileGetUserProfilesAsync
XblProfileGetUserProfilesForSocialGroupAsync
XblProfileGetUserProfilesForSocialGroupResult
XblProfileGetUserProfilesForSocialGroupResultCount
XblProfileGetUserProfilesResult
XblProfileGetUserProfilesResultCount
XblRealTimeActivityAddConnectionStateChangeHandler
XblRealTimeActivityAddResyncHandler
XblRealTimeActivityRemoveConnectionStateChangeHandler
XblRealTimeActivityRemoveResyncHandler
XblRemoveServiceCallRoutedHandler
XblSetOverrideConfiguration
XblSetOverrideLocale
XblSocialAddSocialRelationshipChangedHandler
XblSocialGetSocialRelationshipsAsync
XblSocialGetSocialRelationshipsResult
XblSocialManagerAddLocalUser
XblSocialManagerCreateSocialUserGroupFromFilters
XblSocialManagerCreateSocialUserGroupFromList
XblSocialManagerDestroySocialUserGroup
XblSocialManagerDoWork
XblSocialManagerGetLocalUserCount
XblSocialManagerGetLocalUsers
XblSocialManagerPresenceRecordIsUserPlayingTitle
XblSocialManagerRemoveLocalUser
XblSocialManagerSetRichPresencePollingStatus
XblSocialManagerUpdateSocialUserGroup
XblSocialManagerUserGroupGetFilters
XblSocialManagerUserGroupGetLocalUser
XblSocialManagerUserGroupGetType
XblSocialManagerUserGroupGetUsers
XblSocialManagerUserGroupGetUsersTrackedByGroup
XblSocialRelationshipResultCloseHandle
XblSocialRelationshipResultDuplicateHandle
XblSocialRelationshipResultGetNextAsync
XblSocialRelationshipResultGetNextResult
XblSocialRelationshipResultGetRelationships
XblSocialRelationshipResultGetTotalCount
XblSocialRelationshipResultHasNext
XblSocialRemoveSocialRelationshipChangedHandler
XblSocialSubmitBatchReputationFeedbackAsync
XblSocialSubmitReputationFeedbackAsync
XblStringVerifyStringAsync
XblStringVerifyStringResult
XblStringVerifyStringResultSize
XblStringVerifyStringsAsync
XblStringVerifyStringsResult
XblStringVerifyStringsResultSize
XblTitleManagedStatsDeleteStatsAsync
XblTitleManagedStatsUpdateStatsAsync
XblTitleManagedStatsWriteAsync
XblTitleStorageBlobMetadataResultCloseHandle
XblTitleStorageBlobMetadataResultDuplicateHandle
XblTitleStorageBlobMetadataResultGetItems
XblTitleStorageBlobMetadataResultGetNextAsync
XblTitleStorageBlobMetadataResultGetNextResult
XblTitleStorageBlobMetadataResultHasNext
XblTitleStorageDeleteBlobAsync
XblTitleStorageDownloadBlobAsync
XblTitleStorageDownloadBlobResult
XblTitleStorageGetBlobMetadataAsync
XblTitleStorageGetBlobMetadataResult
XblTitleStorageGetQuotaAsync
XblTitleStorageGetQuotaResult
XblTitleStorageUploadBlobAsync
XblTitleStorageUploadBlobResult
XblUserStatisticsAddStatisticChangedHandler
XblUserStatisticsGetMultipleUserStatisticsAsync
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsAsync
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsResult
XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsResultSize
XblUserStatisticsGetMultipleUserStatisticsResult
XblUserStatisticsGetMultipleUserStatisticsResultSize
XblUserStatisticsGetSingleUserStatisticAsync
XblUserStatisticsGetSingleUserStatisticResult
XblUserStatisticsGetSingleUserStatisticResultSize
XblUserStatisticsGetSingleUserStatisticsAsync
XblUserStatisticsGetSingleUserStatisticsResult
XblUserStatisticsGetSingleUserStatisticsResultSize
XblUserStatisticsRemoveStatisticChangedHandler
XblUserStatisticsStopTrackingStatistics
XblUserStatisticsStopTrackingUsers
XblUserStatisticsTrackStatistics
XTaskQueueCloseHandle
XTaskQueueCreate
XTaskQueueCreateComposite
XTaskQueueDispatch
XTaskQueueDuplicateHandle
XTaskQueueGetCurrentProcessTaskQueue
XTaskQueueGetPort
XTaskQueueRegisterMonitor
XTaskQueueRegisterWaiter
XTaskQueueSetCurrentProcessTaskQueue
XTaskQueueSubmitCallback
XTaskQueueSubmitDelayedCallback
XTaskQueueTerminate
XTaskQueueUnregisterMonitor
XTaskQueueUnregisterWaiter
================================================
FILE: Build/xsapi.gdk.bwoi.props
================================================
$(GameDK)
$(GameDKLatest)WindowsSDK\
<_PlatformFolder>$(GameDKLatest)GXDK\VS2017\flatDeployment\Common7\IDE\VC\VCTargets\Platforms\$(Platform)\
$(_PlatformFolder)
$(_PlatformFolder)
<_PlatformFolder>$(GameDKLatest)GXDK\VS2017\flatDeployment\Common7\IDE\VC\VCTargets\Platforms\$(Platform)\
$(_PlatformFolder)
$(_PlatformFolder)
<_PlatformFolder>$(GameDKLatest)GRDK\VS2017\flatDeployment\Common7\IDE\VC\VCTargets\Platforms\$(Platform)\
$(_PlatformFolder)
$(_PlatformFolder)
<_AlternativeVCTargetsPath160>$(GDKMSBuildForVS2019)v160\
<_AlternativeVCTargetsPath150>$(GDKMSBuildForVS2019)v150\
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
<_AlternativeVCTargetsPath160>$(GDKMSBuildForVS2019)v160\
<_AlternativeVCTargetsPath150>$(GDKMSBuildForVS2019)v150\
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath160)
$(_AlternativeVCTargetsPath150)
$(_AlternativeVCTargetsPath160)
================================================
FILE: Build/xsapi.gdk.props
================================================
v141
false
$(XsapiOutDir)
$(XsapiIntDir)
================================================
FILE: Build/xsapi.win32.props
================================================
v141
$(XsapiOutDir)
$(XsapiIntDir)
================================================
FILE: CONTRIBUTING.md
================================================
# Contribution Guidelines
There are many different ways in which you can contribute! Please submit issues, questions, bug reports, feature requests, bug fixes, improvements, and new features.
### Report bugs and request features
Issues and feature requests are submitted through the project's [issue tracker](../issues) section on GitHub. Please use the following guidelines when you submit issues and feature requests:
* Make sure the issue is not already reported by searching through the list of issues
* Provide a detailed description of the issue including the following information:
* Which feature the issue appears in
* Under what circumstances the issue appears
* What is the desired behavior
* What is breaking
* What is the impact (things like loss or corruption of data, compromising security, disruption of service etc.)
* Any code that will be helpful to reproduce the issue
### Create bug fixes and features
Please submit any changes as a Pull Request against the development branch. Make sure to write a detailed message describing the changes in the Pull Request. This will help us quickly determine what changes (if any) need to be made for it to be ready for integration.
_Note: Please keep in mind that not all requests will be approved. Requests are reviewed by the team on a regular basis and will be updated with the status at each review. If your request is accepted you will receive information about the next steps and when the request will be integrated in the development branch. If your request is rejected you will receive information about the reasons why it was rejected._
### Contribution guidelines
Before you start working on bug fixes and features it is good idea to discuss those broadly with the community. You can use the [issue tracker](../issues) for this purpose. Before submitting your changes make sure you followed the guidelines below:
* You have properly documented any new functionality
* For any new functionality you have written complete unit tests
* You have run all unit tests and they pass
* In order to speed up the process of accepting your contributions, you should try to make your checkins as small as possible, avoid any unnecessary deltas and the need to rebase.
================================================
FILE: Custom.props
================================================
$(MSBuildProjectName)
$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Android SDK Tools@Path)
$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools@Path)
================================================
FILE: Directory.Packages.props
================================================
true
================================================
FILE: External/Xal/README
================================================
This repository only contains the public headers for the Xbox Authentication Library (XAL), the same headers shipped as part of the GDK. Full source for XAL is not publicly available at this time.
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
#include
extern "C"
{
//-----------------------------------------------------------------------------
// User model
//-----------------------------------------------------------------------------
///
/// Initializes Xal, must be called before any other Xal functions (except
/// XalMemSetFunctions, XalMemGetFunctions and XalPlatform*SetHandler).
///
/// The initialization arguments for Xal,
/// .
/// The async queue Xal should use for internal
/// only work such as telemetry and asynchronous init work. Only the work side
/// of the queue will be used.
/// Result code for this API operation.
///
/// Depending on the platform, some of the platform event handlers defined in
/// xal_platform.h may be required, in which case they should be set before
/// calling this function. If any required event handlers are missing
/// XalInitialize will fail with E_XAL_MISSINGPLATFORMEVENTHANDLER.
///
/// It is never an error to set a platform event handler that is not required.
///
STDAPI XalInitialize(
_In_ XalInitArgs const* args,
_In_opt_ XTaskQueueHandle internalWorkQueue
) noexcept;
///
/// Cleans up Xal, after this function returns Xal will be in the same state as
/// if XalInit was never called.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This functions should only be called when all user handles have been closed
/// and there are no outstanding asynchronous operations.
///
STDAPI XalCleanupAsync(
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a successful XalCleanupAsync operation.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalCleanupResult(
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the maximum number of users that can be added at the same time on the
/// current platform.
///
/// The maximum number of concurrent users.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
STDAPI XalGetMaxUsers(
_Out_ uint32_t* maxUsers
) noexcept;
///
/// Get the Xbox Live title ID that Xal was initialized with. Must be called
/// after XalInitialize.
///
/// The Xbox Live title ID.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
STDAPI XalGetTitleId(
_Out_ uint32_t* titleId
) noexcept;
///
/// Get the size of the buffer needed to store the Xbox Live sandbox string.
///
/// The size of the sandbox string including the null terminator.
STDAPI_(size_t) XalGetSandboxSize() noexcept;
///
/// Get the Xbox Live sandbox that Xal was initialized with. Must be called after
/// XalInitialize.
///
/// The size in bytes of the sandbox buffer.
/// Should be the value returned by XalGetSandboxSize.
/// The buffer the sandbox will be written to.
/// The number of bytes used in the buffer including
/// the null terminator.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
STDAPI XalGetSandbox(
_In_ size_t sandboxSize,
_Out_writes_(sandboxSize) char* sandbox,
_Out_opt_ size_t* sandboxUsed
) noexcept;
///
/// Attempts to add a user without showing any ui.
///
/// Client provided identifier for the user.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// userIdentifier will be stored in the user and passed to all XalPlatform*
/// callbacks related to this user.
///
STDAPI XalTryAddDefaultUserSilentlyAsync(
_In_ uint32_t userIdentifier,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a successful XalTryAddDefaultUserSilentlyAsync operation.
///
/// The AsyncBlock for this operation.
/// The user that was just added.
/// Result code for this API operation.
///
/// If the operations failed, newUser will be NULL.
///
STDAPI XalTryAddDefaultUserSilentlyResult(
_In_ XAsyncBlock* async,
_Out_ XalUserHandle* newUser
) noexcept;
///
/// Attempts to add a user with the given Xbox user id.
///
/// Client provided identifier for the user.
///
/// The Xbox user id.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This function may show ui to the user.
///
/// userIdentifier will be stored in the user and passed to all XalPlatform*
/// callbacks related to this user.
///
STDAPI XalTryAddUserByIdAsync(
_In_ uint32_t userIdentifier,
_In_ uint64_t xboxUserId,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a successful XalTryAddUserByIdAsync operation.
///
/// The AsyncBlock for this operation.
/// The user that was just added.
/// Result code for this API operation.
///
/// If the operations failed, newUser will be NULL.
///
STDAPI XalTryAddUserByIdResult(
_In_ XAsyncBlock* async,
_Out_ XalUserHandle* newUser
) noexcept;
///
/// Attempts to add a user.
///
/// Client provided identifier for the user.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This function will show ui to the user.
///
/// userIdentifier will be stored in the user and passed to all XalPlatform*
/// callbacks related to this user.
///
STDAPI XalAddUserWithUiAsync(
_In_ uint32_t userIdentifier,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a successful XalAddUserWithUiAsync operation.
///
/// The AsyncBlock for this operation.
/// The user that was just added.
/// Result code for this API operation.
///
/// If the operations failed, newUser will be NULL.
///
STDAPI XalAddUserWithUiResult(
_In_ XAsyncBlock* async,
_Out_ XalUserHandle* newUser
) noexcept;
///
/// Checks if the current platform supports retrieving a device user handle.
///
/// True if device user present, false if not.
STDAPI_(bool) XalGetDeviceUserIsPresent() noexcept;
///
/// Returns a user which represents the device itself.
///
/// The user object.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
///
/// This user handle will have had XalUserDuplicateHandle called on it. Be sure
/// to call XalUserCloseHandle once it is no longer needed.
///
STDAPI XalGetDeviceUser(
_Out_ XalUserHandle* deviceUser
) noexcept;
///
/// Checks if the user can be signed out on the current platform.
///
/// True if user can be signed out, false if user can't.
STDAPI_(bool) XalSignOutUserAsyncIsPresent() noexcept;
///
/// Signs out a user from the device.
///
/// The user to remove.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// User sign out may not be present on all platforms, on platforms where it is
/// missing this function will return E_XAL_FEATURENOTPRESENT. To query if user
/// sign out is available see .
///
/// On some platforms this call may fail to sign out the user if there is no
/// internet connectivity, if that happens the user will not be removed from the
/// user set and will still be fully signed in.
///
/// On platforms that use the web ui hooks
/// (see ) this function will
/// invoke the hook.
///
STDAPI XalSignOutUserAsync(
_In_ XalUserHandle user,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a given XalSignOutUserAsync operation.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalSignOutUserResult(
_In_ XAsyncBlock* async
) noexcept;
///
/// Tries to find a user for the given local id.
///
/// The local id it to look up.
/// The user object.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
///
/// If no user can be found matching the local id, E_XAL_USERNOTFOUND is returned.
///
STDAPI XalFindUserByLocalId(
_In_ XalUserLocalId localId,
_Out_ XalUserHandle* user
) noexcept;
///
/// Checks if the given consent is opted in by all the users in the user set.
///
/// The UCS consent model name.
/// True if all the users in the user set are opted in.
/// Result code for this API operation. Possible values are S_OK,
/// E_XAL_NOTINITIALIZED, E_XAL_UNLISTEDCONSENT, or E_FAIL.
STDAPI XalCheckUcsConsentForAllUsers(
_In_z_ char const* consentModelName,
_Out_ bool* canOptIn
) noexcept;
}
// Back compat apis
#if XAL_ENABLE_BACK_COMPAT_SHIMS
///
/// Attempts to add a user without showing any ui.
///
/// Must be null.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This version of the api is deprecated, consider the variant taking a
/// uint32_t userIdentifier instead.
///
inline
HRESULT XalTryAddDefaultUserSilentlyAsync(
_In_opt_ nullptr_t /*userContext*/,
_In_ XAsyncBlock* async
) noexcept
{
return XalTryAddDefaultUserSilentlyAsync(0u, async);
}
///
/// Attempts to add a user.
///
/// Must be null.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This version of the api is deprecated, consider the variant taking a
/// uint32_t userIdentifier instead.
///
/// This function will show ui to the user.
///
inline
HRESULT XalAddUserWithUiAsync(
_In_opt_ nullptr_t /*userContext*/,
_In_ XAsyncBlock* async
) noexcept
{
return XalAddUserWithUiAsync(0u, async);
}
#endif
#if HC_PLATFORM == HC_PLATFORM_GDK
#include
#elif HC_PLATFORM == HC_PLATFORM_XDK
#include
#endif
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_android.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
extern "C"
{
//------------------------------------------------------------------------------
// Important Information About Xal For Android
//------------------------------------------------------------------------------
//
// Xal on Android has several hard requirements for how it is used with JNI.
// Xal functions may fail if these requirements are not met.
//
// First and foremost, XalInitialize must be called from a thread which
// originated from Java. If this does not happen, Xal will not be able to load
// any of the java classes its Android implementation depends on.
//
// Xal also expects the client to be responsible for attaching and detaching
// threads to the Java Virtual Machine. Any thread Xal is running on for
// Android should be attached to the Java VM. This is done to save the cost of
// repeatedly attaching and detaching to the Java VM.
// The recommended pattern for threads that may need to do JNI calls, including
// the ones that Xal will be run on, is to attach when the thread starts and
// detach just before the thread terminates.
//
// Xal is configured to work with JNI_VERSION_1_6. Therefore this should be the
// return value of the JNI_OnLoad value exported by the native library which
// consumes Xal. More information about JNI_OnLoad can be found in the JNI
// invocation documentation.
//------------------------------------------------------------------------------
// Android types
//------------------------------------------------------------------------------
///
/// Struct that encapsulates the Android specific settings for Xal.
///
typedef struct XalAndroidArgs
{
///
/// MSA client id
///
_Field_z_ char const* clientId;
///
/// Xbox Live title id
///
uint32_t titleId;
///
/// Xbox Live sandbox
///
_Field_z_ char const* sandbox;
///
/// A bool indicating whether Xal can send diagnostic telemetry.
/// Setting this to true indicates to Xal that it does not have user consent
/// to report data about any crashes or errors it encounters during use.
/// If this variable is set to false, Xal assumes it can report this data.
///
bool disableDiagnosticTelemetry;
///
/// A correlation vector string for XAL to use as a base. XAL will extend
/// this prior to using it. This argument is optional.
///
_Field_z_ char const* correlationVector;
///
/// Xal configuration flags.
///
uint32_t flags;
///
/// The JavaVM for the application consuming Xal.
///
JavaVM* javaVM;
///
/// The Android App context for the application consuming Xal.
///
jobject appContext;
///
/// The number of consents present in the ThirdPartyConsents array.
///
uint32_t thirdPartyConsentCount;
///
/// An optional list of consent requests to access Xbox Live services.
///
_Field_size_(thirdPartyConsentCount) char const** thirdPartyConsents;
///
/// The Android App custom redirect URI.
///
_Field_z_ char const* redirectUri;
///
/// The number of consents present in the ucsConsents array
///
uint32_t ucsConsentCount;
///
/// An optional list of consent requests to UCS
///
_Field_size_(ucsConsentCount) char const** ucsConsents;
} XalAndroidArgs;
typedef XalAndroidArgs XalInitArgs;
#define XAL_PLATFORM "Android"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_apple.h
================================================
#pragma once
#include
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Apple types
//------------------------------------------------------------------------------
///
/// Struct that encapsulates the Apple specific arguments for Xal.
///
typedef struct XalAppleArgs
{
///
/// MSA client id
///
_Field_z_ char const* clientId;
///
/// Xbox Live title id
///
uint32_t titleId;
///
/// Xbox Live sandbox
///
_Field_z_ char const* sandbox;
///
/// A bool indicating whether Xal can send diagnostic telemetry.
/// Setting this to true indicates to Xal that it does not have user consent
/// to report data about any crashes or errors it encounters during use.
/// If this variable is set to false, Xal assumes it can report this data.
///
bool disableDiagnosticTelemetry;
///
/// A correlation vector string for XAL to use as a base. XAL will extend
/// this prior to using it. This argument is optional.
///
_Field_z_ char const* correlationVector;
///
/// Xal configuration flags.
///
uint32_t flags;
///
/// The number of consents present in the ThirdPartyConsents array.
///
uint32_t thirdPartyConsentCount;
///
/// An optional list of consent requests to access Xbox Live services.
///
_Field_size_(thirdPartyConsentCount) char const** thirdPartyConsents;
///
/// The app custom redirect URI. (Optional on macOS).
///
_Field_z_ char const* redirectUri;
///
/// The number of consents present in the ucsConsents array
///
uint32_t ucsConsentCount;
///
/// An optional list of consent requests to UCS
///
_Field_size_(ucsConsentCount) char const** ucsConsents;
} XalAppleArgs;
typedef XalAppleArgs XalInitArgs;
#if HC_PLATFORM == HC_PLATFORM_IOS
#define XAL_PLATFORM "iOS"
#elif HC_PLATFORM == HC_PLATFORM_MAC
#define XAL_PLATFORM "macOS"
#endif
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_generic.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Generic types
//------------------------------------------------------------------------------
typedef struct XalGenericDeviceInfo
{
_Field_z_ char const* deviceType;
_Field_z_ char const* osVersion;
_Field_z_ char const* deviceId;
} XalGenericDeviceInfo;
// TODO collapse the 2 structs? the only thing missing from this one is the
// device type, or remove dupes from this struct and ignore it unless telemetry
// is enabled?
typedef struct XalGenericTelemetryInfo
{
_Field_z_ char const* appId; // TODO do we want to just use the titleId here? or the msa app id?
_Field_z_ char const* appVer;
_Field_z_ char const* osName; // TODO use the device type?
_Field_z_ char const* osVersion; // TODO dupe
_Field_z_ char const* osLocale;
_Field_z_ char const* deviceClass; // TODO use the device type?
_Field_z_ char const* deviceId; // TODO dupe
} XalGenericTelemetryInfo;
///
/// Struct that encapsulates the extra information Xal needs.
///
typedef struct XalGenericArgs
{
///
/// MSA client id
///
_Field_z_ char const* clientId;
///
/// Xbox Live title id
///
uint32_t titleId;
///
/// Xbox Live sandbox
///
_Field_z_ char const* sandbox;
///
/// A bool indicating whether Xal can send diagnostic telemetry.
/// Setting this to true indicates to Xal that it does not have user consent
/// to report data about any crashes or errors it encounters during use.
/// If this variable is set to false, Xal assumes it can report this data.
///
bool disableDiagnosticTelemetry;
///
/// A correlation vector string for XAL to use as a base. XAL will extend
/// this prior to using it. This argument is optional.
///
_Field_z_ char const* correlationVector;
///
/// Reserved for future use.
///
uint32_t flags;
///
/// The maximum number of users that can be signed in at the same time.
///
uint32_t maxSignedInUsers;
///
/// The number of consents present in the ThirdPartyConsents array.
///
uint32_t thirdPartyConsentCount;
///
/// An optional list of consent requests to access Xbox Live services.
///
_Field_size_(thirdPartyConsentCount) char const** thirdPartyConsents;
///
/// Custom redirect URI.
///
_Field_z_ char const* redirectUri;
///
/// The number of consents present in the ucsConsents array
///
uint32_t ucsConsentCount;
///
/// An optional list of consent requests to UCS
///
_Field_size_(ucsConsentCount) char const** ucsConsents;
bool useRemoteAuth;
XalGenericDeviceInfo deviceInfo;
XalGenericTelemetryInfo telemetryInfo;
} XalGenericArgs;
typedef XalGenericArgs XalInitArgs;
#define XAL_PLATFORM "Generic"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_gsdk.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
#include
extern "C"
{
//------------------------------------------------------------------------------
// GDK types
//------------------------------------------------------------------------------
#define XAL_OS_ERRORS 1
#define XAL_OS_IMPL 1
typedef XUserHandle XalUserHandle;
typedef XUserLocalId XalUserLocalId;
///
/// Struct that encapsulates the GDK specific arguments for Xal.
///
typedef struct XalGsdkArgs {} XalGsdkArgs;
typedef XalGsdkArgs XalInitArgs;
typedef XUserChangeEvent XalUserChangeType;
XUserChangeEvent const XalUserChange_SignedInAgain = XUserChangeEvent::SignedInAgain;
XUserChangeEvent const XalUserChange_SigningOut = XUserChangeEvent::SigningOut;
XUserChangeEvent const XalUserChange_SignedOut = XUserChangeEvent::SignedOut;
XUserChangeEvent const XalUserChange_Gamertag = XUserChangeEvent::Gamertag;
XUserChangeEvent const XalUserChange_GamerPicture = XUserChangeEvent::GamerPicture;
XUserChangeEvent const XalUserChange_Privileges = XUserChangeEvent::Privileges;
typedef XUserChangeEventCallback XalUserChangeEventHandler;
typedef XUserSignOutDeferralHandle XalSignoutDeferralHandle;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_gsdk_impl.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
#include
#include
#include
extern "C"
{
static_assert(XalUserState_SignedIn == static_cast(XUserState::SignedIn), "Xal / GDK mismatch");
static_assert(XalUserState_SigningOut == static_cast(XUserState::SigningOut), "Xal / GDK mismatch");
static_assert(XalUserState_SignedOut == static_cast(XUserState::SignedOut), "Xal / GDK mismatch");
static_assert(XalGamerPictureSize_Small == static_cast(XUserGamerPictureSize::Small), "Xal / GDK mismatch");
static_assert(XalGamerPictureSize_Medium == static_cast(XUserGamerPictureSize::Medium), "Xal / GDK mismatch");
static_assert(XalGamerPictureSize_Large == static_cast(XUserGamerPictureSize::Large), "Xal / GDK mismatch");
static_assert(XalGamerPictureSize_ExtraLarge == static_cast(XUserGamerPictureSize::ExtraLarge), "Xal / GDK mismatch");
static_assert(XalAgeGroup_Unknown == static_cast(XUserAgeGroup::Unknown), "Xal / GDK mismatch");
static_assert(XalAgeGroup_Child == static_cast(XUserAgeGroup::Child), "Xal / GDK mismatch");
static_assert(XalAgeGroup_Teen == static_cast(XUserAgeGroup::Teen), "Xal / GDK mismatch");
static_assert(XalAgeGroup_Adult == static_cast(XUserAgeGroup::Adult), "Xal / GDK mismatch");
static_assert(XalPrivilegeCheckDenyReasons_None == static_cast(XUserPrivilegeDenyReason::None), "Xal / GDK mismatch");
static_assert(XalPrivilegeCheckDenyReasons_PurchaseRequired == static_cast(XUserPrivilegeDenyReason::PurchaseRequired), "Xal / GDK mismatch");
static_assert(XalPrivilegeCheckDenyReasons_Restricted == static_cast(XUserPrivilegeDenyReason::Restricted), "Xal / GDK mismatch");
static_assert(XalPrivilegeCheckDenyReasons_Banned == static_cast(XUserPrivilegeDenyReason::Banned), "Xal / GDK mismatch");
static_assert(XalPrivilegeCheckDenyReasons_Unknown == static_cast(XUserPrivilegeDenyReason::Unknown), "Xal / GDK mismatch");
//------------------------------------------------------------------------------
// xal.h
//------------------------------------------------------------------------------
inline
HRESULT XalInitialize(
_In_ XalInitArgs const* /*args*/,
_In_opt_ XTaskQueueHandle /*internalWorkQueue*/
) noexcept
{
return S_OK;
}
inline
HRESULT XalCleanupAsync(
_In_ XAsyncBlock* async
) noexcept
{
HRESULT hr = XAsyncBegin(async, nullptr, &XalCleanupAsync, "XalCleanupAsync", [](
_In_ XAsyncOp op,
_In_ XAsyncProviderData const* data
)
{
if (op == XAsyncOp::DoWork)
{
XAsyncComplete(data->async, S_OK, 0);
}
return S_OK;
});
if (SUCCEEDED(hr))
{
hr = XAsyncSchedule(async, 0);
}
return hr;
}
inline
HRESULT XalCleanupResult(
_In_ XAsyncBlock* async
) noexcept
{
return XAsyncGetStatus(async, false);
}
inline
HRESULT XalGetMaxUsers(
_Out_ uint32_t* maxUsers
) noexcept
{
return XUserGetMaxUsers(maxUsers);
}
inline
HRESULT XalGetTitleId(
_Out_ uint32_t* titleId
) noexcept
{
return XGameGetXboxTitleId(titleId);
}
inline
size_t XalGetSandboxSize() noexcept
{
return XSystemXboxLiveSandboxIdMaxBytes;
}
inline
HRESULT XalGetSandbox(
_In_ size_t sandboxSize,
_Out_writes_(sandboxSize) char* sandbox,
_Out_opt_ size_t* sandboxUsed
) noexcept
{
return XSystemGetXboxLiveSandboxId(sandboxSize, sandbox, sandboxUsed);
}
inline
HRESULT XalTryAddDefaultUserSilentlyAsync(
_In_ uint32_t /*userIdentifier*/, // user identifier is not used on GameCore
_In_ XAsyncBlock* async
) noexcept
{
return XUserAddAsync(XUserAddOptions::AddDefaultUserSilently, async);
}
inline
HRESULT XalTryAddDefaultUserSilentlyResult(
_In_ XAsyncBlock* async,
_Out_ XalUserHandle* newUser
) noexcept
{
return XUserAddResult(async, newUser);
}
inline
HRESULT XalAddUserWithUiAsync(
_In_ uint32_t /*userIdentifier*/, // user identifier is not used on GameCore
_In_ XAsyncBlock* async
) noexcept
{
return XUserAddAsync(XUserAddOptions::None, async);
}
inline
HRESULT XalAddUserWithUiResult(
_In_ XAsyncBlock* async,
_Out_ XalUserHandle* newUser
) noexcept
{
return XUserAddResult(async, newUser);
}
inline
bool XalGetDeviceUserIsPresent() noexcept
{
return false;
}
inline
HRESULT XalGetDeviceUser(
_Out_ XalUserHandle* /*deviceUser*/
) noexcept
{
return E_NOT_SUPPORTED;
}
inline
bool XalSignOutUserAsyncIsPresent() noexcept
{
return false;
}
inline
HRESULT XalSignOutUserAsync(
_In_ XalUserHandle /*user*/,
_In_ XAsyncBlock* /*async*/
) noexcept
{
return E_NOT_SUPPORTED;
}
inline
HRESULT XalSignOutUserResult(
_In_ XAsyncBlock* /*async*/
) noexcept
{
return E_NOT_SUPPORTED;
}
inline
HRESULT XalFindUserByLocalId(
_In_ XalUserLocalId localId,
_Out_ XalUserHandle* user
) noexcept
{
return XUserFindUserByLocalId(localId, user);
}
//------------------------------------------------------------------------------
// xal_user.h
//------------------------------------------------------------------------------
inline
HRESULT XalUserDuplicateHandle(
_In_ XalUserHandle user,
_Out_ XalUserHandle* duplicatedUser
) noexcept
{
return XUserDuplicateHandle(user, duplicatedUser);
}
inline
void XalUserCloseHandle(
_In_ XalUserHandle user
) noexcept
{
XUserCloseHandle(user);
}
inline
int32_t XalCompareUsers(
_In_ XalUserHandle user1,
_In_ XalUserHandle user2
) noexcept
{
return XUserCompare(user1, user2);
}
inline
HRESULT XalUserGetId(
_In_ XalUserHandle user,
_Out_ uint64_t* id
) noexcept
{
return XUserGetId(user, id);
}
inline
HRESULT XalUserGetLocalId(
_In_ XalUserHandle user,
_Out_ XalUserLocalId* localId
) noexcept
{
HRESULT hr = XUserGetLocalId(user, localId);
return hr;
}
inline
bool XalUserIsDevice(
_In_ XalUserHandle /*user*/
) noexcept
{
return false;
}
inline
bool XalUserIsGuest(
_In_ XalUserHandle user
) noexcept
{
bool isGuest = false;
XUserGetIsGuest(user, &isGuest);
return isGuest;
}
inline
HRESULT XalUserGetState(
_In_ XalUserHandle user,
_Out_ XalUserState* state
) noexcept
{
HRESULT hr = XUserGetState(user, reinterpret_cast(state));
return hr;
}
inline
size_t XalUserGetGamertagSize(
_In_ XalUserHandle /*user*/,
_In_ XalGamertagComponent component
) noexcept
{
switch (component)
{
case XalGamertagComponent_Classic:
return XUserGamertagComponentClassicMaxBytes;
case XalGamertagComponent_Modern:
return XUserGamertagComponentModernMaxBytes;
case XalGamertagComponent_ModernSuffix:
return XUserGamertagComponentModernSuffixMaxBytes;
case XalGamertagComponent_UniqueModern:
return XUserGamertagComponentUniqueModernMaxBytes;
default:
return 0;
}
}
inline
HRESULT XalUserGetGamertag(
_In_ XalUserHandle user,
_In_ XalGamertagComponent component,
_In_ size_t gamertagSize,
_Out_writes_(gamertagSize) char* gamertag,
_Out_opt_ size_t* gamertagUsed
) noexcept
{
return XUserGetGamertag(user, static_cast(component), gamertagSize, gamertag, gamertagUsed);
}
inline
HRESULT XalUserGetGamerPictureAsync(
_In_ XalUserHandle user,
_In_ XalGamerPictureSize pictureSize,
_In_ XAsyncBlock* async
) noexcept
{
return XUserGetGamerPictureAsync(user, static_cast(pictureSize), async);
}
inline
HRESULT XalUserGetGamerPictureResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept
{
return XUserGetGamerPictureResultSize(async, bufferSize);
}
inline
HRESULT XalUserGetGamerPictureResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_(bufferSize) void* buffer
) noexcept
{
return XUserGetGamerPictureResult(async, bufferSize, buffer, nullptr);
}
inline
HRESULT XalUserGetAgeGroup(
_In_ XalUserHandle user,
_Out_ XalAgeGroup* ageGroup
) noexcept
{
HRESULT hr = XUserGetAgeGroup(user, reinterpret_cast(ageGroup));
return hr;
}
inline
HRESULT XalUserCheckPrivilege(
_In_ XalUserHandle user,
_In_ XalPrivilege privilege,
_Out_ bool* hasPrivilege,
_Out_opt_ XalPrivilegeCheckDenyReasons* reasons
) noexcept
{
HRESULT hr = XUserCheckPrivilege(
user,
XUserPrivilegeOptions::None,
static_cast(privilege),
hasPrivilege,
reinterpret_cast(reasons)
);
return hr;
}
inline
bool XalUserResolvePrivilegeWithUiIsPresent() noexcept
{
return true;
}
inline
HRESULT XalUserResolveUserPrivilegeWithUiAsync(
_In_ XalUserHandle user,
_In_ XalPrivilege privilege,
_In_ XAsyncBlock* async
) noexcept
{
return XUserResolvePrivilegeWithUiAsync(
user,
XUserPrivilegeOptions::None,
static_cast(privilege),
async
);
}
inline
HRESULT XalUserResolveUserPrivilegeWithUiResult(
_In_ XAsyncBlock* async
) noexcept
{
return XUserResolvePrivilegeWithUiResult(async);
}
inline
HRESULT XalUserGetTokenAndSignatureSilentlyAsync(
_In_ XalUserHandle user,
_In_ XalUserGetTokenAndSignatureArgs const* args,
_In_ XAsyncBlock* async
) noexcept
{
static_assert(sizeof(XalHttpHeader) == sizeof(XUserGetTokenAndSignatureHttpHeader), "Xal / GDK mismatch");
XUserGetTokenAndSignatureOptions opts = XUserGetTokenAndSignatureOptions::None;
if (args->forceRefresh)
{
opts |= XUserGetTokenAndSignatureOptions::ForceRefresh;
}
if (args->allUsers)
{
opts |= XUserGetTokenAndSignatureOptions::AllUsers;
}
return XUserGetTokenAndSignatureAsync(
user,
opts,
args->method,
args->url,
args->headerCount,
reinterpret_cast(args->headers),
args->bodySize,
args->body,
async
);
}
inline
HRESULT XalUserGetTokenAndSignatureSilentlyResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept
{
return XUserGetTokenAndSignatureResultSize(async, bufferSize);
}
inline
HRESULT XalUserGetTokenAndSignatureSilentlyResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer,
_Outptr_ XalUserGetTokenAndSignatureData** result,
_Out_opt_ size_t* bufferUsed
) noexcept
{
static_assert(sizeof(XalUserGetTokenAndSignatureData) == sizeof(XUserGetTokenAndSignatureData), "Xal / GDK mismatch");
return XUserGetTokenAndSignatureResult(
async,
bufferSize,
buffer,
reinterpret_cast(result),
bufferUsed
);
}
inline
HRESULT XalUserResolveIssueWithUiAsync(
_In_ XalUserHandle user,
_In_opt_z_ char const* url,
_In_ XAsyncBlock* async
) noexcept
{
return XUserResolveIssueWithUiAsync(user, url, async);
}
inline
HRESULT XalUserResolveIssueWithUiResult(
_In_ XAsyncBlock* async
) noexcept
{
return XUserResolveIssueWithUiResult(async);
}
inline
HRESULT XalUserRegisterChangeEventHandler(
_In_opt_ XTaskQueueHandle queue,
_In_opt_ void* context,
_In_ XalUserChangeEventHandler* handler,
_Out_ XalRegistrationToken* token
) noexcept
{
static_assert(sizeof(XalRegistrationToken) == sizeof(XTaskQueueRegistrationToken), "Xal / GDK mismatch");
static_assert(sizeof(XalRegistrationToken::token) == sizeof(XTaskQueueRegistrationToken::token), "Xal / GDK mismatch");
return XUserRegisterForChangeEvent(
queue,
context,
handler,
reinterpret_cast(token)
);
}
inline
void XalUserUnregisterChangeEventHandler(
_In_ XalRegistrationToken token
) noexcept
{
XTaskQueueRegistrationToken gdkToken{ token.token };
XUserUnregisterForChangeEvent(gdkToken, true);
}
inline
HRESULT XalUserGetSignoutDeferral(
_Out_ XalSignoutDeferralHandle* deferral
) noexcept
{
return XUserGetSignOutDeferral(deferral);
}
inline
void XalUserCloseSignoutDeferral(
_In_ XalSignoutDeferralHandle deferral
) noexcept
{
XUserCloseSignOutDeferralHandle(deferral);
}
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_internal_marketing.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
// Attention: This file is intended for internal uses only.
// Its use is not recommended and not supported.
#include
extern "C"
{
//-----------------------------------------------------------------------------
// Marketing State
//-----------------------------------------------------------------------------
///
/// Enum defining the various marketing states.
///
typedef enum XalMarketingState
{
/// Existing user
XalMarketingState_ExistingUser = 0,
/// User went through account creation
XalMarketingState_NewUser = 1,
/// User went through account creation and saw the first party marketing notice
XalMarketingState_NewUserFirstPartyNotice = 2,
} XalMarketingState;
STDAPI XalUserGetMarketingState(
_In_ XalUserHandle user,
_Out_ XalMarketingState* marketingState
) noexcept;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_internal_telemetry.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
// Attention: This file is intended for internal uses only.
// Its use is not recommended and not supported.
#include
extern "C"
{
//-----------------------------------------------------------------------------
// Telemetry
//-----------------------------------------------------------------------------
///
/// Controls if the event is to be uploaded immediately or can be batched.
///
///
/// This is a copy of MAE::EventLatency and should be kept in sync with it.
///
typedef enum XalTelemetryLatency
{
XalTelemetryLatency_Unspecified = -1,
XalTelemetryLatency_Off = 0,
XalTelemetryLatency_Normal = 0x0100,
XalTelemetryLatency_CostDeferred = 0x0200,
XalTelemetryLatency_Realtime = 0x0300,
XalTelemetryLatency_Max = 0x0400,
} XalTelemetryLatency;
///
/// Controls the priority of keeping the event in case 1DS needs to evict some.
///
///
/// This is a copy of MAE::EventPersistence and should be kept in sync with it.
///
typedef enum XalTelemetryPersistence
{
XalTelemetryPersistence_Normal = 0x00,
XalTelemetryPersistence_Critical = 0x01,
XalTelemetryPersistence_DoNotStoreOnDisk = 0x02,
} XalTelemetryPersistence;
///
/// Controls the sampling rate of the event.
///
typedef enum XalTelemetrySampleRate
{
XalTelemetrySampleRate_Unspecified = 0,
XalTelemetrySampleRate_NoSampling = 1,
XalTelemetrySampleRate_10_percent = 2,
XalTelemetrySampleRate_0_percent = 3,
} XalTelemetrySampleRate;
///
/// Describes the type of a ticket.
///
typedef enum XalTelemetryTicketType
{
//XalTelemetryTicketType_Unspecified = 0, // currently unsupported
//XalTelemetryTicketType_MsaUser = 0x01, // currently unsupported
//XalTelemetryTicketType_MsaDevice = 0x02, // currently unsupported
XalTelemetryTicketType_XauthUser = 0x03,
XalTelemetryTicketType_XauthDevice = 0x04
} XalTelemetryTicketType;
///
/// Describes a ticket that should be included with a telemetry event.
///
typedef struct XalTelemetryTicket
{
///
/// The url for the ticket audience.
///
_Field_z_ char const* Url;
///
/// The ticket id.
///
uint32_t Id;
///
/// The type of ticket.
///
XalTelemetryTicketType Type;
} XalTelemetryTicket;
///
/// A method to write a telemetry event and send it to vortex.
///
/// The user to send this event for.
/// The game's iKey.
/// The null terminated event name string. This will be the
/// full name of the event with the provider prefix.
/// The null terminated event data string. The string should
/// be properly formatted JSON.
/// The number of tickets to send with the event.
/// Information about the tickets to send.
/// The 1DS latency for this event.
/// The 1DS persistence for this event.
/// The 1DS sampleRate for this event.
STDAPI XalTelemetryWriteEvent(
_In_ XalUserHandle user,
_In_z_ char const* iKey,
_In_z_ char const* eventNameWithProvider,
_In_z_ char const* data,
_In_ uint32_t ticketCount,
_In_reads_(ticketCount) XalTelemetryTicket* tickets,
_In_ XalTelemetryLatency latency,
_In_ XalTelemetryPersistence persistence,
_In_ XalTelemetrySampleRate sampleRate
) noexcept;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_internal_types.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
// Attention: This file is intended for internal uses only.
// Its use is not recommended and not supported.
#include
extern "C"
{
//------------------------------------------------------------------------------
// Xal init flags
//------------------------------------------------------------------------------
///
/// Flag that instructs Xal to attempt to use cached MSA refresh tokens from Xsapi to
/// silently sign existing users in. Do not use this flag unless you have been
/// instructed to do so.
///
///
/// This flag is supported on Android and iOS device types.
///
uint32_t const XAL_INIT_OPTION_MIGRATE_XSAPI_USER_TOKENS = 1u;
///
/// Flag that instructs Xal that your app is set up for FOCI token sharing and to attempt
/// to use FOCI SSO. If your app is not set up for FOCI do not set this flag.
///
///
/// This flag is supported on Win32, Android, iOS, Mac, and generic device types.
///
uint32_t const XAL_INIT_OPTION_USE_FOCI = 1u << 24;
///
/// Flag that provides a hint to Xal that your app is allowed to sign out the user on the
/// UWP platform. Note that setting this does not give your app permission to sign
/// out the user, but only acts as clue for Xal that you have that permission.
///
///
/// This flag is supported on UWP device types.
///
uint32_t const XAL_INIT_OPTION_ALLOW_UWP_SIGNOUT = 1u << 25;
///
/// Flag to disable SSO browser usage on platforms where a secure browser exists.
/// This flag is provided for testing purposes only.
///
///
/// This flag is supported on Android and iOS device types.
///
uint32_t const XAL_INIT_OPTION_USE_IN_PROC_BROWSER = 1u << 27;
///
/// Flag to tell XAL to use file storage for token storage on Win32 platforms instead of the Windows
/// Credential Manager. Using this flag will break many SSO scenarios.
///
///
/// This flag is supported on Win32 device types.
///
uint32_t const XAL_INIT_OPTION_WIN32_USE_FILE_STORAGE = 1u << 28;
///
/// Flag to instruct Xal to use the beta Xbox service cloud.
///
///
/// This flag is supported on Win32, Android, iOS, Mac, and generic device types.
///
uint32_t const XAL_INIT_OPTION_USE_BETA_SERVICES_FLAG = 1u << 29;
///
/// Flag to instruct Xal to use the 1st party auth flow.
///
///
/// This flag is supported on Win32, UWP, Android, iOS, Mac, and generic device types.
///
uint32_t const XAL_INIT_OPTION_TITLE_TYPE_FIRST_PARTY_FLAG = 1u << 31;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_internal_web_account.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
// Attention: This file is intended for internal uses only.
// Its use is not recommended and not supported.
#include
#include
extern "C"
{
//-----------------------------------------------------------------------------
// User properties
///
/// Returns the size of the buffer needed to store the web account ID string.
///
/// The user object.
STDAPI_(size_t) XalUserGetWebAccountIdSize(
_In_ XalUserHandle user
) noexcept;
///
/// Returns the web account ID of the user.
///
/// The user object.
/// The size in bytes of the webAccountId buffer.
/// Should be the value returned by XalUserGetWebAccountIdSize.
/// The buffer the web account ID will be written to.
///
/// The number of bytes used in the buffer
/// including the null terminator.
STDAPI XalUserGetWebAccountId(
_In_ XalUserHandle user,
_In_ size_t webAccountIdSize,
_Out_writes_(webAccountIdSize) char* webAccountId,
_Out_opt_ size_t* webAccountIdUsed
) noexcept;
//-----------------------------------------------------------------------------
// Get web account token
///
/// Struct that represents a parameter that has a key and a value for web account APIs.
///
typedef struct XalWebAccountParameter
{
/// Parameter name.
_Field_z_ char const* name;
/// Parameter value.
_Field_z_ char const* value;
} XalWebAccountParameter;
///
/// Struct that encapsulates the arguments for XalUserGetWebAccountTokenSilentlyAsync.
///
///
/// Xal will copy the data before XalUserGetWebAccountTokenSilentlyAsync returns.
///
typedef struct XalUserGetWebAccountTokenArgs
{
///
/// The token scope string being requested.
///
_Field_z_ char const* Scope;
///
/// Ignore cached tokens.
///
///
/// This flag should only be set if an http request using a previously
/// fetched token failed with a 401 error. In that case the entire call
/// should be retried after getting a new token using this flag.
///
bool ForceRefresh;
///
/// The number of request parameters that will be added to the token request.
///
uint32_t parameterCount;
///
/// The array of request parameters that will be added to the token request.
///
_Field_size_(parameterCount) XalWebAccountParameter const* requestParameters;
} XalUserGetWebAccountTokenArgs;
///
/// Gets a token with the specified scope for the user without showing UI.
///
/// The user the token is for.
/// The requested token details.
/// The AsyncBlock for this operation.
/// .
STDAPI XalUserGetWebAccountTokenSilentlyAsync(
_In_ XalUserHandle user,
_In_ XalUserGetWebAccountTokenArgs const* args,
_In_ XAsyncBlock* async
) noexcept;
///
/// Gets the size in bytes of the web account token result buffer.
///
/// The AsyncBlock for this operation.
/// The size in bytes for the result buffer.
STDAPI XalUserGetWebAccountTokenSilentlyResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept;
///
/// Gets the results of a successful XalUserGetWebAccountTokenSilentlyAsync operation.
///
/// The AsyncBlock for this operation.
/// The size of the buffer for the result object.
///
/// The result token.
STDAPI XalUserGetWebAccountTokenSilentlyResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_z_(bufferSize) char* result
) noexcept;
///
/// Gets a token with the specified scope for the user showing UI if necessary.
///
/// The user the token is for.
/// The requested token details.
/// The AsyncBlock for this operation.
/// .
STDAPI XalUserGetWebAccountTokenWithUiAsync(
_In_ XalUserHandle user,
_In_ XalUserGetWebAccountTokenArgs const* args,
_In_ XAsyncBlock* async
) noexcept;
///
/// Gets the size in bytes of the web account token result buffer.
///
/// The AsyncBlock for this operation.
/// The size in bytes for the result buffer.
STDAPI XalUserGetWebAccountTokenWithUiResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept;
///
/// Gets the results of a successful XalUserGetWebAccountTokenWithUiAsync operation.
///
/// The AsyncBlock for this operation.
/// The size of the buffer for the result object.
///
/// The result token.
STDAPI XalUserGetWebAccountTokenWithUiResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_z_(bufferSize) char* result
) noexcept;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_platform.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
#include
extern "C"
{
//-----------------------------------------------------------------------------
// Hooks for platform specific behaviour
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Memory (optional on all platforms)
///
/// Sets the memory hook functions to allow callers to route memory allocations
/// to their own memory manager. This must be called before XalInitialize and
/// cannot be called again until after XalCleanup and all XAL_USER_HANDLEs have
/// been closed.
///
/// This method allows the application to install custom memory allocation
/// routines in order to service all requests for new memory buffers instead of
/// using default allocation routines.
///
/// The and
/// parameters can be null pointers to restore the default routines. Both
/// callback pointers must be null or both must be non-null. Mixing custom and
/// default routines is not permitted and will cause the function to fail.
///
/// A pointer to the custom allocation callback to
/// use, or a null pointer to restore the default.
/// A pointer to the custom freeing callback to use,
/// or a null pointer to restore the default.
/// Result code for this API operation.
STDAPI XalMemSetFunctions(
_In_opt_ XalMemAllocFunc* memAllocFunc,
_In_opt_ XalMemFreeFunc* memFreeFunc
) noexcept;
///
/// Gets the memory hook functions to allow callers to route memory allocations
/// to their own memory manager. This method allows the application get the
/// default memory allocation routines. This can be used along with
/// XalMemSetFunctions to monitor all memory allocations.
///
/// Set to the current allocation callback. Returns
/// the default routine if not previously set.
/// Set to the to the current memory free callback.
/// Returns the default routine if not previously set.
/// Result code for this API operation.
STDAPI XalMemGetFunctions(
_Out_ XalMemAllocFunc** memAllocFunc,
_Out_ XalMemFreeFunc** memFreeFunc
) noexcept;
//-----------------------------------------------------------------------------
// Web view (ignored on OneCore platforms, optional on iOS and Android)
///
/// Registers the show url event handler.
///
/// The async queue the callback should be invoked on.
///
/// Optional pointer to data used by the event handler.
///
/// The event handler,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformWebSetEventHandler(
_In_opt_ XTaskQueueHandle queue,
_In_opt_ void* context,
_In_ XalPlatformWebShowUrlEventHandler2* handler
) noexcept;
///
/// Clears the show url event handler.
///
/// Result code for this API operation.
///
/// Must be called before XalInitialize or after XalCleanupAsync completes.
///
STDAPI XalPlatformWebClearEventHandler() noexcept;
///
/// Completes a show url operation.
///
/// The handle for this operation.
/// The result of the operation.
/// The full url for the final redirection.
/// Result code for this API operation.
///
/// This should only be called in response to a show url event, once the web
/// view is redirected to the final url or if an error occurs and the operation
/// cannot be completed.
///
///
STDAPI XalPlatformWebShowUrlComplete(
_In_ XalPlatformOperation operation,
_In_ XalPlatformOperationResult result,
_In_opt_z_ char const* url
) noexcept;
//-----------------------------------------------------------------------------
// Storage (ignored on OneCore platforms, optional on iOS and Android)
///
/// Sets the storage event handlers.
///
/// The async queue the callbacks should be invoked on.
///
/// The event handlers,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformStorageSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformStorageEventHandlers2* handlers
) noexcept;
///
/// Clears the storage event handlers.
///
/// Result code for this API operation.
///
/// Must be called before XalInitialize or after XalCleanupAsync completes.
///
STDAPI XalPlatformStorageClearEventHandlers() noexcept;
///
/// Completes write to storage operation.
///
/// The handle for this operation.
/// The result of the operation.
/// Result code for this API operation.
///
/// This should only be called in response to a write to storage event, once
/// the write is completed or if an error occurs and the operation cannot be
/// completed .
///
STDAPI XalPlatformStorageWriteComplete(
_In_ XalPlatformOperation operation,
_In_ XalPlatformOperationResult result
) noexcept;
///
/// Completes read from storage operation.
///
/// The handle for this operation.
/// The result of the operation.
/// The size (in bytes) of the data.
/// The data read.
/// Result code for this API operation.
///
/// This should only be called in response to a read from storage event, once
/// the read is completed or if an error occurs and the operation cannot be
/// completed .
///
/// If the requested key cannot be found, the operation should be completed
/// with XalClientOperationResult_Success, data = nullptr and dataSize = 0.
///
STDAPI XalPlatformStorageReadComplete(
_In_ XalPlatformOperation operation,
_In_ XalPlatformOperationResult result,
_In_ size_t dataSize,
_In_reads_bytes_opt_(dataSize) void const* data
) noexcept;
///
/// Completes clear from storage operation.
///
/// The handle for this operation.
/// The result of the operation.
/// Result code for this API operation.
///
/// This should only be called in response to a clear from storage event, once
/// the data is cleared or if an error occurs and the operation cannot be
/// completed .
///
STDAPI XalPlatformStorageClearComplete(
_In_ XalPlatformOperation operation,
_In_ XalPlatformOperationResult result
) noexcept;
//-----------------------------------------------------------------------------
// Remote Connect (only used in generic mode, when configured for it)
///
/// Sets the remote connect event handlers.
///
/// The async queue the callbacks should be invoked on.
///
/// The event handlers,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformRemoteConnectSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformRemoteConnectEventHandlers3* handlers
) noexcept;
///
/// Clears the remote connect event handlers.
///
/// Result code for this API operation.
///
/// Must be called before XalInitialize or after XalCleanupAsync completes.
///
STDAPI XalPlatformRemoteConnectClearEventHandlers() noexcept;
///
/// Signal to Xal that the remote connect prompt has been dismissed by the user.
///
/// The handle for this operation.
/// Result code for this API operation.
///
/// This should be called after a XalPlatformRemoteConnectShowPromptEventHandler
/// if the user dismisses the prompt. The whole remote connect process will be
/// cancelled and the starting AddUserAsync operation will complete with
/// E_ABORT. The XalPlatformRemoteConnectClosePromptEventHandler will be called
/// as normal.
///
STDAPI XalPlatformRemoteConnectCancelPrompt(
_In_ XalPlatformOperation operation
) noexcept;
//------------------------------------------------------------------------------
// Crypto (only used in generic mode)
///
/// Sets the crypto callbacks.
///
/// The callbacks,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformCryptoSetCallbacks(
_In_ XalPlatformCryptoCallbacks* callbacks
) noexcept;
//------------------------------------------------------------------------------
// Date & Time (only used in generic mode)
///
/// Sets the date/time callbacks.
///
/// The callbacks,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformDateTimeSetCallbacks(
_In_ XalPlatformDateTimeCallbacks* callbacks
) noexcept;
//-----------------------------------------------------------------------------
// Spop Prompt (only used in generic mode, when configured for it)
///
/// Sets the SPOP prompt event handler.
///
/// The event handler,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
STDAPI XalPlatformSpopPromptSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformSpopPromptEventHandler* handler,
_In_opt_ void* context
) noexcept;
///
/// Clears the SPOP event handlers.
///
/// Result code for this API operation.
///
/// Must be called before XalInitialize or after XalCleanupAsync completes.
///
STDAPI XalPlatformSpopPromptClearEventHandler() noexcept;
///
/// Signal to Xal that the user finished interacting with the SPOP prompt.
///
/// The handle for this operation.
/// The result of the user interaction.
/// Result code for this API operation.
///
/// This should be called after a XalPlatformSpopPromptEventHandler when the
/// user makes a choice or if a failure occurs.
///
STDAPI XalPlatformSpopPromptComplete(
_In_ XalPlatformOperation operation,
_In_ XalSpopOperationResult result
) noexcept;
}
// Back compat hooks
#if XAL_ENABLE_BACK_COMPAT_SHIMS
//-----------------------------------------------------------------------------
// Web view (ignored on OneCore platforms, optional on iOS and Android)
///
/// Registers the show url event handler.
///
/// The async queue the callback should be invoked on.
///
/// Optional pointer to data used by the event handler.
///
/// The event handler,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
inline
HRESULT XalPlatformWebSetEventHandler(
_In_opt_ XTaskQueueHandle queue,
_In_opt_ void* context,
_In_ XalPlatformWebShowUrlEventHandler* handler
) noexcept
{
static struct WebShowUrlHandler
{
XalPlatformWebShowUrlEventHandler* handler;
void* context;
} s_handlers{};
s_handlers.handler = handler;
s_handlers.context = context;
XalPlatformWebShowUrlEventHandler2* trampoline = [](
void* ctx,
uint32_t /*cuid*/,
XalPlatformOperation op,
char const* sUrl,
char const* fUrl,
XalShowUrlType t,
uint32_t /*requestHeaderCount*/,
XalHttpHeader const* /*requestHeaders*/
)
{
auto handler = static_cast(ctx);
handler->handler(handler->context, nullptr, op, sUrl, fUrl, t);
};
return XalPlatformWebSetEventHandler(queue, &s_handlers, trampoline);
}
//-----------------------------------------------------------------------------
// Storage (ignored on OneCore platforms, optional on iOS and Android)
///
/// Sets the storage event handlers.
///
/// The async queue the callbacks should be invoked on.
///
/// The event handlers,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
inline
HRESULT XalPlatformStorageSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformStorageEventHandlers* handlers
) noexcept
{
static XalPlatformStorageEventHandlers s_handlers{};
s_handlers = *handlers;
XalPlatformStorageEventHandlers2 trampolines = {};
trampolines.write = [](void* ctx, uint32_t /*cuid*/, XalPlatformOperation op, char const* key, size_t size, void const* data)
{
auto handlers = static_cast(ctx);
handlers->write(handlers->context, nullptr, op, key, size, data);
};
trampolines.read = [](void* ctx, uint32_t /*cuid*/, XalPlatformOperation op, char const* key)
{
auto handlers = static_cast(ctx);
handlers->read(handlers->context, nullptr, op, key);
};
trampolines.clear = [](void* ctx, uint32_t /*cuid*/, XalPlatformOperation op, char const* key)
{
auto handlers = static_cast(ctx);
handlers->clear(handlers->context, nullptr, op, key);
};
trampolines.context = &s_handlers;
return XalPlatformStorageSetEventHandlers(queue, &trampolines);
}
//-----------------------------------------------------------------------------
// Remote Connect (only used in generic mode, when configured for it)
///
/// Sets the remote connect event handlers.
///
/// The async queue the callbacks should be invoked on.
///
/// The event handlers,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
inline
HRESULT XalPlatformRemoteConnectSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformRemoteConnectEventHandlers2* handlers
) noexcept
{
static XalPlatformRemoteConnectEventHandlers2 s_handlers{};
s_handlers = *handlers;
XalPlatformRemoteConnectEventHandlers3 trampolines = {};
trampolines.show = [](void* ctx, uint32_t cuid, XalPlatformOperation op, char const* url, char const* code, size_t /*qrCodeSize*/, void const* /*qrCode*/)
{
auto handlers = static_cast(ctx);
handlers->show(handlers->context, cuid, op, url, code);
};
trampolines.close = [](void* ctx, uint32_t cuid, XalPlatformOperation op)
{
auto handlers = static_cast(ctx);
handlers->close(handlers->context, cuid, op);
};
trampolines.context = &s_handlers;
return XalPlatformRemoteConnectSetEventHandlers(queue, &trampolines);
}
///
/// Sets the remote connect event handlers.
///
/// The async queue the callbacks should be invoked on.
///
/// The event handlers,
/// .
/// Result code for this API operation.
///
/// Must be called before XalInitialize.
///
inline
HRESULT XalPlatformRemoteConnectSetEventHandlers(
_In_opt_ XTaskQueueHandle queue,
_In_ XalPlatformRemoteConnectEventHandlers* handlers
) noexcept
{
static XalPlatformRemoteConnectEventHandlers s_handlers{};
s_handlers = *handlers;
XalPlatformRemoteConnectEventHandlers3 trampolines = {};
trampolines.show = [](void* ctx, uint32_t /*cuid*/, XalPlatformOperation op, char const* url, char const* code, size_t /*qrCodeSize*/, void const* /*qrCode*/)
{
auto handlers = static_cast(ctx);
handlers->show(handlers->context, nullptr, op, url, code);
};
trampolines.close = [](void* ctx, uint32_t /*cuid*/, XalPlatformOperation op)
{
auto handlers = static_cast(ctx);
handlers->close(handlers->context, nullptr, op);
};
trampolines.context = &s_handlers;
return XalPlatformRemoteConnectSetEventHandlers(queue, &trampolines);
}
#endif
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_platform_types.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
extern "C"
{
//-----------------------------------------------------------------------------
// Types for for platform hooks
//-----------------------------------------------------------------------------
///
/// Handle to an operation Xal requested the client to perform.
///
typedef struct XalPlatformOperationToken* XalPlatformOperation;
///
/// Enum defining the results of a client operation.
///
typedef enum XalPlatformOperationResult
{
///
/// Successful client operation.
///
XalPlatformOperationResult_Success = 0,
///
/// Failed client operation.
///
XalPlatformOperationResult_Failure = 1,
///
/// Canceled client operation.
///
XalPlatformOperationResult_Canceled = 2,
} XalPlatformOperationResult;
///
/// Enum defining the possible reasons a platform web event might occur.
///
typedef enum XalShowUrlType
{
///
/// The client should show the URL in a shared system browser if
/// one is present, otherwise the client should use an embedded browser.
///
XalShowUrlType_Normal = 0,
///
/// This case is deprecated and no longer used. Cookie removal is now
/// signaled exclusively using
/// XalShowUrlType_CookieRemovalSkipIfSharedCredentials.
///
///
/// Formerly, this value indicated that the browser was being raised for the
/// purposes of deleting cookies from both shared and embedded browsers.
///
XalShowUrlType_CookieRemoval_DEPRECATED = 1,
///
/// The browser is being raised for the purposes of deleting
/// cookies. If the client is using a shared system browser, this call
/// should be ignored and the client should immediately call
/// XalPlatformWebShowUrlComplete passing in success, and forwarding the
/// received final URL back into Xal. If an embedded browser is being used,
/// the cookies should be cleared without showing UI if possible. If silent
/// cookie-clearing is impossible, the URL should be loaded as normal.
///
XalShowUrlType_CookieRemovalSkipIfSharedCredentials = 2,
///
/// This is a web flow which does not rely on cookies. The client
/// may use a shared system browser or an embedded browser depending on
/// whichever browser would give the best user experience. If headers are
/// required for the web request, this will be the show type asked for. If
/// this is the case, an embedded browser might be required so those
/// request headers can be set.
///
XalShowUrlType_NonAuthFlow = 3,
} XalShowUrlType;
///
/// The userIdentifier value Xal will use for data that is not specific to a
/// single user.
///
uint32_t const XAL_NO_USER_IDENTIFIER = static_cast(-1);
//-----------------------------------------------------------------------------
// Memory (optional on all platforms)
///
/// A callback invoked every time a new memory buffer must be dynamically
/// allocated by the library. This callback is optionally installed by calling
/// XalMemSetFunctions.
///
/// The callback must allocate and return a pointer to a contiguous block of
/// memory of the specified size that will remain valid until the app's
/// corresponding XalMemFreeFunc callback is invoked to release it.
///
/// Every non-null pointer returned by this method will be subsequently passed
/// to the corresponding XalMemFreeFunc callback once the memory is no longer
/// needed.
///
/// The size of the allocation to be made. This value will
/// never be zero.
/// An opaque identifier representing the internal category
/// of memory being allocated.
/// A pointer to an allocated block of memory of the specified size, or
/// a null pointer if allocation failed.
typedef _Ret_maybenull_ _Post_writable_byte_size_(size) void* XalMemAllocFunc(size_t size, uint32_t tag);
///
/// A callback invoked every time a previously allocated memory buffer is no
/// longer needed by the library and can be freed. This callback is optionally
/// installed by calling XalMemSetFunctions.
///
/// The callback is invoked whenever the library has finished using a memory
/// buffer previously returned by the app's corresponding XalMemAllocFunc such
/// that the application can free the memory buffer.
///
/// The pointer to the memory buffer previously allocated.
/// This value will never be a null pointer.
/// An opaque identifier representing the internal category
/// of memory being allocated.
///
typedef void XalMemFreeFunc(_In_ _Post_invalid_ void* pointer, uint32_t tag);
//-----------------------------------------------------------------------------
// Web view (ignored on OneCore platforms, optional on iOS and Android)
///
/// Show url event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// The url to navigate to.
/// The url that indicates the web flow is
/// complete.
/// Enum indicating the type of flow occurring. This
/// flag dictates what correct behavior for the client is expected to be.
///
/// The number of request headers present in
/// the requestHeaders array.
/// Request headers that must be added to the web
/// session request for the best user experience.
///
///
/// This event is raised when Xal needs to show a web flow to the user, the
/// client should navigate to startUrl and wait for a redirect to finalUrl. Once
/// the redirect to finalUrl occurs the client should close the web ui and invoke
/// XalPlatformWebShowUrlComplete passing the full redirect url.
///
/// This handler is optional for Android and iOS platforms. If it is not set on
/// these platforms, Xal will provide default browser behavior. On UWP, and XDK
/// platforms, this handler is ignored.
///
/// Depending on the value of showUrlType and the type of browser the client is
/// using, different behavior is expected. See the definition for
/// XalShowUrlType for more information.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformWebShowUrlEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* startUrl,
_In_z_ char const* finalUrl,
_In_ XalShowUrlType showUrlType,
_In_ uint32_t requestHeaderCount,
_In_reads_(requestHeaderCount) XalHttpHeader const* requestHeaders
);
//-----------------------------------------------------------------------------
// Storage (ignored on OneCore platforms, optional on iOS and Android)
///
/// Write to storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// Identifies the data being written.
/// The size (in bytes) of the data.
/// The data to write.
///
///
/// This event is raised when Xal needs to write data to storage, the client
/// should write the data and when done invoke XalPlatformStorageWriteComplete.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageWriteEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* key,
_In_ size_t dataSize,
_In_reads_bytes_(dataSize) void const* data
);
///
/// Read from storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// Identifies the data being read.
///
///
/// This event is raised when Xal needs to read data from storage, the client
/// should read the data and when done invoke XalPlatformStorageReadComplete.
/// If the key is not found, the client should complete with
/// XalPlatformOperationResult_Success and no data.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageReadEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* key
);
///
/// Clear from storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// Identifies the data being cleared.
///
///
/// This event is raised when Xal needs to clear data from storage, the client
/// should clear the data and when done invoke XalPlatformStorageClearComplete.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageClearEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* key
);
///
/// Struct encapsulating the storage event handlers.
///
///
/// All 3 handlers must be set at the same time.
///
typedef struct XalPlatformStorageEventHandlers2
{
///
/// Write to storage handler.
///
XalPlatformStorageWriteEventHandler2* write;
///
/// Read from storage handler.
///
XalPlatformStorageReadEventHandler2* read;
///
/// Clear from storage handler.
///
XalPlatformStorageClearEventHandler2* clear;
///
/// Optional pointer to data used by the event handlers.
///
void* context;
} XalPlatformStorageEventHandlers2;
//-----------------------------------------------------------------------------
// Remote Connect (only used in generic mode, when configured for it)
///
/// Show prompt for remote connect authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// The url to show in the prompt.
/// The code to show in the prompt.
/// Size of the qrCode buffer
/// A pointer to a buffer containing the QR code for the url as PNG.
///
///
/// This event is raised when Xal needs to prompt the user to perform the
/// remote connect authentication process.
/// The prompt ui should be displayed until
/// XalPlatformRemoteConnectClosePromptEventHandler is called or it is dismissed
/// by the user.
///
/// Game should still render the URL and code that it got back in case the user can’t scan
/// the QR code. The QR code will also not contain the code embedded into it.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectShowPromptEventHandler3)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* url,
_In_z_ char const* code,
_In_ size_t qrCodeSize,
_In_reads_bytes_(qrCodeSize) void const* qrCode
);
///
/// Close prompt for remote authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
///
///
/// This event is raised when the remote connect authentication process has been
/// completed and the prompt is no longer necessary.
/// This event will always be called with the same operation as a previous
/// XalPlatformRemoteConnectShowPromptEventHandler event.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectClosePromptEventHandler3)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation
);
///
/// Struct encapsulating the remote connect event handlers.
///
///
/// Both handlers must be set at the same time.
///
typedef struct XalPlatformRemoteConnectEventHandlers3
{
///
/// Show the prompt handler.
///
XalPlatformRemoteConnectShowPromptEventHandler3* show;
///
/// Close the prompt handler.
///
XalPlatformRemoteConnectClosePromptEventHandler3* close;
///
/// Optional pointer to data used by the event handlers.
///
void* context;
} XalPlatformRemoteConnectEventHandlers3;
//------------------------------------------------------------------------------
// Crypto (only used in generic mode)
///
/// Struct representing a UUID.
///
///
/// UUIDs should conform to RFC4122 (https://tools.ietf.org/html/rfc4122).
///
typedef struct XalUuid
{
///
/// Stores the time_low field.
///
uint32_t data1;
///
/// Stores the time_mid field.
///
uint16_t data2;
///
/// Stores the time_hi_and_version field.
///
uint16_t data3;
///
/// Stores the clock_seq_hi_and_reserved field [0], clock_seq_low field [1], and node fields [2-7].
///
uint8_t data4[8];
} XalUuid;
///
/// Generate UUID callback.
///
/// Optional pointer to data used by the callback.
///
/// The new UUID.
/// The results of the client operation.
///
/// This callback is invoked when Xal needs a new UUID.
///
/// This callback will be invoked on a thread Xal is running on.
///
typedef XalPlatformOperationResult (XalPlatformCryptoGenerateUuidCallback)(
_In_opt_ void* context,
_Out_ XalUuid* newUuid
);
///
/// Generate random bytes callback.
///
/// Optional pointer to data used by the callback.
///
/// The number of random bytes needed.
/// The buffer the random data should be written to.
///
/// The results of the client operation.
///
/// This callback is invoked when Xal needs random data, which should be
/// generated using the platform cryptographic RNG.
///
/// This callback will be invoked on a thread Xal is running on.
///
typedef XalPlatformOperationResult (XalPlatformCryptoGenerateRandomBytesCallback)(
_In_opt_ void* context,
_In_ size_t bufferSize,
_Out_writes_bytes_(bufferSize) uint8_t* buffer
);
///
/// Struct encapsulating the crypto callbacks.
///
///
/// Both callbacks must be set at the same time.
///
typedef struct XalPlatformCryptoCallbacks
{
///
/// The UUID callback to be invoked.
///
XalPlatformCryptoGenerateUuidCallback* uuid;
///
/// The random bytes callback to be invoked.
///
XalPlatformCryptoGenerateRandomBytesCallback* random;
///
/// Optional pointer to data used by the callback.
///
void* context;
} XalPlatformCryptoCallbacks;
//------------------------------------------------------------------------------
// Date & Time (only used in generic mode)
///
/// Generate Unix timestamp callback.
///
/// Optional pointer to data used by the callback.
///
/// Number of seconds from the Unix Epoch
/// (1970-01-01T00:00:00Z) in the UTC timezone.
/// The fraction of second, in
/// milliseconds.
/// The results of the client operation.
///
/// This callback is invoked when Xal needs a timestamp.
/// The subsecond value is optional and can be set to 0.
///
/// This callback will be invoked on a thread Xal is running on.
///
typedef XalPlatformOperationResult (XalPlatformDateTimeGetUtcTimestampCallback)(
_In_opt_ void* context,
_Out_ int64_t* secondsFromUnixEpoch,
_Out_ uint32_t* subsecondMilliseconds
);
///
/// Convert a Unix timestamp into date/time components.
///
/// Optional pointer to data used by the callback.
///
/// Number of seconds from the Unix Epoch
/// (1970-01-01T00:00:00Z) in the UTC timezone.
/// The resulting date/time components.
/// The results of the client operation.
///
/// This callback is invoked when Xal needs to convert a timestamp into a date,
/// the date produced should be in the UTC timezone.
///
/// This callback will be invoked on a thread Xal is running on.
///
typedef XalPlatformOperationResult (XalPlatformDateTimeTimestampToComponentsCallback)(
_In_opt_ void* context,
_In_ int64_t secondsFromUnixEpoch,
_Out_ XalTimestampComponents* components
);
///
/// Convert a date/time components into a Unix timestamp.
///
/// Optional pointer to data used by the callback.
///
/// The date/time components.
/// Number of seconds from the Unix Epoch
/// (1970-01-01T00:00:00Z) in the UTC timezone.
/// The results of the client operation.
///
/// This callback is invoked when Xal needs to convert a date into a timestamp,
/// the date is always in the UTC timezone.
///
/// This callback will be invoked on a thread Xal is running on.
///
typedef XalPlatformOperationResult(XalPlatformDateTimeComponentsToTimestampCallback)(
_In_opt_ void* context,
_In_ XalTimestampComponents const* components,
_Out_ int64_t* secondsFromUnixEpoch
);
///
/// Struct encapsulating the date/time callbacks.
///
///
/// All 3 callbacks must be set at the same time.
///
struct XalPlatformDateTimeCallbacks
{
///
/// The get utc timestamp callback to be invoked.
///
XalPlatformDateTimeGetUtcTimestampCallback* timestamp;
///
/// The timestamp to components callback to be invoked.
///
XalPlatformDateTimeTimestampToComponentsCallback* timestampToComponents;
///
/// The components to timestamp callback to be invoked.
///
XalPlatformDateTimeComponentsToTimestampCallback* componentsToTimestamp;
///
/// Optional pointer to data used by the callback.
///
void* context;
};
//-----------------------------------------------------------------------------
// Spop Prompt (only used in generic mode, when configured for it)
///
/// Show prompt for SPOP operation event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// Modern gamertag
/// Modern gamertag suffix if there is one.
///
///
/// This event is raised when the user is already signed in on a different
/// device and therefore hits an SPOP veto. Xal needs to prompt the user to
/// decide whether they want to sign-out the other session and sign-in on the
/// current device. This will only occur as a response to a call to
/// XalAddUserWithUiAsync that resulted in an SPOP veto.
///
/// The modern gamertag suffix might be null for certain users.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformSpopPromptEventHandler)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* modernGamertag,
_In_opt_z_ char const* modernGamertagSuffix
);
///
/// Enum defining the results of a client operation.
///
typedef enum XalSpopOperationResult
{
///
/// User agreed to sign-out the existing session, and sign-in on the current device
///
XalSpopOperationResult_SignInHere = 0,
///
/// User selected a "switch account" option
///
XalSpopOperationResult_SwitchAccount = 1,
///
/// Canceled client operation.
///
XalSpopOperationResult_Canceled = 2,
///
/// Unrecoverable failure in client operation.
///
XalSpopOperationResult_Failure = 3,
} XalSpopOperationResult;
}
// Back compat handlers
#if XAL_ENABLE_BACK_COMPAT_SHIMS
//-----------------------------------------------------------------------------
// Web view (ignored on OneCore platforms, optional on iOS and Android)
///
/// Show url event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
/// The url to navigate to.
/// The url that indicates the web flow is
/// complete.
/// Enum indicating the type of flow occurring. This
/// flag dictates what correct behavior for the client is expected to be.
///
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformWebShowUrlEventHandler2.
///
/// This event is raised when Xal needs to show a web flow to the user, the
/// client should navigate to startUrl and wait for a redirect to finalUrl. Once
/// the redirect to finalUrl occurs the client should close the web ui and invoke
/// XalPlatformWebShowUrlComplete passing the full redirect url.
///
/// This handler is optional for Android and iOS platforms. If it is not set on
/// these platforms, Xal will provide default browser behavior. On UWP, and XDK
/// platforms, this handler is ignored.
///
/// Depending on the value of showUrlType and the type of browser the client is
/// using, different behavior is expected. See the definition for
/// XalShowUrlType for more information.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformWebShowUrlEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation,
_In_z_ char const* startUrl,
_In_z_ char const* finalUrl,
_In_ XalShowUrlType showUrlType
);
//-----------------------------------------------------------------------------
// Storage (ignored on OneCore platforms, optional on iOS and Android)
///
/// Write to storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
/// Identifies the data being written.
/// The size (in bytes) of the data.
/// The data to write.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformStorageWriteEventHandler2.
///
/// This event is raised when Xal needs to write data to storage, the client
/// should write the data and when done invoke XalPlatformStorageWriteComplete.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageWriteEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation,
_In_z_ char const* key,
_In_ size_t dataSize,
_In_reads_bytes_(dataSize) void const* data
);
///
/// Read from storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
/// Identifies the data being read.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformStorageReadEventHandler2.
///
/// This event is raised when Xal needs to read data from storage, the client
/// should read the data and when done invoke XalPlatformStorageReadComplete.
/// If the key is not found, the client should complete with
/// XalPlatformOperationResult_Success and no data.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageReadEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation,
_In_z_ char const* key
);
///
/// Clear from storage event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
/// Identifies the data being cleared.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformStorageClearEventHandler2.
///
/// This event is raised when Xal needs to clear data from storage, the client
/// should clear the data and when done invoke XalPlatformStorageClearComplete.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformStorageClearEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation,
_In_z_ char const* key
);
///
/// Struct encapsulating the storage event handlers.
///
///
/// This version of the api is deprecated, please switch to
/// XalPlatformStorageEventHandlers2.
///
/// All 3 handlers must be set at the same time.
///
typedef struct XalPlatformStorageEventHandlers
{
///
/// Write to storage handler.
///
XalPlatformStorageWriteEventHandler* write;
///
/// Read from storage handler.
///
XalPlatformStorageReadEventHandler* read;
///
/// Clear from storage handler.
///
XalPlatformStorageClearEventHandler* clear;
///
/// Optional pointer to data used by the event handlers.
///
void* context;
} XalPlatformStorageEventHandlers;
//-----------------------------------------------------------------------------
// Remote Connect (only used in generic mode, when configured for it)
///
/// Show prompt for remote connect authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
/// The url to show in the prompt.
/// The code to show in the prompt.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformRemoteConnectShowPromptEventHandler3.
///
/// This event is raised when Xal needs to prompt the user to perform the
/// remote connect authentication process.
/// The prompt ui should be displayed until
/// XalPlatformRemoteConnectClosePromptEventHandler is called or it is dismissed
/// by the user.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectShowPromptEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation,
_In_z_ char const* url,
_In_z_ char const* code
);
///
/// Close prompt for remote authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The user identifier that was passed to Xal when
/// the user was added.
/// The handle for this operation.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformRemoteConnectClosePromptEventHandler3.
///
/// This event is raised when the remote connect authentication process has been
/// completed and the prompt is no longer necessary.
/// This event will always be called with the same operation as a previous
/// XalPlatformRemoteConnectShowPromptEventHandler event.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectClosePromptEventHandler2)(
_In_opt_ void* context,
_In_ uint32_t userIdentifier,
_In_ XalPlatformOperation operation
);
///
/// Struct encapsulating the remote connect event handlers.
///
///
/// This version of the api is deprecated, please switch to
/// XalPlatformRemoteConnectEventHandlers3.
///
/// Both handlers must be set at the same time.
///
typedef struct XalPlatformRemoteConnectEventHandlers2
{
///
/// Show the prompt handler.
///
XalPlatformRemoteConnectShowPromptEventHandler2* show;
///
/// Close the prompt handler.
///
XalPlatformRemoteConnectClosePromptEventHandler2* close;
///
/// Optional pointer to data used by the event handlers.
///
void* context;
} XalPlatformRemoteConnectEventHandlers2;
///
/// Show prompt for remote connect authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
/// The url to show in the prompt.
/// The code to show in the prompt.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformRemoteConnectShowPromptEventHandler2.
///
/// This event is raised when Xal needs to prompt the user to perform the
/// remote connect authentication process.
/// The prompt ui should be displayed until
/// XalPlatformRemoteConnectClosePromptEventHandler is called or it is dismissed
/// by the user.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectShowPromptEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation,
_In_z_ char const* url,
_In_z_ char const* code
);
///
/// Close prompt for remote authentication event handler.
///
/// Optional pointer to data used by the event handler.
///
/// Always null.
/// The handle for this operation.
///
///
/// This version of the handler is deprecated, please switch to
/// XalPlatformRemoteConnectClosePromptEventHandler2.
///
/// This event is raised when the remote connect authentication process has been
/// completed and the prompt is no longer necessary.
/// This event will always be called with the same operation as a previous
/// XalPlatformRemoteConnectShowPromptEventHandler event.
///
/// All arguments are owned by the caller (except context).
///
typedef void (XalPlatformRemoteConnectClosePromptEventHandler)(
_In_opt_ void* context,
_In_opt_ void* userContext,
_In_ XalPlatformOperation operation
);
///
/// Struct encapsulating the remote connect event handlers.
///
///
/// This version of the api is deprecated, please switch to
/// XalPlatformRemoteConnectEventHandlers2.
///
/// Both handlers must be set at the same time.
///
typedef struct XalPlatformRemoteConnectEventHandlers
{
///
/// Show the prompt handler.
///
XalPlatformRemoteConnectShowPromptEventHandler* show;
///
/// Close the prompt handler.
///
XalPlatformRemoteConnectClosePromptEventHandler* close;
///
/// Optional pointer to data used by the event handlers.
///
void* context;
} XalPlatformRemoteConnectEventHandlers;
#endif
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_types.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
#if HC_PLATFORM_HEADER_OVERRIDE
#ifdef XAL_PLATFORM_TYPES_PATH
#include XAL_PLATFORM_TYPES_PATH
#else
#error Platform header override is enabled but XAL_PLATFORM_TYPES_PATH is undefined
#endif
#elif HC_PLATFORM == HC_PLATFORM_WIN32
#include
#elif HC_PLATFORM == HC_PLATFORM_UWP
#include
#elif HC_PLATFORM == HC_PLATFORM_XDK
#include
#elif HC_PLATFORM == HC_PLATFORM_GDK
#include
#elif HC_PLATFORM == HC_PLATFORM_ANDROID
#include
#elif HC_PLATFORM_IS_APPLE
#include
#elif HC_PLATFORM_IS_EXTERNAL
#include
#else
#error Xal does not recognize this platform, do you need to set HC_PLATFORM = HC_PLATFORM_GENERIC?
#endif
#ifndef XAL_OS_IMPL
#define XAL_OS_IMPL 0
#endif
#ifndef XAL_ENABLE_BACK_COMPAT_SHIMS
#define XAL_ENABLE_BACK_COMPAT_SHIMS 1
#endif
#ifndef XAL_OS_ERRORS
#define XAL_OS_ERRORS 0
#endif
#ifndef XAL_CUSTOM_ALLOCATOR
#define XAL_CUSTOM_ALLOCATOR 1
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Results
//------------------------------------------------------------------------------
#define E_XAL_NOTINITIALIZED MAKE_E_HC(0x5100L) // 0x89235100
#define E_XAL_ALREADYINITIALIZED MAKE_E_HC(0x5101L) // 0x89235101
#define E_XAL_USERSETNOTEMPTY MAKE_E_HC(0x5102L) // 0x89235102
#define E_XAL_USERSETFULL MAKE_E_HC(0x5103L) // 0x89235103
#define E_XAL_USERSIGNEDOUT MAKE_E_HC(0x5104L) // 0x89235104
#define E_XAL_DUPLICATEDUSER MAKE_E_HC(0x5105L) // 0x89235105
#define E_XAL_NETWORK MAKE_E_HC(0x5106L) // 0x89235106
#define E_XAL_CLIENTERROR MAKE_E_HC(0x5107L) // 0x89235107
#define E_XAL_UIREQUIRED MAKE_E_HC(0x5108L) // 0x89235108
#define E_XAL_HANDLERALREADYREGISTERED MAKE_E_HC(0x5109L) // 0x89235109
#define E_XAL_UNEXPECTEDUSERSIGNEDIN MAKE_E_HC(0x510AL) // 0x8923510A
#define E_XAL_NOTATTACHEDTOJVM MAKE_E_HC(0x510BL) // 0x8923510B
#define E_XAL_DEVICEUSER MAKE_E_HC(0x510CL) // 0x8923510C
#define E_XAL_DEFERRALNOTAVAILABLE MAKE_E_HC(0x510DL) // 0x8923510D
#define E_XAL_MISSINGPLATFORMEVENTHANDLER MAKE_E_HC(0x510EL) // 0x8923510E
#define E_XAL_USERNOTFOUND MAKE_E_HC(0x510FL) // 0x8923510F
#define E_XAL_NOTOKENREQUIRED MAKE_E_HC(0x5110L) // 0x89235110
#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
#define E_XAL_INVALIDAPPCONFIGURATION MAKE_E_HC(0x5115L) // 0x89235115
#define E_XAL_MALFORMEDCLIENTID MAKE_E_HC(0x5116L) // 0x89235116
#define E_XAL_MISSINGCLIENTID MAKE_E_HC(0x5117L) // 0x89235117
#define E_XAL_MISSINGTITLEID MAKE_E_HC(0x5118L) // 0x89235118
#define E_XAL_CONTENT_ISOLATION MAKE_E_HC(0x5119L) // 0x89235119
#define E_XAL_SANDBOX_NOT_ALLOWED MAKE_E_HC(0x511AL) // 0x8923511A
#define E_XAL_GAMEWINDOWNOTFOREGROUND MAKE_E_HC(0x511BL) // 0x8923511B
#define E_XAL_UNLISTEDCONSENT MAKE_E_HC(0x511CL) // 0x8923511C
#define E_XAL_CONSENTNOTAPPLICABLE MAKE_E_HC(0x511DL) // 0x8923511D
#define E_XAL_NO_SIGNED_IN_USER_FOUND MAKE_E_HC(0x511EL) // 0x8923511E
// E_XAL_INTERNAL_* values should never be returned to callers of XAL.
#define E_XAL_INTERNAL_SWITCHUSER MAKE_E_HC(0x5171L) // 0x89235171
#define E_XAL_INTERNAL_NOUSERFOUND MAKE_E_HC(0x5172L) // 0x89235172
#define E_XAL_INTERNAL_TOOMANYCACHEDUSERS MAKE_E_HC(0x5173L) // 0x89235173
#define E_XAL_INTERNAL_BADUSERTOKEN MAKE_E_HC(0x5174L) // 0x89235174
#define E_XAL_INTERNAL_BADDEVICEIDENTITY MAKE_E_HC(0x5175L) // 0x89235175
#define E_XAL_INTERNAL_UNAUTHORIZED MAKE_E_HC(0x5176L) // 0x89235176
#define E_XAL_INTERNAL_NODISPLAYCLAIMSFOUND MAKE_E_HC(0x5177L) // 0x89235177
// GDK has system definitions for some error values
#if XAL_OS_ERRORS
#undef E_XAL_USERSETFULL
#undef E_XAL_USERSIGNEDOUT
#undef E_XAL_UIREQUIRED
#undef E_XAL_DEFERRALNOTAVAILABLE
#undef E_XAL_USERNOTFOUND
#undef E_XAL_NOTOKENREQUIRED
#undef E_XAL_NODEFAULTUSER
#undef E_XAL_FAILEDTORESOLVE
#undef E_XAL_MISMATCHEDTITLEANDCLIENTIDS
#undef E_XAL_INVALIDAPPCONFIGURATION
#undef E_XAL_MALFORMEDCLIENTID
#undef E_XAL_MISSINGCLIENTID
#undef E_XAL_MISSINGTITLEID
#undef E_XAL_CONTENT_ISOLATION
#undef E_XAL_SANDBOX_NOT_ALLOWED
#undef E_XAL_GAMEWINDOWNOTFOREGROUND
#define E_XAL_USERSETFULL E_GAMEUSER_MAX_USERS_ADDED // 0x89245100
#define E_XAL_USERSIGNEDOUT E_GAMEUSER_SIGNED_OUT // 0x89245101
#define E_XAL_UIREQUIRED E_GAMEUSER_RESOLVE_USER_ISSUE_REQUIRED // 0x89245102
#define E_XAL_DEFERRALNOTAVAILABLE E_GAMEUSER_DEFERRAL_NOT_AVAILABLE // 0x89245103
#define E_XAL_USERNOTFOUND E_GAMEUSER_USER_NOT_FOUND // 0x89245104
#define E_XAL_NOTOKENREQUIRED E_GAMEUSER_NO_TOKEN_REQUIRED // 0x89245105
#define E_XAL_NODEFAULTUSER E_GAMEUSER_NO_DEFAULT_USER // 0x89245106
#define E_XAL_FAILEDTORESOLVE E_GAMEUSER_FAILED_TO_RESOLVE // 0x89245107
#define E_XAL_MISSINGTITLEID E_GAMEUSER_NO_TITLE_ID // 0x89245108
#define E_XAL_INVALIDAPPCONFIGURATION E_GAMEUSER_INVALID_APP_CONFIGURATION // 0x89245112
#define E_XAL_MALFORMEDCLIENTID E_GAMEUSER_MALFORMED_MSAAPPID // 0x89245113
#define E_XAL_MISMATCHEDTITLEANDCLIENTIDS E_GAMEUSER_INCONSISTENT_MSAAPPID_AND_TITLEID // 0x89245114
#define E_XAL_MISSINGCLIENTID E_GAMEUSER_NO_MSAAPPID // 0x89245115
#define E_XAL_CONTENT_ISOLATION XO_E_CONTENT_ISOLATION // 0x8015DC12
#define E_XAL_SANDBOX_NOT_ALLOWED XO_E_SANDBOX_NOT_ALLOWED // 0x8015DC19
#define E_XAL_GAMEWINDOWNOTFOREGROUND E_GAMERUNTIME_WINDOW_NOT_FOREGROUND // 0x89240103
#endif
//------------------------------------------------------------------------------
// Xal init flags
//------------------------------------------------------------------------------
///
/// Flag to instruct Xal to use MPOP behavior when adding users. MPOP behavior
/// allows Xal to rely on cached Xtokens when adding users so refreshing is not
/// required. This lowers the time it takes for add user calls to finish
/// because less network traffic is needed, but it implies that SPOP vetoes
/// will not be checked prior to returning a user.
///
///
/// This flag is supported on Win32, Android, iOS, Mac, and generic device types.
///
uint32_t const XAL_INIT_OPTION_USE_MPOP_BEHAVIOR = 1u << 2;
///
/// Flag to instruct Xal to use the modern Gamertag features during sign up.
///
///
/// This flag is supported on Win32, UWP, Android, iOS, Mac, and generic device types.
///
uint32_t const XAL_INIT_OPTION_REQUEST_MODERN_GAMERTAG_FLOW = 1u << 26;
//------------------------------------------------------------------------------
// Privileges
//------------------------------------------------------------------------------
///
/// Enum defining the values for Xbox Live privileges
///
typedef enum XalPrivilege
{
/// The user can play with people outside of Xbox Live
XalPrivilege_CrossPlay = 185,
/// Create/join/participate in Clubs
XalPrivilege_Clubs = 188,
/// Create/join non interactive multiplayer sessions
XalPrivilege_Sessions = 189,
/// Broadcast live gameplay
XalPrivilege_BroadCast = 190,
/// Change settings to show real name
XalPrivilege_ManageProfilePrivacy = 196,
/// Upload GameDVR
XalPrivilege_GameDvr = 198,
/// Join parties
XalPrivilege_MultiplayerParties = 203,
/// Use Voice Chat in game or in parties
XalPrivilege_CommsInGameVoice = 205,
/// Allocate cloud compute resources for their session
XalPrivilege_CloudManageSession = 207,
/// Join cloud compute sessions
XalPrivilege_CloudJoinSession = 208,
/// Save games on the cloud
XalPrivilege_CloudSavedGames = 209,
/// Share progress to social networks
XalPrivilege_SocialNetworkSharing = 220,
/// Access user generated content in game
XalPrivilege_Ugc = 247,
/// Use real time voice and text communication with users in their friends list
XalPrivilege_CommsFriendsOnly = 251,
/// Use real time voice and text communication with all users
XalPrivilege_Comms = 252,
/// Join multiplayer sessions
XalPrivilege_Multiplayer = 254,
/// Add friends / people to follow
XalPrivilege_AddFriends = 255,
} XalPrivilege;
//------------------------------------------------------------------------------
// User api types
//------------------------------------------------------------------------------
///
/// Handle to a user object. All operations on a user object are threadsafe.
///
///
/// User objects returned by Xal as out parameters already have had their
/// reference count incremented, so XalUserRelease should be called when the
/// caller is done with them.
/// User objects passed as arguments to callbacks did not have their reference
/// count incremented, the callback should call XalUserDuplicateHandle if they
/// wish to hold onto the object (and XalUserCloseHandle when they are done).
///
#if !XAL_OS_IMPL
typedef struct XalUser* XalUserHandle;
#else
// XalUserHandle is defined in the platform specific header.
// That header is included at the top of this file
#endif
///
/// Struct holding local user ID data.
///
#if !XAL_OS_IMPL
typedef struct XalUserLocalId
{
/// The local user ID
uint64_t value;
} XalUserLocalId;
#else
// XalUserLocalId is defined in the platform specific header.
// That header is included at the top of this file
#endif
///
/// Enum defining the possible states for a user object.
///
typedef enum XalUserState
{
/// XAL signed in state
XalUserState_SignedIn = 0,
/// XAL signing out state
XalUserState_SigningOut = 1,
/// XAL signed out state
XalUserState_SignedOut = 2,
} XalUserState;
///
/// Enum defining the possible gamer picture sizes.
///
typedef enum XalGamerPictureSize
{
/// 64x64
XalGamerPictureSize_Small = 0,
/// 208x208
XalGamerPictureSize_Medium = 1,
/// 424x424
XalGamerPictureSize_Large = 2,
/// 1080x1080
XalGamerPictureSize_ExtraLarge = 3,
} XalGamerPictureSize;
///
/// Enum defining the possible consent states.
///
///
/// The different states provide additional information for the client to adapt
/// the UX, but only Opted In can be used as a positive signal, the rest should
/// all be treated as Opted Out.
///
typedef enum XalConsentState
{
/// Unkown consent state due to query failure
/// Should treat as Opted Out
XalConsentState_QueryFailure = 0,
/// Model does not exist or does not apply for user
/// Should treat as Opted Out
XalConsentState_NotApplicable = 1,
/// User has been opted out
XalConsentState_OptedOut = 2,
/// User has been opted in
XalConsentState_OptedIn = 3,
} XalConsentState;
///
/// Enum defining the various gamertag components.
///
typedef enum XalGamertagComponent
{
/// The classic gamertag
XalGamertagComponent_Classic = 0,
/// The modern gamertag without the suffix
XalGamertagComponent_Modern = 1,
/// The modern gamertag suffix if the user has one (otherwise empty)
XalGamertagComponent_ModernSuffix = 2,
/// The combined modern gamertag with the suffix (if the suffix exists)
XalGamertagComponent_UniqueModern = 3,
} XalGamertagComponent;
///
/// Enum defining the various age groups.
///
typedef enum XalAgeGroup
{
/// Unknown age group
XalAgeGroup_Unknown = 0,
/// Child age group
XalAgeGroup_Child = 1,
/// Teen age group
XalAgeGroup_Teen = 2,
/// Adult age group
XalAgeGroup_Adult = 3,
} XalAgeGroup;
///
/// Enum defining the various reasons for a privilege being denied.
///
typedef enum XalPrivilegeCheckDenyReasons
{
/// None
XalPrivilegeCheckDenyReasons_None = 0,
/// Purchase required
XalPrivilegeCheckDenyReasons_PurchaseRequired = 1,
/// Restricted
XalPrivilegeCheckDenyReasons_Restricted = 2,
/// Banned
XalPrivilegeCheckDenyReasons_Banned = 3,
/// Unknown
XalPrivilegeCheckDenyReasons_Unknown = 0xFFFFFFFF
} XalPrivilegeCheckDenyReasons;
//-----------------------------------------------------------------------------
// Get token and signature
///
/// Struct that represents an HTTP header.
///
typedef struct XalHttpHeader
{
/// HTTP header name
_Field_z_ char const* name;
/// HTTP header value
_Field_z_ char const* value;
} XalHttpHeader;
///
/// Struct that encapsulates the arguments for
/// XalUserGetTokenAndSignatureSilentlyAsync.
///
///
/// Xal will copy the data before XalUserGetTokenAndSignatureSilentlyAsync
/// returns.
///
typedef struct XalUserGetTokenAndSignatureArgs
{
///
/// The method for the request
///
_Field_z_ char const* method;
///
/// The url to get the token and to signature for (fully escaped).
///
_Field_z_ char const* url;
///
/// The number of headers that will be added to the HTTP request.
///
uint32_t headerCount;
///
/// The array of headers that will be added to the HTTP request.
///
_Field_size_(headerCount) XalHttpHeader const* headers;
///
/// The size of the request body in bytes.
///
size_t bodySize;
///
/// The request body.
///
_Field_size_bytes_(bodySize) uint8_t const* body;
///
/// Ignore cached tokens.
///
///
/// This flag should only be set if an http request using a token and
/// signature failed with a 401 error. In that case the entire call should
/// be retried after getting a new token and signature using this flag.
///
bool forceRefresh;
///
/// Get a token for all users.
///
bool allUsers;
///
/// Get a token with or without TitleIdentity.
///
bool ignoreTitleIdentity;
} XalUserGetTokenAndSignatureArgs;
///
/// Struct that encapsulates the results for
/// XalUserGetTokenAndSignatureSilentlyAsync.
///
typedef struct XalUserGetTokenAndSignatureData
{
///
/// The size of the Token string in bytes including the null terminator.
///
size_t tokenSize;
///
/// The size of the Signature string in bytes including the null terminator.
///
size_t signatureSize;
///
/// The token for the request, if necessary, as a null terminated string.
///
_Field_size_opt_(tokenSize) _Null_terminated_ char const* token;
///
/// The signature for the request, if necessary, as a null terminated
/// string.
///
_Field_size_opt_(signatureSize) _Null_terminated_ char const* signature;
} XalUserGetTokenAndSignatureData;
//-----------------------------------------------------------------------------
// Events
///
/// Enum describing the possible types of changes to a user's details.
///
#if !XAL_OS_IMPL
typedef enum XalUserChangeType
{
/// Changed to signed in
XalUserChange_SignedInAgain = 0,
/// Changed to signing out
XalUserChange_SigningOut = 1,
/// Changed to signed out
XalUserChange_SignedOut = 2,
/// Changed gamertag
XalUserChange_Gamertag = 3,
/// Changed gamer picture
XalUserChange_GamerPicture = 4,
/// Changed privileges
XalUserChange_Privileges = 5,
} XalUserChangeType;
#else
// XalUserChangeType is defined in the platform specific header.
// That header is included at the top of this file
#endif
///
/// A token returned when registering a callback to identify the registration. This token
/// is later used to unregister the callback.
///
struct XalRegistrationToken
{
/// The registration token
uint64_t token;
};
///
/// Handle to a deferral object.
///
#if !XAL_OS_IMPL
typedef struct XalSignoutDeferral* XalSignoutDeferralHandle;
#else
// XalSignoutDeferralHandle is defined in the platform specific header.
// That header is included at the top of this file
#endif
//------------------------------------------------------------------------------
// Date & time
///
/// This struct represents a date.
///
///
/// The date is always in the Gregorian calendar and in the UTC timezone.
///
typedef struct XalTimestampComponents
{
///
/// The year.
///
uint16_t year;
///
/// The month [1, 12].
///
uint8_t month;
///
/// The day of the month [1, 31].
///
uint8_t day;
///
/// The hour in the day [0, 24).
///
uint8_t hour;
///
/// The minute in the hour [0, 60).
///
uint8_t minute;
///
/// The second in the minute [0, 60).
///
uint8_t second;
} XalTimestampComponents;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_user.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
extern "C"
{
//-----------------------------------------------------------------------------
// User Api
//-----------------------------------------------------------------------------
///
/// Increments the reference count on the user object.
///
/// The user handle.
/// The new user handle.
/// Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.
STDAPI XalUserDuplicateHandle(
_In_ XalUserHandle user,
_Out_ XalUserHandle* duplicatedUser
) noexcept;
///
/// Decrements the reference count on the user object.
///
/// The user object
///
STDAPI_(void) XalUserCloseHandle(
_In_ XalUserHandle user
) noexcept;
///
/// Compares 2 user handler.
///
/// The first user.
/// The second user.
///
/// 0 if the two handles refer to the same xbox live identity, -1 if user1
/// identity is "less" than user2, 1 if user1 identity "greater" than user2.
///
///
/// User identity ordering is arbitrary, but sutiable for sorting.
///
STDAPI_(int32_t) XalCompareUsers(
_In_ XalUserHandle user1,
_In_ XalUserHandle user2
) noexcept;
//-----------------------------------------------------------------------------
// User properties
///
/// Returns the Xbox Live User ID (XUID) of the user.
///
/// The user object.
/// The Xbox Live User ID (XUID) of the user.
/// Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.
STDAPI XalUserGetId( // TODO any valid error scenarios? local users, consent
_In_ XalUserHandle user,
_Out_ uint64_t* id
) noexcept;
///
/// Gets the local id of the user.
///
/// The user object.
/// The local id of the user.
/// Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.
STDAPI XalUserGetLocalId(
_In_ XalUserHandle user,
_Out_ XalUserLocalId* localId
) noexcept;
///
/// Returns a boolean indicating if the user is the device user.
///
/// The user object.
///
STDAPI_(bool) XalUserIsDevice(
_In_ XalUserHandle user
) noexcept;
///
/// Returns a boolean indicating if the user is a guest.
///
/// The user object.
///
STDAPI_(bool) XalUserIsGuest(
_In_ XalUserHandle user
) noexcept;
///
/// Returns the sign-in state of the user.
///
/// The user object.
/// The sign-in state of the user
/// .
/// Result code for this API operation.
STDAPI XalUserGetState(
_In_ XalUserHandle user,
_Out_ XalUserState* state
) noexcept;
///
/// Returns the size of the buffer needed to store the gamertag string.
///
/// The user object.
/// The component of the gamertag to get the size of.
/// The size of the buffer needed to store the gamertag string
///
/// If XalGamertagComponent_Modern or XalGamertagComponent_UniqueModern are
/// specified but not available on the platform, this function will execute for
/// XalGamertagComponent_Classic instead. XalGamertagComponent_Suffix will be
/// empty if the modern components are unavailable.
///
STDAPI_(size_t) XalUserGetGamertagSize(
_In_ XalUserHandle user,
_In_ XalGamertagComponent component
) noexcept;
///
/// Returns the gamertag of the user.
///
/// The user object.
/// The component of the gamertag to get.
/// The size in bytes of the gamertag buffer.
/// Should be the value returned by XalUserGetGamertagSize.
/// The buffer the gamertag will be written to.
/// The number of bytes used in the buffer including
/// the null terminator.
/// Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.
///
/// If XalGamertagComponent_Modern or XalGamertagComponent_UniqueModern are
/// specified but not available on the platform, this function will execute for
/// XalGamertagComponent_Classic instead. XalGamertagComponent_Suffix will be
/// empty if the modern components are unavailable.
///
STDAPI XalUserGetGamertag(
_In_ XalUserHandle user,
_In_ XalGamertagComponent component,
_In_ size_t gamertagSize,
_Out_writes_(gamertagSize) char* gamertag,
_Out_opt_ size_t* gamertagUsed
) noexcept;
///
/// Gets the gamer picture for the user as a png in memory buffer.
///
/// The user object.
/// The size wanted.
/// The AsyncBlock for this operation.
/// Result code for this API operation. Possible values are S_OK or E_FAIL.
STDAPI XalUserGetGamerPictureAsync(
_In_ XalUserHandle user,
_In_ XalGamerPictureSize pictureSize,
_In_ XAsyncBlock* async
) noexcept;
///
/// Gets the size in bytes of gamer picture buffer.
///
/// The AsyncBlock for this operation.
/// The size in bytes for the result buffer.
/// Result code for this API operation.
STDAPI XalUserGetGamerPictureResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept;
///
/// Gets the results of a successful XalUserGetGamerPictureAsync operation.
///
/// The AsyncBlock for this operation.
/// The size of the gamer picture buffer.
/// The gamer picture png data.
/// Result code for this API operation.
STDAPI XalUserGetGamerPictureResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_(bufferSize) void* buffer
) noexcept;
///
/// Returns the age group of the user.
///
/// The user object.
/// The age group.
/// Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.
STDAPI XalUserGetAgeGroup(
_In_ XalUserHandle user,
_Out_ XalAgeGroup* ageGroup
) noexcept;
///
/// Checks if the user has the given privilege.
///
/// The user object.
/// The privilege to check.
/// true if the user has the privilege, false
/// otherwise.
/// Bitmask of the various reasons why the user could be
/// denied a privilege. If the user has the privilege it will always be
/// XAL_PRIVILEGE_CHECK_DENY_REASON_NONE.
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
STDAPI XalUserCheckPrivilege(
_In_ XalUserHandle user,
_In_ XalPrivilege privilege,
_Out_ bool* hasPrivilege,
_Out_opt_ XalPrivilegeCheckDenyReasons* reasons
) noexcept;
///
/// Checks if the current platform supports resolving missing privileges.
///
///
STDAPI_(bool) XalUserResolvePrivilegeWithUiIsPresent() noexcept;
///
/// Shows ui explaining why the user is missing the given privilege and
/// allows acquiring it.
///
/// The user object.
/// The privilege to check.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalUserResolveUserPrivilegeWithUiAsync(
_In_ XalUserHandle user,
_In_ XalPrivilege privilege,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a given XalUserResolveUserPrivilegeWithUiAsync operation.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalUserResolveUserPrivilegeWithUiResult(
_In_ XAsyncBlock* async
) noexcept;
//-----------------------------------------------------------------------------
// Get token and signature
///
/// Gets the appropriate token and signature for an HTTP request.
///
/// The user the token and signature are for.
/// The HTTP request details.
/// The AsyncBlock for this operation.
/// .
/// Result code for this API operation.
STDAPI XalUserGetTokenAndSignatureSilentlyAsync(
_In_ XalUserHandle user,
_In_ XalUserGetTokenAndSignatureArgs const* args,
_In_ XAsyncBlock* async
) noexcept;
///
/// Gets the size in bytes of the token and signature buffers.
///
/// The AsyncBlock for this operation.
/// The size in bytes for the result buffer.
/// Result code for this API operation.
STDAPI XalUserGetTokenAndSignatureSilentlyResultSize(
_In_ XAsyncBlock* async,
_Out_ size_t* bufferSize
) noexcept;
///
/// Gets the results of a successful XalUserGetTokenAndSignatureSilentlyAsync operation.
///
/// The AsyncBlock for this operation.
/// The size of the buffer for the result object.
/// Byte buffer used for result value and its fields.
/// Pointer to the result object.
/// The number of bytes in the provided buffer that were used.
/// Result code for this API operation.
///
/// result is a pointer within buffer and does not need to be freed separately.
///
STDAPI XalUserGetTokenAndSignatureSilentlyResult(
_In_ XAsyncBlock* async,
_In_ size_t bufferSize,
_Out_writes_bytes_to_(bufferSize, *bufferUsed) void* buffer,
_Outptr_ XalUserGetTokenAndSignatureData** result,
_Out_opt_ size_t* bufferUsed
) noexcept;
///
/// This function will show the ui required to resolve certain errors in
/// XalUserGetTokenAndSignatureSilentlyAsync.
///
/// The user the token and signature are for.
/// The url of the request that failed.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
///
/// This function should only be called after a call to
/// XalUserGetTokenAndSignatureSilentlyAsync fails with E_XAL_UIREQUIRED.
///
STDAPI XalUserResolveIssueWithUiAsync(
_In_ XalUserHandle user,
_In_opt_z_ char const* url,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a given XalUserResolveIssueWithUiAsync operation.
///
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalUserResolveIssueWithUiResult(
_In_ XAsyncBlock* async
) noexcept;
//-----------------------------------------------------------------------------
// UCS consent
///
/// Checks the state of the given UCS consent for the user.
///
/// The user object.
/// The UCS consent model name.
/// The state of the consent.
/// Result code for this API operation.
STDAPI XalUserCheckUcsConsent(
_In_ XalUserHandle user,
_In_z_ char const* consentModelName,
_Out_ XalConsentState* consentState
) noexcept;
///
/// Shows ui explaining why the user is missing the given privilege and
/// allows acquiring it.
///
/// The user object.
/// The UCS consent model name.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalUserManageUcsConsentWithUiAsync(
_In_ XalUserHandle user,
_In_z_ char const* consentModelName,
_In_ XAsyncBlock* async
) noexcept;
///
/// Get the result of a given XalUserManageUcsConsentWithUiAsync operation.
///
/// The AsyncBlock for this operation.
/// The state of the consent.
/// Result code for this API operation.
STDAPI XalUserManageUcsConsentWithUiResult(
_In_ XAsyncBlock* async,
_Out_ XalConsentState* consentState
) noexcept;
//-----------------------------------------------------------------------------
// Events
///
/// User detail change event handler.
///
/// Optional pointer to data used by the event handler.
///
/// The local id of the user that changed.
/// The type of change.
///
#if !XAL_OS_IMPL
typedef void (XalUserChangeEventHandler)(
_In_opt_ void* context,
_In_ XalUserLocalId userId,
_In_ XalUserChangeType change
);
#else
// XalUserChangeEventHandler is defined in the platform specific header.
// That header is included in xal_types.h
#endif
///
/// Register the event handler for user detail changes.
///
/// The async queue the callback should be invoked on.
/// Optional pointer to data used by the event handler.
/// The event handler, .
/// The token for unregistering this callback
/// Result code for this API operation. Possible values are S_OK, E_XAL_NOTINITIALIZED, or E_FAIL.
STDAPI XalUserRegisterChangeEventHandler(
_In_opt_ XTaskQueueHandle queue,
_In_opt_ void* context,
_In_ XalUserChangeEventHandler* handler,
_Out_ XalRegistrationToken* token
) noexcept;
///
/// Unregisters a previously registered callback.
///
/// The token returned from
/// XalUserRegisterChangeEventHandler.
///
STDAPI_(void) XalUserUnregisterChangeEventHandler(
_In_ XalRegistrationToken token
) noexcept;
///
/// Get a signout deferral.
///
/// The deferral handle.
/// Result code for this API operation.
///
/// May only be called from within a XalUserChangeEventHandler during a
/// XalUserChange_SigningOut event. The signout process will be halted until
/// the deferral handle is closed (or a timeout is reached).
///
/// May fail with E_XAL_DEFERRALNOTAVAILABLE.
///
STDAPI XalUserGetSignoutDeferral(
_Out_ XalSignoutDeferralHandle* deferral
) noexcept;
///
/// Closes a signout deferral.
///
/// The deferral handle.
///
STDAPI_(void) XalUserCloseSignoutDeferral(
_In_ XalSignoutDeferralHandle deferral
) noexcept;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_uwp.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Uwp types
//------------------------------------------------------------------------------
///
/// Struct that encapsulates the Uwp specific arguments for Xal.
///
typedef struct XalUwpArgs
{
///
/// Xbox Live title id.
///
uint32_t titleId;
///
/// The package family name.
///
_Field_z_ char const* packageFamilyName;
///
/// A correlation vector string for XAL to use as a base. XAL will extend
/// this prior to using it. This argument is optional.
///
_Field_z_ char const* correlationVector;
///
/// Xal configuration flags.
///
uint32_t flags;
///
/// The user that launched the application, as provided by Application::OnLaunched()
///
///
/// If left null, Xal will bring up the User Picker on Xbox when signing in with UI.
/// This field has no effect on the PC sign in flow.
///
Windows::System::User^ launchUser;
///
/// The hwnd of the window that launched the sign in request
///
///
/// If a centennial build, this is required for identifying the main window that
/// launched a sign in request. Otherwise this is unused.
///
HWND mainWindow;
///
/// Optional Cobrand ID for MSA
///
_Field_z_ char const* cobrandId;
} XalUwpArgs;
typedef XalUwpArgs XalInitArgs;
#define XAL_PLATFORM "UWP"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_uwp_user.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
#include
#include
extern "C"
{
//------------------------------------------------------------------------------
// Uwp user functions
//------------------------------------------------------------------------------
STDAPI XalUserGetPlatformWebAccount(
_In_ XalUserHandle user,
_Out_ Windows::Security::Credentials::WebAccount^* webAccount
) noexcept;
///
/// Adds the given system user.
///
/// The system user.
/// The AsyncBlock for this operation.
/// Result code for this API operation.
STDAPI XalAddUwpSystemUserSilentAsync(
_In_ Windows::System::User^ user,
_In_ XAsyncBlock* async
) noexcept;
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_version.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//-----------------------------------------------------------------------------
// Version
//-----------------------------------------------------------------------------
///
/// The macro definition of the current library version. It is a '.' delimited
/// string where the fields have the following meanings. They are in order from
/// left to right:
/// YYYY Release year
/// MM Release month
/// YYYYMMDD Date string describing the date the build was created
/// rrr QFE number (000 indicates base release)
///
#define XAL_VERSION "2025.07.20250718.000"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_win32.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Win32 types
//------------------------------------------------------------------------------
///
/// Struct that encapsulates the Win32 specific arguments for Xal.
///
typedef struct XalWin32Args
{
///
/// MSA client id.
///
_Field_z_ char const* clientId;
///
/// Xbox Live title id.
///
uint32_t titleId;
///
/// Xbox Live sandbox.
///
///
/// If Xal detects a sandbox key in the registry it will use that value and
/// ignore the value passed in here.
///
_Field_z_ char const* sandbox;
///
/// A bool indicating whether Xal can send diagnostic telemetry.
/// Setting this to true indicates to Xal that it does not have user consent
/// to report data about any crashes or errors it encounters during use.
/// If this variable is set to false, Xal assumes it can report this data.
///
bool disableDiagnosticTelemetry;
///
/// A correlation vector string for XAL to use as a base. XAL will extend
/// this prior to using it. This argument is optional.
///
_Field_z_ char const* correlationVector;
///
/// Xal configuration flags.
///
uint32_t flags;
///
/// The number of consents present in the ThirdPartyConsents array.
///
uint32_t thirdPartyConsentCount;
///
/// An optional list of consent requests to access Xbox Live services.
///
_Field_size_(thirdPartyConsentCount) char const** thirdPartyConsents;
///
/// Win32 optional custom redirect URI.
///
_Field_z_ char const* redirectUri;
///
/// The number of consents present in the ucsConsents array
///
uint32_t ucsConsentCount;
///
/// An optional list of consent requests to UCS
///
_Field_size_(ucsConsentCount) char const** ucsConsents;
} XalWin32Args;
typedef XalWin32Args XalInitArgs;
#define XAL_PLATFORM "Win32"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_xdk.h
================================================
#pragma once
#if !defined(__cplusplus)
#error C++11 required
#endif
extern "C"
{
//------------------------------------------------------------------------------
// Xdk types
//------------------------------------------------------------------------------
///
/// Struct that encapsulates the Xdk specific arguments for Xal.
///
typedef struct XalXdkArgs {} XalXdkArgs;
typedef XalXdkArgs XalInitArgs;
#define XAL_PLATFORM "XDK"
}
================================================
FILE: External/Xal/Source/Xal/Include/Xal/xal_xdk_ext.h
================================================
#pragma once
extern "C"
{
///
/// Returns the system user associated with the user handle.
///
/// The user handle.
/// The associated system user.
STDAPI XalUserToXboxSystemUser(
_In_ XalUserHandle user,
_Out_ Windows::Xbox::System::IUser^* systemUser
) noexcept;
///
/// Add the given system user as a Xal user.
///
/// The system user.
/// The new user handle.
STDAPI XalAddXboxSystemUser(
_In_ Windows::Xbox::System::IUser^ systemUser,
_Out_ XalUserHandle* user
) noexcept;
}
================================================
FILE: Include/cpprestinclude/cpprest/astreambuf.h
================================================
#if !XSAPI_NO_PPL
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( push )
#pragma warning( disable : 26444 ) // ignore various unnamed objects
#endif
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Asynchronous I/O: stream buffer. This is an extension to the PPL concurrency features and therefore
* lives in the Concurrency namespace.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include "cpprest/asyncrt_utils.h"
#include "cpprest/details/basic_types.h"
#include "pplx/pplxtasks.h"
#include
#include
#include
#include
#include
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) && !CPPREST_FORCE_PPLX
namespace Concurrency // since namespace pplx = Concurrency
#else
namespace pplx
#endif
{
namespace details
{
template
pplx::task _do_while(F func)
{
pplx::task first = func();
return first.then([=](bool guard) -> pplx::task {
if (guard)
return pplx::details::_do_while(func);
else
return first;
});
}
} // namespace details
}
namespace Concurrency
{
/// Library for asynchronous streams.
namespace streams
{
///
/// Extending the standard char_traits type with one that adds values and types
/// that are unique to "C++ REST SDK" streams.
///
///
/// The data type of the basic element of the stream.
///
template
struct char_traits : std::char_traits<_CharType>
{
///
/// Some synchronous functions will return this value if the operation
/// requires an asynchronous call in a given situation.
///
/// An int_type value which implies that an asynchronous call is required.
static typename std::char_traits<_CharType>::int_type requires_async()
{
return std::char_traits<_CharType>::eof() - 1;
}
};
#if !defined(_WIN32)
template<>
struct char_traits : private std::char_traits
{
public:
typedef unsigned char char_type;
using std::char_traits::eof;
using std::char_traits::int_type;
using std::char_traits::off_type;
using std::char_traits::pos_type;
static size_t length(const unsigned char* str)
{
return std::char_traits::length(reinterpret_cast(str));
}
static void assign(unsigned char& left, const unsigned char& right) { left = right; }
static unsigned char* assign(unsigned char* left, size_t n, unsigned char value)
{
return reinterpret_cast(
std::char_traits::assign(reinterpret_cast(left), n, static_cast(value)));
}
static unsigned char* copy(unsigned char* left, const unsigned char* right, size_t n)
{
return reinterpret_cast(
std::char_traits::copy(reinterpret_cast(left), reinterpret_cast(right), n));
}
static unsigned char* move(unsigned char* left, const unsigned char* right, size_t n)
{
return reinterpret_cast(
std::char_traits::move(reinterpret_cast(left), reinterpret_cast(right), n));
}
static int_type requires_async() { return eof() - 1; }
};
#endif
namespace details
{
///
/// Stream buffer base class.
///
template
class basic_streambuf
{
public:
typedef _CharType char_type;
typedef ::concurrency::streams::char_traits<_CharType> traits;
typedef typename traits::int_type int_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
///
/// Virtual constructor for stream buffers.
///
virtual ~basic_streambuf() {}
///
/// can_read is used to determine whether a stream buffer will support read operations (get).
///
virtual bool can_read() const = 0;
///
/// can_write is used to determine whether a stream buffer will support write operations (put).
///
virtual bool can_write() const = 0;
///
/// can_seek is used to determine whether a stream buffer supports seeking.
///
virtual bool can_seek() const = 0;
///
/// has_size is used to determine whether a stream buffer supports size().
///
virtual bool has_size() const = 0;
///
/// is_eof is used to determine whether a read head has reached the end of the buffer.
///
virtual bool is_eof() const = 0;
///
/// Gets the stream buffer size, if one has been set.
///
/// The direction of buffering (in or out)
/// The size of the internal buffer (for the given direction).
/// An implementation that does not support buffering will always return 0.
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const = 0;
///
/// Sets the stream buffer implementation to buffer or not buffer.
///
/// The size to use for internal buffering, 0 if no buffering should be done.
/// The direction of buffering (in or out)
/// An implementation that does not support buffering will silently ignore calls to this function and it
/// will not have any effect on what is returned by subsequent calls to .
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in) = 0;
///
/// For any input stream, in_avail returns the number of characters that are immediately available
/// to be consumed without blocking. May be used in conjunction with to read data without
/// incurring the overhead of using tasks.
///
virtual size_t in_avail() const = 0;
///
/// Checks if the stream buffer is open.
///
/// No separation is made between open for reading and open for writing.
virtual bool is_open() const = 0;
///
/// Closes the stream buffer, preventing further read or write operations.
///
/// The I/O mode (in or out) to close for.
virtual pplx::task close(std::ios_base::openmode mode = (std::ios_base::in | std::ios_base::out)) = 0;
///
/// Closes the stream buffer with an exception.
///
/// The I/O mode (in or out) to close for.
/// Pointer to the exception.
virtual pplx::task close(std::ios_base::openmode mode, std::exception_ptr eptr) = 0;
///
/// Writes a single character to the stream.
///
/// The character to write
/// A task that holds the value of the character. This value is EOF if the write operation
/// fails.
virtual pplx::task putc(_CharType ch) = 0;
///
/// Writes a number of characters to the stream.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// A task that holds the number of characters actually written, either 'count' or 0.
virtual pplx::task putn(const _CharType* ptr, size_t count) = 0;
///
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// A task that holds the number of characters actually written, either 'count' or 0.
virtual pplx::task putn_nocopy(const _CharType* ptr, size_t count) = 0;
///
/// Reads a single character from the stream and advances the read position.
///
/// A task that holds the value of the character. This value is EOF if the read fails.
virtual pplx::task bumpc() = 0;
///
/// Reads a single character from the stream and advances the read position.
///
/// The value of the character. -1 if the read fails. -2 if an asynchronous read is
/// required This is a synchronous operation, but is guaranteed to never block.
virtual int_type sbumpc() = 0;
///
/// Reads a single character from the stream without advancing the read position.
///
/// A task that holds the value of the byte. This value is EOF if the read fails.
virtual pplx::task getc() = 0;
///
/// Reads a single character from the stream without advancing the read position.
///
/// The value of the character. EOF if the read fails. if an
/// asynchronous read is required This is a synchronous operation, but is guaranteed to never
/// block.
virtual int_type sgetc() = 0;
///
/// Advances the read position, then returns the next character without advancing again.
///
/// A task that holds the value of the character. This value is EOF if the read fails.
virtual pplx::task nextc() = 0;
///
/// Retreats the read position, then returns the current character without advancing.
///
/// A task that holds the value of the character. This value is EOF if the read fails,
/// requires_async if an asynchronous read is required
virtual pplx::task ungetc() = 0;
///
/// Reads up to a given number of characters from the stream.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// A task that holds the number of characters read. This value is O if the end of the stream is
/// reached.
virtual pplx::task getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
///
/// Copies up to a given number of characters from the stream, synchronously.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required. This is a synchronous operation, but is guaranteed to never block.
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
///
/// Gets the current read or write position in the stream.
///
/// The I/O direction to seek (see remarks)
/// The current position. EOF if the operation fails.
/// Some streams may have separate write and read cursors.
/// For such streams, the direction parameter defines whether to move the read or the write
/// cursor.
virtual pos_type getpos(std::ios_base::openmode direction) const = 0;
///
/// Gets the size of the stream, if known. Calls to has_size will determine whether
/// the result of size can be relied on.
///
virtual utility::size64_t size() const = 0;
///
/// Seeks to the given position.
///
/// The offset from the beginning of the stream.
/// The I/O direction to seek (see remarks).
/// The position. EOF if the operation fails.
/// Some streams may have separate write and read cursors. For such streams, the direction parameter
/// defines whether to move the read or the write cursor.
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode direction) = 0;
///
/// Seeks to a position given by a relative offset.
///
/// The relative position to seek to
/// The starting point (beginning, end, current) for the seek.
/// The I/O direction to seek (see remarks)
/// The position. EOF if the operation fails.
/// Some streams may have separate write and read cursors.
/// For such streams, the mode parameter defines whether to move the read or the write cursor.
virtual pos_type seekoff(off_type offset, std::ios_base::seekdir way, std::ios_base::openmode mode) = 0;
///
/// For output streams, flush any internally buffered data to the underlying medium.
///
/// A task that returns true if the sync succeeds, false if not.
virtual pplx::task sync() = 0;
//
// Efficient read and write.
//
// The following routines are intended to be used for more efficient, copy-free, reading and
// writing of data from/to the stream. Rather than having the caller provide a buffer into which
// data is written or from which it is read, the stream buffer provides a pointer directly to the
// internal data blocks that it is using. Since not all stream buffers use internal data structures
// to copy data, the functions may not be supported by all. An application that wishes to use this
// functionality should therefore first try them and check for failure to support. If there is
// such failure, the application should fall back on the copying interfaces (putn / getn)
//
///
/// Allocates a contiguous memory block and returns it.
///
/// The number of characters to allocate.
/// A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit.
virtual _CharType* alloc(_In_ size_t count) = 0;
///
/// Submits a block already allocated by the stream buffer.
///
/// The number of characters to be committed.
virtual void commit(_In_ size_t count) = 0;
///
/// Gets a pointer to the next already allocated contiguous block of data.
///
/// A reference to a pointer variable that will hold the address of the block on success.
/// The number of contiguous characters available at the address in 'ptr'.
/// true if the operation succeeded, false otherwise.
///
/// A return of false does not necessarily indicate that a subsequent read operation would fail, only that
/// there is no block to return immediately or that the stream buffer does not support the operation.
/// The stream buffer may not de-allocate the block until is called.
/// If the end of the stream is reached, the function will return true, a null pointer, and a count of zero;
/// a subsequent read will not succeed.
///
virtual bool acquire(_Out_ _CharType*& ptr, _Out_ size_t& count) = 0;
///
/// Releases a block of data acquired using . This frees the stream buffer to
/// de-allocate the memory, if it so desires. Move the read position ahead by the count.
///
/// A pointer to the block of data to be released.
/// The number of characters that were read.
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
///
/// Retrieves the stream buffer exception_ptr if it has been set.
///
/// Pointer to the exception, if it has been set; otherwise, nullptr will be returned
virtual std::exception_ptr exception() const = 0;
};
template
class streambuf_state_manager : public basic_streambuf<_CharType>,
public std::enable_shared_from_this>
{
public:
typedef typename details::basic_streambuf<_CharType>::traits traits;
typedef typename details::basic_streambuf<_CharType>::int_type int_type;
typedef typename details::basic_streambuf<_CharType>::pos_type pos_type;
typedef typename details::basic_streambuf<_CharType>::off_type off_type;
///
/// can_read is used to determine whether a stream buffer will support read operations (get).
///
virtual bool can_read() const { return m_stream_can_read; }
///
/// can_write is used to determine whether a stream buffer will support write operations (put).
///
virtual bool can_write() const { return m_stream_can_write; }
///
/// Checks if the stream buffer is open.
///
/// No separation is made between open for reading and open for writing.
virtual bool is_open() const { return can_read() || can_write(); }
///
/// Closes the stream buffer, preventing further read or write operations.
///
/// The I/O mode (in or out) to close for.
virtual pplx::task close(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
{
pplx::task closeOp = pplx::task_from_result();
if (mode & std::ios_base::in && can_read())
{
closeOp = _close_read();
}
// After the flush_internal task completed, "this" object may have been destroyed,
// accessing the members is invalid, use shared_from_this to avoid access violation exception.
auto this_ptr = std::static_pointer_cast(this->shared_from_this());
if (mode & std::ios_base::out && can_write())
{
if (closeOp.is_done())
closeOp = closeOp && _close_write().then([this_ptr] {}); // passing down exceptions from closeOp
else
closeOp = closeOp.then([this_ptr] { return this_ptr->_close_write().then([this_ptr] {}); });
}
return closeOp;
}
///
/// Closes the stream buffer with an exception.
///
/// The I/O mode (in or out) to close for.
/// Pointer to the exception.
virtual pplx::task close(std::ios_base::openmode mode, std::exception_ptr eptr)
{
if (m_currentException == nullptr) m_currentException = eptr;
return close(mode);
}
///
/// is_eof is used to determine whether a read head has reached the end of the buffer.
///
virtual bool is_eof() const { return m_stream_read_eof; }
///
/// Writes a single character to the stream.
///
/// The character to write
/// The value of the character. EOF if the write operation fails
virtual pplx::task putc(_CharType ch)
{
if (!can_write()) return create_exception_checked_value_task(traits::eof());
return create_exception_checked_task(_putc(ch), [](int_type) {
return false; // no EOF for write
});
}
///
/// Writes a number of characters to the stream.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// The number of characters actually written, either 'count' or 0.
CASABLANCA_DEPRECATED("This API in some cases performs a copy. It is deprecated and will be removed in a future "
"release. Use putn_nocopy instead.")
virtual pplx::task putn(const _CharType* ptr, size_t count)
{
if (!can_write()) return create_exception_checked_value_task(0);
if (count == 0) return pplx::task_from_result(0);
return create_exception_checked_task(_putn(ptr, count, true), [](size_t) {
return false; // no EOF for write
});
}
///
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// A task that holds the number of characters actually written, either 'count' or 0.
virtual pplx::task putn_nocopy(const _CharType* ptr, size_t count)
{
if (!can_write()) return create_exception_checked_value_task(0);
if (count == 0) return pplx::task_from_result(0);
return create_exception_checked_task(_putn(ptr, count), [](size_t) {
return false; // no EOF for write
});
}
///
/// Reads a single character from the stream and advances the read position.
///
/// The value of the character. EOF if the read fails.
virtual pplx::task bumpc()
{
if (!can_read())
return create_exception_checked_value_task(streambuf_state_manager<_CharType>::traits::eof());
return create_exception_checked_task(
_bumpc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
///
/// Reads a single character from the stream and advances the read position.
///
/// The value of the character. -1 if the read fails. -2 if an asynchronous read is
/// required This is a synchronous operation, but is guaranteed to never block.
virtual int_type sbumpc()
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return traits::eof();
return check_sync_read_eof(_sbumpc());
}
///
/// Reads a single character from the stream without advancing the read position.
///
/// The value of the byte. EOF if the read fails.
virtual pplx::task getc()
{
if (!can_read()) return create_exception_checked_value_task(traits::eof());
return create_exception_checked_task(
_getc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
///
/// Reads a single character from the stream without advancing the read position.
///
/// The value of the character. EOF if the read fails. if an
/// asynchronous read is required This is a synchronous operation, but is guaranteed to never
/// block.
virtual int_type sgetc()
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return traits::eof();
return check_sync_read_eof(_sgetc());
}
///
/// Advances the read position, then returns the next character without advancing again.
///
/// The value of the character. EOF if the read fails.
virtual pplx::task nextc()
{
if (!can_read()) return create_exception_checked_value_task(traits::eof());
return create_exception_checked_task(
_nextc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
///
/// Retreats the read position, then returns the current character without advancing.
///
/// The value of the character. EOF if the read fails. if an
/// asynchronous read is required
virtual pplx::task ungetc()
{
if (!can_read()) return create_exception_checked_value_task(traits::eof());
return create_exception_checked_task(_ungetc(), [](int_type) { return false; });
}
///
/// Reads up to a given number of characters from the stream.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// The number of characters read. O if the end of the stream is reached.
virtual pplx::task getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
if (!can_read()) return create_exception_checked_value_task(0);
if (count == 0) return pplx::task_from_result(0);
return create_exception_checked_task(_getn(ptr, count), [](size_t val) { return val == 0; });
}
///
/// Copies up to a given number of characters from the stream, synchronously.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required. This is a synchronous operation, but is guaranteed to never block.
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return 0;
return _scopy(ptr, count);
}
///
/// For output streams, flush any internally buffered data to the underlying medium.
///
/// true if the flush succeeds, false if not
virtual pplx::task sync()
{
if (!can_write())
{
if (m_currentException == nullptr)
return pplx::task_from_result();
else
return pplx::task_from_exception(m_currentException);
}
return create_exception_checked_task(_sync(), [](bool) { return false; }).then([](bool) {});
}
///
/// Retrieves the stream buffer exception_ptr if it has been set.
///
/// Pointer to the exception, if it has been set; otherwise, nullptr will be returned.
virtual std::exception_ptr exception() const { return m_currentException; }
///
/// Allocates a contiguous memory block and returns it.
///
/// The number of characters to allocate.
/// A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit. This is intended as an advanced API to be used only when it is important to
/// avoid extra copies.
_CharType* alloc(size_t count)
{
if (m_alloced)
throw std::logic_error(
"The buffer is already allocated, this maybe caused by overlap of stream read or write");
_CharType* alloc_result = _alloc(count);
if (alloc_result) m_alloced = true;
return alloc_result;
}
///
/// Submits a block already allocated by the stream buffer.
///
/// The number of characters to be committed.
/// This is intended as an advanced API to be used only when it is important to avoid extra
/// copies.
void commit(size_t count)
{
if (!m_alloced) throw std::logic_error("The buffer needs to allocate first");
_commit(count);
m_alloced = false;
}
public:
virtual bool can_seek() const = 0;
virtual bool has_size() const = 0;
virtual utility::size64_t size() const { return 0; }
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const = 0;
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in) = 0;
virtual size_t in_avail() const = 0;
virtual pos_type getpos(std::ios_base::openmode direction) const = 0;
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode direction) = 0;
virtual pos_type seekoff(off_type offset, std::ios_base::seekdir way, std::ios_base::openmode mode) = 0;
virtual bool acquire(_Out_writes_(count) _CharType*& ptr, _In_ size_t& count) = 0;
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
protected:
virtual pplx::task _putc(_CharType ch) = 0;
// This API is only needed for file streams and until we remove the deprecated stream buffer putn overload.
virtual pplx::task _putn(const _CharType* ptr, size_t count, bool)
{
// Default to no copy, only the file streams API overloads and performs a copy.
return _putn(ptr, count);
}
virtual pplx::task _putn(const _CharType* ptr, size_t count) = 0;
virtual pplx::task _bumpc() = 0;
virtual int_type _sbumpc() = 0;
virtual pplx::task _getc() = 0;
virtual int_type _sgetc() = 0;
virtual pplx::task _nextc() = 0;
virtual pplx::task _ungetc() = 0;
virtual pplx::task _getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
virtual size_t _scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
virtual pplx::task _sync() = 0;
virtual _CharType* _alloc(size_t count) = 0;
virtual void _commit(size_t count) = 0;
///
/// The real read head close operation, implementation should override it if there is any resource to be released.
///
virtual pplx::task _close_read()
{
m_stream_can_read = false;
return pplx::task_from_result();
}
///
/// The real write head close operation, implementation should override it if there is any resource to be released.
///
virtual pplx::task _close_write()
{
m_stream_can_write = false;
return pplx::task_from_result();
}
protected:
streambuf_state_manager(std::ios_base::openmode mode)
{
m_stream_can_read = (mode & std::ios_base::in) != 0;
m_stream_can_write = (mode & std::ios_base::out) != 0;
m_stream_read_eof = false;
m_alloced = false;
}
std::exception_ptr m_currentException;
// The in/out mode for the buffer
std::atomic m_stream_can_read;
std::atomic m_stream_can_write;
std::atomic m_stream_read_eof;
std::atomic m_alloced;
private:
template
pplx::task<_CharType1> create_exception_checked_value_task(const _CharType1& val) const
{
if (this->exception() == nullptr)
return pplx::task_from_result<_CharType1>(static_cast<_CharType1>(val));
else
return pplx::task_from_exception<_CharType1>(this->exception());
}
// Set exception and eof states for async read
template
pplx::task<_CharType1> create_exception_checked_task(pplx::task<_CharType1> result,
std::function eof_test,
std::ios_base::openmode mode = std::ios_base::in |
std::ios_base::out)
{
auto thisPointer = this->shared_from_this();
auto func1 = [=](pplx::task<_CharType1> t1) -> pplx::task<_CharType1> {
try
{
thisPointer->m_stream_read_eof = eof_test(t1.get());
}
catch (...)
{
thisPointer->close(mode, std::current_exception()).get();
return pplx::task_from_exception<_CharType1>(thisPointer->exception(), pplx::task_options());
}
if (thisPointer->m_stream_read_eof && !(thisPointer->exception() == nullptr))
return pplx::task_from_exception<_CharType1>(thisPointer->exception(), pplx::task_options());
return t1;
};
if (result.is_done())
{
// If the data is already available, we should avoid scheduling a continuation, so we do it inline.
return func1(result);
}
else
{
return result.then(func1);
}
}
// Set eof states for sync read
int_type check_sync_read_eof(int_type ch)
{
m_stream_read_eof = ch == traits::eof();
return ch;
}
};
} // namespace details
// Forward declarations
template
class basic_istream;
template
class basic_ostream;
///
/// Reference-counted stream buffer.
///
///
/// The data type of the basic element of the streambuf.
///
///
/// The data type of the basic element of the streambuf.
///
template
class streambuf : public details::basic_streambuf<_CharType>
{
public:
typedef typename details::basic_streambuf<_CharType>::traits traits;
typedef typename details::basic_streambuf<_CharType>::int_type int_type;
typedef typename details::basic_streambuf<_CharType>::pos_type pos_type;
typedef typename details::basic_streambuf<_CharType>::off_type off_type;
typedef typename details::basic_streambuf<_CharType>::char_type char_type;
template
friend class streambuf;
///
/// Constructor.
///
/// A pointer to the concrete stream buffer implementation.
streambuf(_In_ const std::shared_ptr>& ptr) : m_buffer(ptr) {}
///
/// Default constructor.
///
streambuf() {}
///
/// Converter Constructor.
///
///
/// The data type of the basic element of the source streambuf.
///
/// The source buffer to be converted.
template
streambuf(const streambuf& other)
: m_buffer(std::static_pointer_cast>(
std::static_pointer_cast(other.m_buffer)))
{
static_assert(std::is_same::pos_type>::value &&
std::is_same::off_type>::value &&
std::is_integral<_CharType>::value && std::is_integral::value &&
std::is_integral::value &&
std::is_integral::int_type>::value &&
sizeof(_CharType) == sizeof(AlterCharType) &&
sizeof(int_type) == sizeof(typename details::basic_streambuf::int_type),
"incompatible stream character types");
}
///
/// Constructs an input stream head for this stream buffer.
///
/// basic_istream.
concurrency::streams::basic_istream<_CharType> create_istream() const
{
if (!can_read()) throw std::runtime_error("stream buffer not set up for input of data");
return concurrency::streams::basic_istream<_CharType>(*this);
}
///
/// Constructs an output stream for this stream buffer.
///
/// basic_ostream
concurrency::streams::basic_ostream<_CharType> create_ostream() const
{
if (!can_write()) throw std::runtime_error("stream buffer not set up for output of data");
return concurrency::streams::basic_ostream<_CharType>(*this);
}
///
/// Checks if the stream buffer has been initialized or not.
///
operator bool() const { return (bool)m_buffer; }
///
/// Destructor
///
virtual ~streambuf() {}
const std::shared_ptr>& get_base() const
{
if (!m_buffer)
{
throw std::invalid_argument("Invalid streambuf object");
}
return m_buffer;
}
///
/// can_read is used to determine whether a stream buffer will support read operations (get).
///
virtual bool can_read() const { return get_base()->can_read(); }
///
/// can_write is used to determine whether a stream buffer will support write operations (put).
///
virtual bool can_write() const { return get_base()->can_write(); }
///
/// can_seek is used to determine whether a stream buffer supports seeking.
///
/// True if seeking is supported, false otherwise.
virtual bool can_seek() const { return get_base()->can_seek(); }
///
/// has_size is used to determine whether a stream buffer supports size().
///
/// True if the size API is supported, false otherwise.
virtual bool has_size() const { return get_base()->has_size(); }
///
/// Gets the total number of characters in the stream buffer, if known. Calls to has_size will determine
/// whether the result of size can be relied on.
///
/// The total number of characters in the stream buffer.
virtual utility::size64_t size() const { return get_base()->size(); }
///
/// Gets the stream buffer size, if one has been set.
///
/// The direction of buffering (in or out)
/// The size of the internal buffer (for the given direction).
/// An implementation that does not support buffering will always return 0.
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const
{
return get_base()->buffer_size(direction);
}
///
/// Sets the stream buffer implementation to buffer or not buffer.
///
/// The size to use for internal buffering, 0 if no buffering should be done.
/// The direction of buffering (in or out)
/// An implementation that does not support buffering will silently ignore calls to this function and it
/// will not have any effect on what is returned by subsequent calls to .
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in)
{
get_base()->set_buffer_size(size, direction);
}
///
/// For any input stream, in_avail returns the number of characters that are immediately available
/// to be consumed without blocking. May be used in conjunction with to read data without
/// incurring the overhead of using tasks.
///
/// Number of characters that are ready to read.
virtual size_t in_avail() const { return get_base()->in_avail(); }
///
/// Checks if the stream buffer is open.
///
/// No separation is made between open for reading and open for writing.
/// True if the stream buffer is open for reading or writing, false otherwise.
virtual bool is_open() const { return get_base()->is_open(); }
///
/// is_eof is used to determine whether a read head has reached the end of the buffer.
///
/// True if at the end of the buffer, false otherwise.
virtual bool is_eof() const { return get_base()->is_eof(); }
///
/// Closes the stream buffer, preventing further read or write operations.
///
/// The I/O mode (in or out) to close for.
virtual pplx::task close(std::ios_base::openmode mode = (std::ios_base::in | std::ios_base::out))
{
// We preserve the check here to workaround a Dev10 compiler crash
auto buffer = get_base();
return buffer ? buffer->close(mode) : pplx::task_from_result();
}
///
/// Closes the stream buffer with an exception.
///
/// The I/O mode (in or out) to close for.
/// Pointer to the exception.
virtual pplx::task close(std::ios_base::openmode mode, std::exception_ptr eptr)
{
// We preserve the check here to workaround a Dev10 compiler crash
auto buffer = get_base();
return buffer ? buffer->close(mode, eptr) : pplx::task_from_result();
}
///
/// Writes a single character to the stream.
///
/// The character to write
/// The value of the character. EOF if the write operation fails
virtual pplx::task putc(_CharType ch) { return get_base()->putc(ch); }
///
/// Allocates a contiguous memory block and returns it.
///
/// The number of characters to allocate.
/// A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit.
virtual _CharType* alloc(size_t count) { return get_base()->alloc(count); }
///
/// Submits a block already allocated by the stream buffer.
///
/// The number of characters to be committed.
virtual void commit(size_t count) { get_base()->commit(count); }
///
/// Gets a pointer to the next already allocated contiguous block of data.
///
/// A reference to a pointer variable that will hold the address of the block on success.
/// The number of contiguous characters available at the address in 'ptr'.
/// true if the operation succeeded, false otherwise.
///
/// A return of false does not necessarily indicate that a subsequent read operation would fail, only that
/// there is no block to return immediately or that the stream buffer does not support the operation.
/// The stream buffer may not de-allocate the block until is called.
/// If the end of the stream is reached, the function will return true, a null pointer, and a count of zero;
/// a subsequent read will not succeed.
///
virtual bool acquire(_Out_ _CharType*& ptr, _Out_ size_t& count)
{
ptr = nullptr;
count = 0;
return get_base()->acquire(ptr, count);
}
///
/// Releases a block of data acquired using . This frees the stream buffer to
/// de-allocate the memory, if it so desires. Move the read position ahead by the count.
///
/// A pointer to the block of data to be released.
/// The number of characters that were read.
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) { get_base()->release(ptr, count); }
///
/// Writes a number of characters to the stream.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// The number of characters actually written, either 'count' or 0.
CASABLANCA_DEPRECATED("This API in some cases performs a copy. It is deprecated and will be removed in a future "
"release. Use putn_nocopy instead.")
virtual pplx::task putn(const _CharType* ptr, size_t count) { return get_base()->putn(ptr, count); }
///
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
///
/// A pointer to the block of data to be written.
/// The number of characters to write.
/// The number of characters actually written, either 'count' or 0.
virtual pplx::task putn_nocopy(const _CharType* ptr, size_t count)
{
return get_base()->putn_nocopy(ptr, count);
}
///
/// Reads a single character from the stream and advances the read position.
///
/// The value of the character. EOF if the read fails.
virtual pplx::task bumpc() { return get_base()->bumpc(); }
///
/// Reads a single character from the stream and advances the read position.
///
/// The value of the character. -1 if the read fails. -2 if an asynchronous read is
/// required This is a synchronous operation, but is guaranteed to never block.
virtual typename details::basic_streambuf<_CharType>::int_type sbumpc() { return get_base()->sbumpc(); }
///
/// Reads a single character from the stream without advancing the read position.
///
/// The value of the byte. EOF if the read fails.
virtual pplx::task getc() { return get_base()->getc(); }
///
/// Reads a single character from the stream without advancing the read position.
///
/// The value of the character. EOF if the read fails. if an
/// asynchronous read is required This is a synchronous operation, but is guaranteed to never
/// block.
virtual typename details::basic_streambuf<_CharType>::int_type sgetc() { return get_base()->sgetc(); }
///
/// Advances the read position, then returns the next character without advancing again.
///
/// The value of the character. EOF if the read fails.
pplx::task nextc() { return get_base()->nextc(); }
///
/// Retreats the read position, then returns the current character without advancing.
///
/// The value of the character. EOF if the read fails. if an
/// asynchronous read is required
pplx::task ungetc() { return get_base()->ungetc(); }
///
/// Reads up to a given number of characters from the stream.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// The number of characters read. O if the end of the stream is reached.
virtual pplx::task getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
return get_base()->getn(ptr, count);
}
///
/// Copies up to a given number of characters from the stream, synchronously.
///
/// The address of the target memory area.
/// The maximum number of characters to read.
/// The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required. This is a synchronous operation, but is guaranteed to never block.
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
return get_base()->scopy(ptr, count);
}
///
/// Gets the current read or write position in the stream.
///
/// The I/O direction to seek (see remarks)
/// The current position. EOF if the operation fails.
/// Some streams may have separate write and read cursors.
/// For such streams, the direction parameter defines whether to move the read or the write
/// cursor.
virtual typename details::basic_streambuf<_CharType>::pos_type getpos(std::ios_base::openmode direction) const
{
return get_base()->getpos(direction);
}
///
/// Seeks to the given position.
///
/// The offset from the beginning of the stream.
/// The I/O direction to seek (see remarks).
/// The position. EOF if the operation fails.
/// Some streams may have separate write and read cursors. For such streams, the direction parameter
/// defines whether to move the read or the write cursor.
virtual typename details::basic_streambuf<_CharType>::pos_type seekpos(
typename details::basic_streambuf<_CharType>::pos_type pos, std::ios_base::openmode direction)
{
return get_base()->seekpos(pos, direction);
}
///
/// Seeks to a position given by a relative offset.
///
/// The relative position to seek to
/// The starting point (beginning, end, current) for the seek.
/// The I/O direction to seek (see remarks)
/// The position. EOF if the operation fails.
/// Some streams may have separate write and read cursors.
/// For such streams, the mode parameter defines whether to move the read or the write cursor.
virtual typename details::basic_streambuf<_CharType>::pos_type seekoff(
typename details::basic_streambuf<_CharType>::off_type offset,
std::ios_base::seekdir way,
std::ios_base::openmode mode)
{
return get_base()->seekoff(offset, way, mode);
}
///
/// For output streams, flush any internally buffered data to the underlying medium.
///
/// true if the flush succeeds, false if not
virtual pplx::task sync() { return get_base()->sync(); }
///
/// Retrieves the stream buffer exception_ptr if it has been set.
///
/// Pointer to the exception, if it has been set; otherwise, nullptr will be returned
virtual std::exception_ptr exception() const { return get_base()->exception(); }
private:
std::shared_ptr> m_buffer;
};
} // namespace streams
} // namespace Concurrency
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( pop )
#endif
#endif // !XSAPI_NO_PPL
================================================
FILE: Include/cpprestinclude/cpprest/asyncrt_utils.h
================================================
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Various common utilities.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include
#include
#include
#include
#include
#include
#include "cpprest/details/basic_types.h"
#if !defined(_WIN32) || (_MSC_VER >= 1700)
#include
#endif
#ifndef _WIN32
#include
#endif
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( push )
#pragma warning( disable : 26444 ) // ignore various unnamed objects
#endif
/// Various utilities for string conversions and date and time manipulation.
namespace utility
{
// Left over from VS2010 support, remains to avoid breaking.
typedef std::chrono::seconds seconds;
/// Functions for converting to/from std::chrono::seconds to xml string.
namespace timespan
{
///
/// Converts a timespan/interval in seconds to xml duration string as specified by
/// http://www.w3.org/TR/xmlschema-2/#duration
///
_ASYNCRTIMP utility::string_t __cdecl seconds_to_xml_duration(utility::seconds numSecs);
///
/// Converts an xml duration to timespan/interval in seconds
/// http://www.w3.org/TR/xmlschema-2/#duration
///
_ASYNCRTIMP utility::seconds __cdecl xml_duration_to_seconds(const utility::string_t ×panString);
}
/// Functions for Unicode string conversions.
namespace conversions
{
///
/// Converts a UTF-16 string to a UTF-8 string.
///
/// A two byte character UTF-16 string.
/// A single byte character UTF-8 string.
_ASYNCRTIMP std::string __cdecl utf16_to_utf8(const utf16string &w);
///
/// Converts a UTF-8 string to a UTF-16
///
/// A single byte character UTF-8 string.
/// A two byte character UTF-16 string.
_ASYNCRTIMP utf16string __cdecl utf8_to_utf16(const std::string &s);
///
/// Converts a ASCII (us-ascii) string to a UTF-16 string.
///
/// A single byte character us-ascii string.
/// A two byte character UTF-16 string.
_ASYNCRTIMP utf16string __cdecl usascii_to_utf16(const std::string &s);
///
/// Converts a Latin1 (iso-8859-1) string to a UTF-16 string.
///
/// A single byte character UTF-8 string.
/// A two byte character UTF-16 string.
_ASYNCRTIMP utf16string __cdecl latin1_to_utf16(const std::string &s);
///
/// Converts a Latin1 (iso-8859-1) string to a UTF-8 string.
///
/// A single byte character UTF-8 string.
/// A single byte character UTF-8 string.
_ASYNCRTIMP utf8string __cdecl latin1_to_utf8(const std::string &s);
///
/// Converts to a platform dependent Unicode string type.
///
/// A single byte character UTF-8 string.
/// A platform dependent string type.
_ASYNCRTIMP utility::string_t __cdecl to_string_t(std::string &&s);
///
/// Converts to a platform dependent Unicode string type.
///
/// A two byte character UTF-16 string.
/// A platform dependent string type.
_ASYNCRTIMP utility::string_t __cdecl to_string_t(utf16string &&s);
///
/// Converts to a platform dependent Unicode string type.
///
/// A single byte character UTF-8 string.
/// A platform dependent string type.
_ASYNCRTIMP utility::string_t __cdecl to_string_t(const std::string &s);
///
/// Converts to a platform dependent Unicode string type.
///
/// A two byte character UTF-16 string.
/// A platform dependent string type.
_ASYNCRTIMP utility::string_t __cdecl to_string_t(const utf16string &s);
///
/// Converts to a UTF-16 from string.
///
/// A single byte character UTF-8 string.
/// A two byte character UTF-16 string.
_ASYNCRTIMP utf16string __cdecl to_utf16string(const std::string &value);
///
/// Converts to a UTF-16 from string.
///
/// A two byte character UTF-16 string.
/// A two byte character UTF-16 string.
_ASYNCRTIMP utf16string __cdecl to_utf16string(utf16string value);
///
/// Converts to a UTF-8 string.
///
/// A single byte character UTF-8 string.
/// A single byte character UTF-8 string.
_ASYNCRTIMP std::string __cdecl to_utf8string(std::string value);
///
/// Converts to a UTF-8 string.
///
/// A two byte character UTF-16 string.
/// A single byte character UTF-8 string.
_ASYNCRTIMP std::string __cdecl to_utf8string(const utf16string &value);
///
/// Encode the given byte array into a base64 string
///
_ASYNCRTIMP utility::string_t __cdecl to_base64(const unsigned char* data, size_t dataSize);
///
/// Encode the given byte array into a base64 string
///
_ASYNCRTIMP utility::string_t __cdecl to_base64(const std::vector& data);
///
/// Encode the given 8-byte integer into a base64 string
///
_ASYNCRTIMP utility::string_t __cdecl to_base64(uint64_t data);
///
/// Decode the given base64 string to a byte array
///
_ASYNCRTIMP std::vector __cdecl from_base64(const utility::string_t& str);
template
utility::string_t print_string(const Source &val, const std::locale &loc)
{
utility::ostringstream_t oss;
oss.imbue(loc);
oss << val;
if (oss.bad())
{
throw std::bad_cast();
}
return oss.str();
}
template
utility::string_t print_string(const Source &val)
{
return print_string(val, std::locale());
}
inline utility::string_t print_string(const utility::string_t &val)
{
return val;
}
template
Target scan_string(const utility::string_t &str, const std::locale &loc)
{
Target t;
utility::istringstream_t iss(str);
iss.imbue(loc);
iss >> t;
if (iss.bad())
{
throw std::bad_cast();
}
return t;
}
template
Target scan_string(const utility::string_t &str)
{
return scan_string(str, std::locale());
}
inline utility::string_t scan_string(const utility::string_t &str)
{
return str;
}
}
namespace details
{
///
/// Cross platform RAII container for setting thread local locale.
///
class scoped_c_thread_locale
{
public:
_ASYNCRTIMP scoped_c_thread_locale();
_ASYNCRTIMP ~scoped_c_thread_locale();
#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(PAVO) // CodePlex 269
#ifdef _WIN32
typedef _locale_t xplat_locale;
#else
typedef locale_t xplat_locale;
#endif
static _ASYNCRTIMP xplat_locale __cdecl c_locale();
#endif
private:
#ifdef _WIN32
std::string m_prevLocale;
int m_prevThreadSetting;
#elif !(defined(ANDROID) || defined(__ANDROID__) || defined(PAVO))
locale_t m_prevLocale;
#endif
scoped_c_thread_locale(const scoped_c_thread_locale &);
scoped_c_thread_locale & operator=(const scoped_c_thread_locale &);
};
///
/// Our own implementation of alpha numeric instead of std::isalnum to avoid
/// taking global lock for performance reasons.
///
inline bool __cdecl is_alnum(char ch)
{
return (ch >= '0' && ch <= '9')
|| (ch >= 'A' && ch <= 'Z')
|| (ch >= 'a' && ch <= 'z');
}
///
/// Simplistic implementation of make_unique. A better implementation would be based on variadic templates
/// and therefore not be compatible with Dev10.
///
template
std::unique_ptr<_Type> make_unique() {
return std::unique_ptr<_Type>(new _Type());
}
template
std::unique_ptr<_Type> make_unique(_Arg1&& arg1) {
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1)));
}
template
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2) {
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2)));
}
template
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3) {
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2), std::forward<_Arg3>(arg3)));
}
template
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3, _Arg4&& arg4) {
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2), std::forward<_Arg3>(arg3), std::forward<_Arg4>(arg4)));
}
///
/// Cross platform utility function for performing case insensitive string comparision.
///
/// First string to compare.
/// Second strong to compare.
/// true if the strings are equivalent, false otherwise
inline bool str_icmp(const utility::string_t &left, const utility::string_t &right)
{
#ifdef _WIN32
return _wcsicmp(left.c_str(), right.c_str()) == 0;
#else
return strcasecmp(left.c_str(), right.c_str());
#endif
}
#ifdef _WIN32
///
/// Category error type for Windows OS errors.
///
class windows_category_impl : public std::error_category
{
public:
virtual const char *name() const CPPREST_NOEXCEPT { return "windows"; }
_ASYNCRTIMP virtual std::string message(int errorCode) const CPPREST_NOEXCEPT;
_ASYNCRTIMP virtual std::error_condition default_error_condition(int errorCode) const CPPREST_NOEXCEPT;
};
///
/// Gets the one global instance of the windows error category.
///
/// An error category instance.
_ASYNCRTIMP const std::error_category & __cdecl windows_category();
#else
///
/// Gets the one global instance of the linux error category.
///
/// An error category instance.
_ASYNCRTIMP const std::error_category & __cdecl linux_category();
#endif
///
/// Gets the one global instance of the current platform's error category.
///
_ASYNCRTIMP const std::error_category & __cdecl platform_category();
///
/// Creates an instance of std::system_error from a OS error code.
///
inline std::system_error __cdecl create_system_error(unsigned long errorCode)
{
std::error_code code((int)errorCode, platform_category());
return std::system_error(code, code.message());
}
///
/// Creates a std::error_code from a OS error code.
///
inline std::error_code __cdecl create_error_code(unsigned long errorCode)
{
return std::error_code((int)errorCode, platform_category());
}
///
/// Creates the corresponding error message from a OS error code.
///
inline utility::string_t __cdecl create_error_message(unsigned long errorCode)
{
return utility::conversions::to_string_t(create_error_code(errorCode).message());
}
}
class datetime
{
public:
typedef uint64_t interval_type;
///
/// Defines the supported date and time string formats.
///
enum date_format { RFC_1123, ISO_8601 };
///
/// Returns the current UTC time.
///
static _ASYNCRTIMP datetime __cdecl utc_now();
///
/// An invalid UTC timestamp value.
///
enum:interval_type { utc_timestamp_invalid = static_cast(-1) };
///
/// Returns seconds since Unix/POSIX time epoch at 01-01-1970 00:00:00.
/// If time is before epoch, utc_timestamp_invalid is returned.
///
static interval_type utc_timestamp()
{
const auto seconds = utc_now().to_interval() / _secondTicks;
if (seconds >= 11644473600LL)
{
return seconds - 11644473600LL;
}
else
{
return utc_timestamp_invalid;
}
}
datetime() : m_interval(0)
{
}
///
/// Creates datetime from a string representing time in UTC in RFC 1123 format.
///
/// Returns a datetime of zero if not successful.
static _ASYNCRTIMP datetime __cdecl from_string(const utility::string_t& timestring, date_format format = RFC_1123);
///
/// Returns a string representation of the datetime.
///
_ASYNCRTIMP utility::string_t to_string(date_format format = RFC_1123) const;
///
/// Returns the integral time value.
///
interval_type to_interval() const
{
return m_interval;
}
datetime operator- (interval_type value) const
{
return datetime(m_interval - value);
}
datetime operator+ (interval_type value) const
{
return datetime(m_interval + value);
}
bool operator== (datetime dt) const
{
return m_interval == dt.m_interval;
}
bool operator!= (const datetime& dt) const
{
return !(*this == dt);
}
static interval_type from_milliseconds(unsigned int milliseconds)
{
return milliseconds*_msTicks;
}
static interval_type from_seconds(unsigned int seconds)
{
return seconds*_secondTicks;
}
static interval_type from_minutes(unsigned int minutes)
{
return minutes*_minuteTicks;
}
static interval_type from_hours(unsigned int hours)
{
return hours*_hourTicks;
}
static interval_type from_days(unsigned int days)
{
return days*_dayTicks;
}
bool is_initialized() const
{
return m_interval != 0;
}
private:
friend int operator- (datetime t1, datetime t2);
static const interval_type _msTicks = static_cast(10000);
static const interval_type _secondTicks = 1000*_msTicks;
static const interval_type _minuteTicks = 60*_secondTicks;
static const interval_type _hourTicks = 60*60*_secondTicks;
static const interval_type _dayTicks = 24*60*60*_secondTicks;
#ifdef _WIN32
// void* to avoid pulling in windows.h
static _ASYNCRTIMP bool __cdecl system_type_to_datetime(/*SYSTEMTIME*/ void* psysTime, uint64_t seconds, datetime * pdt);
#else
static datetime timeval_to_datetime(const timeval &time);
#endif
// Private constructor. Use static methods to create an instance.
datetime(interval_type interval) : m_interval(interval)
{
}
// Storing as hundreds of nanoseconds 10e-7, i.e. 1 here equals 100ns.
interval_type m_interval;
};
#ifndef _WIN32
// temporary workaround for the fact that
// utf16char is not fully supported in GCC
class cmp
{
public:
static int icmp(std::string left, std::string right)
{
size_t i;
for (i = 0; i < left.size(); ++i)
{
if (i == right.size()) return 1;
auto l = cmp::tolower(left[i]);
auto r = cmp::tolower(right[i]);
if (l > r) return 1;
if (l < r) return -1;
}
if (i < right.size()) return -1;
return 0;
}
private:
static char tolower(char c)
{
if (c >= 'A' && c <= 'Z')
return static_cast(c - 'A' + 'a');
return c;
}
};
#endif
inline int operator- (datetime t1, datetime t2)
{
auto diff = (t1.m_interval - t2.m_interval);
// Round it down to seconds
diff /= 10 * 1000 * 1000;
return static_cast(diff);
}
///
/// Nonce string generator class.
///
class nonce_generator
{
public:
///
/// Define default nonce length.
///
enum { default_length = 32 };
///
/// Nonce generator constructor.
///
/// Length of the generated nonce string.
nonce_generator(int length=default_length) :
m_random(static_cast(utility::datetime::utc_timestamp())),
m_length(length)
{}
///
/// Generate a nonce string containing random alphanumeric characters (A-Za-z0-9).
/// Length of the generated string is set by length().
///
/// The generated nonce string.
_ASYNCRTIMP utility::string_t generate();
///
/// Get length of generated nonce string.
///
/// Nonce string length.
int length() const { return m_length; }
///
/// Set length of the generated nonce string.
///
/// Lenght of nonce string.
void set_length(int length) { m_length = length; }
private:
static const utility::char_t* c_allowed_chars;
std::mt19937 m_random;
int m_length;
};
} // namespace utility;
#if HC_PLATFORM_IS_MICROSOFT
#pragma warning( pop )
#endif
================================================
FILE: Include/cpprestinclude/cpprest/base_uri.h
================================================
/***
* ==++==
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ==--==
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Protocol independent support for URIs.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include