Built motion from commit (unavailable).|2.5.16
[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 _0xd386=['VoiceExtension','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x34570c,_0x4dc5e6){var _0x4e7abc=function(_0x5c52f8){while(--_0x5c52f8){_0x34570c['push'](_0x34570c['shift']());}};_0x4e7abc(++_0x4dc5e6);}(_0xd386,0x10c));var _0x6d38=function(_0x11bb60,_0x3dc734){_0x11bb60=_0x11bb60-0x0;var _0x37357e=_0xd386[_0x11bb60];return _0x37357e;};'use strict';var EventEmitter=require(_0x6d38('0x0'));var VoiceExtension=require(_0x6d38('0x1'))['db'][_0x6d38('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6d38('0x3'),'afterUpdate':_0x6d38('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1ce7c5){return function(_0x21b7ee,_0x97f669,_0xa6b2b3){VoiceExtensionEvents['emit'](_0x1ce7c5+':'+_0x21b7ee['id'],_0x21b7ee);VoiceExtensionEvents[_0x6d38('0x5')](_0x1ce7c5,_0x21b7ee);_0xa6b2b3(null);};}for(var e in events){if(events[_0x6d38('0x6')](e)){var event=events[e];VoiceExtension[_0x6d38('0x7')](e,emitEvent(event));}}module[_0x6d38('0x8')]=VoiceExtensionEvents;