Built motion from commit b5413ace.|2.6.9
[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 _0x74b0=['plugin:','save','update','register','length'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x74b0,0x146));var _0x074b=function(_0x424329,_0x1a3e61){_0x424329=_0x424329-0x0;var _0x324625=_0x74b0[_0x424329];return _0x324625;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x074b('0x0'),'remove',_0x074b('0x1')];function createListener(_0x5c012b,_0x19a3dd){return function(_0x12d595){_0x19a3dd['emit'](_0x5c012b,_0x12d595);};}function removeListener(_0x401861,_0x36b685){return function(){PluginEvents['removeListener'](_0x401861,_0x36b685);};}exports[_0x074b('0x2')]=function(_0x394f97){for(var _0x577355=0x0,_0x1fef88=events[_0x074b('0x3')];_0x577355<_0x1fef88;_0x577355++){var _0x47086a=events[_0x577355];var _0xd0416c=createListener(_0x074b('0x4')+_0x47086a,_0x394f97);PluginEvents['on'](_0x47086a,_0xd0416c);}};