1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-03 09:03:32 +00:00

[PM-7846] Implement a rust based native messaging proxy and IPC system

This commit is contained in:
Daniel García
2024-06-20 18:11:24 +02:00
parent d92e1b3eca
commit 0a83b8ddaf
26 changed files with 961 additions and 358 deletions

View File

@@ -41,3 +41,23 @@ export namespace clipboards {
export function read(): Promise<string>
export function write(text: string, password: boolean): Promise<void>
}
export namespace ipc {
export const enum IpcMessageType {
Connected = 0,
Disconnected = 1,
Message = 2
}
export class IpcMessage {
clientId: number
kind: IpcMessageType
message: string
}
export class IpcServer {
/** Create and start the IPC server. */
static listen(name: string, callback: (error: null | Error, message: IpcMessage) => void): IpcServer
/** Stop the IPC server. */
stop(): void
/** Send a message over the IPC server. */
send(message: string): void
}
}