const MockProgram = function MockProgram() { Object.assign(this, { key: blessed.program.prototype.key }); EventEmitter.call(this); }
const LogProvider = function LogProvider(screen) { EventEmitter.call(this); this._log = []; this.limit = 10000; screen.on("stdout", this._onLog.bind(this, "stdout")); screen.on("stderr", this._onLog.bind(this, "stderr")); }
const MockScreen = function MockScreen() { // organized by primitive, Object, stubs, alphabetically Object.assign(this, { program: new MockProgram(), type: "screen", clickable: [], keyable: [], _listenKeys: blessed.screen.prototype._listenKeys, _listenMouse: sandbox.stub(), append: sandbox.stub(), remove: sandbox.stub(), render: sandbox.stub(), restoreFocus: sandbox.stub(), rewindFocus: sandbox.stub(), saveFocus: sandbox.stub(), setEffects: sandbox.stub() }); EventEmitter.call(this); if (stubEvents === undefined || stubEvents) { sandbox.stub(this, "on"); } }
}.bind(this); EventEmitter.call(this);
}) EventEmitter.call(this)
/** * Interactor * This is used to run job.js and interact with IPC through EventEmitter */ function Interactor() { if(!this instanceof Interactor) { return new Interactor() } EventEmitter.call(this) this.job = null }
// Module Loader var hikvision = function(options) { events.EventEmitter.call(this) this.client = this.connect(options) if (options.log) TRACE = options.log; BASEURI = 'http://' + options.host + ':' + options.port this.activeEvents = { }; this.triggerActive = false }
var FrontendSession = function(session){ EventEmitter.call(this); clone(session, this, FRONTEND_SESSION_FIELDS); this.settings = dclone(session.settings); this.__session__ = session; }
var Master = function(app, opts){ EventsEmitter.call(this); this.app = app; this.opts = opts || {}; this.serverInfo = app.getCurServer(); this.masterInfo = app.getMaster(); this.console = genMonitorConsole(this); }
/** * @memberof yodaRT * @class */ function AppRuntime () { EventEmitter.call(this) this.inited = false this.hibernated = false this.__temporaryDisablingReasons = [ 'initiating' ] this.componentLoader = new Loader(this, 'component') this.descriptorLoader = new Loader(this, 'descriptor') }
var Server = function(opts){ "use strict"; EventEmitter.call(this); opts = opts || {}; this.straightSend = opts.straightSend; this.straightReceive = opts.straightReceive; this.state = ST_INITED; }
function Eventer() { //Inherit from EventEmitter EventEmitter.call(this); this._savedStatuses = []; this._maxStatuses = logconfig.maxEvents; }
var Session = function(sid, frontendId, socket, service){ EventEmitter.call(this); this.id = sid; this.frontendId = frontendId; this.uid = null; this.settings = {}; this.__socket__ = socket; this.__sessionService__ = service; this.__state__ = ST_INITED; }
var Connector = function(port, opts){ EventEmitter.call(this); this.port = port; this.opts = opts; }
var Receiver = function(){ EventEmitter.call(this); this._bufferedBytes = 0; this._buffer = []; this._pduLen = 0; this._state = GET_PDU_LEN; }