Built motion from commit 497d3d92.|2.5.43
[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 _0xc41d=['length','save','remove','update','emit'];(function(_0x515afd,_0x1a1e91){var _0x536d53=function(_0x1d3a89){while(--_0x1d3a89){_0x515afd['push'](_0x515afd['shift']());}};_0x536d53(++_0x1a1e91);}(_0xc41d,0x7e));var _0xdc41=function(_0x9323ac,_0x103f22){_0x9323ac=_0x9323ac-0x0;var _0x343adc=_0xc41d[_0x9323ac];return _0x343adc;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xdc41('0x0'),_0xdc41('0x1'),_0xdc41('0x2')];function createListener(_0x46eacf,_0x4e5010){return function(_0x47cdd7){_0x4e5010[_0xdc41('0x3')](_0x46eacf,_0x47cdd7);};}function removeListener(_0x22bea7,_0x2d8050){return function(){PluginEvents['removeListener'](_0x22bea7,_0x2d8050);};}exports['register']=function(_0x46ff00){for(var _0x130c1f=0x0,_0x2011de=events[_0xdc41('0x4')];_0x130c1f<_0x2011de;_0x130c1f++){var _0x107d57=events[_0x130c1f];var _0x158f39=createListener('plugin:'+_0x107d57,_0x46ff00);PluginEvents['on'](_0x107d57,_0x158f39);}};