aboutsummaryrefslogtreecommitdiff
path: root/externals/discord-rpc/src/connection.h
diff options
context:
space:
mode:
authorDawid Potocki <dawid@dawidpotocki.com>2024-03-05 14:09:27 +1300
committerDawid Potocki <dawid@dawidpotocki.com>2024-03-05 20:34:15 +1300
commit063e15900bda8453fb0fc6751e78d064501ccbae (patch)
treea4cd5f01dbca33a262333aff10e1e035217a30c8 /externals/discord-rpc/src/connection.h
parent537296095ab24eddcb196b5ef98004f91de9c8c2 (diff)
Replace broken submodules with vendored source codeHEADpatched
Diffstat (limited to 'externals/discord-rpc/src/connection.h')
-rw-r--r--externals/discord-rpc/src/connection.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/externals/discord-rpc/src/connection.h b/externals/discord-rpc/src/connection.h
new file mode 100644
index 0000000000..a8f99b9f10
--- /dev/null
+++ b/externals/discord-rpc/src/connection.h
@@ -0,0 +1,19 @@
+#pragma once
+
+// This is to wrap the platform specific kinds of connect/read/write.
+
+#include <stdint.h>
+#include <stdlib.h>
+
+// 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);
+};