af9a63545b25ffbdc8cf4054bbe9f909aa27dbbd
[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 _0x49f9=['length','./voiceQueue.events','remove','update','removeListener'];(function(_0x580244,_0x22923b){var _0x332f49=function(_0x971102){while(--_0x971102){_0x580244['push'](_0x580244['shift']());}};_0x332f49(++_0x22923b);}(_0x49f9,0x11e));var _0x949f=function(_0x3d622c,_0x2d22c2){_0x3d622c=_0x3d622c-0x0;var _0x2a5f25=_0x49f9[_0x3d622c];return _0x2a5f25;};'use strict';var VoiceQueueEvents=require(_0x949f('0x0'));var events=['save',_0x949f('0x1'),_0x949f('0x2')];function createListener(_0x83613f,_0x1cd41b){return function(_0x45bea9){_0x1cd41b['emit'](_0x83613f,_0x45bea9);};}function removeListener(_0x41c042,_0x46b0c7){return function(){VoiceQueueEvents[_0x949f('0x3')](_0x41c042,_0x46b0c7);};}exports['register']=function(_0xa2888a){for(var _0xc29a73=0x0,_0x549c48=events[_0x949f('0x4')];_0xc29a73<_0x549c48;_0xc29a73++){var _0x2f5fbb=events[_0xc29a73];var _0x23aa54=createListener('voiceQueue:'+_0x2f5fbb,_0xa2888a);VoiceQueueEvents['on'](_0x2f5fbb,_0x23aa54);}};