70981377c63c7e24b9381eb5cc6301c5befe9136
[motion2.git] / server / api / cmList / cmList.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 _0x4863=['emit','removeListener','register','length','cmList:','./cmList.events','save','remove','update'];(function(_0x7a112,_0x2eb4a0){var _0x136dc5=function(_0x437650){while(--_0x437650){_0x7a112['push'](_0x7a112['shift']());}};_0x136dc5(++_0x2eb4a0);}(_0x4863,0x19a));var _0x3486=function(_0x5106ec,_0x1f567f){_0x5106ec=_0x5106ec-0x0;var _0x3c74b3=_0x4863[_0x5106ec];return _0x3c74b3;};'use strict';var CmListEvents=require(_0x3486('0x0'));var events=[_0x3486('0x1'),_0x3486('0x2'),_0x3486('0x3')];function createListener(_0x4ea68a,_0x115fae){return function(_0x527797){_0x115fae[_0x3486('0x4')](_0x4ea68a,_0x527797);};}function removeListener(_0x3ec84e,_0xf3e06a){return function(){CmListEvents[_0x3486('0x5')](_0x3ec84e,_0xf3e06a);};}exports[_0x3486('0x6')]=function(_0x5ec571){for(var _0x116ada=0x0,_0x564066=events[_0x3486('0x7')];_0x116ada<_0x564066;_0x116ada++){var _0x2522f3=events[_0x116ada];var _0x579e34=createListener(_0x3486('0x8')+_0x2522f3,_0x5ec571);CmListEvents['on'](_0x2522f3,_0x579e34);}};