Built motion from commit bab6f49e.|2.6.17
[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 _0x2556=['update','removeListener','register','length','plugin:','remove'];(function(_0x18d5d7,_0x19074b){var _0x30a9ea=function(_0x514f3f){while(--_0x514f3f){_0x18d5d7['push'](_0x18d5d7['shift']());}};_0x30a9ea(++_0x19074b);}(_0x2556,0x173));var _0x6255=function(_0x1203f,_0x554bbc){_0x1203f=_0x1203f-0x0;var _0x365f0a=_0x2556[_0x1203f];return _0x365f0a;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0x6255('0x0'),_0x6255('0x1')];function createListener(_0x248ea0,_0x326b49){return function(_0x375066){_0x326b49['emit'](_0x248ea0,_0x375066);};}function removeListener(_0x86e65d,_0x585d1a){return function(){PluginEvents[_0x6255('0x2')](_0x86e65d,_0x585d1a);};}exports[_0x6255('0x3')]=function(_0x550cbc){for(var _0x14d04c=0x0,_0x50b252=events[_0x6255('0x4')];_0x14d04c<_0x50b252;_0x14d04c++){var _0x8981de=events[_0x14d04c];var _0x34c55d=createListener(_0x6255('0x5')+_0x8981de,_0x550cbc);PluginEvents['on'](_0x8981de,_0x34c55d);}};