558208b492fdb750b5fb410a5f4f51efd8e8af18
[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 _0xf534=['save','remove','update','emit','removeListener','register','plugin:','./plugin.events'];(function(_0x236252,_0xcbc917){var _0x3736cc=function(_0x492880){while(--_0x492880){_0x236252['push'](_0x236252['shift']());}};_0x3736cc(++_0xcbc917);}(_0xf534,0x9f));var _0x4f53=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf534[_0x14add3];return _0x4a174f;};'use strict';var PluginEvents=require(_0x4f53('0x0'));var events=[_0x4f53('0x1'),_0x4f53('0x2'),_0x4f53('0x3')];function createListener(_0x396e58,_0x51437d){return function(_0xe1fd01){_0x51437d[_0x4f53('0x4')](_0x396e58,_0xe1fd01);};}function removeListener(_0x585266,_0x15f7e5){return function(){PluginEvents[_0x4f53('0x5')](_0x585266,_0x15f7e5);};}exports[_0x4f53('0x6')]=function(_0x33a4df){for(var _0x5b4f16=0x0,_0x199cd2=events['length'];_0x5b4f16<_0x199cd2;_0x5b4f16++){var _0x34c008=events[_0x5b4f16];var _0x22763e=createListener(_0x4f53('0x7')+_0x34c008,_0x33a4df);PluginEvents['on'](_0x34c008,_0x22763e);}};