278789ed77fcb4d154e1dd7e99f112272c5a71bc
[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 _0x2cbb=['update','emit','length','cmList:','./cmList.events'];(function(_0x55fa03,_0xcb96c2){var _0x2cd7cd=function(_0x56611f){while(--_0x56611f){_0x55fa03['push'](_0x55fa03['shift']());}};_0x2cd7cd(++_0xcb96c2);}(_0x2cbb,0x9f));var _0xb2cb=function(_0x53b07e,_0x3bc254){_0x53b07e=_0x53b07e-0x0;var _0x5490b7=_0x2cbb[_0x53b07e];return _0x5490b7;};'use strict';var CmListEvents=require(_0xb2cb('0x0'));var events=['save','remove',_0xb2cb('0x1')];function createListener(_0x5b79b5,_0x54a40d){return function(_0x3269b7){_0x54a40d[_0xb2cb('0x2')](_0x5b79b5,_0x3269b7);};}function removeListener(_0xc86ff3,_0x23f223){return function(){CmListEvents['removeListener'](_0xc86ff3,_0x23f223);};}exports['register']=function(_0x2f0683){for(var _0x5b5217=0x0,_0x523d96=events[_0xb2cb('0x3')];_0x5b5217<_0x523d96;_0x5b5217++){var _0x1fd698=events[_0x5b5217];var _0x1b896c=createListener(_0xb2cb('0x4')+_0x1fd698,_0x2f0683);CmListEvents['on'](_0x1fd698,_0x1b896c);}};