c4e6ec3cd77bbb9e05e239612a475f6a447790f9
[motion2.git] / server / api / smsQueue / smsQueue.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 _0xa638=['emit','length','./smsQueue.events','remove','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa638,0x1f1));var _0x8a63=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0xa638[_0x4f9b18];return _0x29f20c;};'use strict';var SmsQueueEvents=require(_0x8a63('0x0'));var events=['save',_0x8a63('0x1'),_0x8a63('0x2')];function createListener(_0x8bc5e5,_0xbf03df){return function(_0x3e04b4){_0xbf03df[_0x8a63('0x3')](_0x8bc5e5,_0x3e04b4);};}function removeListener(_0x2ca4ce,_0x3f9fca){return function(){SmsQueueEvents['removeListener'](_0x2ca4ce,_0x3f9fca);};}exports['register']=function(_0x1d8898){for(var _0x1ed3c8=0x0,_0xb414b6=events[_0x8a63('0x4')];_0x1ed3c8<_0xb414b6;_0x1ed3c8++){var _0x1049f6=events[_0x1ed3c8];var _0x1d4739=createListener('smsQueue:'+_0x1049f6,_0x1d8898);SmsQueueEvents['on'](_0x1049f6,_0x1d4739);}};