CheatMenuSA/src/utils/rpc.h

41 lines
828 B
C
Raw Normal View History

2022-03-09 17:23:08 -05:00
#pragma once
2022-06-12 14:01:43 -04:00
/*
* Discord Rich Presence Class
* Handles connection with discord
*/
2022-03-09 17:23:08 -05:00
class RPC
{
private:
2022-06-12 14:01:43 -04:00
struct DiscordRichPresence
2022-03-10 13:20:53 -05:00
{
const char* state;
const char* details;
2022-06-07 17:25:49 -04:00
long long startTimestamp;
long long endTimestamp;
2022-03-10 13:20:53 -05:00
const char* largeImageKey;
const char* largeImageText;
const char* smallImageKey;
const char* smallImageText;
const char* partyId;
int partySize;
int partyMax;
const char* matchSecret;
const char* joinSecret;
const char* spectateSecret;
2022-06-07 17:25:49 -04:00
char instance;
2022-06-12 14:01:43 -04:00
};
2022-03-10 13:20:53 -05:00
static inline FARPROC f_Init, f_ShutDown, f_Update;
static inline DiscordRichPresence drpc;
static inline HMODULE hDll = NULL;
static inline bool bInit;
2022-03-14 02:04:58 -04:00
2022-03-09 17:23:08 -05:00
public:
RPC() = delete;
RPC(RPC&) = delete;
static void Init();
static void Process();
static void Shutdown();
};