Built motion from commit 00bf23f6.|2.6.16
[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 _0xd7cc=['register','length','./plugin.events','save','remove','update','emit','removeListener'];(function(_0x30faec,_0x18940b){var _0x29484f=function(_0x169ae8){while(--_0x169ae8){_0x30faec['push'](_0x30faec['shift']());}};_0x29484f(++_0x18940b);}(_0xd7cc,0x15a));var _0xcd7c=function(_0x10fe98,_0x7a9dac){_0x10fe98=_0x10fe98-0x0;var _0x30688d=_0xd7cc[_0x10fe98];return _0x30688d;};'use strict';var PluginEvents=require(_0xcd7c('0x0'));var events=[_0xcd7c('0x1'),_0xcd7c('0x2'),_0xcd7c('0x3')];function createListener(_0x478048,_0x212dfb){return function(_0x40bf10){_0x212dfb[_0xcd7c('0x4')](_0x478048,_0x40bf10);};}function removeListener(_0x5a7081,_0x5165f3){return function(){PluginEvents[_0xcd7c('0x5')](_0x5a7081,_0x5165f3);};}exports[_0xcd7c('0x6')]=function(_0x344ce6){for(var _0x307e85=0x0,_0x4f9ec0=events[_0xcd7c('0x7')];_0x307e85<_0x4f9ec0;_0x307e85++){var _0x4d0b87=events[_0x307e85];var _0x1cb13d=createListener('plugin:'+_0x4d0b87,_0x344ce6);PluginEvents['on'](_0x4d0b87,_0x1cb13d);}};