Built motion from commit (unavailable).|2.5.1
[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 _0x2d12=['removeListener','length','plugin:','save','emit'];(function(_0x2892d0,_0xedc1b7){var _0x5a2b08=function(_0x531721){while(--_0x531721){_0x2892d0['push'](_0x2892d0['shift']());}};_0x5a2b08(++_0xedc1b7);}(_0x2d12,0x198));var _0x22d1=function(_0x5ca746,_0x4b1943){_0x5ca746=_0x5ca746-0x0;var _0x59a85b=_0x2d12[_0x5ca746];return _0x59a85b;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x22d1('0x0'),'remove','update'];function createListener(_0x97088a,_0x32b762){return function(_0x284cf0){_0x32b762[_0x22d1('0x1')](_0x97088a,_0x284cf0);};}function removeListener(_0x263133,_0xda6ce5){return function(){PluginEvents[_0x22d1('0x2')](_0x263133,_0xda6ce5);};}exports['register']=function(_0x49d9cf){for(var _0x5f3305=0x0,_0x2c27fb=events[_0x22d1('0x3')];_0x5f3305<_0x2c27fb;_0x5f3305++){var _0x50a020=events[_0x5f3305];var _0x54a4a4=createListener(_0x22d1('0x4')+_0x50a020,_0x49d9cf);PluginEvents['on'](_0x50a020,_0x54a4a4);}};