Built motion from commit 06eb8eb0.|2.6.31
[motion2.git] / server / api / voiceExtension / voiceExtension.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 _0x5c3b=['../../mysqldb','VoiceExtension','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x43cdc5,_0x2f19ba){var _0x2da6c5=function(_0x1bf4f7){while(--_0x1bf4f7){_0x43cdc5['push'](_0x43cdc5['shift']());}};_0x2da6c5(++_0x2f19ba);}(_0x5c3b,0x6d));var _0xb5c3=function(_0x1e88eb,_0x4d031e){_0x1e88eb=_0x1e88eb-0x0;var _0x23fe01=_0x5c3b[_0x1e88eb];return _0x23fe01;};'use strict';var EventEmitter=require(_0xb5c3('0x0'));var VoiceExtension=require(_0xb5c3('0x1'))['db'][_0xb5c3('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb5c3('0x3'),'afterUpdate':_0xb5c3('0x4'),'afterDestroy':_0xb5c3('0x5')};function emitEvent(_0x894f23){return function(_0x2ca2ac,_0x53465b,_0x38a30f){VoiceExtensionEvents[_0xb5c3('0x6')](_0x894f23+':'+_0x2ca2ac['id'],_0x2ca2ac);VoiceExtensionEvents[_0xb5c3('0x6')](_0x894f23,_0x2ca2ac);_0x38a30f(null);};}for(var e in events){if(events[_0xb5c3('0x7')](e)){var event=events[e];VoiceExtension[_0xb5c3('0x8')](e,emitEvent(event));}}module[_0xb5c3('0x9')]=VoiceExtensionEvents;