9ca586773c93d4910c6aa09dd7bdd620637e4082
[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 _0x4a58=['voiceQueue:','./voiceQueue.events','save','remove','emit','register','length'];(function(_0x164b96,_0x12f735){var _0x5489d9=function(_0x57ef88){while(--_0x57ef88){_0x164b96['push'](_0x164b96['shift']());}};_0x5489d9(++_0x12f735);}(_0x4a58,0x120));var _0x84a5=function(_0x5df2ff,_0x48300e){_0x5df2ff=_0x5df2ff-0x0;var _0x594f25=_0x4a58[_0x5df2ff];return _0x594f25;};'use strict';var VoiceQueueEvents=require(_0x84a5('0x0'));var events=[_0x84a5('0x1'),_0x84a5('0x2'),'update'];function createListener(_0x47a657,_0x636a4a){return function(_0x2b2694){_0x636a4a[_0x84a5('0x3')](_0x47a657,_0x2b2694);};}function removeListener(_0x5cdc78,_0x5b3431){return function(){VoiceQueueEvents['removeListener'](_0x5cdc78,_0x5b3431);};}exports[_0x84a5('0x4')]=function(_0xbea31f){for(var _0x374d71=0x0,_0xdb89a5=events[_0x84a5('0x5')];_0x374d71<_0xdb89a5;_0x374d71++){var _0x792f7b=events[_0x374d71];var _0x396f2c=createListener(_0x84a5('0x6')+_0x792f7b,_0xbea31f);VoiceQueueEvents['on'](_0x792f7b,_0x396f2c);}};