c47dbd70b004b0e2a2bef8410ca4e3070a86b38d
[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 _0xf2ba=['voiceQueue:','./voiceQueue.events','save','removeListener','length'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xf2ba,0xab));var _0xaf2b=function(_0x3bb45b,_0x2dcc0b){_0x3bb45b=_0x3bb45b-0x0;var _0x513162=_0xf2ba[_0x3bb45b];return _0x513162;};'use strict';var VoiceQueueEvents=require(_0xaf2b('0x0'));var events=[_0xaf2b('0x1'),'remove','update'];function createListener(_0x19f781,_0x278600){return function(_0x53e5d8){_0x278600['emit'](_0x19f781,_0x53e5d8);};}function removeListener(_0x270bcd,_0x470eae){return function(){VoiceQueueEvents[_0xaf2b('0x2')](_0x270bcd,_0x470eae);};}exports['register']=function(_0x4e6e12){for(var _0x57f9b6=0x0,_0x32081f=events[_0xaf2b('0x3')];_0x57f9b6<_0x32081f;_0x57f9b6++){var _0x59c0e9=events[_0x57f9b6];var _0x429e47=createListener(_0xaf2b('0x4')+_0x59c0e9,_0x4e6e12);VoiceQueueEvents['on'](_0x59c0e9,_0x429e47);}};