Built motion from commit (unavailable).|2.4.18
[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 _0xc832=['FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x31c29e,_0x514baf){var _0x460bd9=function(_0x3e9b7f){while(--_0x3e9b7f){_0x31c29e['push'](_0x31c29e['shift']());}};_0x460bd9(++_0x514baf);}(_0xc832,0xdb));var _0x2c83=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0xc832[_0x1e7b16];return _0x37fadc;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x2c83('0x0'))['db'][_0x2c83('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x2c83('0x2')](0x0);var events={'afterCreate':_0x2c83('0x3'),'afterUpdate':_0x2c83('0x4'),'afterDestroy':_0x2c83('0x5')};function emitEvent(_0x477d2f){return function(_0x4063e2,_0x45c5b9,_0x15e974){FaxQueueEvents['emit'](_0x477d2f+':'+_0x4063e2['id'],_0x4063e2);FaxQueueEvents[_0x2c83('0x6')](_0x477d2f,_0x4063e2);_0x15e974(null);};}for(var e in events){if(events[_0x2c83('0x7')](e)){var event=events[e];FaxQueue[_0x2c83('0x8')](e,emitEvent(event));}}module[_0x2c83('0x9')]=FaxQueueEvents;