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.

517 lines
24 KiB

  1. //====== Copyright (C) 1996-2008, Valve Corporation, All rights reserved. =====
  2. //
  3. // Purpose: interface to both friends list data and general information about users
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMFRIENDS_H
  7. #define ISTEAMFRIENDS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "isteamclient.h"
  12. #include "steamclientpublic.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose: set of relationships to other users
  15. //-----------------------------------------------------------------------------
  16. enum EFriendRelationship
  17. {
  18. k_EFriendRelationshipNone = 0,
  19. k_EFriendRelationshipBlocked = 1,
  20. k_EFriendRelationshipRequestRecipient = 2,
  21. k_EFriendRelationshipFriend = 3,
  22. k_EFriendRelationshipRequestInitiator = 4,
  23. k_EFriendRelationshipIgnored = 5,
  24. k_EFriendRelationshipIgnoredFriend = 6,
  25. k_EFriendRelationshipSuggested = 7,
  26. // keep this updated
  27. k_EFriendRelationshipMax = 8,
  28. };
  29. // maximum length of friend group name (not including terminating nul!)
  30. const int k_cchMaxFriendsGroupName = 64;
  31. // maximum number of groups a single user is allowed
  32. const int k_cFriendsGroupLimit = 100;
  33. //-----------------------------------------------------------------------------
  34. // Purpose: list of states a friend can be in
  35. //-----------------------------------------------------------------------------
  36. enum EPersonaState
  37. {
  38. k_EPersonaStateOffline = 0, // friend is not currently logged on
  39. k_EPersonaStateOnline = 1, // friend is logged on
  40. k_EPersonaStateBusy = 2, // user is on, but busy
  41. k_EPersonaStateAway = 3, // auto-away feature
  42. k_EPersonaStateSnooze = 4, // auto-away for a long time
  43. k_EPersonaStateLookingToTrade = 5, // Online, trading
  44. k_EPersonaStateLookingToPlay = 6, // Online, wanting to play
  45. k_EPersonaStateMax,
  46. };
  47. //-----------------------------------------------------------------------------
  48. // Purpose: flags for enumerating friends list, or quickly checking a the relationship between users
  49. //-----------------------------------------------------------------------------
  50. enum EFriendFlags
  51. {
  52. k_EFriendFlagNone = 0x00,
  53. k_EFriendFlagBlocked = 0x01,
  54. k_EFriendFlagFriendshipRequested = 0x02,
  55. k_EFriendFlagImmediate = 0x04, // "regular" friend
  56. k_EFriendFlagClanMember = 0x08,
  57. k_EFriendFlagOnGameServer = 0x10,
  58. // k_EFriendFlagHasPlayedWith = 0x20, // not currently used
  59. // k_EFriendFlagFriendOfFriend = 0x40, // not currently used
  60. k_EFriendFlagRequestingFriendship = 0x80,
  61. k_EFriendFlagRequestingInfo = 0x100,
  62. k_EFriendFlagIgnored = 0x200,
  63. k_EFriendFlagIgnoredFriend = 0x400,
  64. k_EFriendFlagSuggested = 0x800,
  65. k_EFriendFlagAll = 0xFFFF,
  66. };
  67. // friend game played information
  68. #pragma pack( push, 8 )
  69. struct FriendGameInfo_t
  70. {
  71. CGameID m_gameID;
  72. uint32 m_unGameIP;
  73. uint16 m_usGamePort;
  74. uint16 m_usQueryPort;
  75. CSteamID m_steamIDLobby;
  76. };
  77. #pragma pack( pop )
  78. // maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
  79. // The UTF-8 version has to be very generous to accomodate characters that get large when encoded
  80. // in UTF-8.
  81. enum
  82. {
  83. k_cchPersonaNameMax = 128,
  84. k_cwchPersonaNameMax = 32,
  85. };
  86. //-----------------------------------------------------------------------------
  87. // Purpose: user restriction flags
  88. //-----------------------------------------------------------------------------
  89. enum EUserRestriction
  90. {
  91. k_nUserRestrictionNone = 0, // no known chat/content restriction
  92. k_nUserRestrictionUnknown = 1, // we don't know yet (user offline)
  93. k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat
  94. k_nUserRestrictionVoiceChat = 4, // user is not allowed to (or can't) send/recv voice chat
  95. k_nUserRestrictionGroupChat = 8, // user is not allowed to (or can't) send/recv group chat
  96. k_nUserRestrictionRating = 16, // user is too young according to rating in current region
  97. };
  98. // size limit on chat room or member metadata
  99. const uint32 k_cubChatMetadataMax = 8192;
  100. // size limits on Rich Presence data
  101. enum { k_cchMaxRichPresenceKeys = 20 };
  102. enum { k_cchMaxRichPresenceKeyLength = 64 };
  103. enum { k_cchMaxRichPresenceValueLength = 256 };
  104. //-----------------------------------------------------------------------------
  105. // Purpose: interface to accessing information about individual users,
  106. // that can be a friend, in a group, on a game server or in a lobby with the local user
  107. //-----------------------------------------------------------------------------
  108. class ISteamFriends
  109. {
  110. public:
  111. // returns the local players name - guaranteed to not be NULL.
  112. // this is the same name as on the users community profile page
  113. // this is stored in UTF-8 format
  114. // like all the other interface functions that return a char *, it's important that this pointer is not saved
  115. // off; it will eventually be free'd or re-allocated
  116. virtual const char *GetPersonaName() = 0;
  117. // sets the player name, stores it on the server and publishes the changes to all friends who are online
  118. virtual void SetPersonaName( const char *pchPersonaName ) = 0;
  119. // gets the status of the current user
  120. virtual EPersonaState GetPersonaState() = 0;
  121. // friend iteration
  122. // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria
  123. // then GetFriendByIndex() can then be used to return the id's of each of those users
  124. virtual int GetFriendCount( int iFriendFlags ) = 0;
  125. // returns the steamID of a user
  126. // iFriend is a index of range [0, GetFriendCount())
  127. // iFriendsFlags must be the same value as used in GetFriendCount()
  128. // the returned CSteamID can then be used by all the functions below to access details about the user
  129. virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0;
  130. // returns a relationship to a user
  131. virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0;
  132. // returns the current status of the specified user
  133. // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user
  134. virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0;
  135. // returns the name another user - guaranteed to not be NULL.
  136. // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user
  137. // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously
  138. //
  139. virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0;
  140. // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details
  141. virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0;
  142. // accesses old friends names - returns an empty string when their are no more items in the history
  143. virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0;
  144. // returns true if the specified user meets any of the criteria specified in iFriendFlags
  145. // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values
  146. virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0;
  147. // clan (group) iteration and access functions
  148. virtual int GetClanCount() = 0;
  149. virtual CSteamID GetClanByIndex( int iClan ) = 0;
  150. virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
  151. virtual const char *GetClanTag( CSteamID steamIDClan ) = 0;
  152. // returns the most recent information we have about what's happening in a clan
  153. virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0;
  154. // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest
  155. virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0;
  156. // iterators for getting users in a chat room, lobby, game server or clan
  157. // note that large clans that cannot be iterated by the local user
  158. // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby
  159. // steamIDSource can be the steamID of a group, game server, lobby or chat room
  160. virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0;
  161. virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;
  162. // returns true if the local user can see that steamIDUser is a member or in steamIDSource
  163. virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0;
  164. // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)
  165. virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0;
  166. // activates the game overlay, with an optional dialog to open
  167. // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements"
  168. virtual void ActivateGameOverlay( const char *pchDialog ) = 0;
  169. // activates game overlay to a specific place
  170. // valid options are
  171. // "steamid" - opens the overlay web browser to the specified user or groups profile
  172. // "chat" - opens a chat window to the specified user, or joins the group chat
  173. // "tradeinvite" - opens a chat window to the specified user and invites them to trade
  174. // "stats" - opens the overlay web browser to the specified user's stats
  175. // "achievements" - opens the overlay web browser to the specified user's achievements
  176. virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0;
  177. // activates game overlay web browser directly to the specified URL
  178. // full address with protocol type is required, e.g. http://www.steamgames.com/
  179. virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0;
  180. // activates game overlay to store page for app
  181. virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0;
  182. // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is
  183. // in game
  184. virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0;
  185. // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.
  186. // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby.
  187. virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0;
  188. // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
  189. virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0;
  190. // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
  191. virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0;
  192. // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
  193. // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again
  194. virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0;
  195. // requests information about a user - persona name & avatar
  196. // if bRequireNameOnly is set, then the avatar of a user isn't downloaded
  197. // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them
  198. // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved
  199. // if returns false, it means that we already have all the details about that user, and functions can be called immediately
  200. virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0;
  201. // requests information about a clan officer list
  202. // when complete, data is returned in ClanOfficerListResponse_t call result
  203. // this makes available the calls below
  204. // you can only ask about clans that a user is a member of
  205. // note that this won't download avatars automatically; if you get an officer,
  206. // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar
  207. virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0;
  208. // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed
  209. // returns the steamID of the clan owner
  210. virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0;
  211. // returns the number of officers in a clan (including the owner)
  212. virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0;
  213. // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)
  214. virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0;
  215. // if current user is chat restricted, he can't send or receive any text/voice chat messages.
  216. // the user can't see custom avatars. But the user can be online and send/recv game invites.
  217. // a chat restricted user can't add friends or join any groups.
  218. virtual uint32 GetUserRestrictions() = 0;
  219. // Rich Presence data is automatically shared between friends who are in the same game
  220. // Each user has a set of Key/Value pairs
  221. // Up to 20 different keys can be set
  222. // There are two magic keys:
  223. // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list
  224. // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game
  225. // GetFriendRichPresence() returns an empty string "" if no value is set
  226. // SetRichPresence() to a NULL or an empty string deletes the key
  227. // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()
  228. // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging)
  229. virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0;
  230. virtual void ClearRichPresence() = 0;
  231. virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0;
  232. virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0;
  233. virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0;
  234. // rich invite support
  235. // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game
  236. // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string
  237. // invites can only be sent to friends
  238. virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0;
  239. // recently-played-with friends iteration
  240. // this iterates the entire list of users recently played with, across games
  241. // GetFriendCoplayTime() returns as a unix time
  242. virtual int GetCoplayFriendCount() = 0;
  243. virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0;
  244. virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0;
  245. virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0;
  246. // chat interface for games
  247. // this allows in-game access to group (clan) chats from in the game
  248. // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay
  249. // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat
  250. virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0;
  251. virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0;
  252. virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0;
  253. virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0;
  254. virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0;
  255. virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *, CSteamID * ) = 0;
  256. virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0;
  257. // interact with the Steam (game overlay / desktop)
  258. virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0;
  259. virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
  260. virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
  261. // peer-to-peer chat interception
  262. // this is so you can show P2P chats inline in the game
  263. virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0;
  264. virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0;
  265. virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
  266. };
  267. #define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends010"
  268. // callbacks
  269. #pragma pack( push, 8 )
  270. //-----------------------------------------------------------------------------
  271. // Purpose: called when a friends' status changes
  272. //-----------------------------------------------------------------------------
  273. struct PersonaStateChange_t
  274. {
  275. enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
  276. uint64 m_ulSteamID; // steamID of the friend who changed
  277. int m_nChangeFlags; // what's changed
  278. };
  279. // used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user
  280. // these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend
  281. enum EPersonaChange
  282. {
  283. k_EPersonaChangeName = 0x001,
  284. k_EPersonaChangeStatus = 0x002,
  285. k_EPersonaChangeComeOnline = 0x004,
  286. k_EPersonaChangeGoneOffline = 0x008,
  287. k_EPersonaChangeGamePlayed = 0x010,
  288. k_EPersonaChangeGameServer = 0x020,
  289. k_EPersonaChangeAvatar = 0x040,
  290. k_EPersonaChangeJoinedSource= 0x080,
  291. k_EPersonaChangeLeftSource = 0x100,
  292. k_EPersonaChangeRelationshipChanged = 0x200,
  293. k_EPersonaChangeNameFirstSet = 0x400,
  294. k_EPersonaChangeFacebookInfo = 0x800,
  295. };
  296. //-----------------------------------------------------------------------------
  297. // Purpose: posted when game overlay activates or deactivates
  298. // the game can use this to be pause or resume single player games
  299. //-----------------------------------------------------------------------------
  300. struct GameOverlayActivated_t
  301. {
  302. enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
  303. uint8 m_bActive; // true if it's just been activated, false otherwise
  304. };
  305. //-----------------------------------------------------------------------------
  306. // Purpose: called when the user tries to join a different game server from their friends list
  307. // game client should attempt to connect to specified server when this is received
  308. //-----------------------------------------------------------------------------
  309. struct GameServerChangeRequested_t
  310. {
  311. enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
  312. char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com")
  313. char m_rgchPassword[64]; // server password, if any
  314. };
  315. //-----------------------------------------------------------------------------
  316. // Purpose: called when the user tries to join a lobby from their friends list
  317. // game client should attempt to connect to specified lobby when this is received
  318. //-----------------------------------------------------------------------------
  319. struct GameLobbyJoinRequested_t
  320. {
  321. enum { k_iCallback = k_iSteamFriendsCallbacks + 33 };
  322. CSteamID m_steamIDLobby;
  323. // The friend they did the join via (will be invalid if not directly via a friend)
  324. //
  325. // On PS3, the friend will be invalid if this was triggered by a PSN invite via the XMB, but
  326. // the account type will be console user so you can tell at least that this was from a PSN friend
  327. // rather than a Steam friend.
  328. CSteamID m_steamIDFriend;
  329. };
  330. //-----------------------------------------------------------------------------
  331. // Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call
  332. // if the image wasn't already available
  333. //-----------------------------------------------------------------------------
  334. struct AvatarImageLoaded_t
  335. {
  336. enum { k_iCallback = k_iSteamFriendsCallbacks + 34 };
  337. CSteamID m_steamID; // steamid the avatar has been loaded for
  338. int m_iImage; // the image index of the now loaded image
  339. int m_iWide; // width of the loaded image
  340. int m_iTall; // height of the loaded image
  341. };
  342. //-----------------------------------------------------------------------------
  343. // Purpose: marks the return of a request officer list call
  344. //-----------------------------------------------------------------------------
  345. struct ClanOfficerListResponse_t
  346. {
  347. enum { k_iCallback = k_iSteamFriendsCallbacks + 35 };
  348. CSteamID m_steamIDClan;
  349. int m_cOfficers;
  350. uint8 m_bSuccess;
  351. };
  352. //-----------------------------------------------------------------------------
  353. // Purpose: callback indicating updated data about friends rich presence information
  354. //-----------------------------------------------------------------------------
  355. struct FriendRichPresenceUpdate_t
  356. {
  357. enum { k_iCallback = k_iSteamFriendsCallbacks + 36 };
  358. CSteamID m_steamIDFriend; // friend who's rich presence has changed
  359. AppId_t m_nAppID; // the appID of the game (should always be the current game)
  360. };
  361. //-----------------------------------------------------------------------------
  362. // Purpose: called when the user tries to join a game from their friends list
  363. // rich presence will have been set with the "connect" key which is set here
  364. //-----------------------------------------------------------------------------
  365. struct GameRichPresenceJoinRequested_t
  366. {
  367. enum { k_iCallback = k_iSteamFriendsCallbacks + 37 };
  368. CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
  369. char m_rgchConnect[k_cchMaxRichPresenceValueLength];
  370. };
  371. //-----------------------------------------------------------------------------
  372. // Purpose: a chat message has been received for a clan chat the game has joined
  373. //-----------------------------------------------------------------------------
  374. struct GameConnectedClanChatMsg_t
  375. {
  376. enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
  377. CSteamID m_steamIDClanChat;
  378. CSteamID m_steamIDUser;
  379. int m_iMessageID;
  380. };
  381. //-----------------------------------------------------------------------------
  382. // Purpose: a user has joined a clan chat
  383. //-----------------------------------------------------------------------------
  384. struct GameConnectedChatJoin_t
  385. {
  386. enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
  387. CSteamID m_steamIDClanChat;
  388. CSteamID m_steamIDUser;
  389. };
  390. //-----------------------------------------------------------------------------
  391. // Purpose: a user has left the chat we're in
  392. //-----------------------------------------------------------------------------
  393. struct GameConnectedChatLeave_t
  394. {
  395. enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
  396. CSteamID m_steamIDClanChat;
  397. CSteamID m_steamIDUser;
  398. bool m_bKicked; // true if admin kicked
  399. bool m_bDropped; // true if Steam connection dropped
  400. };
  401. //-----------------------------------------------------------------------------
  402. // Purpose: a DownloadClanActivityCounts() call has finished
  403. //-----------------------------------------------------------------------------
  404. struct DownloadClanActivityCountsResult_t
  405. {
  406. enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
  407. bool m_bSuccess;
  408. };
  409. //-----------------------------------------------------------------------------
  410. // Purpose: a JoinClanChatRoom() call has finished
  411. //-----------------------------------------------------------------------------
  412. struct JoinClanChatRoomCompletionResult_t
  413. {
  414. enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
  415. CSteamID m_steamIDClanChat;
  416. EChatRoomEnterResponse m_eChatRoomEnterResponse;
  417. };
  418. //-----------------------------------------------------------------------------
  419. // Purpose: a chat message has been received from a user
  420. //-----------------------------------------------------------------------------
  421. struct GameConnectedFriendChatMsg_t
  422. {
  423. enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
  424. CSteamID m_steamIDUser;
  425. int m_iMessageID;
  426. };
  427. #pragma pack( pop )
  428. #endif // ISTEAMFRIENDS_H