ad67a15a265535ce3404ca43f6842efb645f5bf8
[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 _0xb05e=['remove','update','emit','removeListener','length','./voiceQueue.events','save'];(function(_0x4f23e0,_0x4f350e){var _0x1dbe1b=function(_0x529b72){while(--_0x529b72){_0x4f23e0['push'](_0x4f23e0['shift']());}};_0x1dbe1b(++_0x4f350e);}(_0xb05e,0x83));var _0xeb05=function(_0x5916c6,_0x329433){_0x5916c6=_0x5916c6-0x0;var _0x4389d3=_0xb05e[_0x5916c6];return _0x4389d3;};'use strict';var VoiceQueueEvents=require(_0xeb05('0x0'));var events=[_0xeb05('0x1'),_0xeb05('0x2'),_0xeb05('0x3')];function createListener(_0x2cecd5,_0x468187){return function(_0x65576c){_0x468187[_0xeb05('0x4')](_0x2cecd5,_0x65576c);};}function removeListener(_0x3c905e,_0x45bc38){return function(){VoiceQueueEvents[_0xeb05('0x5')](_0x3c905e,_0x45bc38);};}exports['register']=function(_0x27f0b2){for(var _0x356f9e=0x0,_0x333779=events[_0xeb05('0x6')];_0x356f9e<_0x333779;_0x356f9e++){var _0x5ee0a4=events[_0x356f9e];var _0x41f10d=createListener('voiceQueue:'+_0x5ee0a4,_0x27f0b2);VoiceQueueEvents['on'](_0x5ee0a4,_0x41f10d);}};