c316ef43ebffe64b539e913ff39d167c2750c867
[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 _0x118e=['length','./cmList.events','save','remove','removeListener','register'];(function(_0x5a5b82,_0x41fd7d){var _0x5cf01=function(_0x4c07b1){while(--_0x4c07b1){_0x5a5b82['push'](_0x5a5b82['shift']());}};_0x5cf01(++_0x41fd7d);}(_0x118e,0x14b));var _0xe118=function(_0x2ed8f3,_0x4aa12f){_0x2ed8f3=_0x2ed8f3-0x0;var _0x525a55=_0x118e[_0x2ed8f3];return _0x525a55;};'use strict';var CmListEvents=require(_0xe118('0x0'));var events=[_0xe118('0x1'),_0xe118('0x2'),'update'];function createListener(_0x38a008,_0x29e674){return function(_0x53338f){_0x29e674['emit'](_0x38a008,_0x53338f);};}function removeListener(_0x4259ab,_0x332e08){return function(){CmListEvents[_0xe118('0x3')](_0x4259ab,_0x332e08);};}exports[_0xe118('0x4')]=function(_0x381214){for(var _0xed9bf5=0x0,_0x3357d5=events[_0xe118('0x5')];_0xed9bf5<_0x3357d5;_0xed9bf5++){var _0x17213a=events[_0xed9bf5];var _0x113b26=createListener('cmList:'+_0x17213a,_0x381214);CmListEvents['on'](_0x17213a,_0x113b26);}};