7d3ac5e275d12ecd5eb285d29736141a2b05cba2
[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 _0x96cf=['emit','length','./voiceQueue.events','save','update'];(function(_0xfcb70f,_0x48435e){var _0x335816=function(_0xb0a6c3){while(--_0xb0a6c3){_0xfcb70f['push'](_0xfcb70f['shift']());}};_0x335816(++_0x48435e);}(_0x96cf,0x7a));var _0xf96c=function(_0x1fb558,_0x3e5cb8){_0x1fb558=_0x1fb558-0x0;var _0x4c0127=_0x96cf[_0x1fb558];return _0x4c0127;};'use strict';var VoiceQueueEvents=require(_0xf96c('0x0'));var events=[_0xf96c('0x1'),'remove',_0xf96c('0x2')];function createListener(_0x407e2c,_0x1fec38){return function(_0xa68f8e){_0x1fec38[_0xf96c('0x3')](_0x407e2c,_0xa68f8e);};}function removeListener(_0x1eb5e3,_0x1f8142){return function(){VoiceQueueEvents['removeListener'](_0x1eb5e3,_0x1f8142);};}exports['register']=function(_0x2f1c61){for(var _0x77b843=0x0,_0x5a12ef=events[_0xf96c('0x4')];_0x77b843<_0x5a12ef;_0x77b843++){var _0x19ba0f=events[_0x77b843];var _0x3f008f=createListener('voiceQueue:'+_0x19ba0f,_0x2f1c61);VoiceQueueEvents['on'](_0x19ba0f,_0x3f008f);}};