Built motion from commit e2351160.|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 _0x83cb=['remove','removeListener','register','length','plugin:','./plugin.events','save'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x83cb,0x1ef));var _0xb83c=function(_0x143c39,_0x332547){_0x143c39=_0x143c39-0x0;var _0x23cca6=_0x83cb[_0x143c39];return _0x23cca6;};'use strict';var PluginEvents=require(_0xb83c('0x0'));var events=[_0xb83c('0x1'),_0xb83c('0x2'),'update'];function createListener(_0x3e2ad4,_0x20424c){return function(_0x7434d8){_0x20424c['emit'](_0x3e2ad4,_0x7434d8);};}function removeListener(_0x25c4b8,_0x1d65f5){return function(){PluginEvents[_0xb83c('0x3')](_0x25c4b8,_0x1d65f5);};}exports[_0xb83c('0x4')]=function(_0x529a80){for(var _0x276c5f=0x0,_0x2b904c=events[_0xb83c('0x5')];_0x276c5f<_0x2b904c;_0x276c5f++){var _0x4cf099=events[_0x276c5f];var _0x260b47=createListener(_0xb83c('0x6')+_0x4cf099,_0x529a80);PluginEvents['on'](_0x4cf099,_0x260b47);}};