2024-02-23 22:32:32 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2023-08-11 19:22:26 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
2024-02-23 21:57:57 +01:00
|
|
|
#include <discord_rpc.h>
|
2023-08-11 19:22:26 +02:00
|
|
|
|
|
|
|
namespace Discord {
|
2024-02-23 22:32:32 +01:00
|
|
|
|
|
|
|
enum class RPCStatus {
|
|
|
|
Idling,
|
|
|
|
Playing,
|
|
|
|
};
|
2023-08-11 19:22:26 +02:00
|
|
|
|
2024-02-23 21:57:57 +01:00
|
|
|
class RPC {
|
|
|
|
std::uint64_t startTimestamp;
|
|
|
|
bool enabled = false;
|
2023-08-11 19:22:26 +02:00
|
|
|
|
2024-02-23 21:57:57 +01:00
|
|
|
public:
|
|
|
|
void init();
|
|
|
|
void update(RPCStatus status, const std::string& title);
|
|
|
|
void stop();
|
|
|
|
};
|
2024-02-23 22:32:32 +01:00
|
|
|
|
2024-02-23 21:57:57 +01:00
|
|
|
} // namespace Discord
|