42fb6942c0ac3adfce06516975d8dd45d0e36bc1
[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 _0xf884=['save','remove','emit','register','length','./smsQueue.events'];(function(_0x152953,_0x46ff51){var _0x3dbc2c=function(_0x3e1d59){while(--_0x3e1d59){_0x152953['push'](_0x152953['shift']());}};_0x3dbc2c(++_0x46ff51);}(_0xf884,0x1bb));var _0x4f88=function(_0x1ba28a,_0x4f212d){_0x1ba28a=_0x1ba28a-0x0;var _0x469d31=_0xf884[_0x1ba28a];return _0x469d31;};'use strict';var SmsQueueEvents=require(_0x4f88('0x0'));var events=[_0x4f88('0x1'),_0x4f88('0x2'),'update'];function createListener(_0x4d6791,_0x49edcc){return function(_0x48e716){_0x49edcc[_0x4f88('0x3')](_0x4d6791,_0x48e716);};}function removeListener(_0x13dcd1,_0x34c513){return function(){SmsQueueEvents['removeListener'](_0x13dcd1,_0x34c513);};}exports[_0x4f88('0x4')]=function(_0x20fe14){for(var _0x17acb1=0x0,_0x31f6db=events[_0x4f88('0x5')];_0x17acb1<_0x31f6db;_0x17acb1++){var _0x58c8c8=events[_0x17acb1];var _0x33e0f3=createListener('smsQueue:'+_0x58c8c8,_0x20fe14);SmsQueueEvents['on'](_0x58c8c8,_0x33e0f3);}};