'''
Author: your name
Date: 2021-06-30 17:43:46
LastEditTime: 2021-07-23 00:27:31
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \evm-store\tools\build_out\controllers\__init__.py
'''
#!/usr/bin/env python
# -*- coding: utf_8 -*-

from signal import SIGABRT
from application.signal_manager import signalManager
from .area import areaManager
from .api import appReview, buildAppResource
from .app import appManager
from .package import packageManager
from .user import userManager
from .login import loginManager
from .device import deviceManager
from .annex import annexManager
from .monitorWatch import monitorWatchManager
from .monitorSystem import monitorSystemManager
from .monitorLvgl import monitorLvglManager
from .monitorImage import monitorImageManager
from .monitorEvm import monitorEvmManager
from .file import fileManager
from .workbench import workbenchResource

def initConnect():
    signalManager.actionPostArea.connect(areaManager.post)
    signalManager.actionDeleteArea.connect(areaManager.delete)
    signalManager.actionGetListArea.connect(areaManager.getList)
    signalManager.actionGetArea.connect(areaManager.get)
    signalManager.actionPutArea.connect(areaManager.put)
    signalManager.actionPostApp.connect(appManager.post)
    signalManager.actionDeleteApp.connect(appManager.delete)
    signalManager.actionGetListApp.connect(appManager.getList)
    signalManager.actionGetApp.connect(appManager.get)
    signalManager.actionPutApp.connect(appManager.put)
    signalManager.actionGetListPackage.connect(packageManager.getList)
    signalManager.actionGetPackage.connect(packageManager.get)
    signalManager.actionPostUser.connect(userManager.post)
    signalManager.actionDeleteUser.connect(userManager.delete)
    signalManager.actionGetListUser.connect(userManager.getList)
    signalManager.actionGetUser.connect(userManager.get)
    signalManager.actionPutUser.connect(userManager.put)
    signalManager.actionPostLogin.connect(loginManager.post)
    signalManager.actionGetListLogin.connect(loginManager.getList)
    signalManager.actionGetLogin.connect(loginManager.get)
    signalManager.actionPostDevice.connect(deviceManager.post)
    signalManager.actionDeleteDevice.connect(deviceManager.delete)
    signalManager.actionGetListDevice.connect(deviceManager.getList)
    signalManager.actionGetDevice.connect(deviceManager.get)
    signalManager.actionPutDevice.connect(deviceManager.put)
    signalManager.actionDeleteAnnex.connect(annexManager.delete)
    signalManager.actionGetListAnnex.connect(annexManager.getList)
    signalManager.actionGetAnnex.connect(annexManager.get)
    signalManager.actionGetListMonitorWatch.connect(monitorWatchManager.getList)
    signalManager.actionGetMonitorWatch.connect(monitorWatchManager.get)
    signalManager.actionGetListMonitorSystem.connect(monitorSystemManager.getList)
    signalManager.actionGetMonitorSystem.connect(monitorSystemManager.get)
    signalManager.actionGetListMonitorLvgl.connect(monitorLvglManager.getList)
    signalManager.actionGetMonitorLvgl.connect(monitorLvglManager.get)
    signalManager.actionGetListMonitorImage.connect(monitorImageManager.getList)
    signalManager.actionGetMonitorImage.connect(monitorImageManager.get)
    signalManager.actionGetListMonitorEvm.connect(monitorEvmManager.getList)
    signalManager.actionGetMonitorEvm.connect(monitorEvmManager.get)
    # file manager api
    signalManager.actionGetFileContent.connect(fileManager.content)
    signalManager.actionGetFileDisk.connect(fileManager.disk)
    signalManager.actionGetFileDown.connect(fileManager.download)
    signalManager.actionGetFileInit.connect(fileManager.initialize)
    signalManager.actionGetFilePreview.connect(fileManager.preview)
    signalManager.actionGetFileTree.connect(fileManager.tree)
    signalManager.actionPostFileUpdate.connect(fileManager.update_file)
    signalManager.actionPostFileUpload.connect(fileManager.upload)
    signalManager.actionPostFileDelete.connect(fileManager.delete)
    signalManager.actionPostFileCreate.connect(fileManager.create_file)
    signalManager.actionPostFileCreateDir.connect(fileManager.create_dir)
    signalManager.actionPostFilePaste.connect(fileManager.paste)
    # api
    signalManager.actionPostAppReview.connect(appReview.post)
    signalManager.actionSetLauncher.connect(appReview.get)
    signalManager.actionGetLauncher.connect(appReview.getLauncher)
    signalManager.actionApplicationBuild.connect(buildAppResource.post)
    signalManager.actionGetAppList.connect(appReview.getAppList)
    signalManager.actionGetApplication.connect(appReview.getApp)
    signalManager.actionGetEpk.connect(appReview.getDownloadFile)
    signalManager.actionCheckVersion.connect(appReview.checkAppVersion)
    signalManager.actionWorkbench.connect(workbenchResource.get)
