Built motion from commit 19a84241.|2.5.34
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0xb200=['hook','events','VoicePrefix','save','update','remove','emit','hasOwnProperty'];(function(_0x561df9,_0x3daf73){var _0x2d6c9a=function(_0xe7a8f3){while(--_0xe7a8f3){_0x561df9['push'](_0x561df9['shift']());}};_0x2d6c9a(++_0x3daf73);}(_0xb200,0x141));var _0x0b20=function(_0x51674a,_0x77ccff){_0x51674a=_0x51674a-0x0;var _0x13fca6=_0xb200[_0x51674a];return _0x13fca6;};'use strict';var EventEmitter=require(_0x0b20('0x0'));var VoicePrefix=require('../../mysqldb')['db'][_0x0b20('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0b20('0x2'),'afterUpdate':_0x0b20('0x3'),'afterDestroy':_0x0b20('0x4')};function emitEvent(_0x324f8e){return function(_0x2afd3d,_0x3600c1,_0x27beb5){VoicePrefixEvents[_0x0b20('0x5')](_0x324f8e+':'+_0x2afd3d['id'],_0x2afd3d);VoicePrefixEvents['emit'](_0x324f8e,_0x2afd3d);_0x27beb5(null);};}for(var e in events){if(events[_0x0b20('0x6')](e)){var event=events[e];VoicePrefix[_0x0b20('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;