Built motion from commit (unavailable).|2.5.25
[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(_0x32103d,_0x33b023){var _0x40b58e=function(_0x1be123){while(--_0x1be123){_0x32103d['push'](_0x32103d['shift']());}};_0x40b58e(++_0x33b023);}(_0xf1b0,0x151));var _0x0f1b=function(_0x144b30,_0x77072d){_0x144b30=_0x144b30-0x0;var _0x1bb7bc=_0xf1b0[_0x144b30];return _0x1bb7bc;};'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);}};