Built motion from commit (unavailable).|2.5.26
[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 _0xf1b0=['plugin:','./plugin.events','save','remove','update','removeListener'];(function(_0x3852e7,_0x10e0e2){var _0x482cd9=function(_0x135543){while(--_0x135543){_0x3852e7['push'](_0x3852e7['shift']());}};_0x482cd9(++_0x10e0e2);}(_0xf1b0,0x151));var _0x0f1b=function(_0x1c9c24,_0x2a517b){_0x1c9c24=_0x1c9c24-0x0;var _0x349c69=_0xf1b0[_0x1c9c24];return _0x349c69;};'use strict';var PluginEvents=require(_0x0f1b('0x0'));var events=[_0x0f1b('0x1'),_0x0f1b('0x2'),_0x0f1b('0x3')];function createListener(_0x4280c3,_0x4193f3){return function(_0x4ac856){_0x4193f3['emit'](_0x4280c3,_0x4ac856);};}function removeListener(_0x37c2a5,_0x209c8d){return function(){PluginEvents[_0x0f1b('0x4')](_0x37c2a5,_0x209c8d);};}exports['register']=function(_0x28dda7){for(var _0x12f389=0x0,_0xe15b0b=events['length'];_0x12f389<_0xe15b0b;_0x12f389++){var _0x1a2b2a=events[_0x12f389];var _0x2afc75=createListener(_0x0f1b('0x5')+_0x1a2b2a,_0x28dda7);PluginEvents['on'](_0x1a2b2a,_0x2afc75);}};