c21b7e456382655745a42c8e1a65993f6a939919
[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 _0xe384=['update','emit','register','plugin:','./plugin.events','remove'];(function(_0x2a55f8,_0x540ac4){var _0x245efd=function(_0x4dbc19){while(--_0x4dbc19){_0x2a55f8['push'](_0x2a55f8['shift']());}};_0x245efd(++_0x540ac4);}(_0xe384,0x160));var _0x4e38=function(_0x5a7789,_0x227fef){_0x5a7789=_0x5a7789-0x0;var _0xd58b00=_0xe384[_0x5a7789];return _0xd58b00;};'use strict';var PluginEvents=require(_0x4e38('0x0'));var events=['save',_0x4e38('0x1'),_0x4e38('0x2')];function createListener(_0x521a6f,_0x4820f4){return function(_0x5164a5){_0x4820f4[_0x4e38('0x3')](_0x521a6f,_0x5164a5);};}function removeListener(_0x1c4e12,_0x4a97d6){return function(){PluginEvents['removeListener'](_0x1c4e12,_0x4a97d6);};}exports[_0x4e38('0x4')]=function(_0x5a34a1){for(var _0x52fd5e=0x0,_0x2a1873=events['length'];_0x52fd5e<_0x2a1873;_0x52fd5e++){var _0x582197=events[_0x52fd5e];var _0x1030fd=createListener(_0x4e38('0x5')+_0x582197,_0x5a34a1);PluginEvents['on'](_0x582197,_0x1030fd);}};