5bf967bb4111d30e1caff7ffbd037262994a5d7d
[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 _0x0f3f=['removeListener','register','smsQueue:','./smsQueue.events','save','remove','update'];(function(_0x182ccb,_0x35b47b){var _0x2e908c=function(_0x12b5f0){while(--_0x12b5f0){_0x182ccb['push'](_0x182ccb['shift']());}};_0x2e908c(++_0x35b47b);}(_0x0f3f,0xc0));var _0xf0f3=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0x0f3f[_0x5c351c];return _0x26f3b3;};'use strict';var SmsQueueEvents=require(_0xf0f3('0x0'));var events=[_0xf0f3('0x1'),_0xf0f3('0x2'),_0xf0f3('0x3')];function createListener(_0x32cb4f,_0x4ac9b2){return function(_0x540f5a){_0x4ac9b2['emit'](_0x32cb4f,_0x540f5a);};}function removeListener(_0xa6aecd,_0x58736b){return function(){SmsQueueEvents[_0xf0f3('0x4')](_0xa6aecd,_0x58736b);};}exports[_0xf0f3('0x5')]=function(_0xa44546){for(var _0x921b60=0x0,_0x143603=events['length'];_0x921b60<_0x143603;_0x921b60++){var _0x340d78=events[_0x921b60];var _0x4a1b5f=createListener(_0xf0f3('0x6')+_0x340d78,_0xa44546);SmsQueueEvents['on'](_0x340d78,_0x4a1b5f);}};