Built motion from commit 14588770.|2.5.38
[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 _0xa8fa=['emit','removeListener','register','length','plugin:','save'];(function(_0x1eb42c,_0x35c7b7){var _0x5df39a=function(_0x281a17){while(--_0x281a17){_0x1eb42c['push'](_0x1eb42c['shift']());}};_0x5df39a(++_0x35c7b7);}(_0xa8fa,0x18b));var _0xaa8f=function(_0x46a3e8,_0x2e1b35){_0x46a3e8=_0x46a3e8-0x0;var _0xf1442e=_0xa8fa[_0x46a3e8];return _0xf1442e;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xaa8f('0x0'),'remove','update'];function createListener(_0x2de228,_0x3771e2){return function(_0x55e918){_0x3771e2[_0xaa8f('0x1')](_0x2de228,_0x55e918);};}function removeListener(_0x3b263c,_0x4ef9ad){return function(){PluginEvents[_0xaa8f('0x2')](_0x3b263c,_0x4ef9ad);};}exports[_0xaa8f('0x3')]=function(_0x4cd2f2){for(var _0x5eee24=0x0,_0x20c059=events[_0xaa8f('0x4')];_0x5eee24<_0x20c059;_0x5eee24++){var _0x4202d8=events[_0x5eee24];var _0xae7dc0=createListener(_0xaa8f('0x5')+_0x4202d8,_0x4cd2f2);PluginEvents['on'](_0x4202d8,_0xae7dc0);}};