A tool for deriving PKG packet encryption keys for ps4 written in c++
| 1 | // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <cstdint> |
| 7 | #include <string> |
| 8 | #include <discord_rpc.h> |
| 9 | |
| 10 | namespace DiscordRPCHandler { |
| 11 | |
| 12 | enum class RPCStatus { |
| 13 | Idling, |
| 14 | Playing, |
| 15 | }; |
| 16 | |
| 17 | class RPC { |
| 18 | std::uint64_t startTimestamp; |
| 19 | bool rpcEnabled = false; |
| 20 | RPCStatus status; |
| 21 | |
| 22 | public: |
| 23 | void init(); |
| 24 | void setStatusIdling(); |
| 25 | void setStatusPlaying(const std::string& game_name, const std::string& game_id); |
| 26 | void shutdown(); |
| 27 | bool getRPCEnabled(); |
| 28 | }; |
| 29 | |
| 30 | } // namespace DiscordRPCHandler |
| 31 |