efb44267d31a49e4fc7eeefc85b7c706c101d337
[motion2.git] / server / api / chatQueue / chatQueue.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 _0xedd9=['removeListener','register','length','chatQueue:','save','remove','update','emit'];(function(_0x12f029,_0x25b9df){var _0x28b186=function(_0x46553e){while(--_0x46553e){_0x12f029['push'](_0x12f029['shift']());}};_0x28b186(++_0x25b9df);}(_0xedd9,0xfc));var _0x9edd=function(_0x4faf43,_0x5035a3){_0x4faf43=_0x4faf43-0x0;var _0xdab4b9=_0xedd9[_0x4faf43];return _0xdab4b9;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=[_0x9edd('0x0'),_0x9edd('0x1'),_0x9edd('0x2')];function createListener(_0x2c16b8,_0x3b51bc){return function(_0x127cbe){_0x3b51bc[_0x9edd('0x3')](_0x2c16b8,_0x127cbe);};}function removeListener(_0x36b53f,_0x5943b3){return function(){ChatQueueEvents[_0x9edd('0x4')](_0x36b53f,_0x5943b3);};}exports[_0x9edd('0x5')]=function(_0x268f9e){for(var _0x34c1a7=0x0,_0x5319f7=events[_0x9edd('0x6')];_0x34c1a7<_0x5319f7;_0x34c1a7++){var _0x571af9=events[_0x34c1a7];var _0x172522=createListener(_0x9edd('0x7')+_0x571af9,_0x268f9e);ChatQueueEvents['on'](_0x571af9,_0x172522);}};