cc43dc01352bd91f46f828c79e09f4cf61cf00af
[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 _0x5ba8=['update','removeListener','register','length','voiceQueue:','./voiceQueue.events','save','remove'];(function(_0x5ba353,_0x11fd8b){var _0x149f6b=function(_0x59b92e){while(--_0x59b92e){_0x5ba353['push'](_0x5ba353['shift']());}};_0x149f6b(++_0x11fd8b);}(_0x5ba8,0xe5));var _0x85ba=function(_0x54b9d4,_0x3930e7){_0x54b9d4=_0x54b9d4-0x0;var _0x32f9e8=_0x5ba8[_0x54b9d4];return _0x32f9e8;};'use strict';var VoiceQueueEvents=require(_0x85ba('0x0'));var events=[_0x85ba('0x1'),_0x85ba('0x2'),_0x85ba('0x3')];function createListener(_0x3e69c4,_0x5df54f){return function(_0x15c744){_0x5df54f['emit'](_0x3e69c4,_0x15c744);};}function removeListener(_0x102ccf,_0x56729a){return function(){VoiceQueueEvents[_0x85ba('0x4')](_0x102ccf,_0x56729a);};}exports[_0x85ba('0x5')]=function(_0x3b64ad){for(var _0xc29cc2=0x0,_0xb6e2c=events[_0x85ba('0x6')];_0xc29cc2<_0xb6e2c;_0xc29cc2++){var _0x432d63=events[_0xc29cc2];var _0x24cce8=createListener(_0x85ba('0x7')+_0x432d63,_0x3b64ad);VoiceQueueEvents['on'](_0x432d63,_0x24cce8);}};