1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0xa592=['emit','hook','exports','save','update','remove'];(function(_0x5522fe,_0x46c5dd){var _0xd648f5=function(_0x413d11){while(--_0x413d11){_0x5522fe['push'](_0x5522fe['shift']());}};_0xd648f5(++_0x46c5dd);}(_0xa592,0xdb));var _0x2a59=function(_0x243676,_0x351afc){_0x243676=_0x243676-0x0;var _0x5c4497=_0xa592[_0x243676];return _0x5c4497;};'use strict';var EventEmitter=require('events');var VoiceQueue=require('../../mysqldb')['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2a59('0x0'),'afterUpdate':_0x2a59('0x1'),'afterDestroy':_0x2a59('0x2')};function emitEvent(_0x3bd13e){return function(_0x11a640,_0x44d092,_0x4e13d6){VoiceQueueEvents[_0x2a59('0x3')](_0x3bd13e+':'+_0x11a640['id'],_0x11a640);VoiceQueueEvents['emit'](_0x3bd13e,_0x11a640);_0x4e13d6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x2a59('0x4')](e,emitEvent(event));}}module[_0x2a59('0x5')]=VoiceQueueEvents;