7d5460025b3df8b9d3f2f7d2044ae9021b451f01
[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 _0xe598=['register','length','plugin:','remove','update','emit','removeListener'];(function(_0x155bbf,_0x1bca34){var _0x1cb0ac=function(_0x101c7c){while(--_0x101c7c){_0x155bbf['push'](_0x155bbf['shift']());}};_0x1cb0ac(++_0x1bca34);}(_0xe598,0x145));var _0x8e59=function(_0x258b93,_0x188ccc){_0x258b93=_0x258b93-0x0;var _0x35484b=_0xe598[_0x258b93];return _0x35484b;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0x8e59('0x0'),_0x8e59('0x1')];function createListener(_0x52262d,_0x4c1157){return function(_0x2f89e1){_0x4c1157[_0x8e59('0x2')](_0x52262d,_0x2f89e1);};}function removeListener(_0x4ac451,_0x449a37){return function(){PluginEvents[_0x8e59('0x3')](_0x4ac451,_0x449a37);};}exports[_0x8e59('0x4')]=function(_0x1f10b7){for(var _0x5d60bb=0x0,_0x2aee9d=events[_0x8e59('0x5')];_0x5d60bb<_0x2aee9d;_0x5d60bb++){var _0x174683=events[_0x5d60bb];var _0x3223f5=createListener(_0x8e59('0x6')+_0x174683,_0x1f10b7);PluginEvents['on'](_0x174683,_0x3223f5);}};