14de0a8eca6946921fc2b227c1915594e5d8afde
[motion2.git] / server / api / plugin / plugin.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 _0xeb1b=['register','length','./plugin.events','save','remove','update','emit','removeListener'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xeb1b,0x16a));var _0xbeb1=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xeb1b[_0x14add3];return _0x4a174f;};'use strict';var PluginEvents=require(_0xbeb1('0x0'));var events=[_0xbeb1('0x1'),_0xbeb1('0x2'),_0xbeb1('0x3')];function createListener(_0x24f4c5,_0x11f1eb){return function(_0x3fedfe){_0x11f1eb[_0xbeb1('0x4')](_0x24f4c5,_0x3fedfe);};}function removeListener(_0x1740eb,_0x383f01){return function(){PluginEvents[_0xbeb1('0x5')](_0x1740eb,_0x383f01);};}exports[_0xbeb1('0x6')]=function(_0x1ac6e6){for(var _0x2c363a=0x0,_0x1011d=events[_0xbeb1('0x7')];_0x2c363a<_0x1011d;_0x2c363a++){var _0x5d1c83=events[_0x2c363a];var _0x4225ae=createListener('plugin:'+_0x5d1c83,_0x1ac6e6);PluginEvents['on'](_0x5d1c83,_0x4225ae);}};