Files
xSaherElmClient/platforms/electron/modules/services/x-electron.service.js
T
2026-04-17 17:04:44 +03:30

49 lines
1010 B
JavaScript

'use strict';
//
const XElectronChannel = {
Default: 'xMessage',
Handshake: 'xHandshake',
FileService: 'xFileService',
ProjectsService: 'xProjectsService',
}
//
// Module Exports ...
module.exports = {
//
XElectronChannel: XElectronChannel,
//
XElectronMessage: class XElectronMessage {
//
constructor(
sender = '',
reciever = '',
message = '',
payload = undefined,
channel = undefined,
timestamp = undefined,
) {
//
if (!timestamp) {
timestamp = Date.now();
}
//
if (!channel) {
channel = XElectronChannel.Default;
}
//
this.sender = sender;
this.reciever = reciever;
this.payload = payload;
this.message = message;
this.timestamp = timestamp;
this.channel = channel;
}
}
}