// Include this to get access to all Fame-related Sentient features.
#pragma once
#include"SenClientSys.h"
namespaceSentient
{
/**********************
*****FameTypes*****
**********************/
enumSenFameVIPLevel
{
SenFameVIPLevel_Unknown=0xFFFFFFFF,
SenFameVIPLevel_Fan=0,
SenFameVIPLevel_Newcomer=1,
SenFameVIPLevel_UpAndComing=2,
SenFameVIPLevel_Headliner=3,
SenFameVIPLevel_Star=4,
SenFameVIPLevel_Superstar=5,
};
/// @brief Information about a user's VIP status
///
/// @details This structure contains the user's current VIP level and fame points
///
structSenFameVIPData
{
PlayerUIDuser;///< ID for the user whose VIP status this instance describes
unsignedintvipLevel;///< Current VIP level [0-n]
unsignedintlastAckedVIPLevel;///< VIP level last time this structure was acknowledged by a Sentient client
unsignedintfamePointsCurrent;///< Fame Points accrued across all Fame titles since the last VIP level passed.
unsignedintfamePointsWeek;///< Fame Points accrued across all Fame titles this week.
unsignedintfamePointsLifetime;///< Fame Points accrued across all Fame titles over the user's entire history.
unsignedintpointsToNextLevel;///< Incremental Fame Points that must be acquired to gain a new VIP level.
unsignedintsuperstarCounter;///< Number of times the user has achieved the maximum possible VIP level.
SYSTEMTIMEvipLevelExpiresAt;///< Date at which current VIP level will expire. Only relevant when vipLevelExpires is true.
boolvipLevelExpires;///< Whether or not the current VIP level will expire.
};
/// @brief Information about a single row in a Fame leaderboard
///
/// @details This structure contains the identity of the user and summary information about their Fame status
///
structSenFameLeaderboardEntry
{
PlayerUIDuser;///< ID for the user this row describes
unsignedintvipLevel;///< Current VIP level[0-n]
unsignedintfamePoints;///< Fame Points accrued. May be weekly or lifetime depending on leaderboard type queried.
unsignedintsuperstarCounter;///< Number of times the user has achieved the maximum possible VIP level.
unsignedintrank;///< Global rank in the leaderboard [1-n]
};
/// @brief Leaderboard query ranking options
///
/// @details When querying leaderboards, these are the options for how the leaderboard is ranked.
///
enumSenFameLeaderboardRankType
{
SenFameLeaderboardRankType_Week,///< Return ranking for fame points earned this week.
SenFameLeaderboardRankType_Lifetime,///< Return ranking for fame points earned all time
SenFameLeaderboardRankType_Superstar///< Return ranking for superstar counter
};
/// @brief Leaderboard query filter options
///
/// @details When querying leaderboards, these are the options for how the leaderboard is filtered.
///
enumSenFameLeaderboardFilter
{
SenFameLeaderboardFilter_Everyone=0,///< Return the unfiltered leaderboard
SenFameLeaderboardFilter_Friends,///< Filter leaderboard by friends.
};
/// @brief Information about the parameters for a leaderboard query
///
/// @details This structure should be filled in to specify parameters for a leaderboard query
///
structSenFameLeaderboardRequest
{
SenFameLeaderboardRankTypetype;///< Ranking option for this query.
SenFameLeaderboardFilterfilter;///< Filter option for this query.
intstartIndex;///< Rank at which leaderboard query should start. Set to -1 to center on querying user.
};
/// @brief Information about the results of a leaderboard query
///
/// @details This structure contains information about the results of a leaderboard query.
///
structSenFameLeaderboardResults
{
unsignedintplayerIndex;///< When playerIndex < numEntriesReturned, provides the index into result set at which the row for the querying user is located.
size_tnumEntriesReturned;///< Number of rows returned by the query.
size_tnumLeaderboardEntries;///< Total number of rows in the leaderboard.
};
/// @brief Fame progress (challenge) types
///
/// @details Defines a set of well-known challenge types, plus a range for titles to use for their custom challenge types
///
enumSenFameProgressID
{
SenFameProgressID_TitleDefinedFirst=0,///< First possible ID for a title-defined challenge.
SenFameProgressID_TitleDefinedLast=1023,///< Last possible ID for a title-defined challenge.
SenFameProgressID_FirstPlay=1024,///< Challenge tracks the first time a user plays a given title. This challenge is implemented on the Sentient server. Do not submit updates for it.
SenFameProgressID_AvatarAward1,///< Challenge tracks the user receiving the first available Avatar Award. Progress against this challenge must be submitted by titles.
SenFameProgressID_AvatarAward2,///< Challenge tracks the user receiving the second available Avatar Award. Progress against this challenge must be submitted by titles.
SenFameProgressID_FriendsOwnTitle,
// These challenges are not currently implemented. Contact senhelp@microsoft.com before using.
SenFameProgressID_MPWithFriend,
SenFameProgressID_MPWithVIP1,
SenFameProgressID_MPWithVIP2,
SenFameProgressID_MPWithVIP3,
SenFameProgressID_MPWithVIP4,
SenFameProgressID_MPWithVIP5,
SenFameProgressID_FriendsAtVIP1,
SenFameProgressID_FriendsAtVIP2,
SenFameProgressID_FriendsAtVIP3,
SenFameProgressID_FriendsAtVIP4,
SenFameProgressID_FriendsAtVIP5,
SenFameProgressID_Invalid=0xffffffff///< Reserved identifier for an invalid challenge.
};
/// @brief Constants that may be reported when Fame APIs return a count.
enumSenFameCount:unsignedint
{
SenFameCount_Unbounded=0xffffffff///< Indicates that there is no fixed limit on the number of items.
};
/// @brief Information about a granted award (milestone)
///
/// @details When querying for awards, this structure will be filled out with summary information about any award granted to the user.
structSenAwardMessageData
{
wchar_tawardDesc[128];///< Localized string containing a message for display.
unsignedintawardPoints;///< Fame Points granted as a result of this award.
unsignedintawardTrigger;///< Progress within the associated Challenge that caused the award to trigger.
};
/// @brief Measures a time period.
///
/// @details Provides a display-friendly way to report time differences - e.g. the time until the current Fame week expires.
structSenFameTime
{
intdays;
inthours;
intminutes;
intseconds;
};
/// @brief Information about a user's progress against a single Challenge
///
/// @details Provides a display-friendly format for retrieving information about a user's progress against Fame Challenges.
///
structSenFameDisplayData
{
wchar_tmilestoneTypeDescription[128];///< Localized string that describes the challenge.
SenFameProgressIDmilestoneTypeID;///< ID for the Challenge.
unsignedintmilestoneCount;///< Total number of milestones (awards) available for this Challenge. May be SenFameCount_Unbounded.
unsignedintcurrentMilestone;///< Index of the milestone the user is currently working towards (i.e. 0 indicates no milestones have been passed).
unsignedintxpSinceLastMilestone;///< Progress achieved since the last milestone in this Challenge was passed.
unsignedintxpToNextMilestone;///< Progress required to hit the next milestone in this Challenge. Expressed as the progress difference between milestones, i.e. does not vary with xpSinceLastMilestone
unsignedintfamePointsSoFar;///< Fame Points achieved in this Challenge.
unsignedintfamePointsMaximum;///< Total Fame Points available from this Challenge. May be SenFameCount_Unbounded.
boolisWeekly;///< When true, progress against this Challenge is reset weekly.
};
/// @brief Information about a participant in a multiplayer game.
///
/// @details Use for reporting information about multiplayer games to the Sentient server.
///
structSenFameMPGameParticipant
{
PlayerUIDuser;///< ID of a user who should be credited with participation in the game.
boolwinner;///< When true, this user should be considered among the winners of the game. There are no restrictions on the number of 'winners' a game may have.
};
/**************************
*****FameFunctions*****
**************************/
/// @brief Query the server for VIP status information for a collection of arbitrary users.
///
/// @param[in] userIndex
/// The index of the initiating user on the console. Note: This is NOT a XUID.
///
/// @param[in] userIDCount
/// The number of valid XUIDs in @a userIDArray
///
/// @param[in] userIDArray
/// Users for whom VIP data should be retrieved.
///
/// @param[out] out_userFameVIPArray
/// The structures to fill in with the retrieved information.
/// It is assumed that this is preallocated to at least @a userIDCount entries.
///
/// @param[in] userCallback
/// If this call returns a success code, the userCallback will be called at the end of the asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.