a0bc6c26a37492fc8a3f3a249e6c4da586cb19e4
[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 _0x9a28=['removeListener','length','./plugin.events','save','emit'];(function(_0x5b174b,_0x404869){var _0x47ee37=function(_0x467947){while(--_0x467947){_0x5b174b['push'](_0x5b174b['shift']());}};_0x47ee37(++_0x404869);}(_0x9a28,0x16a));var _0x89a2=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0x9a28[_0x487b0c];return _0x1adbdc;};'use strict';var PluginEvents=require(_0x89a2('0x0'));var events=[_0x89a2('0x1'),'remove','update'];function createListener(_0x2d7333,_0x3dacea){return function(_0x5f4c4e){_0x3dacea[_0x89a2('0x2')](_0x2d7333,_0x5f4c4e);};}function removeListener(_0x1a15c7,_0x1ef74e){return function(){PluginEvents[_0x89a2('0x3')](_0x1a15c7,_0x1ef74e);};}exports['register']=function(_0x8e4862){for(var _0x558aae=0x0,_0x53c88c=events[_0x89a2('0x4')];_0x558aae<_0x53c88c;_0x558aae++){var _0x57ce45=events[_0x558aae];var _0x31abc7=createListener('plugin:'+_0x57ce45,_0x8e4862);PluginEvents['on'](_0x57ce45,_0x31abc7);}};