refactor: adapter

This commit is contained in:
手瓜一十雪 committed 2024-09-07 22:58:29 +08:00
1 parent 137608c3d2
commit a299d9c0a7
3 files changed
+16 -6

No files matched your search

+4 -5
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) {
+11
View File
@@ -0,0 +1,11 @@
export enum MsfStatusType {
KUNKNOWN,
KDISCONNECTED,
KCONNECTED
}
export enum MsfChangeReasonType {
KUNKNOWN,
KUSERLOGININ,
KUSERLOGINOUT,
KAUTO
}
+1 -1
View File
@@ -229,7 +229,7 @@ export async function NCoreInitShell() {
sessionConfig,
new NodeIDependsAdapter(),
new NodeIDispatcherAdapter(),
sessionListener as any,
sessionListener,
);
try {
session.startNT(0);