Built motion from commit (unavailable).|2.5.13
[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 _0x6bdd=['VoiceExtension','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','../../mysqldb'];(function(_0x4c28e1,_0x4b8fc2){var _0x4192b9=function(_0x4b6637){while(--_0x4b6637){_0x4c28e1['push'](_0x4c28e1['shift']());}};_0x4192b9(++_0x4b8fc2);}(_0x6bdd,0xe9));var _0xd6bd=function(_0x254c9e,_0xab8a1b){_0x254c9e=_0x254c9e-0x0;var _0x2d4cb6=_0x6bdd[_0x254c9e];return _0x2d4cb6;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0xd6bd('0x0'))['db'][_0xd6bd('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xd6bd('0x2')](0x0);var events={'afterCreate':_0xd6bd('0x3'),'afterUpdate':_0xd6bd('0x4'),'afterDestroy':_0xd6bd('0x5')};function emitEvent(_0x52f071){return function(_0x7f59e3,_0x53e5c8,_0x1a4398){VoiceExtensionEvents[_0xd6bd('0x6')](_0x52f071+':'+_0x7f59e3['id'],_0x7f59e3);VoiceExtensionEvents['emit'](_0x52f071,_0x7f59e3);_0x1a4398(null);};}for(var e in events){if(events[_0xd6bd('0x7')](e)){var event=events[e];VoiceExtension[_0xd6bd('0x8')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;