Built motion from commit e6806ed6.|2.6.0
[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 _0x3f6d=['exports','../../mysqldb','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x30db41,_0x2bd5c8){var _0x550c6a=function(_0x3b1b83){while(--_0x3b1b83){_0x30db41['push'](_0x30db41['shift']());}};_0x550c6a(++_0x2bd5c8);}(_0x3f6d,0x151));var _0xd3f6=function(_0x47643e,_0x337374){_0x47643e=_0x47643e-0x0;var _0x2aa5db=_0x3f6d[_0x47643e];return _0x2aa5db;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0xd3f6('0x0'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd3f6('0x1'),'afterUpdate':_0xd3f6('0x2'),'afterDestroy':_0xd3f6('0x3')};function emitEvent(_0x479762){return function(_0x58dea9,_0x382b87,_0x508ec6){VoiceExtensionEvents[_0xd3f6('0x4')](_0x479762+':'+_0x58dea9['id'],_0x58dea9);VoiceExtensionEvents[_0xd3f6('0x4')](_0x479762,_0x58dea9);_0x508ec6(null);};}for(var e in events){if(events[_0xd3f6('0x5')](e)){var event=events[e];VoiceExtension[_0xd3f6('0x6')](e,emitEvent(event));}}module[_0xd3f6('0x7')]=VoiceExtensionEvents;