Built motion from commit 092f8824.|2.5.49
[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 _0x59ae=['length','plugin:','./plugin.events','save','remove','update','removeListener'];(function(_0x566148,_0x394b29){var _0xd4cb24=function(_0x2cf027){while(--_0x2cf027){_0x566148['push'](_0x566148['shift']());}};_0xd4cb24(++_0x394b29);}(_0x59ae,0x1b4));var _0xe59a=function(_0xa24337,_0x3f9365){_0xa24337=_0xa24337-0x0;var _0x259e4b=_0x59ae[_0xa24337];return _0x259e4b;};'use strict';var PluginEvents=require(_0xe59a('0x0'));var events=[_0xe59a('0x1'),_0xe59a('0x2'),_0xe59a('0x3')];function createListener(_0x55a3fd,_0x23acf5){return function(_0x27da1d){_0x23acf5['emit'](_0x55a3fd,_0x27da1d);};}function removeListener(_0x4509cd,_0x2bab52){return function(){PluginEvents[_0xe59a('0x4')](_0x4509cd,_0x2bab52);};}exports['register']=function(_0x508c18){for(var _0x45a6a8=0x0,_0x35f8e2=events[_0xe59a('0x5')];_0x45a6a8<_0x35f8e2;_0x45a6a8++){var _0x41d2ae=events[_0x45a6a8];var _0x196e43=createListener(_0xe59a('0x6')+_0x41d2ae,_0x508c18);PluginEvents['on'](_0x41d2ae,_0x196e43);}};