2bf5e2ca91c39a0d8031d509aef12f1e04200572
[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 _0x751c=['save','remove','update','register','./voiceQueue.events'];(function(_0x248bf0,_0x29a685){var _0x455c00=function(_0x44da4d){while(--_0x44da4d){_0x248bf0['push'](_0x248bf0['shift']());}};_0x455c00(++_0x29a685);}(_0x751c,0x7c));var _0xc751=function(_0x23d830,_0x57d89a){_0x23d830=_0x23d830-0x0;var _0x4d5405=_0x751c[_0x23d830];return _0x4d5405;};'use strict';var VoiceQueueEvents=require(_0xc751('0x0'));var events=[_0xc751('0x1'),_0xc751('0x2'),_0xc751('0x3')];function createListener(_0x39e0de,_0x2a2ccb){return function(_0x614bfc){_0x2a2ccb['emit'](_0x39e0de,_0x614bfc);};}function removeListener(_0x2cc6e2,_0x4c07ce){return function(){VoiceQueueEvents['removeListener'](_0x2cc6e2,_0x4c07ce);};}exports[_0xc751('0x4')]=function(_0x3cedc0){for(var _0x53387e=0x0,_0x56a45c=events['length'];_0x53387e<_0x56a45c;_0x53387e++){var _0x111cf7=events[_0x53387e];var _0x565102=createListener('voiceQueue:'+_0x111cf7,_0x3cedc0);VoiceQueueEvents['on'](_0x111cf7,_0x565102);}};