Built motion from commit (unavailable).|2.5.21
[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 _0x8a36=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','save'];(function(_0x50fa04,_0xcfb27){var _0xb49bbc=function(_0x2a5652){while(--_0x2a5652){_0x50fa04['push'](_0x50fa04['shift']());}};_0xb49bbc(++_0xcfb27);}(_0x8a36,0x95));var _0x68a3=function(_0x2ae5db,_0x1a1be4){_0x2ae5db=_0x2ae5db-0x0;var _0x20dea5=_0x8a36[_0x2ae5db];return _0x20dea5;};'use strict';var EventEmitter=require(_0x68a3('0x0'));var FaxQueue=require(_0x68a3('0x1'))['db'][_0x68a3('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x68a3('0x3'),'afterUpdate':_0x68a3('0x4'),'afterDestroy':_0x68a3('0x5')};function emitEvent(_0x18ff40){return function(_0x495742,_0x57390f,_0x2ba67e){FaxQueueEvents[_0x68a3('0x6')](_0x18ff40+':'+_0x495742['id'],_0x495742);FaxQueueEvents['emit'](_0x18ff40,_0x495742);_0x2ba67e(null);};}for(var e in events){if(events[_0x68a3('0x7')](e)){var event=events[e];FaxQueue[_0x68a3('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;