fcecc61c6f3644072d1246edcb22c19c1167312a
[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 _0x0b3d=['removeListener','register','length','cmList:','./cmList.events','remove'];(function(_0x256b72,_0x340985){var _0x2183e3=function(_0xf7fd37){while(--_0xf7fd37){_0x256b72['push'](_0x256b72['shift']());}};_0x2183e3(++_0x340985);}(_0x0b3d,0x76));var _0xd0b3=function(_0x5712cc,_0x5db7dd){_0x5712cc=_0x5712cc-0x0;var _0x15561a=_0x0b3d[_0x5712cc];return _0x15561a;};'use strict';var CmListEvents=require(_0xd0b3('0x0'));var events=['save',_0xd0b3('0x1'),'update'];function createListener(_0x44585b,_0x5cd26e){return function(_0x2e82a6){_0x5cd26e['emit'](_0x44585b,_0x2e82a6);};}function removeListener(_0x372f08,_0x50faaa){return function(){CmListEvents[_0xd0b3('0x2')](_0x372f08,_0x50faaa);};}exports[_0xd0b3('0x3')]=function(_0x5b80df){for(var _0x2968c9=0x0,_0x5bc883=events[_0xd0b3('0x4')];_0x2968c9<_0x5bc883;_0x2968c9++){var _0x5f3196=events[_0x2968c9];var _0x5ab5b2=createListener(_0xd0b3('0x5')+_0x5f3196,_0x5b80df);CmListEvents['on'](_0x5f3196,_0x5ab5b2);}};