Built motion from commit 06eb8eb0.|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 _0xb15c=['save','update','emit','removeListener','register','length','plugin:'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xb15c,0x103));var _0xcb15=function(_0x595719,_0x475ccc){_0x595719=_0x595719-0x0;var _0x4226ff=_0xb15c[_0x595719];return _0x4226ff;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xcb15('0x0'),'remove',_0xcb15('0x1')];function createListener(_0x3e0cc9,_0x498187){return function(_0x3b0e23){_0x498187[_0xcb15('0x2')](_0x3e0cc9,_0x3b0e23);};}function removeListener(_0x401a0d,_0xe310b6){return function(){PluginEvents[_0xcb15('0x3')](_0x401a0d,_0xe310b6);};}exports[_0xcb15('0x4')]=function(_0x4234b6){for(var _0x2f1ade=0x0,_0x533f2f=events[_0xcb15('0x5')];_0x2f1ade<_0x533f2f;_0x2f1ade++){var _0x355823=events[_0x2f1ade];var _0x1a5d2a=createListener(_0xcb15('0x6')+_0x355823,_0x4234b6);PluginEvents['on'](_0x355823,_0x1a5d2a);}};