Built motion from commit 9d0783e6.|2.6.13
[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 _0xa872=['update','emit','length','voiceQueue:','./voiceQueue.events','save'];(function(_0x1c969c,_0x2c0fbf){var _0x421d03=function(_0x2f4b4e){while(--_0x2f4b4e){_0x1c969c['push'](_0x1c969c['shift']());}};_0x421d03(++_0x2c0fbf);}(_0xa872,0x1b4));var _0x2a87=function(_0x336e7a,_0x211e1a){_0x336e7a=_0x336e7a-0x0;var _0x3764db=_0xa872[_0x336e7a];return _0x3764db;};'use strict';var VoiceQueueEvents=require(_0x2a87('0x0'));var events=[_0x2a87('0x1'),'remove',_0x2a87('0x2')];function createListener(_0x117a5a,_0x25ff4e){return function(_0x23385a){_0x25ff4e[_0x2a87('0x3')](_0x117a5a,_0x23385a);};}function removeListener(_0x5532a5,_0x57195b){return function(){VoiceQueueEvents['removeListener'](_0x5532a5,_0x57195b);};}exports['register']=function(_0xb3e6bc){for(var _0x23dd1a=0x0,_0x1fc688=events[_0x2a87('0x4')];_0x23dd1a<_0x1fc688;_0x23dd1a++){var _0x57471f=events[_0x23dd1a];var _0x2f45f0=createListener(_0x2a87('0x5')+_0x57471f,_0xb3e6bc);VoiceQueueEvents['on'](_0x57471f,_0x2f45f0);}};