-
Notifications
You must be signed in to change notification settings - Fork 0
/
SteamID.hpp
63 lines (46 loc) · 1.62 KB
/
SteamID.hpp
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
#pragma once
#include <regex>
class SteamID {
public:
// SteamID universes
static const int UNIVERSE_INVALID = 0;
static const int UNIVERSE_PUBLIC = 1;
static const int UNIVERSE_BETA = 2;
static const int UNIVERSE_INTERNAL = 3;
static const int UNIVERSE_DEV = 4;
// SteamID account types
static const int TYPE_INVALID = 0;
static const int TYPE_INDIVIDUAL = 1;
static const int TYPE_MULTISEAT = 2;
static const int TYPE_GAMESERVER = 3;
static const int TYPE_ANON_GAMESERVER = 4;
static const int TYPE_PENDING = 5;
static const int TYPE_CONTENT_SERVER = 6;
static const int TYPE_CLAN = 7;
static const int TYPE_CHAT = 8;
static const int TYPE_P2P_SUPER_SEEDER = 9;
static const int TYPE_ANON_USER = 10;
static const int INSTANCE_ALL = 0;
static const int INSTANCE_DESKTOP = 1;
static const int INSTANCE_CONSOLE = 2;
static const int INSTANCE_WEB = 4;
static const int CHAT_INSTANCE_FLAG_CLAN = 0x80000;
static const int CHAT_INSTANCE_FLAG_LOBBY = 0x40000;
static const int CHAT_INSTANCE_FLAG_MMSLOBBY = 0x20000;
explicit SteamID(const std::string &id);
std::string getIdSteam2Rendered(bool newerFormat) const;
std::string getIdSteam3Rendered() const;
long long getIdSteam64() const;
bool isValid() const;
bool isClanChat() const;
bool isLobbyChat() const;
bool isMMSLobbyChat() const;
long long getAccountId() const;
private:
long long universe;
long long type;
long long instance;
long long accountId;
static int getTypeFromChar(char type);
static char getCharFromType(long long t);
};