6af36347fd4b14b318d159c24383bb462a26727a
[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 _0xdd1d=['remove','emit','removeListener','register','length','dashboard:'];(function(_0x5aaa66,_0x3522ab){var _0x19f48a=function(_0x16e595){while(--_0x16e595){_0x5aaa66['push'](_0x5aaa66['shift']());}};_0x19f48a(++_0x3522ab);}(_0xdd1d,0x150));var _0xddd1=function(_0x39a04c,_0x2b4002){_0x39a04c=_0x39a04c-0x0;var _0x580cb0=_0xdd1d[_0x39a04c];return _0x580cb0;};'use strict';var DashboardEvents=require('./dashboard.events');var events=['save',_0xddd1('0x0'),'update'];function createListener(_0x558f17,_0x589dab){return function(_0x26fc48){_0x589dab[_0xddd1('0x1')](_0x558f17,_0x26fc48);};}function removeListener(_0x566bbf,_0x592f8b){return function(){DashboardEvents[_0xddd1('0x2')](_0x566bbf,_0x592f8b);};}exports[_0xddd1('0x3')]=function(_0x484484){for(var _0x28193e=0x0,_0x5f431c=events[_0xddd1('0x4')];_0x28193e<_0x5f431c;_0x28193e++){var _0x3b4743=events[_0x28193e];var _0x213242=createListener(_0xddd1('0x5')+_0x3b4743,_0x484484);DashboardEvents['on'](_0x3b4743,_0x213242);}};