Built motion from commit 85328c08.|2.5.50
[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 _0xf2fc=['remove','emit','removeListener','plugin:','./plugin.events','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf2fc,0x100));var _0xcf2f=function(_0x2bd8a6,_0x5b9211){_0x2bd8a6=_0x2bd8a6-0x0;var _0x1e037a=_0xf2fc[_0x2bd8a6];return _0x1e037a;};'use strict';var PluginEvents=require(_0xcf2f('0x0'));var events=[_0xcf2f('0x1'),_0xcf2f('0x2'),'update'];function createListener(_0x47d963,_0x5f59ab){return function(_0x218397){_0x5f59ab[_0xcf2f('0x3')](_0x47d963,_0x218397);};}function removeListener(_0x37598d,_0x15a35e){return function(){PluginEvents[_0xcf2f('0x4')](_0x37598d,_0x15a35e);};}exports['register']=function(_0x2ef44e){for(var _0x2c5042=0x0,_0x41eeb2=events['length'];_0x2c5042<_0x41eeb2;_0x2c5042++){var _0x5220b6=events[_0x2c5042];var _0xf96abc=createListener(_0xcf2f('0x5')+_0x5220b6,_0x2ef44e);PluginEvents['on'](_0x5220b6,_0xf96abc);}};