discord: Add namespace and cleanup CMakeLists

This commit is contained in:
Jonas Kvinge
2025-03-23 19:55:50 +01:00
parent 9fa9012c70
commit bbd8a24b75
24 changed files with 152 additions and 143 deletions

22
3rdparty/discord-rpc/src/connection.h vendored Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
// This is to wrap the platform specific kinds of connect/read/write.
#include <cstdlib>
namespace discord_rpc {
// not really connectiony, but need per-platform
int GetProcessId();
struct BaseConnection {
static BaseConnection *Create();
static void Destroy(BaseConnection *&);
bool isOpen { false };
bool Open();
bool Close();
bool Write(const void *data, size_t length);
bool Read(void *data, size_t length);
};
} // namespace discord_rpc