Built motion from commit 3c2ce842.|2.6.31
[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 _0x1cdb=['length','./plugin.events','save','remove','update','emit','removeListener','register'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1cdb,0x179));var _0xb1cd=function(_0x41a5a5,_0x6ff62c){_0x41a5a5=_0x41a5a5-0x0;var _0x1f8471=_0x1cdb[_0x41a5a5];return _0x1f8471;};'use strict';var PluginEvents=require(_0xb1cd('0x0'));var events=[_0xb1cd('0x1'),_0xb1cd('0x2'),_0xb1cd('0x3')];function createListener(_0x560679,_0x4d9ba2){return function(_0x1dc090){_0x4d9ba2[_0xb1cd('0x4')](_0x560679,_0x1dc090);};}function removeListener(_0x3dd3f9,_0x4f7d88){return function(){PluginEvents[_0xb1cd('0x5')](_0x3dd3f9,_0x4f7d88);};}exports[_0xb1cd('0x6')]=function(_0x6a8520){for(var _0x23c0a0=0x0,_0x468b20=events[_0xb1cd('0x7')];_0x23c0a0<_0x468b20;_0x23c0a0++){var _0x90b770=events[_0x23c0a0];var _0x4923ed=createListener('plugin:'+_0x90b770,_0x6a8520);PluginEvents['on'](_0x90b770,_0x4923ed);}};