mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-06-05 00:56:57 +02:00
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
|
|
import { ESteamRealm, Unregisterable } from "./shared";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* `hSharedConnection` is the number from {@link AllocateSharedConnection}.
|
||
|
|
*/
|
||
|
|
export interface SharedConnection {
|
||
|
|
AllocateSharedConnection(): Promise<number>;
|
||
|
|
|
||
|
|
// if no such number, sends this warning:
|
||
|
|
// src\clientdll\clientsharedconnection.cpp (154) : m_mapSharedConnections.HasElement( hSharedConnection )
|
||
|
|
Close(hSharedConnection: number): void;
|
||
|
|
|
||
|
|
RegisterOnBinaryMessageReceived(hSharedConnection: number, callback: (data: ArrayBuffer) => void): Unregisterable;
|
||
|
|
|
||
|
|
RegisterOnLogonInfoChanged(hSharedConnection: number, callback: (info: LogonInfo) => void): Unregisterable;
|
||
|
|
|
||
|
|
RegisterOnMessageReceived(hSharedConnection: number, callback: (param0: any) => void): Unregisterable;
|
||
|
|
|
||
|
|
SendMsg: any;
|
||
|
|
SendMsgAndAwaitBinaryResponse: any;
|
||
|
|
|
||
|
|
SendMsgAndAwaitResponse(hSharedConnection: number, msg: string): Promise<any>;
|
||
|
|
|
||
|
|
SubscribeToClientServiceMethod(hSharedConnection: number, param1: any): any;
|
||
|
|
|
||
|
|
SubscribeToEMsg(hSharedConnection: number, param1: any): any;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LogonInfo {
|
||
|
|
/** `true` if logged on. */
|
||
|
|
bLoggedOn: boolean;
|
||
|
|
eUniverse: ESteamRealm;
|
||
|
|
/** Account username. Empty if not logged on. */
|
||
|
|
strAccountName: string;
|
||
|
|
/** URL for community content. */
|
||
|
|
strCommunityImagesURL: string;
|
||
|
|
/** Account nickname. Empty if not logged on. */
|
||
|
|
strPersonaName: string;
|
||
|
|
/** Steam64 ID. */
|
||
|
|
strSteamid: string;
|
||
|
|
/** Country code. */
|
||
|
|
strUserCountry: string;
|
||
|
|
}
|