47cff9f6a654f12c51fbf9a8de07721caa1dd1c6
[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 _0xab9c=['emit','length','smsQueue:','./smsQueue.events'];(function(_0x21a1cc,_0x3d40c2){var _0xcb3ac=function(_0x21ec37){while(--_0x21ec37){_0x21a1cc['push'](_0x21a1cc['shift']());}};_0xcb3ac(++_0x3d40c2);}(_0xab9c,0x1df));var _0xcab9=function(_0x3e6875,_0x26164e){_0x3e6875=_0x3e6875-0x0;var _0x4605ea=_0xab9c[_0x3e6875];return _0x4605ea;};'use strict';var SmsQueueEvents=require(_0xcab9('0x0'));var events=['save','remove','update'];function createListener(_0x461ef0,_0x41d161){return function(_0x42f13f){_0x41d161[_0xcab9('0x1')](_0x461ef0,_0x42f13f);};}function removeListener(_0xde0453,_0xd4dc0b){return function(){SmsQueueEvents['removeListener'](_0xde0453,_0xd4dc0b);};}exports['register']=function(_0x5ca5f8){for(var _0x4f5a62=0x0,_0x36444c=events[_0xcab9('0x2')];_0x4f5a62<_0x36444c;_0x4f5a62++){var _0x51128e=events[_0x4f5a62];var _0x5d8ade=createListener(_0xcab9('0x3')+_0x51128e,_0x5ca5f8);SmsQueueEvents['on'](_0x51128e,_0x5d8ade);}};