System Event Handler Working

This commit is contained in:
Luis Fernando Molina committed 2019-09-06 08:33:24 +02:00
1 parent 10c631b5b4
commit 83d88758c5
3 files changed
+4 -9

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@
<Compile Include="Assistant.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="EventHandler.js">
<Compile Include="SystemEventHandler.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="Integrations\Ecosystem.js" />
+1 -1
View File
@@ -25,7 +25,7 @@ global.CUSTOM_FAIL_RESPONSE = {
message: "Custom Message"
};
const EVENT_HANDLER_MODULE = require('./EventHandler.js');
const EVENT_HANDLER_MODULE = require('./SystemEventHandler.js');
global.systemEventHandler = EVENT_HANDLER_MODULE.newSystemEventHandler()
global.systemEventHandler.initialize(bootLoader)
+2 -7
View File
@@ -92,7 +92,6 @@
eventHandlerName: eventHandlerName,
callerId: callerId
}
sendCommand(eventCommand, responseCallBack)
}
@@ -102,30 +101,27 @@
eventHandlerName: eventHandlerName,
callerId: callerId
}
sendCommand(eventCommand, responseCallBack)
}
function listenToEvent(eventHandlerName, eventType, extraData, callerId, responseCallBack, eventsCallBack) {
eventCommand = {
let eventCommand = {
action: 'listenToEvent',
eventHandlerName: eventHandlerName,
eventType: eventType,
extraData: extraData,
callerId: callerId
}
sendCommand(eventCommand, responseCallBack, eventsCallBack)
}
function stopListening(eventHandlerName, eventSubscriptionId, callerId, responseCallBack) {
eventCommand = {
let eventCommand = {
action: 'stopListening',
eventHandlerName: eventHandlerName,
eventSubscriptionId: eventSubscriptionId,
callerId: callerId
}
sendCommand(eventCommand, responseCallBack)
}
@@ -137,7 +133,6 @@
event: event,
callerId: callerId
}
sendCommand(eventCommand, responseCallBack)
}
}