Built motion from commit f7863d46.|2.5.41
[motion2.git] / server / api / voiceQueue / voiceQueue.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xf264=['save','update','remove','emit','hasOwnProperty','hook','../../mysqldb','VoiceQueue','setMaxListeners'];(function(_0x349f16,_0x63ad15){var _0x40cbbc=function(_0x5ca67d){while(--_0x5ca67d){_0x349f16['push'](_0x349f16['shift']());}};_0x40cbbc(++_0x63ad15);}(_0xf264,0x1bf));var _0x4f26=function(_0x419ba7,_0x59031d){_0x419ba7=_0x419ba7-0x0;var _0x2283d4=_0xf264[_0x419ba7];return _0x2283d4;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x4f26('0x0'))['db'][_0x4f26('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4f26('0x2')](0x0);var events={'afterCreate':_0x4f26('0x3'),'afterUpdate':_0x4f26('0x4'),'afterDestroy':_0x4f26('0x5')};function emitEvent(_0x152d7a){return function(_0x29d93a,_0x15c22b,_0x3189a2){VoiceQueueEvents[_0x4f26('0x6')](_0x152d7a+':'+_0x29d93a['id'],_0x29d93a);VoiceQueueEvents[_0x4f26('0x6')](_0x152d7a,_0x29d93a);_0x3189a2(null);};}for(var e in events){if(events[_0x4f26('0x7')](e)){var event=events[e];VoiceQueue[_0x4f26('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;