a9025cb1206cf4a472067fa60cdab969918b679b
[motion2.git] / server / api / mailQueue / mailQueue.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 _0x44cc=['update','emit','mailQueue:','./mailQueue.events'];(function(_0x232719,_0x37a326){var _0x21ee88=function(_0x4494ff){while(--_0x4494ff){_0x232719['push'](_0x232719['shift']());}};_0x21ee88(++_0x37a326);}(_0x44cc,0x73));var _0xc44c=function(_0x40a799,_0x5ddff4){_0x40a799=_0x40a799-0x0;var _0x5cb23b=_0x44cc[_0x40a799];return _0x5cb23b;};'use strict';var MailQueueEvents=require(_0xc44c('0x0'));var events=['save','remove',_0xc44c('0x1')];function createListener(_0x312d7e,_0x4c9044){return function(_0x825534){_0x4c9044[_0xc44c('0x2')](_0x312d7e,_0x825534);};}function removeListener(_0x366a12,_0xa894b3){return function(){MailQueueEvents['removeListener'](_0x366a12,_0xa894b3);};}exports['register']=function(_0x190b3b){for(var _0x3a07d3=0x0,_0x4c15a2=events['length'];_0x3a07d3<_0x4c15a2;_0x3a07d3++){var _0x55deca=events[_0x3a07d3];var _0x100cd4=createListener(_0xc44c('0x3')+_0x55deca,_0x190b3b);MailQueueEvents['on'](_0x55deca,_0x100cd4);}};