Built motion from commit 351e7f9c.|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 _0x8e31=['emit','removeListener','register','length','remove','update'];(function(_0x2eb156,_0xa7b67b){var _0x162485=function(_0x376657){while(--_0x376657){_0x2eb156['push'](_0x2eb156['shift']());}};_0x162485(++_0xa7b67b);}(_0x8e31,0x94));var _0x18e3=function(_0x819464,_0x46fc91){_0x819464=_0x819464-0x0;var _0x49dcc0=_0x8e31[_0x819464];return _0x49dcc0;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0x18e3('0x0'),_0x18e3('0x1')];function createListener(_0xb9bb04,_0x140d9a){return function(_0x4bdbac){_0x140d9a[_0x18e3('0x2')](_0xb9bb04,_0x4bdbac);};}function removeListener(_0x119d57,_0x32290c){return function(){PluginEvents[_0x18e3('0x3')](_0x119d57,_0x32290c);};}exports[_0x18e3('0x4')]=function(_0x2d18e5){for(var _0x2f52e2=0x0,_0x45a6c2=events[_0x18e3('0x5')];_0x2f52e2<_0x45a6c2;_0x2f52e2++){var _0x22dfa7=events[_0x2f52e2];var _0x34b842=createListener('plugin:'+_0x22dfa7,_0x2d18e5);PluginEvents['on'](_0x22dfa7,_0x34b842);}};