9dc726713317464f03bcb8faf9eba4867cb74761
[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 _0x1ecd=['cmList:','./cmList.events','save','remove','removeListener'];(function(_0x378af6,_0x272be6){var _0xbcdfbe=function(_0x5d03b7){while(--_0x5d03b7){_0x378af6['push'](_0x378af6['shift']());}};_0xbcdfbe(++_0x272be6);}(_0x1ecd,0x14b));var _0xd1ec=function(_0x4a9d73,_0x404b5f){_0x4a9d73=_0x4a9d73-0x0;var _0x2544c1=_0x1ecd[_0x4a9d73];return _0x2544c1;};'use strict';var CmListEvents=require(_0xd1ec('0x0'));var events=[_0xd1ec('0x1'),_0xd1ec('0x2'),'update'];function createListener(_0x2e404d,_0x338a69){return function(_0x26b50e){_0x338a69['emit'](_0x2e404d,_0x26b50e);};}function removeListener(_0x7f6c9c,_0x1ee8b4){return function(){CmListEvents[_0xd1ec('0x3')](_0x7f6c9c,_0x1ee8b4);};}exports['register']=function(_0x23c929){for(var _0x3ccdd1=0x0,_0x1a8d80=events['length'];_0x3ccdd1<_0x1a8d80;_0x3ccdd1++){var _0x2c5870=events[_0x3ccdd1];var _0x43e70b=createListener(_0xd1ec('0x4')+_0x2c5870,_0x23c929);CmListEvents['on'](_0x2c5870,_0x43e70b);}};