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 _0xe13e=['save','update','remove','emit','hasOwnProperty','exports','VoiceQueue'];(function(_0x3c7aa6,_0x30e103){var _0x225944=function(_0x7e475b){while(--_0x7e475b){_0x3c7aa6['push'](_0x3c7aa6['shift']());}};_0x225944(++_0x30e103);}(_0xe13e,0x1aa));var _0xee13=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe13e[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require('events');var VoiceQueue=require('../../mysqldb')['db'][_0xee13('0x0')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xee13('0x1'),'afterUpdate':_0xee13('0x2'),'afterDestroy':_0xee13('0x3')};function emitEvent(_0x539fdf){return function(_0x3e0c56,_0x2ed30c,_0x5d5034){VoiceQueueEvents[_0xee13('0x4')](_0x539fdf+':'+_0x3e0c56['id'],_0x3e0c56);VoiceQueueEvents[_0xee13('0x4')](_0x539fdf,_0x3e0c56);_0x5d5034(null);};}for(var e in events){if(events[_0xee13('0x5')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xee13('0x6')]=VoiceQueueEvents;