1495920ce05d7ea505072b63034322e5ae8383e3
[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 _0xbafa=['removeListener','register','length','voiceQueue:','./voiceQueue.events','save','update'];(function(_0x2a3e00,_0xe5ff18){var _0x3542f4=function(_0xbad9db){while(--_0xbad9db){_0x2a3e00['push'](_0x2a3e00['shift']());}};_0x3542f4(++_0xe5ff18);}(_0xbafa,0x66));var _0xabaf=function(_0x4c84f5,_0x1e60e0){_0x4c84f5=_0x4c84f5-0x0;var _0xa10719=_0xbafa[_0x4c84f5];return _0xa10719;};'use strict';var VoiceQueueEvents=require(_0xabaf('0x0'));var events=[_0xabaf('0x1'),'remove',_0xabaf('0x2')];function createListener(_0x3afb78,_0x5410cc){return function(_0x2b66fc){_0x5410cc['emit'](_0x3afb78,_0x2b66fc);};}function removeListener(_0xef27c3,_0x4826fd){return function(){VoiceQueueEvents[_0xabaf('0x3')](_0xef27c3,_0x4826fd);};}exports[_0xabaf('0x4')]=function(_0x282596){for(var _0x29f5ea=0x0,_0x5c8227=events[_0xabaf('0x5')];_0x29f5ea<_0x5c8227;_0x29f5ea++){var _0x49e015=events[_0x29f5ea];var _0x1843e3=createListener(_0xabaf('0x6')+_0x49e015,_0x282596);VoiceQueueEvents['on'](_0x49e015,_0x1843e3);}};