Built motion from commit 775e2a94.|2.6.3
[motion2.git] / server / api / faxQueue / faxQueue.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 _0x3dde=['save','update','remove','emit','hasOwnProperty','exports','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x248bf0,_0x29a685){var _0x455c00=function(_0x44da4d){while(--_0x44da4d){_0x248bf0['push'](_0x248bf0['shift']());}};_0x455c00(++_0x29a685);}(_0x3dde,0x1ec));var _0xe3dd=function(_0x168b7d,_0x5a906f){_0x168b7d=_0x168b7d-0x0;var _0x388531=_0x3dde[_0x168b7d];return _0x388531;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xe3dd('0x0'))['db'][_0xe3dd('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xe3dd('0x2')](0x0);var events={'afterCreate':_0xe3dd('0x3'),'afterUpdate':_0xe3dd('0x4'),'afterDestroy':_0xe3dd('0x5')};function emitEvent(_0x5bfe76){return function(_0x4185fc,_0x4bdc6f,_0x159534){FaxQueueEvents['emit'](_0x5bfe76+':'+_0x4185fc['id'],_0x4185fc);FaxQueueEvents[_0xe3dd('0x6')](_0x5bfe76,_0x4185fc);_0x159534(null);};}for(var e in events){if(events[_0xe3dd('0x7')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xe3dd('0x8')]=FaxQueueEvents;