b34d67ba89e6163c25e6ada7af58e1baf731caf5
[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(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xeb1b,0x16a));var _0xbeb1=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xeb1b[_0x3947c9];return _0x2e7871;};'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);}};