5670ab2a5b64433dca0b0b5bec2339d176aafecf
[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 _0xac94=['remove','emit','removeListener','register','length','./plugin.events'];(function(_0x4b2ac7,_0x164d15){var _0x20dbc4=function(_0x5aeb79){while(--_0x5aeb79){_0x4b2ac7['push'](_0x4b2ac7['shift']());}};_0x20dbc4(++_0x164d15);}(_0xac94,0xc5));var _0x4ac9=function(_0xffc78d,_0x159b0d){_0xffc78d=_0xffc78d-0x0;var _0x1908df=_0xac94[_0xffc78d];return _0x1908df;};'use strict';var PluginEvents=require(_0x4ac9('0x0'));var events=['save',_0x4ac9('0x1'),'update'];function createListener(_0x51cefd,_0x4ac314){return function(_0x10858d){_0x4ac314[_0x4ac9('0x2')](_0x51cefd,_0x10858d);};}function removeListener(_0x3c03b9,_0x276c90){return function(){PluginEvents[_0x4ac9('0x3')](_0x3c03b9,_0x276c90);};}exports[_0x4ac9('0x4')]=function(_0x494139){for(var _0x3ff632=0x0,_0x167f87=events[_0x4ac9('0x5')];_0x3ff632<_0x167f87;_0x3ff632++){var _0x26d319=events[_0x3ff632];var _0x312919=createListener('plugin:'+_0x26d319,_0x494139);PluginEvents['on'](_0x26d319,_0x312919);}};