2ebde8e4951d9ae923fffe3afdf19c8f56a5cb5e
[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 _0xfac1=['cmList:','save','update','emit','register','length'];(function(_0x8c2e98,_0xacc0f1){var _0x3a546b=function(_0x1e64da){while(--_0x1e64da){_0x8c2e98['push'](_0x8c2e98['shift']());}};_0x3a546b(++_0xacc0f1);}(_0xfac1,0x16f));var _0x1fac=function(_0x29d60a,_0x2b4229){_0x29d60a=_0x29d60a-0x0;var _0x4efc39=_0xfac1[_0x29d60a];return _0x4efc39;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0x1fac('0x0'),'remove',_0x1fac('0x1')];function createListener(_0x516fc2,_0x39c68c){return function(_0x3d4396){_0x39c68c[_0x1fac('0x2')](_0x516fc2,_0x3d4396);};}function removeListener(_0x23c264,_0x14605e){return function(){CmListEvents['removeListener'](_0x23c264,_0x14605e);};}exports[_0x1fac('0x3')]=function(_0x10e3de){for(var _0x2b769e=0x0,_0x5bdbfb=events[_0x1fac('0x4')];_0x2b769e<_0x5bdbfb;_0x2b769e++){var _0x3f5e7f=events[_0x2b769e];var _0x3ac379=createListener(_0x1fac('0x5')+_0x3f5e7f,_0x10e3de);CmListEvents['on'](_0x3f5e7f,_0x3ac379);}};