81cf31b1c68d8a45f9395b7220e4f4312c8c41bd
[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 _0xfa93=['register','plugin:','./plugin.events','remove','update'];(function(_0x51b398,_0x59a387){var _0x4f02c9=function(_0x571343){while(--_0x571343){_0x51b398['push'](_0x51b398['shift']());}};_0x4f02c9(++_0x59a387);}(_0xfa93,0x11f));var _0x3fa9=function(_0x1f517a,_0x924729){_0x1f517a=_0x1f517a-0x0;var _0x28c3fc=_0xfa93[_0x1f517a];return _0x28c3fc;};'use strict';var PluginEvents=require(_0x3fa9('0x0'));var events=['save',_0x3fa9('0x1'),_0x3fa9('0x2')];function createListener(_0x408965,_0x4b33d0){return function(_0x5bd1f9){_0x4b33d0['emit'](_0x408965,_0x5bd1f9);};}function removeListener(_0x31c34d,_0x53a91d){return function(){PluginEvents['removeListener'](_0x31c34d,_0x53a91d);};}exports[_0x3fa9('0x3')]=function(_0x442708){for(var _0x4631a2=0x0,_0x814ea=events['length'];_0x4631a2<_0x814ea;_0x4631a2++){var _0x543ddd=events[_0x4631a2];var _0x42c87c=createListener(_0x3fa9('0x4')+_0x543ddd,_0x442708);PluginEvents['on'](_0x543ddd,_0x42c87c);}};