Built motion from commit 0900f080.|2.5.45
[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 _0xa03c=['emit','hasOwnProperty','hook','../../mysqldb','VoiceExtension','setMaxListeners','save','update','remove'];(function(_0xf7069b,_0x538bc7){var _0x36e597=function(_0x24518b){while(--_0x24518b){_0xf7069b['push'](_0xf7069b['shift']());}};_0x36e597(++_0x538bc7);}(_0xa03c,0xb7));var _0xca03=function(_0x207809,_0x4f4718){_0x207809=_0x207809-0x0;var _0x4f31e4=_0xa03c[_0x207809];return _0x4f31e4;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0xca03('0x0'))['db'][_0xca03('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xca03('0x2')](0x0);var events={'afterCreate':_0xca03('0x3'),'afterUpdate':_0xca03('0x4'),'afterDestroy':_0xca03('0x5')};function emitEvent(_0x3eca6a){return function(_0x444fa8,_0x39e475,_0x14da24){VoiceExtensionEvents[_0xca03('0x6')](_0x3eca6a+':'+_0x444fa8['id'],_0x444fa8);VoiceExtensionEvents[_0xca03('0x6')](_0x3eca6a,_0x444fa8);_0x14da24(null);};}for(var e in events){if(events[_0xca03('0x7')](e)){var event=events[e];VoiceExtension[_0xca03('0x8')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;