Built motion from commit (unavailable).|2.5.11
[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 _0xffc8=['removeListener','length','plugin:','remove','update'];(function(_0x57a1d1,_0x4675aa){var _0x50b9ce=function(_0x33576c){while(--_0x33576c){_0x57a1d1['push'](_0x57a1d1['shift']());}};_0x50b9ce(++_0x4675aa);}(_0xffc8,0x111));var _0x8ffc=function(_0x2828a2,_0x10be4b){_0x2828a2=_0x2828a2-0x0;var _0xf5be16=_0xffc8[_0x2828a2];return _0xf5be16;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0x8ffc('0x0'),_0x8ffc('0x1')];function createListener(_0x1b0b87,_0x242cb5){return function(_0x385192){_0x242cb5['emit'](_0x1b0b87,_0x385192);};}function removeListener(_0x534266,_0x51ecac){return function(){PluginEvents[_0x8ffc('0x2')](_0x534266,_0x51ecac);};}exports['register']=function(_0x1a820e){for(var _0x20aea6=0x0,_0x5afcd7=events[_0x8ffc('0x3')];_0x20aea6<_0x5afcd7;_0x20aea6++){var _0x3e2dff=events[_0x20aea6];var _0x52067e=createListener(_0x8ffc('0x4')+_0x3e2dff,_0x1a820e);PluginEvents['on'](_0x3e2dff,_0x52067e);}};