b499f32852098a4c536fb1f7771046d5c6875dfd
[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 _0xfa28=['remove','update','emit','removeListener','length','plugin:','./plugin.events','save'];(function(_0x25a823,_0x288e3e){var _0x121418=function(_0x1e7581){while(--_0x1e7581){_0x25a823['push'](_0x25a823['shift']());}};_0x121418(++_0x288e3e);}(_0xfa28,0x1c6));var _0x8fa2=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0xfa28[_0x160c73];return _0xd9302;};'use strict';var PluginEvents=require(_0x8fa2('0x0'));var events=[_0x8fa2('0x1'),_0x8fa2('0x2'),_0x8fa2('0x3')];function createListener(_0x677728,_0x41c243){return function(_0x11fb52){_0x41c243[_0x8fa2('0x4')](_0x677728,_0x11fb52);};}function removeListener(_0x5dbd5d,_0x5facce){return function(){PluginEvents[_0x8fa2('0x5')](_0x5dbd5d,_0x5facce);};}exports['register']=function(_0x48263e){for(var _0x4df001=0x0,_0x4f3f6e=events[_0x8fa2('0x6')];_0x4df001<_0x4f3f6e;_0x4df001++){var _0x1035b5=events[_0x4df001];var _0x36c734=createListener(_0x8fa2('0x7')+_0x1035b5,_0x48263e);PluginEvents['on'](_0x1035b5,_0x36c734);}};