diff --git a/Include/xsapi/tournaments.h b/Include/xsapi/tournaments.h index 6d351f29..c5650505 100644 --- a/Include/xsapi/tournaments.h +++ b/Include/xsapi/tournaments.h @@ -320,27 +320,27 @@ public: /// /// Internal function /// - _XSAPIIMP const string_t& _Organizer_id() const; + _XSAPIIMP const string_t& organizer_id() const; /// /// Internal function /// - _XSAPIIMP const string_t& _Tournament_id() const; + _XSAPIIMP const string_t& tournament_id() const; /// /// Internal function /// - _XSAPIIMP uint32_t _Max_items() const; + _XSAPIIMP uint32_t max_items() const; /// /// Internal function /// - _XSAPIIMP const std::vector& _Team_states() const; + _XSAPIIMP const std::vector& state_filter() const; /// /// Internal function /// - _XSAPIIMP team_order_by _Order_by() const; + _XSAPIIMP team_order_by order_by() const; private: uint32_t m_maxItems; @@ -577,32 +577,32 @@ public: /// /// Internal function /// - _XSAPIIMP bool _Filter_results_for_user() const; + _XSAPIIMP bool filter_results_for_user() const; /// /// Internal function /// - _XSAPIIMP uint32_t _Max_items() const; + _XSAPIIMP uint32_t max_items() const; /// /// Internal function /// - _XSAPIIMP const std::vector& _Tournament_states() const; + _XSAPIIMP const std::vector& state_filter() const; /// /// Internal function /// - _XSAPIIMP tournament_order_by _Order_by() const; + _XSAPIIMP tournament_order_by order_by() const; /// /// Internal function /// - _XSAPIIMP tournament_sort_order _Sort_order() const; + _XSAPIIMP tournament_sort_order sort_order() const; /// /// Internal function /// - _XSAPIIMP const string_t& _Organizer_id() const; + _XSAPIIMP const string_t& organizer_id() const; private: tournament_sort_order m_sortOrder; diff --git a/Source/Services/Multiplayer/multiplayer_session_constants.cpp b/Source/Services/Multiplayer/multiplayer_session_constants.cpp index 18f12e5b..b165a538 100644 --- a/Source/Services/Multiplayer/multiplayer_session_constants.cpp +++ b/Source/Services/Multiplayer/multiplayer_session_constants.cpp @@ -28,7 +28,6 @@ multiplayer_session_constants::multiplayer_session_constants() : { m_sessionCustomConstants = web::json::value::object(); m_measurementServerAddressesJson = web::json::value::object(); - m_sessionCloudComputePackageJson = web::json::value::object(); } multiplayer_session_constants::multiplayer_session_constants( @@ -60,7 +59,6 @@ multiplayer_session_constants::multiplayer_session_constants( ); m_measurementServerAddressesJson = web::json::value::object(); - m_sessionCloudComputePackageJson = web::json::value::object(); } multiplayer_session_constants::multiplayer_session_constants( @@ -84,7 +82,6 @@ multiplayer_session_constants::multiplayer_session_constants( { m_sessionCustomConstants = web::json::value::object(); m_measurementServerAddressesJson = web::json::value::object(); - m_sessionCloudComputePackageJson = web::json::value::object(); } uint32_t diff --git a/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.cpp b/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.cpp index 27eb1b02..2e4cbca2 100644 --- a/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.cpp +++ b/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.cpp @@ -34,6 +34,12 @@ TeamRequest::GetCppObj() const return m_cppObj; } +Windows::Foundation::Collections::IVectorView^ +TeamRequest::StateFilter::get() +{ + return m_teamStates; +} + void TeamRequest::StateFilter::set( _In_ Windows::Foundation::Collections::IVectorView^ states diff --git a/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.h b/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.h index 96619053..bc445d0a 100644 --- a/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.h +++ b/Source/Services/Tournaments/WinRT/TeamRequest_WinRT.h @@ -27,7 +27,7 @@ public: /// The maximum number of items to return. /// /// The maximum number of items to return. - DEFINE_PROP_SET_OBJ(MaxItems, max_items, uint32); + DEFINE_PROP_GETSET_OBJ(MaxItems, max_items, uint32); /// /// Filter results based on the multiple states of the team. @@ -35,6 +35,7 @@ public: /// The team states to filter on. property Windows::Foundation::Collections::IVectorView^ StateFilter { + Windows::Foundation::Collections::IVectorView^ get(); void set(_In_ Windows::Foundation::Collections::IVectorView^ states); } @@ -42,7 +43,7 @@ public: /// Filter results based on the order specified. /// /// The field used to order results. - DEFINE_PROP_SET_ENUM_OBJ(OrderBy, order_by, TeamOrderBy, xbox::services::tournaments::team_order_by); + DEFINE_PROP_GETSET_ENUM_OBJ(OrderBy, order_by, TeamOrderBy, xbox::services::tournaments::team_order_by); internal: TeamRequest( diff --git a/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.cpp b/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.cpp index 0eb92235..aa687368 100644 --- a/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.cpp +++ b/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.cpp @@ -32,6 +32,12 @@ TournamentRequest::GetCppObj() const return m_cppObj; } +Windows::Foundation::Collections::IVectorView^ +TournamentRequest::StateFilter::get() +{ + return m_tournamentStates; +} + void TournamentRequest::StateFilter::set( _In_ Windows::Foundation::Collections::IVectorView^ states diff --git a/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.h b/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.h index c658cadd..c3eb1860 100644 --- a/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.h +++ b/Source/Services/Tournaments/WinRT/TournamentRequest_WinRT.h @@ -25,30 +25,31 @@ public: /// /// The maximum number of items to return. /// - DEFINE_PROP_SET_OBJ(MaxItems, max_items, uint32); + DEFINE_PROP_GETSET_OBJ(MaxItems, max_items, uint32); /// /// Filter results based on the multiple states of the tournament. /// property Windows::Foundation::Collections::IVectorView^ StateFilter { + Windows::Foundation::Collections::IVectorView^ get(); void set(_In_ Windows::Foundation::Collections::IVectorView^ states); } /// /// The property used to order results. /// - DEFINE_PROP_SET_ENUM_OBJ(OrderBy, order_by, TournamentOrderBy, xbox::services::tournaments::tournament_order_by); + DEFINE_PROP_GETSET_ENUM_OBJ(OrderBy, order_by, TournamentOrderBy, xbox::services::tournaments::tournament_order_by); /// ///The order in which to sort the results. /// - DEFINE_PROP_SET_ENUM_OBJ(SortOrder, sort_order, TournamentSortOrder, xbox::services::tournaments::tournament_sort_order); + DEFINE_PROP_GETSET_ENUM_OBJ(SortOrder, sort_order, TournamentSortOrder, xbox::services::tournaments::tournament_sort_order); /// /// The organizer of the tournament. /// - DEFINE_PROP_SET_STR_OBJ(OrganizerId, organizer_id); + DEFINE_PROP_GETSET_STR_OBJ(OrganizerId, organizer_id); internal: TournamentRequest( diff --git a/Source/Services/Tournaments/team_request.cpp b/Source/Services/Tournaments/team_request.cpp index db912a1b..cab4743e 100644 --- a/Source/Services/Tournaments/team_request.cpp +++ b/Source/Services/Tournaments/team_request.cpp @@ -21,19 +21,19 @@ team_request::team_request( } const string_t& -team_request::_Organizer_id() const +team_request::organizer_id() const { return m_organizerId; } const string_t& -team_request::_Tournament_id() const +team_request::tournament_id() const { return m_tournamentId; } uint32_t -team_request::_Max_items() const +team_request::max_items() const { return m_maxItems; } @@ -47,7 +47,7 @@ team_request::set_max_items( } const std::vector& -team_request::_Team_states() const +team_request::state_filter() const { return m_states; } @@ -61,7 +61,7 @@ team_request::set_state_filter( } team_order_by -team_request::_Order_by() const +team_request::order_by() const { return m_orderBy; } diff --git a/Source/Services/Tournaments/tournament_request.cpp b/Source/Services/Tournaments/tournament_request.cpp index cc9aedb4..e691c329 100644 --- a/Source/Services/Tournaments/tournament_request.cpp +++ b/Source/Services/Tournaments/tournament_request.cpp @@ -20,13 +20,13 @@ tournament_request::tournament_request( } bool -tournament_request::_Filter_results_for_user() const +tournament_request::filter_results_for_user() const { return m_filterResultsForUser; } uint32_t -tournament_request::_Max_items() const +tournament_request::max_items() const { return m_maxItems; } @@ -40,7 +40,7 @@ tournament_request::set_max_items( } const std::vector& -tournament_request::_Tournament_states() const +tournament_request::state_filter() const { return m_states; } @@ -54,7 +54,7 @@ tournament_request::set_state_filter( } tournament_order_by -tournament_request::_Order_by() const +tournament_request::order_by() const { return m_orderBy; } @@ -68,7 +68,7 @@ tournament_request::set_order_by( } tournament_sort_order -tournament_request::_Sort_order() const +tournament_request::sort_order() const { return m_sortOrder; } @@ -82,7 +82,7 @@ tournament_request::set_sort_order( } const string_t& -tournament_request::_Organizer_id() const +tournament_request::organizer_id() const { return m_organizerId; } diff --git a/Source/Services/Tournaments/tournament_service.cpp b/Source/Services/Tournaments/tournament_service.cpp index 20c719f0..cc93e0e8 100644 --- a/Source/Services/Tournaments/tournament_service.cpp +++ b/Source/Services/Tournaments/tournament_service.cpp @@ -271,20 +271,20 @@ tournament_service::tournament_sub_path_url( subPathBuilder.append_query(_T("titleId"), m_appConfig->title_id()); subPathBuilder.append_query(_T("teamForMember"), m_userContext->xbox_user_id()); - if (request._Filter_results_for_user()) + if (request.filter_results_for_user()) { subPathBuilder.append_query(_T("memberId"), m_userContext->xbox_user_id()); } - if (!request._Organizer_id().empty()) + if (!request.organizer_id().empty()) { - subPathBuilder.append_query(_T("organizer"), request._Organizer_id()); + subPathBuilder.append_query(_T("organizer"), request.organizer_id()); } - if (request._Tournament_states().size() > 0) + if (request.state_filter().size() > 0) { string_t statesArray = L"["; - for (const auto& state : request._Tournament_states()) + for (const auto& state : request.state_filter()) { statesArray += L"\""; statesArray += convert_tournament_state_to_string(state); @@ -295,19 +295,19 @@ tournament_service::tournament_sub_path_url( subPathBuilder.append_query(_T("state"), statesArray); } - if (request._Sort_order() != tournament_sort_order::none) + if (request.sort_order() != tournament_sort_order::none) { - subPathBuilder.append_query(_T("sortOrder"), convert_tournament_sort_order_to_string(request._Sort_order())); + subPathBuilder.append_query(_T("sortOrder"), convert_tournament_sort_order_to_string(request.sort_order())); } - if (request._Order_by() != tournament_order_by::none) + if (request.order_by() != tournament_order_by::none) { - subPathBuilder.append_query(_T("orderBy"), convert_tournament_order_by_to_string(request._Order_by())); + subPathBuilder.append_query(_T("orderBy"), convert_tournament_order_by_to_string(request.order_by())); } - if (request._Max_items() > 0) + if (request.max_items() > 0) { - subPathBuilder.append_query(_T("maxItems"), request._Max_items()); + subPathBuilder.append_query(_T("maxItems"), request.max_items()); } return subPathBuilder.to_string(); @@ -322,19 +322,19 @@ tournament_service::team_sub_path_url( web::uri_builder subPathBuilder; stringstream_t path; - path << _T("/tournaments/") << request._Organizer_id() << _T("/") << request._Tournament_id() << _T("/teams"); + path << _T("/tournaments/") << request.organizer_id() << _T("/") << request.tournament_id() << _T("/teams"); subPathBuilder.set_path(path.str()); subPathBuilder.append_query(_T("memberId"), m_userContext->xbox_user_id()); - if (request._Max_items() > 0) + if (request.max_items() > 0) { - subPathBuilder.append_query(_T("maxItems"), request._Max_items()); + subPathBuilder.append_query(_T("maxItems"), request.max_items()); } - if (request._Team_states().size() > 0) + if (request.state_filter().size() > 0) { string_t statesArray = L"["; - for (const auto& state : request._Team_states()) + for (const auto& state : request.state_filter()) { statesArray += L"\""; statesArray += convert_team_state_to_string(state); @@ -345,9 +345,9 @@ tournament_service::team_sub_path_url( subPathBuilder.append_query(_T("state"), statesArray); } - if (request._Order_by() != team_order_by::none) + if (request.order_by() != team_order_by::none) { - subPathBuilder.append_query(_T("orderBy"), convert_team_order_by_to_string(request._Order_by())); + subPathBuilder.append_query(_T("orderBy"), convert_team_order_by_to_string(request.order_by())); } return subPathBuilder.to_string(); diff --git a/Source/Shared/WinRT/Macros_WinRT.h b/Source/Shared/WinRT/Macros_WinRT.h index b850337a..54d39a91 100644 --- a/Source/Shared/WinRT/Macros_WinRT.h +++ b/Source/Shared/WinRT/Macros_WinRT.h @@ -145,15 +145,6 @@ }\ } -#define DEFINE_PROP_SET_STR_OBJ(x, cppX) \ - property Platform::String^ x \ - { \ - void set(_In_ Platform::String^ value)\ - {\ - m_cppObj.set_##cppX(value->Data());\ - }\ - } - #define DEFINE_PTR_PROP_GETSET_STR_OBJ(x, cppX) \ property Platform::String^ x \ { \ @@ -180,15 +171,6 @@ }\ } -#define DEFINE_PROP_SET_OBJ(x, cppX, y) \ - property y x \ - { \ - void set(_In_ y value)\ - {\ - m_cppObj.set_##cppX(value);\ - }\ - } - #define DEFINE_PTR_PROP_GETSET_OBJ(x, cppX, y) \ property y x \ { \ @@ -332,15 +314,6 @@ }\ } -#define DEFINE_PROP_SET_ENUM_OBJ(x, cppX, y, cppY) \ - property y x \ - { \ - void set(_In_ y value)\ - {\ - m_cppObj.set_##cppX(((cppY)(value))); \ - }\ - } - #define DEFINE_PTR_PROP_GETSET_ENUM_OBJ(x, cppX, y, cppY) \ property y x \ { \ diff --git a/Tests/UnitTests/Tests/Services/TestResponses/Multiplayer.json b/Tests/UnitTests/Tests/Services/TestResponses/Multiplayer.json index 2096c278..685a611b 100644 --- a/Tests/UnitTests/Tests/Services/TestResponses/Multiplayer.json +++ b/Tests/UnitTests/Tests/Services/TestResponses/Multiplayer.json @@ -69,7 +69,7 @@ "userAuthorizationStyle": true, "crossplay": true, "searchable": true, - "connectionRequiredForActiveMembers": true, + "connectionRequiredForActiveMembers": true }, "version": 1, "maxMembersCount": 100, diff --git a/Tests/UnitTests/Tests/Services/TestResponses/Tournaments.json b/Tests/UnitTests/Tests/Services/TestResponses/Tournaments.json index 77a89d2c..d29d3234 100644 --- a/Tests/UnitTests/Tests/Services/TestResponses/Tournaments.json +++ b/Tests/UnitTests/Tests/Services/TestResponses/Tournaments.json @@ -175,7 +175,8 @@ "previousMatch": { "endTime": "2017-02-17T20:06:10.1949991Z", "result": { - "outcome": "Win" + "outcome": "Rank", + "ranking": 2 }, "label" : "Final Match", "startTime": "2017-02-17T20:06:10.1949991Z",