0a7f017b1f6f615048818c75f909abf35feda394
[vg.git] / vg_steam_friends.h
1 #ifndef VG_STEAM_FRIENDS_H
2 #define VG_STEAM_FRIENDS_H
3
4 #include "vg_steam.h"
5
6 #if defined( VALVE_CALLBACK_PACK_SMALL )
7 ;
8 #pragma pack( push, 4 )
9 #elif defined( VALVE_CALLBACK_PACK_LARGE )
10 #pragma pack( push, 8 )
11 #endif
12
13 typedef enum EPersonaChange EPersonaChange;
14 enum EPersonaChange
15 {
16 k_EPersonaChangeName = 0x0001,
17 k_EPersonaChangeStatus = 0x0002,
18 k_EPersonaChangeComeOnline = 0x0004,
19 k_EPersonaChangeGoneOffline = 0x0008,
20 k_EPersonaChangeGamePlayed = 0x0010,
21 k_EPersonaChangeGameServer = 0x0020,
22 k_EPersonaChangeAvatar = 0x0040,
23 k_EPersonaChangeJoinedSource= 0x0080,
24 k_EPersonaChangeLeftSource = 0x0100,
25 k_EPersonaChangeRelationshipChanged = 0x0200,
26 k_EPersonaChangeNameFirstSet = 0x0400,
27 k_EPersonaChangeBroadcast = 0x0800,
28 k_EPersonaChangeNickname = 0x1000,
29 k_EPersonaChangeSteamLevel = 0x2000,
30 k_EPersonaChangeRichPresence = 0x4000,
31 };
32
33 typedef enum EActivateGameOverlayToWebPageMode
34 EActivateGameOverlayToWebPageMode;
35 enum EActivateGameOverlayToWebPageMode
36 {
37 k_EActivateGameOverlayToWebPageMode_Default = 0,
38 k_EActivateGameOverlayToWebPageMode_Modal = 1
39 };
40
41 typedef enum EOverlayToStoreFlag EOverlayToStoreFlag;
42 enum EOverlayToStoreFlag
43 {
44 k_EOverlayToStoreFlag_None = 0,
45 k_EOverlayToStoreFlag_AddToCart = 1,
46 k_EOverlayToStoreFlag_AddToCartAndShow = 2,
47 };
48
49 /* ... */
50 typedef struct GameOverlayActivated_t GameOverlayActivated_t;
51 struct GameOverlayActivated_t
52 {
53 steamapi_bool m_bActive;
54 };
55 enum { k_iGameOverlayActivated = k_iSteamFriendsCallbacks + 31 };
56
57 typedef struct PersonaStateChange_t PersonaStateChange_t;
58 struct PersonaStateChange_t
59 {
60 u64 m_ulSteamID; // steamID of the friend who changed
61 int m_nChangeFlags; // what's changed
62 };
63 enum { k_iPersonaStateChange = k_iSteamFriendsCallbacks + 4 };
64
65 #pragma pack(pop)
66
67 typedef void ISteamFriends;
68 ISteamFriends *SteamAPI_SteamFriends_v017(void);
69 ISteamFriends *SteamAPI_SteamFriends(void)
70 {
71 return SteamAPI_SteamFriends_v017();
72 }
73
74 const char *SteamAPI_ISteamFriends_GetPersonaName( ISteamFriends* self );
75 const char *SteamAPI_ISteamFriends_GetFriendPersonaName( ISteamFriends* self,
76 u64 steamIDFriend );
77
78 steamapi_bool SteamAPI_ISteamFriends_RequestUserInformation(
79 ISteamFriends* self, u64_steamid steamIDUser,
80 steamapi_bool bRequireNameOnly );
81
82 void SteamAPI_ISteamFriends_ActivateGameOverlay( ISteamFriends* self,
83 const char * pchDialog );
84 void SteamAPI_ISteamFriends_ActivateGameOverlayToUser( ISteamFriends* self,
85 const char * pchDialog, u64_steamid steamID );
86 void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( ISteamFriends* self,
87 const char * pchURL, EActivateGameOverlayToWebPageMode eMode );
88 void SteamAPI_ISteamFriends_ActivateGameOverlayToStore( ISteamFriends* self,
89 AppId_t nAppID, EOverlayToStoreFlag eFlag );
90 void SteamAPI_ISteamFriends_SetPlayedWith( ISteamFriends* self,
91 u64_steamid steamIDUserPlayedWith );
92 void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog(
93 ISteamFriends* self, u64_steamid steamIDLobby );
94
95
96 enum EFriendFlags{
97 k_EFriendFlagNone = 0x00,
98 k_EFriendFlagBlocked = 0x01,
99 k_EFriendFlagFriendshipRequested = 0x02,
100 k_EFriendFlagImmediate = 0x04, // "regular" friend
101 k_EFriendFlagClanMember = 0x08,
102 k_EFriendFlagOnGameServer = 0x10,
103 // k_EFriendFlagHasPlayedWith = 0x20, // not currently used
104 // k_EFriendFlagFriendOfFriend = 0x40, // not currently used
105 k_EFriendFlagRequestingFriendship = 0x80,
106 k_EFriendFlagRequestingInfo = 0x100,
107 k_EFriendFlagIgnored = 0x200,
108 k_EFriendFlagIgnoredFriend = 0x400,
109 // k_EFriendFlagSuggested = 0x800, // not used
110 k_EFriendFlagChatMember = 0x1000,
111 k_EFriendFlagAll = 0xFFFF,
112 };
113
114 steamapi_bool SteamAPI_ISteamFriends_HasFriend( ISteamFriends* self,
115 u64_steamid steamIDFriend, int iFriendFlags );
116
117 #endif /* VG_STEAM_FRIENDS_H */