shadPS4/src/common/discord_rpc_handler.h

31 lines
593 B
C
Raw Normal View History

2024-02-23 21:32:32 +00:00
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2023-08-11 17:22:26 +00:00
#pragma once
#include <cstdint>
#include <string>
#include <discord_rpc.h>
2023-08-11 17:22:26 +00:00
namespace DiscordRPCHandler {
2024-02-23 21:32:32 +00:00
enum class RPCStatus {
Idling,
Playing,
};
2023-08-11 17:22:26 +00:00
class RPC {
std::uint64_t startTimestamp;
bool rpcEnabled = false;
RPCStatus status;
2023-08-11 17:22:26 +00:00
public:
void init();
void setStatusIdling();
void setStatusPlaying(const std::string& game_name, const std::string& game_id);
void shutdown();
bool getRPCEnabled();
};
2024-02-23 21:32:32 +00:00
} // namespace DiscordRPCHandler