Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

407 lines
21 KiB

  1. //====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: interface to steam ugc
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMUGC_H
  7. #define ISTEAMUGC_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "isteamclient.h"
  12. // callbacks
  13. #if defined( VALVE_CALLBACK_PACK_SMALL )
  14. #pragma pack( push, 4 )
  15. #elif defined( VALVE_CALLBACK_PACK_LARGE )
  16. #pragma pack( push, 8 )
  17. #else
  18. #error isteamclient.h must be included
  19. #endif
  20. typedef uint64 UGCQueryHandle_t;
  21. typedef uint64 UGCUpdateHandle_t;
  22. const UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffffull;
  23. const UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffffull;
  24. // Matching UGC types for queries
  25. enum EUGCMatchingUGCType
  26. {
  27. k_EUGCMatchingUGCType_Items = 0, // both mtx items and ready-to-use items
  28. k_EUGCMatchingUGCType_Items_Mtx = 1,
  29. k_EUGCMatchingUGCType_Items_ReadyToUse = 2,
  30. k_EUGCMatchingUGCType_Collections = 3,
  31. k_EUGCMatchingUGCType_Artwork = 4,
  32. k_EUGCMatchingUGCType_Videos = 5,
  33. k_EUGCMatchingUGCType_Screenshots = 6,
  34. k_EUGCMatchingUGCType_AllGuides = 7, // both web guides and integrated guides
  35. k_EUGCMatchingUGCType_WebGuides = 8,
  36. k_EUGCMatchingUGCType_IntegratedGuides = 9,
  37. k_EUGCMatchingUGCType_UsableInGame = 10, // ready-to-use items and integrated guides
  38. k_EUGCMatchingUGCType_ControllerBindings = 11,
  39. k_EUGCMatchingUGCType_GameManagedItems = 12, // game managed items (not managed by users)
  40. k_EUGCMatchingUGCType_All = ~0, // return everything
  41. };
  42. // Different lists of published UGC for a user.
  43. // If the current logged in user is different than the specified user, then some options may not be allowed.
  44. enum EUserUGCList
  45. {
  46. k_EUserUGCList_Published,
  47. k_EUserUGCList_VotedOn,
  48. k_EUserUGCList_VotedUp,
  49. k_EUserUGCList_VotedDown,
  50. k_EUserUGCList_WillVoteLater,
  51. k_EUserUGCList_Favorited,
  52. k_EUserUGCList_Subscribed,
  53. k_EUserUGCList_UsedOrPlayed,
  54. k_EUserUGCList_Followed,
  55. };
  56. // Sort order for user published UGC lists (defaults to creation order descending)
  57. enum EUserUGCListSortOrder
  58. {
  59. k_EUserUGCListSortOrder_CreationOrderDesc,
  60. k_EUserUGCListSortOrder_CreationOrderAsc,
  61. k_EUserUGCListSortOrder_TitleAsc,
  62. k_EUserUGCListSortOrder_LastUpdatedDesc,
  63. k_EUserUGCListSortOrder_SubscriptionDateDesc,
  64. k_EUserUGCListSortOrder_VoteScoreDesc,
  65. k_EUserUGCListSortOrder_ForModeration,
  66. };
  67. // Combination of sorting and filtering for queries across all UGC
  68. enum EUGCQuery
  69. {
  70. k_EUGCQuery_RankedByVote = 0,
  71. k_EUGCQuery_RankedByPublicationDate = 1,
  72. k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2,
  73. k_EUGCQuery_RankedByTrend = 3,
  74. k_EUGCQuery_FavoritedByFriendsRankedByPublicationDate = 4,
  75. k_EUGCQuery_CreatedByFriendsRankedByPublicationDate = 5,
  76. k_EUGCQuery_RankedByNumTimesReported = 6,
  77. k_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate = 7,
  78. k_EUGCQuery_NotYetRated = 8,
  79. k_EUGCQuery_RankedByTotalVotesAsc = 9,
  80. k_EUGCQuery_RankedByVotesUp = 10,
  81. k_EUGCQuery_RankedByTextSearch = 11,
  82. k_EUGCQuery_RankedByTotalUniqueSubscriptions = 12,
  83. };
  84. enum EItemUpdateStatus
  85. {
  86. k_EItemUpdateStatusInvalid = 0, // The item update handle was invalid, job might be finished, listen too SubmitItemUpdateResult_t
  87. k_EItemUpdateStatusPreparingConfig = 1, // The item update is processing configuration data
  88. k_EItemUpdateStatusPreparingContent = 2, // The item update is reading and processing content files
  89. k_EItemUpdateStatusUploadingContent = 3, // The item update is uploading content changes to Steam
  90. k_EItemUpdateStatusUploadingPreviewFile = 4, // The item update is uploading new preview file image
  91. k_EItemUpdateStatusCommittingChanges = 5 // The item update is committing all changes
  92. };
  93. enum EItemState
  94. {
  95. k_EItemStateNone = 0, // item not tracked on client
  96. k_EItemStateSubscribed = 1, // current user is subscribed to this item. Not just cached.
  97. k_EItemStateLegacyItem = 2, // item was created with ISteamRemoteStorage
  98. k_EItemStateInstalled = 4, // item is installed and usable (but maybe out of date)
  99. k_EItemStateNeedsUpdate = 8, // items needs an update. Either because it's not installed yet or creator updated content
  100. k_EItemStateDownloading = 16, // item update is currently downloading
  101. k_EItemStateDownloadPending = 32, // DownloadItem() was called for this item, content isn't available until DownloadItemResult_t is fired
  102. };
  103. enum EItemStatistic
  104. {
  105. k_EItemStatistic_NumSubscriptions = 0,
  106. k_EItemStatistic_NumFavorites = 1,
  107. k_EItemStatistic_NumFollowers = 2,
  108. k_EItemStatistic_NumUniqueSubscriptions = 3,
  109. k_EItemStatistic_NumUniqueFavorites = 4,
  110. k_EItemStatistic_NumUniqueFollowers = 5,
  111. k_EItemStatistic_NumUniqueWebsiteViews = 6,
  112. k_EItemStatistic_ReportScore = 7,
  113. };
  114. enum EItemPreviewType
  115. {
  116. k_EItemPreviewType_Image = 0,
  117. k_EItemPreviewType_YouTubeVideo = 1,
  118. k_EItemPreviewType_Sketchfab = 2,
  119. k_EItemPreviewType_ReservedMax = 255, // you can specify your own types above this value
  120. };
  121. const uint32 kNumUGCResultsPerPage = 50;
  122. const uint32 k_cchDeveloperMetadataMax = 5000;
  123. // Details for a single published file/UGC
  124. struct SteamUGCDetails_t
  125. {
  126. PublishedFileId_t m_nPublishedFileId;
  127. EResult m_eResult; // The result of the operation.
  128. EWorkshopFileType m_eFileType; // Type of the file
  129. AppId_t m_nCreatorAppID; // ID of the app that created this file.
  130. AppId_t m_nConsumerAppID; // ID of the app that will consume this file.
  131. char m_rgchTitle[k_cchPublishedDocumentTitleMax]; // title of document
  132. char m_rgchDescription[k_cchPublishedDocumentDescriptionMax]; // description of document
  133. uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content.
  134. uint32 m_rtimeCreated; // time when the published file was created
  135. uint32 m_rtimeUpdated; // time when the published file was last updated
  136. uint32 m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable)
  137. ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility
  138. bool m_bBanned; // whether the file was banned
  139. bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
  140. bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer
  141. char m_rgchTags[k_cchTagListMax]; // comma separated list of all tags associated with this file
  142. // file/url information
  143. UGCHandle_t m_hFile; // The handle of the primary file
  144. UGCHandle_t m_hPreviewFile; // The handle of the preview file
  145. char m_pchFileName[k_cchFilenameMax]; // The cloud filename of the primary file
  146. int32 m_nFileSize; // Size of the primary file
  147. int32 m_nPreviewFileSize; // Size of the preview file
  148. char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website)
  149. // voting information
  150. uint32 m_unVotesUp; // number of votes up
  151. uint32 m_unVotesDown; // number of votes down
  152. float m_flScore; // calculated score
  153. // collection details
  154. uint32 m_unNumChildren;
  155. };
  156. //-----------------------------------------------------------------------------
  157. // Purpose: Steam UGC support API
  158. //-----------------------------------------------------------------------------
  159. class ISteamUGC
  160. {
  161. public:
  162. // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
  163. virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
  164. // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
  165. virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
  166. // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this)
  167. virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
  168. // Send the query to Steam
  169. CALL_RESULT( SteamUGCQueryCompleted_t )
  170. virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
  171. // Retrieve an individual result after receiving the callback for querying UGC
  172. virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0;
  173. virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
  174. virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0;
  175. virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0;
  176. virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 *pStatValue ) = 0;
  177. virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0;
  178. virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0;
  179. virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0;
  180. virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
  181. // Release the request to free up memory, after retrieving results
  182. virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
  183. // Options to set for querying UGC
  184. virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
  185. virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
  186. virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0;
  187. virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0;
  188. virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0;
  189. virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0;
  190. virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0;
  191. virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0;
  192. virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0;
  193. virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0;
  194. // Options only for querying user UGC
  195. virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0;
  196. // Options only for querying all UGC
  197. virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0;
  198. virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0;
  199. virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0;
  200. virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0;
  201. // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead!
  202. virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
  203. // Steam Workshop Creator API
  204. CALL_RESULT( CreateItemResult_t )
  205. virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet
  206. virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate()
  207. virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item
  208. virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item
  209. virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
  210. virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
  211. virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
  212. virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item
  213. virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
  214. virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
  215. virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key
  216. virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag.
  217. virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
  218. virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item
  219. virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
  220. virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item
  221. virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted)
  222. CALL_RESULT( SubmitItemUpdateResult_t )
  223. virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate()
  224. virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0;
  225. // Steam Workshop Consumer API
  226. CALL_RESULT( SetUserItemVoteResult_t )
  227. virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
  228. CALL_RESULT( GetUserItemVoteResult_t )
  229. virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
  230. CALL_RESULT( UserFavoriteItemsListChanged_t )
  231. virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
  232. CALL_RESULT( UserFavoriteItemsListChanged_t )
  233. virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
  234. CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
  235. virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
  236. CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
  237. virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits
  238. virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items
  239. virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs
  240. // get EItemState flags about item on this client
  241. virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0;
  242. // get info about currently installed content on disc for items that have k_EItemStateInstalled set
  243. // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder)
  244. virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0;
  245. // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once
  246. virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0;
  247. // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed,
  248. // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time.
  249. // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP.
  250. virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0;
  251. // game servers can set a specific workshop folder before issuing any UGC commands.
  252. // This is helpful if you want to support multiple game servers running out of the same install folder
  253. virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0;
  254. // SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends
  255. virtual void SuspendDownloads( bool bSuspend ) = 0;
  256. };
  257. #define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION008"
  258. //-----------------------------------------------------------------------------
  259. // Purpose: Callback for querying UGC
  260. //-----------------------------------------------------------------------------
  261. struct SteamUGCQueryCompleted_t
  262. {
  263. enum { k_iCallback = k_iClientUGCCallbacks + 1 };
  264. UGCQueryHandle_t m_handle;
  265. EResult m_eResult;
  266. uint32 m_unNumResultsReturned;
  267. uint32 m_unTotalMatchingResults;
  268. bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
  269. };
  270. //-----------------------------------------------------------------------------
  271. // Purpose: Callback for requesting details on one piece of UGC
  272. //-----------------------------------------------------------------------------
  273. struct SteamUGCRequestUGCDetailsResult_t
  274. {
  275. enum { k_iCallback = k_iClientUGCCallbacks + 2 };
  276. SteamUGCDetails_t m_details;
  277. bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
  278. };
  279. //-----------------------------------------------------------------------------
  280. // Purpose: result for ISteamUGC::CreateItem()
  281. //-----------------------------------------------------------------------------
  282. struct CreateItemResult_t
  283. {
  284. enum { k_iCallback = k_iClientUGCCallbacks + 3 };
  285. EResult m_eResult;
  286. PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID
  287. bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
  288. };
  289. //-----------------------------------------------------------------------------
  290. // Purpose: result for ISteamUGC::SubmitItemUpdate()
  291. //-----------------------------------------------------------------------------
  292. struct SubmitItemUpdateResult_t
  293. {
  294. enum { k_iCallback = k_iClientUGCCallbacks + 4 };
  295. EResult m_eResult;
  296. bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
  297. };
  298. //-----------------------------------------------------------------------------
  299. // Purpose: a Workshop item has been installed or updated
  300. //-----------------------------------------------------------------------------
  301. struct ItemInstalled_t
  302. {
  303. enum { k_iCallback = k_iClientUGCCallbacks + 5 };
  304. AppId_t m_unAppID;
  305. PublishedFileId_t m_nPublishedFileId;
  306. };
  307. //-----------------------------------------------------------------------------
  308. // Purpose: result of DownloadItem(), existing item files can be accessed again
  309. //-----------------------------------------------------------------------------
  310. struct DownloadItemResult_t
  311. {
  312. enum { k_iCallback = k_iClientUGCCallbacks + 6 };
  313. AppId_t m_unAppID;
  314. PublishedFileId_t m_nPublishedFileId;
  315. EResult m_eResult;
  316. };
  317. //-----------------------------------------------------------------------------
  318. // Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites()
  319. //-----------------------------------------------------------------------------
  320. struct UserFavoriteItemsListChanged_t
  321. {
  322. enum { k_iCallback = k_iClientUGCCallbacks + 7 };
  323. PublishedFileId_t m_nPublishedFileId;
  324. EResult m_eResult;
  325. bool m_bWasAddRequest;
  326. };
  327. //-----------------------------------------------------------------------------
  328. // Purpose: The result of a call to SetUserItemVote()
  329. //-----------------------------------------------------------------------------
  330. struct SetUserItemVoteResult_t
  331. {
  332. enum { k_iCallback = k_iClientUGCCallbacks + 8 };
  333. PublishedFileId_t m_nPublishedFileId;
  334. EResult m_eResult;
  335. bool m_bVoteUp;
  336. };
  337. //-----------------------------------------------------------------------------
  338. // Purpose: The result of a call to GetUserItemVote()
  339. //-----------------------------------------------------------------------------
  340. struct GetUserItemVoteResult_t
  341. {
  342. enum { k_iCallback = k_iClientUGCCallbacks + 9 };
  343. PublishedFileId_t m_nPublishedFileId;
  344. EResult m_eResult;
  345. bool m_bVotedUp;
  346. bool m_bVotedDown;
  347. bool m_bVoteSkipped;
  348. };
  349. #pragma pack( pop )
  350. #endif // ISTEAMUGC_H