Built motion from commit b5413ace.|2.6.9
[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 _0x7792=['remove','update','removeListener','register','length'];(function(_0x1fd06c,_0x2b70d3){var _0x302d2b=function(_0x432a0c){while(--_0x432a0c){_0x1fd06c['push'](_0x1fd06c['shift']());}};_0x302d2b(++_0x2b70d3);}(_0x7792,0x131));var _0x2779=function(_0x592e40,_0x2ed011){_0x592e40=_0x592e40-0x0;var _0x5d4288=_0x7792[_0x592e40];return _0x5d4288;};'use strict';var MailQueueEvents=require('./mailQueue.events');var events=['save',_0x2779('0x0'),_0x2779('0x1')];function createListener(_0x15cafe,_0x7f4fa2){return function(_0x2e8e60){_0x7f4fa2['emit'](_0x15cafe,_0x2e8e60);};}function removeListener(_0x8192d1,_0x215480){return function(){MailQueueEvents[_0x2779('0x2')](_0x8192d1,_0x215480);};}exports[_0x2779('0x3')]=function(_0x5ae4c4){for(var _0x4a6692=0x0,_0x3d96f5=events[_0x2779('0x4')];_0x4a6692<_0x3d96f5;_0x4a6692++){var _0x3a69f3=events[_0x4a6692];var _0x2f2717=createListener('mailQueue:'+_0x3a69f3,_0x5ae4c4);MailQueueEvents['on'](_0x3a69f3,_0x2f2717);}};