Built motion from commit 43538d75.|2.5.35
[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 _0x7bb9=['plugin:','./plugin.events','save','remove','emit','removeListener','register','length'];(function(_0x174ef5,_0x256e8e){var _0x1cc379=function(_0x3eafcf){while(--_0x3eafcf){_0x174ef5['push'](_0x174ef5['shift']());}};_0x1cc379(++_0x256e8e);}(_0x7bb9,0x1a9));var _0x97bb=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x7bb9[_0x1deb03];return _0x189fe7;};'use strict';var PluginEvents=require(_0x97bb('0x0'));var events=[_0x97bb('0x1'),_0x97bb('0x2'),'update'];function createListener(_0x5db55c,_0x46e2e3){return function(_0x431630){_0x46e2e3[_0x97bb('0x3')](_0x5db55c,_0x431630);};}function removeListener(_0x5ecaa6,_0x544d80){return function(){PluginEvents[_0x97bb('0x4')](_0x5ecaa6,_0x544d80);};}exports[_0x97bb('0x5')]=function(_0x4a78f2){for(var _0x5c04ae=0x0,_0x203a64=events[_0x97bb('0x6')];_0x5c04ae<_0x203a64;_0x5c04ae++){var _0x282f45=events[_0x5c04ae];var _0x4524af=createListener(_0x97bb('0x7')+_0x282f45,_0x4a78f2);PluginEvents['on'](_0x282f45,_0x4524af);}};