c1f027f1f278825741bdec7e9e1133c54097822b
[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 _0x0ce2=['update','register','length','./voiceQueue.events','remove'];(function(_0x72cdb7,_0x33f930){var _0x231a70=function(_0x22a9bf){while(--_0x22a9bf){_0x72cdb7['push'](_0x72cdb7['shift']());}};_0x231a70(++_0x33f930);}(_0x0ce2,0xfd));var _0x20ce=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x0ce2[_0x19e35c];return _0x3e1fe8;};'use strict';var VoiceQueueEvents=require(_0x20ce('0x0'));var events=['save',_0x20ce('0x1'),_0x20ce('0x2')];function createListener(_0x2768da,_0x141ff0){return function(_0x18683e){_0x141ff0['emit'](_0x2768da,_0x18683e);};}function removeListener(_0x4f1891,_0x23d0c2){return function(){VoiceQueueEvents['removeListener'](_0x4f1891,_0x23d0c2);};}exports[_0x20ce('0x3')]=function(_0x208e54){for(var _0x5ae7b2=0x0,_0x52154a=events[_0x20ce('0x4')];_0x5ae7b2<_0x52154a;_0x5ae7b2++){var _0x2d08e0=events[_0x5ae7b2];var _0x3ffcbb=createListener('voiceQueue:'+_0x2d08e0,_0x208e54);VoiceQueueEvents['on'](_0x2d08e0,_0x3ffcbb);}};