Built motion from commit 2e4747fd.|2.6.7
[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 _0xbb8c=['register','save','remove','update'];(function(_0x475e29,_0x12a7ba){var _0x2060a9=function(_0x1e31d0){while(--_0x1e31d0){_0x475e29['push'](_0x475e29['shift']());}};_0x2060a9(++_0x12a7ba);}(_0xbb8c,0x1cd));var _0xcbb8=function(_0x129d6d,_0x5d713f){_0x129d6d=_0x129d6d-0x0;var _0x436da5=_0xbb8c[_0x129d6d];return _0x436da5;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xcbb8('0x0'),_0xcbb8('0x1'),_0xcbb8('0x2')];function createListener(_0xbcb16b,_0x227438){return function(_0x1411ed){_0x227438['emit'](_0xbcb16b,_0x1411ed);};}function removeListener(_0x459186,_0x870993){return function(){PluginEvents['removeListener'](_0x459186,_0x870993);};}exports[_0xcbb8('0x3')]=function(_0x229673){for(var _0x7476a9=0x0,_0x236a0b=events['length'];_0x7476a9<_0x236a0b;_0x7476a9++){var _0x21260e=events[_0x7476a9];var _0xe3d807=createListener('plugin:'+_0x21260e,_0x229673);PluginEvents['on'](_0x21260e,_0xe3d807);}};