77ac03161ccd32b724e013dea3640142a0c6f072
[motion2.git] / server / api / voiceQueue / voiceQueue.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 _0x6f0e=['save','register','length','./voiceQueue.events'];(function(_0x235f49,_0x2992b4){var _0x551139=function(_0x35565c){while(--_0x35565c){_0x235f49['push'](_0x235f49['shift']());}};_0x551139(++_0x2992b4);}(_0x6f0e,0x11b));var _0xe6f0=function(_0xbc8077,_0x37d8cd){_0xbc8077=_0xbc8077-0x0;var _0x1d826b=_0x6f0e[_0xbc8077];return _0x1d826b;};'use strict';var VoiceQueueEvents=require(_0xe6f0('0x0'));var events=[_0xe6f0('0x1'),'remove','update'];function createListener(_0x1d7ac5,_0x31a0db){return function(_0x35366c){_0x31a0db['emit'](_0x1d7ac5,_0x35366c);};}function removeListener(_0x1aa11f,_0x4934e6){return function(){VoiceQueueEvents['removeListener'](_0x1aa11f,_0x4934e6);};}exports[_0xe6f0('0x2')]=function(_0x593e9e){for(var _0x17a498=0x0,_0x4f35cb=events[_0xe6f0('0x3')];_0x17a498<_0x4f35cb;_0x17a498++){var _0xaf4ec7=events[_0x17a498];var _0x1993c2=createListener('voiceQueue:'+_0xaf4ec7,_0x593e9e);VoiceQueueEvents['on'](_0xaf4ec7,_0x1993c2);}};