c2f5e8b89c1ec5e999573749512e148377f5e514
[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 _0xfb0e=['length','./plugin.events','save','remove','emit','removeListener','register'];(function(_0x493d59,_0x531fdc){var _0x384021=function(_0x1fbfc4){while(--_0x1fbfc4){_0x493d59['push'](_0x493d59['shift']());}};_0x384021(++_0x531fdc);}(_0xfb0e,0x14a));var _0xefb0=function(_0x148879,_0x5b4c11){_0x148879=_0x148879-0x0;var _0x4f7027=_0xfb0e[_0x148879];return _0x4f7027;};'use strict';var PluginEvents=require(_0xefb0('0x0'));var events=[_0xefb0('0x1'),_0xefb0('0x2'),'update'];function createListener(_0x5e3167,_0x42f038){return function(_0xcce4d5){_0x42f038[_0xefb0('0x3')](_0x5e3167,_0xcce4d5);};}function removeListener(_0x2b7f90,_0x529e3c){return function(){PluginEvents[_0xefb0('0x4')](_0x2b7f90,_0x529e3c);};}exports[_0xefb0('0x5')]=function(_0xdaa9d9){for(var _0x5e40df=0x0,_0x2821f7=events[_0xefb0('0x6')];_0x5e40df<_0x2821f7;_0x5e40df++){var _0x51cd5c=events[_0x5e40df];var _0x370649=createListener('plugin:'+_0x51cd5c,_0xdaa9d9);PluginEvents['on'](_0x51cd5c,_0x370649);}};