6bf3ec947745301ed63517246efe55946d2ec97b
[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 _0x4fb9=['removeListener','register','length','save','emit'];(function(_0x12424e,_0x583e0e){var _0x262777=function(_0x17369a){while(--_0x17369a){_0x12424e['push'](_0x12424e['shift']());}};_0x262777(++_0x583e0e);}(_0x4fb9,0xda));var _0x94fb=function(_0x22b2b1,_0x37aa47){_0x22b2b1=_0x22b2b1-0x0;var _0x5b6fa5=_0x4fb9[_0x22b2b1];return _0x5b6fa5;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x94fb('0x0'),'remove','update'];function createListener(_0x1aff75,_0x2c669d){return function(_0x172ded){_0x2c669d[_0x94fb('0x1')](_0x1aff75,_0x172ded);};}function removeListener(_0x3c090e,_0x485393){return function(){PluginEvents[_0x94fb('0x2')](_0x3c090e,_0x485393);};}exports[_0x94fb('0x3')]=function(_0x1aeb85){for(var _0x70f721=0x0,_0x5cce33=events[_0x94fb('0x4')];_0x70f721<_0x5cce33;_0x70f721++){var _0x27458c=events[_0x70f721];var _0x1382aa=createListener('plugin:'+_0x27458c,_0x1aeb85);PluginEvents['on'](_0x27458c,_0x1382aa);}};