c090816a3c91b2588e59bf1558287a195af772a5
[motion2.git] / server / api / openchannelQueue / openchannelQueue.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 _0x9b5a=['openchannelQueue:','./openchannelQueue.events','save','register','length'];(function(_0x2885f3,_0x52a4b4){var _0x2422ea=function(_0x18e737){while(--_0x18e737){_0x2885f3['push'](_0x2885f3['shift']());}};_0x2422ea(++_0x52a4b4);}(_0x9b5a,0xf1));var _0xa9b5=function(_0x2c54e0,_0x48068e){_0x2c54e0=_0x2c54e0-0x0;var _0x4d3830=_0x9b5a[_0x2c54e0];return _0x4d3830;};'use strict';var OpenchannelQueueEvents=require(_0xa9b5('0x0'));var events=[_0xa9b5('0x1'),'remove','update'];function createListener(_0x3c402a,_0x56a3b0){return function(_0x52cd5e){_0x56a3b0['emit'](_0x3c402a,_0x52cd5e);};}function removeListener(_0x56696a,_0x3cf4aa){return function(){OpenchannelQueueEvents['removeListener'](_0x56696a,_0x3cf4aa);};}exports[_0xa9b5('0x2')]=function(_0x3cdc87){for(var _0x3212f0=0x0,_0x15768a=events[_0xa9b5('0x3')];_0x3212f0<_0x15768a;_0x3212f0++){var _0x2d7fc9=events[_0x3212f0];var _0x11ef2e=createListener(_0xa9b5('0x4')+_0x2d7fc9,_0x3cdc87);OpenchannelQueueEvents['on'](_0x2d7fc9,_0x11ef2e);}};