Built motion from commit (unavailable).|2.5.26
[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 _0xc3ed=['emit','hasOwnProperty','hook','exports','save','update'];(function(_0x1a80ee,_0x295292){var _0x1cc350=function(_0x3da5a4){while(--_0x3da5a4){_0x1a80ee['push'](_0x1a80ee['shift']());}};_0x1cc350(++_0x295292);}(_0xc3ed,0xb2));var _0xdc3e=function(_0x4e6ca2,_0x135ba1){_0x4e6ca2=_0x4e6ca2-0x0;var _0x1e92c8=_0xc3ed[_0x4e6ca2];return _0x1e92c8;};'use strict';var EventEmitter=require('events');var VoiceExtension=require('../../mysqldb')['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xdc3e('0x0'),'afterUpdate':_0xdc3e('0x1'),'afterDestroy':'remove'};function emitEvent(_0x6d97d8){return function(_0x49cf77,_0x39c392,_0x2a633c){VoiceExtensionEvents[_0xdc3e('0x2')](_0x6d97d8+':'+_0x49cf77['id'],_0x49cf77);VoiceExtensionEvents[_0xdc3e('0x2')](_0x6d97d8,_0x49cf77);_0x2a633c(null);};}for(var e in events){if(events[_0xdc3e('0x3')](e)){var event=events[e];VoiceExtension[_0xdc3e('0x4')](e,emitEvent(event));}}module[_0xdc3e('0x5')]=VoiceExtensionEvents;