db9a9d053b0c83a144f0ed3d139c25b4cca54503
[motion2.git] / server / api / userProfile / userProfile.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 _0xcf34=['removeListener','register','length','userProfile:','remove','update','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xcf34,0x12a));var _0x4cf3=function(_0x4c3a36,_0xdba60f){_0x4c3a36=_0x4c3a36-0x0;var _0x40f945=_0xcf34[_0x4c3a36];return _0x40f945;};'use strict';var UserProfileEvents=require('./userProfile.events');var events=['save',_0x4cf3('0x0'),_0x4cf3('0x1')];function createListener(_0x36b6cb,_0xf380d4){return function(_0x114359){_0xf380d4[_0x4cf3('0x2')](_0x36b6cb,_0x114359);};}function removeListener(_0x262a34,_0x5caf78){return function(){UserProfileEvents[_0x4cf3('0x3')](_0x262a34,_0x5caf78);};}exports[_0x4cf3('0x4')]=function(_0x25b98b){for(var _0x4bbd74=0x0,_0x2b10d1=events[_0x4cf3('0x5')];_0x4bbd74<_0x2b10d1;_0x4bbd74++){var _0x2564fc=events[_0x4bbd74];var _0x263d11=createListener(_0x4cf3('0x6')+_0x2564fc,_0x25b98b);UserProfileEvents['on'](_0x2564fc,_0x263d11);}};