42118e291a5a0e3d8ec35c7e1d0c3eef877a1874
[motion2.git] / server / api / smsQueue / smsQueue.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 _0x977c=['removeListener','register','length','smsQueue:','remove'];(function(_0x3891fd,_0x132891){var _0x59ed7b=function(_0x637f66){while(--_0x637f66){_0x3891fd['push'](_0x3891fd['shift']());}};_0x59ed7b(++_0x132891);}(_0x977c,0x180));var _0xc977=function(_0x4aadad,_0x4b978b){_0x4aadad=_0x4aadad-0x0;var _0x4a7348=_0x977c[_0x4aadad];return _0x4a7348;};'use strict';var SmsQueueEvents=require('./smsQueue.events');var events=['save',_0xc977('0x0'),'update'];function createListener(_0x37e819,_0x262750){return function(_0x3301c3){_0x262750['emit'](_0x37e819,_0x3301c3);};}function removeListener(_0xb1a0f2,_0x5e66a2){return function(){SmsQueueEvents[_0xc977('0x1')](_0xb1a0f2,_0x5e66a2);};}exports[_0xc977('0x2')]=function(_0x1b16d3){for(var _0x1de6af=0x0,_0x1c616a=events[_0xc977('0x3')];_0x1de6af<_0x1c616a;_0x1de6af++){var _0x2fefd9=events[_0x1de6af];var _0x385df6=createListener(_0xc977('0x4')+_0x2fefd9,_0x1b16d3);SmsQueueEvents['on'](_0x2fefd9,_0x385df6);}};