SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
steampp.h
Go to the documentation of this file.
1
4
5
#pragma once
6
7
#include <cstddef>
8
#include <filesystem>
9
#include <span>
10
#include <string>
11
#include <string_view>
12
#include <unordered_map>
13
#include <vector>
14
15
#include <
kvpp/KV1Binary.h
>
16
17
namespace
steampp
{
18
19
using
AppID
= uint32_t;
20
21
class
Steam
{
22
public
:
23
Steam
();
24
25
[[nodiscard]]
const
std::filesystem::path&
getInstallDir
()
const
;
26
27
[[nodiscard]] std::span<const std::filesystem::path>
getLibraryDirs
()
const
;
28
29
[[nodiscard]] std::filesystem::path
getSourceModDir
()
const
;
30
31
[[nodiscard]] std::vector<AppID>
getInstalledApps
()
const
;
32
33
[[nodiscard]]
bool
isAppInstalled
(
AppID
appID)
const
;
34
35
[[nodiscard]] std::string_view
getAppName
(
AppID
appID)
const
;
36
37
[[nodiscard]] std::filesystem::path
getAppInstallDir
(
AppID
appID)
const
;
38
39
[[nodiscard]] std::filesystem::path
getAppIconPath
(
AppID
appID)
const
;
40
41
[[nodiscard]] std::filesystem::path
getAppLogoPath
(
AppID
appID)
const
;
42
43
[[nodiscard]] std::filesystem::path
getAppHeroPath
(
AppID
appID)
const
;
44
45
[[nodiscard]] std::filesystem::path
getAppBoxArtPath
(
AppID
appID)
const
;
46
47
[[nodiscard]] std::filesystem::path
getAppStoreArtPath
(
AppID
appID)
const
;
48
49
[[nodiscard]]
bool
isAppUsingGoldSrcEngine
(
AppID
appID)
const
;
50
51
[[nodiscard]]
bool
isAppUsingSourceEngine
(
AppID
appID)
const
;
52
53
[[nodiscard]]
bool
isAppUsingSource2Engine
(
AppID
appID)
const
;
54
55
[[nodiscard]]
explicit
operator
bool()
const
;
56
57
private
:
58
struct
GameInfo {
59
std::string name;
60
std::filesystem::path installDir;
61
std::size_t libraryInstallDirsIndex;
62
};
63
64
std::unordered_map<AppID, GameInfo> gameDetails;
65
std::filesystem::path steamInstallDir;
66
std::vector<std::filesystem::path> libraryDirs;
67
kvpp::KV1Binary
assetCache;
68
};
69
70
}
// namespace steampp
KV1Binary.h
kvpp::KV1Binary
Definition
KV1Binary.h:203
steampp::Steam::getInstalledApps
std::vector< AppID > getInstalledApps() const
Definition
steampp.cpp:311
steampp::Steam::isAppUsingSourceEngine
bool isAppUsingSourceEngine(AppID appID) const
Definition
steampp.cpp:423
steampp::Steam::isAppUsingGoldSrcEngine
bool isAppUsingGoldSrcEngine(AppID appID) const
Definition
steampp.cpp:419
steampp::Steam::getLibraryDirs
std::span< const std::filesystem::path > getLibraryDirs() const
Definition
steampp.cpp:303
steampp::Steam::getInstallDir
const std::filesystem::path & getInstallDir() const
Definition
steampp.cpp:299
steampp::Steam::getAppLogoPath
std::filesystem::path getAppLogoPath(AppID appID) const
Definition
steampp.cpp:351
steampp::Steam::Steam
Steam()
Definition
steampp.cpp:138
steampp::Steam::isAppUsingSource2Engine
bool isAppUsingSource2Engine(AppID appID) const
Definition
steampp.cpp:427
steampp::Steam::getAppName
std::string_view getAppName(AppID appID) const
Definition
steampp.cpp:320
steampp::Steam::getAppStoreArtPath
std::filesystem::path getAppStoreArtPath(AppID appID) const
Definition
steampp.cpp:402
steampp::Steam::isAppInstalled
bool isAppInstalled(AppID appID) const
Definition
steampp.cpp:316
steampp::Steam::getAppHeroPath
std::filesystem::path getAppHeroPath(AppID appID) const
Definition
steampp.cpp:368
steampp::Steam::getAppBoxArtPath
std::filesystem::path getAppBoxArtPath(AppID appID) const
Definition
steampp.cpp:385
steampp::Steam::getAppInstallDir
std::filesystem::path getAppInstallDir(AppID appID) const
Definition
steampp.cpp:327
steampp::Steam::getSourceModDir
std::filesystem::path getSourceModDir() const
Definition
steampp.cpp:307
steampp::Steam::getAppIconPath
std::filesystem::path getAppIconPath(AppID appID) const
Definition
steampp.cpp:334
steampp
Based on SteamAppPathProvider.
Definition
steampp.h:17
steampp::AppID
uint32_t AppID
Definition
steampp.h:19
include
steampp
steampp.h
Generated on
for SourcePP by
1.17.0