Add known system events enum - many more to come

This commit is contained in:
Bryan Ashby 2018-03-04 13:34:35 -07:00
parent 74b9d587c9
commit 1482d0b78f
1 changed files with 10 additions and 0 deletions

View File

@ -10,11 +10,21 @@ const _ = require('lodash');
const async = require('async'); const async = require('async');
const glob = require('glob'); const glob = require('glob');
const SYSTEM_EVENTS = {
ClientConnected : 'codes.l33t.enigma.system.connected',
ClientDisconnected : 'codes.l33t.enigma.system.disconnected',
TermDetected : 'codes.l33t.enigma.term_detected',
};
module.exports = new class Events extends events.EventEmitter { module.exports = new class Events extends events.EventEmitter {
constructor() { constructor() {
super(); super();
} }
getSystemEvents() {
return SYSTEM_EVENTS;
}
addListener(event, listener) { addListener(event, listener) {
Log.trace( { event : event }, 'Registering event listener'); Log.trace( { event : event }, 'Registering event listener');
return super.addListener(event, listener); return super.addListener(event, listener);