Built motion from commit 43538d75.|2.5.35
[motion2.git] / server / api / mailAccount / mailAccount.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 _0xc42f=['register','length','mailAccount:','./mailAccount.events','remove','emit','removeListener'];(function(_0x389280,_0x5eed49){var _0x208c93=function(_0xecfe25){while(--_0xecfe25){_0x389280['push'](_0x389280['shift']());}};_0x208c93(++_0x5eed49);}(_0xc42f,0x11b));var _0xfc42=function(_0x583007,_0x4bda2f){_0x583007=_0x583007-0x0;var _0x2b9c8c=_0xc42f[_0x583007];return _0x2b9c8c;};'use strict';var MailAccountEvents=require(_0xfc42('0x0'));var events=['save',_0xfc42('0x1'),'update'];function createListener(_0x380f07,_0x55e62c){return function(_0x2b0089){_0x55e62c[_0xfc42('0x2')](_0x380f07,_0x2b0089);};}function removeListener(_0x194314,_0x56031b){return function(){MailAccountEvents[_0xfc42('0x3')](_0x194314,_0x56031b);};}exports[_0xfc42('0x4')]=function(_0x87a150){for(var _0x1a93c8=0x0,_0x4b8f53=events[_0xfc42('0x5')];_0x1a93c8<_0x4b8f53;_0x1a93c8++){var _0x705114=events[_0x1a93c8];var _0x127589=createListener(_0xfc42('0x6')+_0x705114,_0x87a150);MailAccountEvents['on'](_0x705114,_0x127589);}};