mirror of
https://github.com/YuzuZensai/Discord-Presence-Relay.git
synced 2026-09-13 10:49:02 +00:00
76 lines
1.3 KiB
TypeScript
76 lines
1.3 KiB
TypeScript
import type { ClaimedSocket, ProcessInfo, RelayPlatform } from './types'
|
|
|
|
const NOT_SUPPORTED = new Error('Platform not supported')
|
|
|
|
export class UnsupportedPlatform implements RelayPlatform {
|
|
readonly isSupported = false
|
|
|
|
fakeSocketPath(): string {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
ipcSocketPath(): string {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
removeFakeSocket(): void {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
finalizeFakeSocket(): void {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
fakeSocketExists(): boolean {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
async recoverLeftoverSockets(): Promise<void> {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
async discoverAndClaim(): Promise<ClaimedSocket[]> {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
async discoverNewSocket(): Promise<ClaimedSocket | null> {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
restoreSocket(): void {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
discardClaimedSocket(): void {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
async isSocketAlive(): Promise<boolean> {
|
|
return false
|
|
}
|
|
|
|
async removeStaleIpcSocket(): Promise<void> {
|
|
throw NOT_SUPPORTED
|
|
}
|
|
|
|
getInstanceProcess(): ProcessInfo | null {
|
|
return null
|
|
}
|
|
|
|
getPeerProcess(): ProcessInfo | null {
|
|
return null
|
|
}
|
|
|
|
killProcess(): boolean {
|
|
return false
|
|
}
|
|
|
|
isProcessAlive(): boolean {
|
|
return false
|
|
}
|
|
|
|
launchExecutable(): boolean {
|
|
return false
|
|
}
|
|
}
|