1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#ifndef _STEAM_ENUMS_H_
#define _STEAM_ENUMS_H_
enum VisibilityState
{
Private = 1,
FriendsOnly = 2,
FriendsOfFriends = 3,
UsersOnly = 4,
Public = 5,
};
enum PersonaState
{
Offline = 0,
Online = 1,
Busy = 2,
Away = 3,
Snooze = 4,
LookingToTrade = 5,
LookingToPlay = 6,
};
enum class PersonaStateFlag : int
{
None = 0,
HasRichPresence = 1,
InJoinableGame = 2,
ClientTypeWeb = 256,
ClientTypeMobile = 512,
ClientTypeBigPicture = 1024,
ClientTypeVR = 2048,
};
inline PersonaStateFlag operator &(PersonaStateFlag lhs, PersonaStateFlag rhs)
{
return static_cast<PersonaStateFlag> (
static_cast<std::underlying_type<PersonaStateFlag>::type>(lhs) &
static_cast<std::underlying_type<PersonaStateFlag>::type>(rhs));
}
enum class PersonaStatusFlag : int
{
Status = 1,
PlayerName = 2,
QueryPort = 4,
SourceID = 8,
Presence = 16,
Metadata = 32,
LastSeen = 64,
ClanInfo = 128,
GameExtraInfo = 256,
GameDataBlob = 512,
ClanTag = 1024,
Facebook = 2048,
Unknown = 4096,
};
inline PersonaStatusFlag operator &(PersonaStatusFlag lhs, PersonaStatusFlag rhs)
{
return static_cast<PersonaStatusFlag> (
static_cast<std::underlying_type<PersonaStatusFlag>::type>(lhs) &
static_cast<std::underlying_type<PersonaStatusFlag>::type>(rhs));
}
enum class PersonaRelationshipAction : int
{
// friend removed from contact list
Remove = 0,
// friend added you to ignore list
Ignore = 1,
// friend requested auth
AuthRequest = 2,
// friend added you to contact list
AddToList = 3,
// friend got (or approved?) your auth request
AuthRequested = 4,
};
template<typename T>
bool contains_flag(T x, T y) {
return (static_cast<typename std::underlying_type<T>::type>(x)
& static_cast<typename std::underlying_type<T>::type>(y))
== static_cast<typename std::underlying_type<T>::type>(y);
}
#endif //_STEAM_ENUMS_H_
|