128ef0fe2471e127c8fe2643e9032479390979ab
[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 _0x25c3=['update','removeListener','register','length','plugin:','./plugin.events','save'];(function(_0x3828cf,_0x1579ee){var _0xfcaf5b=function(_0x56747d){while(--_0x56747d){_0x3828cf['push'](_0x3828cf['shift']());}};_0xfcaf5b(++_0x1579ee);}(_0x25c3,0x15c));var _0x325c=function(_0x4d0893,_0x273d32){_0x4d0893=_0x4d0893-0x0;var _0x3fe266=_0x25c3[_0x4d0893];return _0x3fe266;};'use strict';var PluginEvents=require(_0x325c('0x0'));var events=[_0x325c('0x1'),'remove',_0x325c('0x2')];function createListener(_0x3d336e,_0x18ec9b){return function(_0x40cdf5){_0x18ec9b['emit'](_0x3d336e,_0x40cdf5);};}function removeListener(_0x395cf8,_0x2c0712){return function(){PluginEvents[_0x325c('0x3')](_0x395cf8,_0x2c0712);};}exports[_0x325c('0x4')]=function(_0x3c4b10){for(var _0x4af361=0x0,_0x48f344=events[_0x325c('0x5')];_0x4af361<_0x48f344;_0x4af361++){var _0x40f572=events[_0x4af361];var _0x1299d7=createListener(_0x325c('0x6')+_0x40f572,_0x3c4b10);PluginEvents['on'](_0x40f572,_0x1299d7);}};