25d65cfa665de02ae20513be2048518d1b683756
[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 _0xcdfd=['save','remove','emit','register'];(function(_0x5cd4e5,_0x45fab1){var _0x28fb05=function(_0x2b8575){while(--_0x2b8575){_0x5cd4e5['push'](_0x5cd4e5['shift']());}};_0x28fb05(++_0x45fab1);}(_0xcdfd,0x84));var _0xdcdf=function(_0x4a4c9f,_0x5cce76){_0x4a4c9f=_0x4a4c9f-0x0;var _0x5af457=_0xcdfd[_0x4a4c9f];return _0x5af457;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0xdcdf('0x0'),_0xdcdf('0x1'),'update'];function createListener(_0xf24b36,_0x5a45ae){return function(_0x19a4eb){_0x5a45ae[_0xdcdf('0x2')](_0xf24b36,_0x19a4eb);};}function removeListener(_0x101c3b,_0x59c342){return function(){CmListEvents['removeListener'](_0x101c3b,_0x59c342);};}exports[_0xdcdf('0x3')]=function(_0x1f9bd2){for(var _0x4907e3=0x0,_0x289a18=events['length'];_0x4907e3<_0x289a18;_0x4907e3++){var _0x56ef4c=events[_0x4907e3];var _0x27fbf7=createListener('cmList:'+_0x56ef4c,_0x1f9bd2);CmListEvents['on'](_0x56ef4c,_0x27fbf7);}};