3141b8e4784c17d0cf104f23125822768ce4c901
[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 _0xe4c4=['remove','emit','removeListener','register','length','plugin:','save'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xe4c4,0x1f0));var _0x4e4c=function(_0x819464,_0x46fc91){_0x819464=_0x819464-0x0;var _0x49dcc0=_0xe4c4[_0x819464];return _0x49dcc0;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x4e4c('0x0'),_0x4e4c('0x1'),'update'];function createListener(_0x1229c3,_0x458c33){return function(_0x55e8cc){_0x458c33[_0x4e4c('0x2')](_0x1229c3,_0x55e8cc);};}function removeListener(_0xd547c1,_0x467d7c){return function(){PluginEvents[_0x4e4c('0x3')](_0xd547c1,_0x467d7c);};}exports[_0x4e4c('0x4')]=function(_0x5cc93f){for(var _0xc1e696=0x0,_0x6436d1=events[_0x4e4c('0x5')];_0xc1e696<_0x6436d1;_0xc1e696++){var _0x93c0af=events[_0xc1e696];var _0xffdf6a=createListener(_0x4e4c('0x6')+_0x93c0af,_0x5cc93f);PluginEvents['on'](_0x93c0af,_0xffdf6a);}};