Skip to content

Commit 1189ba7

Browse files
authored
2410 GDK (#603)
* 2410 GDK * Removing NogginOutput folder
1 parent 8744d20 commit 1189ba7

File tree

16 files changed

+311
-30
lines changed

16 files changed

+311
-30
lines changed

External/Xal/Source/Xal/Include/Xal/xal_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ extern "C"
2020
/// YYYYMMDD Date string describing the date the build was created
2121
/// rrr QFE number (000 indicates base release)
2222
/// </summary>
23-
#define XAL_VERSION "2024.02.20240220.000"
23+
#define XAL_VERSION "2024.10.20240920.000"
2424

2525
}

Include/xsapi-c/docs/xsapi-c/atoc-xsapi-c.md.txt

Whitespace-only changes.

Include/xsapi-c/presence_c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ STDAPI XblPresenceGetPresenceForMultipleUsersResult(
595595
/// </summary>
596596
/// <param name="xblContextHandle">Xbox live context for the local user.</param>
597597
/// <param name="socialGroupName">The name of the group of users to get presence for.
598-
/// This can be either "Favorites" or "People".</param>
598+
/// This can be either "Favorites" to retrieve information about favorites, "People" to retrieve information about mutual friends and people a user follows, or "Friends" to retrieve information about mutual friends.</param>
599599
/// <param name="socialGroupOwnerXuid">The user whose group should be targeted. If the input is null, current user will be used.</param>
600600
/// <param name="filters">Optional filters struct to filter results.</param>
601601
/// <param name="async">The AsyncBlock for this operation.</param>

Include/xsapi-c/social_c.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,13 @@ typedef struct XblSocialRelationship
217217
bool isFavorite;
218218

219219
/// <summary>
220-
/// Indicates whether the person is following the person that requested the information.
220+
/// Indicates whether there exists a mutual follower/following relation between a user and another Xbox User
221+
/// </summary>
222+
bool isFriend;
223+
224+
/// <summary>
225+
/// Does not reflect a follower/following relationship, is currently kept for backwards compatibility purposes.
226+
/// The value of this field is determined by the value of 'isFriend' within a XblSocialRelationship
221227
/// </summary>
222228
bool isFollowingCaller;
223229

Include/xsapi-c/social_manager_c.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,19 @@ typedef struct XblSocialManagerUser
336336
bool isFavorite;
337337

338338
/// <summary>
339-
/// Whether the calling user is following them.
339+
/// Indicates whether there exists a mutual follower/following relation between a user and another user
340+
/// </summary>
341+
bool isFriend;
342+
343+
/// <summary>
344+
/// No longer indicates whether a calling user is following a given user. Kept for backwards compatibility purposes.
345+
/// The value of this field is determined by the value of 'isFriend'
340346
/// </summary>
341347
bool isFollowingUser;
342348

343349
/// <summary>
344-
/// Whether they calling user is followed by this person.
350+
/// No longer indicates whether a calling user is followed by given user. Kept for backwards compatibility purposes.
351+
/// The value of this field is determined by the value of 'isFriend'
345352
/// </summary>
346353
bool isFollowedByCaller;
347354

Include/xsapi-cpp/impl/social.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ xbox_social_relationship::xbox_social_relationship(
1616
m_xuid{ Utils::StringTFromUint64(socialRelationship.xboxUserId) },
1717
m_isFavorite{ socialRelationship.isFavorite },
1818
m_isFollowingCaller{ socialRelationship.isFollowingCaller },
19+
m_isFriend{ socialRelationship.isFriend },
1920
m_socialNetworks{ Utils::Transform<string_t>(socialRelationship.socialNetworks, socialRelationship.socialNetworksCount, Utils::StringTFromUtf8) }
2021
{
2122
}
@@ -35,6 +36,11 @@ bool xbox_social_relationship::is_following_caller() const
3536
return m_isFollowingCaller;
3637
}
3738

39+
bool xbox_social_relationship::is_friend() const
40+
{
41+
return m_isFriend;
42+
}
43+
3844
const std::vector<string_t>& xbox_social_relationship::social_networks() const
3945
{
4046
return m_socialNetworks;

Include/xsapi-cpp/social.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,14 @@ class xbox_social_relationship
218218
inline bool is_favorite() const;
219219

220220
/// <summary>
221-
/// Indicates whether the person is following the person that requested the information.
221+
/// Indicates whether the person is a friend (mutual follower) of the user.
222+
/// </summary>
223+
inline bool is_friend() const;
224+
225+
/// <summary>
226+
/// Does not indicate a following/follower relation between caller user other users.
227+
/// Currently will return true if a person is a mutual follower of a user that
228+
/// requested information (this is dependent on the value of 'isFriend' field).
222229
/// </summary>
223230
inline bool is_following_caller() const;
224231

@@ -238,6 +245,7 @@ class xbox_social_relationship
238245
string_t m_xuid;
239246
bool m_isFavorite{ false };
240247
bool m_isFollowingCaller{ false };
248+
bool m_isFriend{ false };
241249
std::vector<string_t> m_socialNetworks;
242250
};
243251

Source/Services/Social/Manager/peoplehub_service.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ HRESULT PeoplehubService::GetSocialUsers(
3636
{
3737
return MakeServiceCall(xuid, decorations, RelationshipType::Batch, xuids, async);
3838
}
39-
39+
4040
HRESULT PeoplehubService::MakeServiceCall(
4141
_In_ uint64_t xuid,
4242
_In_ XblSocialManagerExtraDetailLevel decorations,
@@ -54,7 +54,7 @@ HRESULT PeoplehubService::MakeServiceCall(
5454
{
5555
case RelationshipType::Social:
5656
{
57-
subpath << "social";
57+
subpath << "friends";
5858
break;
5959
}
6060
case RelationshipType::Batch:
@@ -99,7 +99,7 @@ HRESULT PeoplehubService::MakeServiceCall(
9999
xbox_live_api::get_social_graph
100100
));
101101

102-
httpCall->SetXblServiceContractVersion(5);
102+
httpCall->SetXblServiceContractVersion(7);
103103

104104
if (!bodyJson.IsNull())
105105
{
@@ -166,9 +166,8 @@ Result<XblSocialManagerUser> PeoplehubService::DeserializeUser(
166166
}
167167

168168
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonXuid(json, "xuid", user.xboxUserId, true));
169-
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(json, "isFavorite", user.isFavorite));
170-
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(json, "isFollowedByCaller", user.isFollowedByCaller));
171-
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(json, "isFollowingCaller", user.isFollowingUser));
169+
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(json, "isFriend", user.isFriend));
170+
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(json, "isFavorite", user.isFavorite));
172171
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringToCharArray(json, "displayName", user.displayName, sizeof(user.displayName)));
173172
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringToCharArray(json, "realName", user.realName, sizeof(user.realName)));
174173
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringToCharArray(json, "displayPicRaw", user.displayPicUrlRaw, sizeof(user.displayPicUrlRaw)));
@@ -179,6 +178,14 @@ Result<XblSocialManagerUser> PeoplehubService::DeserializeUser(
179178
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringToCharArray(json, "uniqueModernGamertag", user.uniqueModernGamertag, sizeof(user.uniqueModernGamertag)));
180179
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonStringToCharArray(json, "gamerScore", user.gamerscore, sizeof(user.gamerscore)));
181180

