Built motion from commit f67b3b02.|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 _0x9bb7=['plugin:','./plugin.events','remove','update','removeListener','register','length'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x9bb7,0x143));var _0x79bb=function(_0x1af8d3,_0x544d86){_0x1af8d3=_0x1af8d3-0x0;var _0x3a50c5=_0x9bb7[_0x1af8d3];return _0x3a50c5;};'use strict';var PluginEvents=require(_0x79bb('0x0'));var events=['save',_0x79bb('0x1'),_0x79bb('0x2')];function createListener(_0x40c2bc,_0x31b04e){return function(_0x2e9439){_0x31b04e['emit'](_0x40c2bc,_0x2e9439);};}function removeListener(_0x20b119,_0x40fd93){return function(){PluginEvents[_0x79bb('0x3')](_0x20b119,_0x40fd93);};}exports[_0x79bb('0x4')]=function(_0x46fe33){for(var _0x2e1a70=0x0,_0x58ca3f=events[_0x79bb('0x5')];_0x2e1a70<_0x58ca3f;_0x2e1a70++){var _0x15ad76=events[_0x2e1a70];var _0x2e8885=createListener(_0x79bb('0x6')+_0x15ad76,_0x46fe33);PluginEvents['on'](_0x15ad76,_0x2e8885);}};