aa3234ef5cdfe0372fb513f64fc621cf53b8eb4d
[motion2.git] / server / api / team / team.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 _0xfcbe=['team:','save','remove','update'];(function(_0x1c4add,_0x1141ef){var _0x2b1cc1=function(_0x2e88c7){while(--_0x2e88c7){_0x1c4add['push'](_0x1c4add['shift']());}};_0x2b1cc1(++_0x1141ef);}(_0xfcbe,0x1b1));var _0xefcb=function(_0x5d0be3,_0x4cfb32){_0x5d0be3=_0x5d0be3-0x0;var _0x7fe5bd=_0xfcbe[_0x5d0be3];return _0x7fe5bd;};'use strict';var TeamEvents=require('./team.events');var events=[_0xefcb('0x0'),_0xefcb('0x1'),_0xefcb('0x2')];function createListener(_0x1d029d,_0x752292){return function(_0x11e156){_0x752292['emit'](_0x1d029d,_0x11e156);};}function removeListener(_0xbfb8c6,_0x14f3b5){return function(){TeamEvents['removeListener'](_0xbfb8c6,_0x14f3b5);};}exports['register']=function(_0x50dcde){for(var _0x3f322c=0x0,_0x4e15ab=events['length'];_0x3f322c<_0x4e15ab;_0x3f322c++){var _0x4697fe=events[_0x3f322c];var _0x55cad2=createListener(_0xefcb('0x3')+_0x4697fe,_0x50dcde);TeamEvents['on'](_0x4697fe,_0x55cad2);}};