Built motion from commit ddca4d0d.|2.5.47
[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 _0x1969=['update','emit','removeListener','register','plugin:','save','remove'];(function(_0x45d2be,_0x102094){var _0xbb76f9=function(_0x1d5363){while(--_0x1d5363){_0x45d2be['push'](_0x45d2be['shift']());}};_0xbb76f9(++_0x102094);}(_0x1969,0x14e));var _0x9196=function(_0x5b1eee,_0x4c57dd){_0x5b1eee=_0x5b1eee-0x0;var _0x1c2dad=_0x1969[_0x5b1eee];return _0x1c2dad;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x9196('0x0'),_0x9196('0x1'),_0x9196('0x2')];function createListener(_0x129395,_0x10ae93){return function(_0x397a62){_0x10ae93[_0x9196('0x3')](_0x129395,_0x397a62);};}function removeListener(_0x55bd79,_0x4ef62a){return function(){PluginEvents[_0x9196('0x4')](_0x55bd79,_0x4ef62a);};}exports[_0x9196('0x5')]=function(_0x42184e){for(var _0x14545f=0x0,_0x25d3fd=events['length'];_0x14545f<_0x25d3fd;_0x14545f++){var _0x47134e=events[_0x14545f];var _0x3b509d=createListener(_0x9196('0x6')+_0x47134e,_0x42184e);PluginEvents['on'](_0x47134e,_0x3b509d);}};