2022-10-25 16:50:07 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
|
|
|
import type { Editor } from "../editor.tsx";
|
|
|
|
|
|
|
|
export function collabSyscalls(editor: Editor): SysCallMapping {
|
|
|
|
return {
|
|
|
|
"collab.start": (
|
|
|
|
_ctx,
|
|
|
|
serverUrl: string,
|
|
|
|
token: string,
|
|
|
|
username: string,
|
|
|
|
) => {
|
|
|
|
editor.startCollab(serverUrl, token, username);
|
|
|
|
},
|
|
|
|
"collab.stop": (
|
|
|
|
_ctx,
|
|
|
|
) => {
|
2023-06-13 18:47:05 +00:00
|
|
|
editor.stopCollab();
|
2022-10-25 16:50:07 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|