Built motion from commit (unavailable).|2.4.4
[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 _0x1f24=['emit','removeListener','register','./plugin.events','remove','update'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0x1f24,0x1d7));var _0x41f2=function(_0x55c5f4,_0x3a1695){_0x55c5f4=_0x55c5f4-0x0;var _0x1f48b4=_0x1f24[_0x55c5f4];return _0x1f48b4;};'use strict';var PluginEvents=require(_0x41f2('0x0'));var events=['save',_0x41f2('0x1'),_0x41f2('0x2')];function createListener(_0x27d6c8,_0x12c9cb){return function(_0x20addf){_0x12c9cb[_0x41f2('0x3')](_0x27d6c8,_0x20addf);};}function removeListener(_0x48b164,_0x3327e2){return function(){PluginEvents[_0x41f2('0x4')](_0x48b164,_0x3327e2);};}exports[_0x41f2('0x5')]=function(_0x4786fc){for(var _0x3fe67e=0x0,_0x2762f4=events['length'];_0x3fe67e<_0x2762f4;_0x3fe67e++){var _0x31432d=events[_0x3fe67e];var _0x28304a=createListener('plugin:'+_0x31432d,_0x4786fc);PluginEvents['on'](_0x31432d,_0x28304a);}};