Built motion from commit 0415ced0.|2.6.28
[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 _0xf117=['emit','hook','exports','events','../../mysqldb','VoiceExtension','save','update','remove'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0xf117,0x108));var _0x7f11=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0xf117[_0x42bdad];return _0x122626;};'use strict';var EventEmitter=require(_0x7f11('0x0'));var VoiceExtension=require(_0x7f11('0x1'))['db'][_0x7f11('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7f11('0x3'),'afterUpdate':_0x7f11('0x4'),'afterDestroy':_0x7f11('0x5')};function emitEvent(_0x410e24){return function(_0x382627,_0x5a1bca,_0x5b8d23){VoiceExtensionEvents[_0x7f11('0x6')](_0x410e24+':'+_0x382627['id'],_0x382627);VoiceExtensionEvents[_0x7f11('0x6')](_0x410e24,_0x382627);_0x5b8d23(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x7f11('0x7')](e,emitEvent(event));}}module[_0x7f11('0x8')]=VoiceExtensionEvents;