40db69e87c57894030ce35a89b3da4dd96cc081a
[motion2.git] / server / api / faxQueue / faxQueue.socket.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 _0x541f=['register','length','faxQueue:','save','update'];(function(_0xbed8a2,_0x578ae3){var _0x11d4f2=function(_0x49e846){while(--_0x49e846){_0xbed8a2['push'](_0xbed8a2['shift']());}};_0x11d4f2(++_0x578ae3);}(_0x541f,0x1f2));var _0xf541=function(_0x2892da,_0x191a40){_0x2892da=_0x2892da-0x0;var _0x28cff2=_0x541f[_0x2892da];return _0x28cff2;};'use strict';var FaxQueueEvents=require('./faxQueue.events');var events=[_0xf541('0x0'),'remove',_0xf541('0x1')];function createListener(_0x35a162,_0x503fa9){return function(_0x1c9ad7){_0x503fa9['emit'](_0x35a162,_0x1c9ad7);};}function removeListener(_0x13fa1a,_0x27194e){return function(){FaxQueueEvents['removeListener'](_0x13fa1a,_0x27194e);};}exports[_0xf541('0x2')]=function(_0x1e9379){for(var _0x1b75d7=0x0,_0x426257=events[_0xf541('0x3')];_0x1b75d7<_0x426257;_0x1b75d7++){var _0x2a4958=events[_0x1b75d7];var _0x172862=createListener(_0xf541('0x4')+_0x2a4958,_0x1e9379);FaxQueueEvents['on'](_0x2a4958,_0x172862);}};