3c65920146b13a60c02f0fcf451d1953591a1667
[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 _0x051e=['./plugin.events','save','remove','update','emit','removeListener','register','length','plugin:'];(function(_0x31364e,_0x39f5bb){var _0x3c1f62=function(_0x5705e7){while(--_0x5705e7){_0x31364e['push'](_0x31364e['shift']());}};_0x3c1f62(++_0x39f5bb);}(_0x051e,0x1d4));var _0xe051=function(_0x1eccc3,_0x1dfaa8){_0x1eccc3=_0x1eccc3-0x0;var _0x283e59=_0x051e[_0x1eccc3];return _0x283e59;};'use strict';var PluginEvents=require(_0xe051('0x0'));var events=[_0xe051('0x1'),_0xe051('0x2'),_0xe051('0x3')];function createListener(_0x4ff4bf,_0xffbe80){return function(_0x5cda73){_0xffbe80[_0xe051('0x4')](_0x4ff4bf,_0x5cda73);};}function removeListener(_0x52ee24,_0x4d5d8c){return function(){PluginEvents[_0xe051('0x5')](_0x52ee24,_0x4d5d8c);};}exports[_0xe051('0x6')]=function(_0x1b7f99){for(var _0x1e82af=0x0,_0x5292c9=events[_0xe051('0x7')];_0x1e82af<_0x5292c9;_0x1e82af++){var _0x53fd2c=events[_0x1e82af];var _0x286db7=createListener(_0xe051('0x8')+_0x53fd2c,_0x1b7f99);PluginEvents['on'](_0x53fd2c,_0x286db7);}};