Built motion from commit ffdca78c.|2.6.24
[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 _0xf770=['remove','update','emit','removeListener','register','length','plugin:','./plugin.events','save'];(function(_0x1509f7,_0x2fc1d2){var _0x3211a0=function(_0x204f7d){while(--_0x204f7d){_0x1509f7['push'](_0x1509f7['shift']());}};_0x3211a0(++_0x2fc1d2);}(_0xf770,0x178));var _0x0f77=function(_0x2f4307,_0xe992da){_0x2f4307=_0x2f4307-0x0;var _0x2c74cf=_0xf770[_0x2f4307];return _0x2c74cf;};'use strict';var PluginEvents=require(_0x0f77('0x0'));var events=[_0x0f77('0x1'),_0x0f77('0x2'),_0x0f77('0x3')];function createListener(_0x3d58d3,_0x5d944f){return function(_0x330d40){_0x5d944f[_0x0f77('0x4')](_0x3d58d3,_0x330d40);};}function removeListener(_0x593c67,_0x3a1926){return function(){PluginEvents[_0x0f77('0x5')](_0x593c67,_0x3a1926);};}exports[_0x0f77('0x6')]=function(_0x15d7aa){for(var _0x1009ba=0x0,_0x34a67c=events[_0x0f77('0x7')];_0x1009ba<_0x34a67c;_0x1009ba++){var _0x280471=events[_0x1009ba];var _0x41b666=createListener(_0x0f77('0x8')+_0x280471,_0x15d7aa);PluginEvents['on'](_0x280471,_0x41b666);}};