17db4ba6f72d513156864ada0427e0a95681b7c2
[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 _0x0047=['save','remove','update','removeListener','length','./voiceQueue.events'];(function(_0x438fe1,_0x3308d5){var _0x3c8e1b=function(_0x2f8d41){while(--_0x2f8d41){_0x438fe1['push'](_0x438fe1['shift']());}};_0x3c8e1b(++_0x3308d5);}(_0x0047,0x197));var _0x7004=function(_0x16e73a,_0x146629){_0x16e73a=_0x16e73a-0x0;var _0x187aa1=_0x0047[_0x16e73a];return _0x187aa1;};'use strict';var VoiceQueueEvents=require(_0x7004('0x0'));var events=[_0x7004('0x1'),_0x7004('0x2'),_0x7004('0x3')];function createListener(_0x439736,_0x3ac9ca){return function(_0x43cc79){_0x3ac9ca['emit'](_0x439736,_0x43cc79);};}function removeListener(_0x14b99c,_0x4ed614){return function(){VoiceQueueEvents[_0x7004('0x4')](_0x14b99c,_0x4ed614);};}exports['register']=function(_0x21573d){for(var _0x43b60f=0x0,_0x1a23ee=events[_0x7004('0x5')];_0x43b60f<_0x1a23ee;_0x43b60f++){var _0x27ccff=events[_0x43b60f];var _0x47c856=createListener('voiceQueue:'+_0x27ccff,_0x21573d);VoiceQueueEvents['on'](_0x27ccff,_0x47c856);}};