Built motion from commit fa4c4286.|2.6.29
[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 _0x815d=['removeListener','length','plugin:','./plugin.events','save','remove','update'];(function(_0x36da8a,_0xa7fcc1){var _0x58d793=function(_0x35e368){while(--_0x35e368){_0x36da8a['push'](_0x36da8a['shift']());}};_0x58d793(++_0xa7fcc1);}(_0x815d,0x1e6));var _0xd815=function(_0x9b9e98,_0x372c4c){_0x9b9e98=_0x9b9e98-0x0;var _0x2893eb=_0x815d[_0x9b9e98];return _0x2893eb;};'use strict';var PluginEvents=require(_0xd815('0x0'));var events=[_0xd815('0x1'),_0xd815('0x2'),_0xd815('0x3')];function createListener(_0x1eacf2,_0x444edd){return function(_0x58b405){_0x444edd['emit'](_0x1eacf2,_0x58b405);};}function removeListener(_0x3da27e,_0x52c88e){return function(){PluginEvents[_0xd815('0x4')](_0x3da27e,_0x52c88e);};}exports['register']=function(_0x42459c){for(var _0x30c2a5=0x0,_0x5d7317=events[_0xd815('0x5')];_0x30c2a5<_0x5d7317;_0x30c2a5++){var _0x216175=events[_0x30c2a5];var _0x2ee18f=createListener(_0xd815('0x6')+_0x216175,_0x42459c);PluginEvents['on'](_0x216175,_0x2ee18f);}};