refactor: adapter

This commit is contained in:
手瓜一十雪 2024-09-07 22:58:29 +08:00
parent 264cb6bbd2
commit a804f90b9c
3 changed files with 16 additions and 6 deletions

View File

@ -1,9 +1,8 @@
import { MsfChangeReasonType, MsfStatusType } from "../entities/adapter";
export class NodeIDependsAdapter {
onMSFStatusChange(arg1: number, arg2: number) {
// console.log(arg1, arg2);
// if (arg1 == 2 && arg2 == 2) {
// log("NapCat丢失网络连接,请检查网络")
// }
onMSFStatusChange(statusType: MsfStatusType, changeReasonType: MsfChangeReasonType) {
}
onMSFSsoError(args: unknown) {

View File

@ -0,0 +1,11 @@
export enum MsfStatusType {
KUNKNOWN,
KDISCONNECTED,
KCONNECTED
}
export enum MsfChangeReasonType {
KUNKNOWN,
KUSERLOGININ,
KUSERLOGINOUT,
KAUTO
}

View File

@ -229,7 +229,7 @@ export async function NCoreInitShell() {
sessionConfig,
new NodeIDependsAdapter(),
new NodeIDispatcherAdapter(),
sessionListener as any,
sessionListener,
);
try {
session.startNT(0);