14fb015a7e029a3d08083b9abc684309e57df962
[motion2.git] / server / api / dashboard / dashboard.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 _0x48e9=['emit','removeListener','register','length','save','remove'];(function(_0xa4928c,_0x16b89c){var _0x27cc29=function(_0x14b819){while(--_0x14b819){_0xa4928c['push'](_0xa4928c['shift']());}};_0x27cc29(++_0x16b89c);}(_0x48e9,0xd6));var _0x948e=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x48e9[_0x2641f9];return _0x585741;};'use strict';var DashboardEvents=require('./dashboard.events');var events=[_0x948e('0x0'),_0x948e('0x1'),'update'];function createListener(_0x2b82c2,_0x3239c3){return function(_0x256c99){_0x3239c3[_0x948e('0x2')](_0x2b82c2,_0x256c99);};}function removeListener(_0x5ce6e7,_0x56abb5){return function(){DashboardEvents[_0x948e('0x3')](_0x5ce6e7,_0x56abb5);};}exports[_0x948e('0x4')]=function(_0x283eca){for(var _0xe3084=0x0,_0x16121a=events[_0x948e('0x5')];_0xe3084<_0x16121a;_0xe3084++){var _0x2c1bd4=events[_0xe3084];var _0x22f284=createListener('dashboard:'+_0x2c1bd4,_0x283eca);DashboardEvents['on'](_0x2c1bd4,_0x22f284);}};