Built motion from commit b5996064.|2.6.21
[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 _0xf531=['voiceQueue:','save','removeListener','register','length'];(function(_0x100e0c,_0x5523b8){var _0x4db1aa=function(_0x29f480){while(--_0x29f480){_0x100e0c['push'](_0x100e0c['shift']());}};_0x4db1aa(++_0x5523b8);}(_0xf531,0xbf));var _0x1f53=function(_0x3c36fb,_0x388539){_0x3c36fb=_0x3c36fb-0x0;var _0x4a47eb=_0xf531[_0x3c36fb];return _0x4a47eb;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=[_0x1f53('0x0'),'remove','update'];function createListener(_0x14abe5,_0x194d74){return function(_0x371a57){_0x194d74['emit'](_0x14abe5,_0x371a57);};}function removeListener(_0x3d96a5,_0x440d6a){return function(){VoiceQueueEvents[_0x1f53('0x1')](_0x3d96a5,_0x440d6a);};}exports[_0x1f53('0x2')]=function(_0x4a4cea){for(var _0x4bf050=0x0,_0x33fd57=events[_0x1f53('0x3')];_0x4bf050<_0x33fd57;_0x4bf050++){var _0x3c43a0=events[_0x4bf050];var _0x29e0c0=createListener(_0x1f53('0x4')+_0x3c43a0,_0x4a4cea);VoiceQueueEvents['on'](_0x3c43a0,_0x29e0c0);}};