Built motion from commit e0fa946e.|2.6.5
[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 _0x60ee=['update','emit','register','plugin:','./plugin.events','save','remove'];(function(_0x136802,_0x421921){var _0x3f6d03=function(_0x3595c7){while(--_0x3595c7){_0x136802['push'](_0x136802['shift']());}};_0x3f6d03(++_0x421921);}(_0x60ee,0x82));var _0xe60e=function(_0xaa6a4,_0x64b067){_0xaa6a4=_0xaa6a4-0x0;var _0xdc31a4=_0x60ee[_0xaa6a4];return _0xdc31a4;};'use strict';var PluginEvents=require(_0xe60e('0x0'));var events=[_0xe60e('0x1'),_0xe60e('0x2'),_0xe60e('0x3')];function createListener(_0x5987d1,_0x1c77e6){return function(_0x233745){_0x1c77e6[_0xe60e('0x4')](_0x5987d1,_0x233745);};}function removeListener(_0x1e9bf0,_0x1303ef){return function(){PluginEvents['removeListener'](_0x1e9bf0,_0x1303ef);};}exports[_0xe60e('0x5')]=function(_0x3eb32a){for(var _0xd7ba77=0x0,_0x4c525b=events['length'];_0xd7ba77<_0x4c525b;_0xd7ba77++){var _0x4bccf6=events[_0xd7ba77];var _0x5e9645=createListener(_0xe60e('0x6')+_0x4bccf6,_0x3eb32a);PluginEvents['on'](_0x4bccf6,_0x5e9645);}};