Built motion from commit 9d7072cc.|2.5.39
[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 _0xed4e=['remove','emit','register','length','./plugin.events','save'];(function(_0x5ac914,_0x1d9fea){var _0xc8d2c6=function(_0x12d1d2){while(--_0x12d1d2){_0x5ac914['push'](_0x5ac914['shift']());}};_0xc8d2c6(++_0x1d9fea);}(_0xed4e,0x1e4));var _0xeed4=function(_0xa3ecba,_0x25000e){_0xa3ecba=_0xa3ecba-0x0;var _0x5675df=_0xed4e[_0xa3ecba];return _0x5675df;};'use strict';var PluginEvents=require(_0xeed4('0x0'));var events=[_0xeed4('0x1'),_0xeed4('0x2'),'update'];function createListener(_0x19b8d5,_0x521c27){return function(_0x56f967){_0x521c27[_0xeed4('0x3')](_0x19b8d5,_0x56f967);};}function removeListener(_0x396e24,_0x5e985a){return function(){PluginEvents['removeListener'](_0x396e24,_0x5e985a);};}exports[_0xeed4('0x4')]=function(_0x25115f){for(var _0x1b3a1e=0x0,_0xde7cee=events[_0xeed4('0x5')];_0x1b3a1e<_0xde7cee;_0x1b3a1e++){var _0x37bf45=events[_0x1b3a1e];var _0x551fd4=createListener('plugin:'+_0x37bf45,_0x25115f);PluginEvents['on'](_0x37bf45,_0x551fd4);}};