Built motion from commit (unavailable).|2.5.16
[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 _0xfed6=['remove','emit','hasOwnProperty','hook','exports','../../mysqldb','VoiceQueue','save','update'];(function(_0x751df,_0x3fe734){var _0x39e29f=function(_0xd12208){while(--_0xd12208){_0x751df['push'](_0x751df['shift']());}};_0x39e29f(++_0x3fe734);}(_0xfed6,0x17f));var _0x6fed=function(_0x57fd59,_0x49ff36){_0x57fd59=_0x57fd59-0x0;var _0x29e757=_0xfed6[_0x57fd59];return _0x29e757;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x6fed('0x0'))['db'][_0x6fed('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6fed('0x2'),'afterUpdate':_0x6fed('0x3'),'afterDestroy':_0x6fed('0x4')};function emitEvent(_0xcc1ff4){return function(_0x5c9b8f,_0xc97347,_0x133057){VoiceQueueEvents[_0x6fed('0x5')](_0xcc1ff4+':'+_0x5c9b8f['id'],_0x5c9b8f);VoiceQueueEvents[_0x6fed('0x5')](_0xcc1ff4,_0x5c9b8f);_0x133057(null);};}for(var e in events){if(events[_0x6fed('0x6')](e)){var event=events[e];VoiceQueue[_0x6fed('0x7')](e,emitEvent(event));}}module[_0x6fed('0x8')]=VoiceQueueEvents;