Built motion from commit 639a1a7f.|2.6.19
[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 _0x5a17=['remove','update','emit','removeListener','register','./plugin.events','save'];(function(_0x2fb11f,_0x9ee5c){var _0x25e686=function(_0xd49629){while(--_0xd49629){_0x2fb11f['push'](_0x2fb11f['shift']());}};_0x25e686(++_0x9ee5c);}(_0x5a17,0x6e));var _0x75a1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5a17[_0x3dd15e];return _0x231fd0;};'use strict';var PluginEvents=require(_0x75a1('0x0'));var events=[_0x75a1('0x1'),_0x75a1('0x2'),_0x75a1('0x3')];function createListener(_0x49928c,_0x202a91){return function(_0x10f8cb){_0x202a91[_0x75a1('0x4')](_0x49928c,_0x10f8cb);};}function removeListener(_0x39b83a,_0x30bd18){return function(){PluginEvents[_0x75a1('0x5')](_0x39b83a,_0x30bd18);};}exports[_0x75a1('0x6')]=function(_0x92c841){for(var _0x405276=0x0,_0x45bda7=events['length'];_0x405276<_0x45bda7;_0x405276++){var _0x1291e6=events[_0x405276];var _0x331620=createListener('plugin:'+_0x1291e6,_0x92c841);PluginEvents['on'](_0x1291e6,_0x331620);}};