Built motion from commit 14588770.|2.5.38
[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 _0xe6e1=['register','length','cmList:','./cmList.events','save','remove','removeListener'];(function(_0x20b626,_0x3e02f4){var _0x21d0e0=function(_0x5d8ea0){while(--_0x5d8ea0){_0x20b626['push'](_0x20b626['shift']());}};_0x21d0e0(++_0x3e02f4);}(_0xe6e1,0x122));var _0x1e6e=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0xe6e1[_0x4243a3];return _0x1b2a33;};'use strict';var CmListEvents=require(_0x1e6e('0x0'));var events=[_0x1e6e('0x1'),_0x1e6e('0x2'),'update'];function createListener(_0x5b6d72,_0x4d8e6f){return function(_0x468f3a){_0x4d8e6f['emit'](_0x5b6d72,_0x468f3a);};}function removeListener(_0x576633,_0x265870){return function(){CmListEvents[_0x1e6e('0x3')](_0x576633,_0x265870);};}exports[_0x1e6e('0x4')]=function(_0x94f793){for(var _0x6da12b=0x0,_0x2706a0=events[_0x1e6e('0x5')];_0x6da12b<_0x2706a0;_0x6da12b++){var _0x532ecb=events[_0x6da12b];var _0x268227=createListener(_0x1e6e('0x6')+_0x532ecb,_0x94f793);CmListEvents['on'](_0x532ecb,_0x268227);}};