Built motion from commit 85328c08.|2.5.50
[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 _0xb48e=['removeListener','length','plugin:','remove','update','emit'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb48e,0x1d7));var _0xeb48=function(_0x5cb163,_0xd63c59){_0x5cb163=_0x5cb163-0x0;var _0x21f283=_0xb48e[_0x5cb163];return _0x21f283;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0xeb48('0x0'),_0xeb48('0x1')];function createListener(_0x1469d0,_0x4bf80b){return function(_0x1e7e7d){_0x4bf80b[_0xeb48('0x2')](_0x1469d0,_0x1e7e7d);};}function removeListener(_0x6b63d3,_0x10886c){return function(){PluginEvents[_0xeb48('0x3')](_0x6b63d3,_0x10886c);};}exports['register']=function(_0x4e866f){for(var _0x4c6f8e=0x0,_0x5438cc=events[_0xeb48('0x4')];_0x4c6f8e<_0x5438cc;_0x4c6f8e++){var _0xa66cff=events[_0x4c6f8e];var _0x5e1eb6=createListener(_0xeb48('0x5')+_0xa66cff,_0x4e866f);PluginEvents['on'](_0xa66cff,_0x5e1eb6);}};