mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Added Comments
This commit is contained in:
@@ -1,31 +1,39 @@
|
||||
/*
|
||||
This file contains the ipc communication methos between the ui and the gui
|
||||
*/
|
||||
|
||||
const { contextBridge, ipcRenderer, webUtils } = require('electron')
|
||||
|
||||
try {
|
||||
//For file lookup on drop
|
||||
contextBridge.exposeInMainWorld("explorer", {
|
||||
onFileDrop: (file) => webUtils.getPathForFile(file)
|
||||
})
|
||||
//For sending the specifications to the main
|
||||
contextBridge.exposeInMainWorld("submit", {
|
||||
submit: (meeting_specifications) => { ipcRenderer.send("file_submit", meeting_specifications) }
|
||||
})
|
||||
//For file lookup on search
|
||||
contextBridge.exposeInMainWorld("electronAPI", {
|
||||
getFilePath: (file) => { return webUtils.getPathForFile(file) }
|
||||
})
|
||||
|
||||
//Gets all information from the main process
|
||||
contextBridge.exposeInMainWorld("onStartup", {
|
||||
getModuleNames: () => ipcRenderer.invoke('get-module-names')
|
||||
})
|
||||
|
||||
//Calls from the main process regarding the progress
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
progress: (callback) => ipcRenderer.on('progress', callback)
|
||||
})
|
||||
|
||||
//For getting the speaker audios and names from the main
|
||||
contextBridge.exposeInMainWorld('audios', {
|
||||
speakerAudios: (callback) => ipcRenderer.on('speakerAudios', callback)
|
||||
})
|
||||
//For sending the new speaker names to the main process
|
||||
contextBridge.exposeInMainWorld("submitSpeaker", {
|
||||
speaker_submit: (speaker_names) => { ipcRenderer.send("speaker_submit", speaker_names) }
|
||||
})
|
||||
|
||||
//For downloading the finished document
|
||||
contextBridge.exposeInMainWorld("download", {
|
||||
file_download: () => { ipcRenderer.send("file_download") }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user