Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / voiceQueueReport / voiceQueueReport.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 _0xf3d2=['remove','emit','hasOwnProperty','exports','../../mysqldb','VoiceQueueReport','save','update'];(function(_0x4d2b2c,_0x13d5ec){var _0x58e0fa=function(_0x133108){while(--_0x133108){_0x4d2b2c['push'](_0x4d2b2c['shift']());}};_0x58e0fa(++_0x13d5ec);}(_0xf3d2,0x1bc));var _0x2f3d=function(_0x560d2a,_0x4a9f54){_0x560d2a=_0x560d2a-0x0;var _0x3df62d=_0xf3d2[_0x560d2a];return _0x3df62d;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x2f3d('0x0'))['db'][_0x2f3d('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2f3d('0x2'),'afterUpdate':_0x2f3d('0x3'),'afterDestroy':_0x2f3d('0x4')};function emitEvent(_0x43b520){return function(_0x8877eb,_0x2477ba,_0x2bd232){VoiceQueueReportEvents['emit'](_0x43b520+':'+_0x8877eb['id'],_0x8877eb);VoiceQueueReportEvents[_0x2f3d('0x5')](_0x43b520,_0x8877eb);_0x2bd232(null);};}for(var e in events){if(events[_0x2f3d('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x2f3d('0x7')]=VoiceQueueReportEvents;