181+
// isFavorite should reflect both isFavorite && isFriend from the service response
182+
user.isFavorite = user.isFavorite && user.isFriend;
183+
// Shim isFollowingUser and isFollowedByCaller to be true if isFriend is true
184+
// This is purely for compatibility purposes and doesn’t reflect a follower/following relationship
185+
user.isFollowedByCaller = user.isFriend;
186+
user.isFollowingUser = user.isFriend;
187+
188+
182189
auto presenceRecordResult = DeserializePresenceRecord(json);
183190
if (Succeeded(presenceRecordResult))
184191
{

Source/Services/Social/Manager/social_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ void SocialGraph::StopTrackingUsers(
443443
for (auto xuid : xuids)
444444
{
445445
auto iter{ m_trackedUsers.find(xuid) };
446-
if (--iter->second.refCount == 0)
446+
if (iter != m_trackedUsers.end() && --iter->second.refCount == 0)
447447
{
448448
m_trackedUsers.erase(iter);
449449
m_pendingUpdates[xuid] = { ProfileChanges::None, nullptr };

Source/Services/Social/social_relationship_result.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ Result<std::shared_ptr<XblSocialRelationshipResult>> XblSocialRelationshipResult
3939
XblSocialRelationship relationship{};
4040
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonXuid(person, "xuid", relationship.xboxUserId, true));
4141
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(person, "isFavorite", relationship.isFavorite));
42-
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(person, "isFollowingCaller", relationship.isFollowingCaller));
42+
RETURN_HR_IF_FAILED(JsonUtils::ExtractJsonBool(person, "isFriend", relationship.isFriend));
4343

44+
// isFavorite should reflect the vlaues of 'isFavorite' and ‘isFriend’ from the service response
45+
relationship.isFavorite = relationship.isFavorite && relationship.isFriend;
46+
// Shimming isFriend response into isFollowingCaller for compatibility purposes.
47+
// This does not reflect a follower/following relationship.
48+
relationship.isFollowingCaller = relationship.isFriend;
4449
xsapi_internal_vector<xsapi_internal_string> socialNetworksInternalVector;
4550
JsonUtils::ExtractJsonVector<xsapi_internal_string>(JsonUtils::JsonStringExtractor, person, "socialNetworks", socialNetworksInternalVector, false);
4651
UTF8StringArray socialNetworks(socialNetworksInternalVector);

0 commit comments

Comments
 (0)