zhuguifei
2025-06-17 c1cc49dd93d38f51790558541d6835d1598ecccf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
 
/**
 * Definition of communication channel between main process and rendering process
 * format:controller/filename/method
 * Definition of communication channels between main process and rendering process
 */
const ipcApiRoute = {
  grain:{
    queryGrainAll: 'controller/grain/queryGrainAll',
    addGrain: 'controller/grain/addGrain',
    updateGrain: 'controller/grain/updateGrain',
    delGrain: 'controller/grain/delGrain',
  },
  config:{
    queryConfig: 'controller/config/queryConfig',
    setConfig: 'controller/config/setConfig',
  },
  sqlitedb:{
    getMax: 'controller/sqlitedb/getMax',
  },
 
 
  example: {
    test: 'controller/example/test',
  },
  framework: {
    checkForUpdater: 'controller/framework/checkForUpdater',
    downloadApp: 'controller/framework/downloadApp',
    jsondbOperation: 'controller/framework/jsondbOperation',
    sqlitedbOperation: 'controller/DbController/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',
  },
 
  // os
  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',
    window1ToWindow2: 'controller/os/window1ToWindow2',
    window2ToWindow1: 'controller/os/window2ToWindow1',
  },
 
  // effect
  effect: {
    selectFile: 'controller/effect/selectFile',
    loginWindow: 'controller/effect/loginWindow',
    restoreWindow: 'controller/effect/restoreWindow',
  },
 
  // cross
  cross: {
    crossInfo: 'controller/cross/info',
    getCrossUrl: 'controller/cross/getUrl',
    killCrossServer: 'controller/cross/killServer',
    createCrossServer: 'controller/cross/createServer',
    requestApi: 'controller/cross/requestApi',
  }
}
 
/**
 * Customize Channel
 * Format: Custom (recommended to add a prefix)
 */
const specialIpcRoute = {
  appUpdater: 'custom/app/updater', // updater channel
}
 
export {
  ipcApiRoute,
  specialIpcRoute
}