Built motion from commit a61a4a20.|2.5.46
[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 _0x52be=['plugin:','save','remove','update','emit','removeListener','register','length'];(function(_0x31302c,_0x462cd3){var _0x1a7f6b=function(_0x210fbd){while(--_0x210fbd){_0x31302c['push'](_0x31302c['shift']());}};_0x1a7f6b(++_0x462cd3);}(_0x52be,0xc1));var _0xe52b=function(_0x24c135,_0xdb4450){_0x24c135=_0x24c135-0x0;var _0x290c66=_0x52be[_0x24c135];return _0x290c66;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xe52b('0x0'),_0xe52b('0x1'),_0xe52b('0x2')];function createListener(_0x437c52,_0x24a413){return function(_0x4363a8){_0x24a413[_0xe52b('0x3')](_0x437c52,_0x4363a8);};}function removeListener(_0x57d8bd,_0x2a5e52){return function(){PluginEvents[_0xe52b('0x4')](_0x57d8bd,_0x2a5e52);};}exports[_0xe52b('0x5')]=function(_0x567cd1){for(var _0x3126b9=0x0,_0x3cff80=events[_0xe52b('0x6')];_0x3126b9<_0x3cff80;_0x3126b9++){var _0x4795b0=events[_0x3126b9];var _0x3e0058=createListener(_0xe52b('0x7')+_0x4795b0,_0x567cd1);PluginEvents['on'](_0x4795b0,_0x3e0058);}};