
/**
 * 主进程与渲染进程通信频道定义
 * Definition of communication channels between main process and rendering process
 */
const ipcApiRoute = {
  // framework
  test: 'controller.example.test',
  checkForUpdater: 'controller.framework.checkForUpdater',
  downloadApp: 'controller.framework.downloadApp',
  jsondbOperation: 'controller.framework.jsondbOperation',
  sqlitedbOperation: 'controller.framework.sqlitedbOperation',
  uploadFile: 'controller.framework.uploadFile',
  checkHttpServer: 'controller.framework.checkHttpServer',
  doHttpRequest: 'controller.framework.doHttpRequest',
  doSocketRequest: 'controller.framework.doSocketRequest',
  ipcInvokeMsg: 'controller.framework.ipcInvokeMsg',
  ipcSendSyncMsg: 'controller.framework.ipcSendSyncMsg',
  ipcSendMsg: 'controller.framework.ipcSendMsg',
  startJavaServer: 'controller.framework.startJavaServer',
  closeJavaServer: 'controller.framework.closeJavaServer',
  someJob: 'controller.framework.someJob',
  timerJobProgress: 'controller.framework.timerJobProgress',
  createPool: 'controller.framework.createPool',
  createPoolNotice: 'controller.framework.createPoolNotice',
  someJobByPool: 'controller.framework.someJobByPool',
  hello: 'controller.framework.hello',
  openSoftware: 'controller.framework.openSoftware', 
  // 获取ex资源目录下的配置文件 参数唯文件名
  getExResConfig: 'controller.framework.getExResConfig',
  // 发送socket 消息
  sendTcpSocket: 'controller.framework.sendTcpSocket',
  // 串口 参数为 整个串口参数 
  connectSeriaPort: 'controller.framework.connectSeriaPort',
  // 发送串口消息 参数为 msg
  sendSeriaPort: 'controller.framework.sendSeriaPort',
  // os
  messageShow: 'controller.os.messageShow',
  messageShowConfirm: 'controller.os.messageShowConfirm',
  selectFolder: 'controller.os.selectFolder',
  selectPic: 'controller.os.selectPic',
  openDirectory: 'controller.os.openDirectory',
  loadViewContent: 'controller.os.loadViewContent',
  removeViewContent: 'controller.os.removeViewContent',
  createWindow: 'controller.os.createWindow',
  getWCid: 'controller.os.getWCid',
  sendNotification: 'controller.os.sendNotification',
  initPowerMonitor: 'controller.os.initPowerMonitor',
  getScreen: 'controller.os.getScreen',
  autoLaunch: 'controller.os.autoLaunch',
  setTheme: 'controller.os.setTheme',
  getTheme: 'controller.os.getTheme',
  // 获取当前目录的配置文件, 入参为配置文件名
  getCurrentDirectoryConfig: 'controller.os.getCurrentDirectoryConfig',
  // 获取mac
  getAllMac: 'controller.os.getAllMac',
  // 获取系统信息
  getOSMessage: 'controller.os.getOSMessage',
  // 声音设置
  deviceLoudness: 'controller.os.deviceLoudness',
  //deviceRestart 重启
  deviceRestart: 'controller.os.deviceRestart',
  // 设备关机
  deviceShutdown: 'controller.os.deviceShutdown',

  // 杀掉进程 参数为进程名称, 模糊搜索,注意可能杀错
  deviceKillName: 'controller.os.deviceKillName',
  // 启动程序 参数为程序目录绝对地址
  deviceStarExe: 'controller.os.deviceStarExe',
  // hardware
  getPrinterList: 'controller.hardware.getPrinterList',
  print: 'controller.hardware.print',
  printStatus: 'controller.hardware.printStatus',

  // effect
  selectFile: 'controller.effect.selectFile',
  loginWindow: 'controller.effect.loginWindow',
  restoreWindow: 'controller.effect.restoreWindow',


  // cross
  crossInfo: 'controller.cross.info',
  getCrossUrl: 'controller.cross.getUrl',
  killCrossServer: 'controller.cross.killServer',
  createCrossServer: 'controller.cross.createServer',
  requestApi: 'controller.cross.requestApi',
}

/**
 * 自定义频道
 * custom chennel
 */
const specialIpcRoute = {
  appUpdater: 'app.updater', // updater channel
  window1ToWindow2: 'window1-to-window2', // windows channel
  window2ToWindow1: 'window2-to-window1', // windows channel
}

export {
  ipcApiRoute, specialIpcRoute
}

