Built motion from commit b0a9a629.|2.6.33
[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 _0x34e7=['save','remove','emit','hasOwnProperty','hook'];(function(_0xcc94b,_0x3f516d){var _0x342f7c=function(_0xf7475){while(--_0xf7475){_0xcc94b['push'](_0xcc94b['shift']());}};_0x342f7c(++_0x3f516d);}(_0x34e7,0x1f4));var _0x734e=function(_0x579d09,_0x1ac221){_0x579d09=_0x579d09-0x0;var _0x4df6bb=_0x34e7[_0x579d09];return _0x4df6bb;};'use strict';var EventEmitter=require('events');var VoiceExtension=require('../../mysqldb')['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x734e('0x0'),'afterUpdate':'update','afterDestroy':_0x734e('0x1')};function emitEvent(_0x493fe3){return function(_0x2592e9,_0x4c91f6,_0x2444f6){VoiceExtensionEvents['emit'](_0x493fe3+':'+_0x2592e9['id'],_0x2592e9);VoiceExtensionEvents[_0x734e('0x2')](_0x493fe3,_0x2592e9);_0x2444f6(null);};}for(var e in events){if(events[_0x734e('0x3')](e)){var event=events[e];VoiceExtension[_0x734e('0x4')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;