50b85fe818f5e19e623cd43ab9911f721357d2fc
[motion2.git] / server / api / smsAccount / smsAccount.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 _0xb1b9=['save','removeListener','register','length','smsAccount:'];(function(_0x5668ae,_0x27ae6b){var _0x41aa43=function(_0x19c709){while(--_0x19c709){_0x5668ae['push'](_0x5668ae['shift']());}};_0x41aa43(++_0x27ae6b);}(_0xb1b9,0x186));var _0x9b1b=function(_0x3df845,_0x9a917){_0x3df845=_0x3df845-0x0;var _0x256c2e=_0xb1b9[_0x3df845];return _0x256c2e;};'use strict';var SmsAccountEvents=require('./smsAccount.events');var events=[_0x9b1b('0x0'),'remove','update'];function createListener(_0x257827,_0x2e3338){return function(_0xe1cec6){_0x2e3338['emit'](_0x257827,_0xe1cec6);};}function removeListener(_0x25e79f,_0x35936f){return function(){SmsAccountEvents[_0x9b1b('0x1')](_0x25e79f,_0x35936f);};}exports[_0x9b1b('0x2')]=function(_0x37ff75){for(var _0x473696=0x0,_0x269f0c=events[_0x9b1b('0x3')];_0x473696<_0x269f0c;_0x473696++){var _0x4d86a7=events[_0x473696];var _0x555b9f=createListener(_0x9b1b('0x4')+_0x4d86a7,_0x37ff75);SmsAccountEvents['on'](_0x4d86a7,_0x555b9f);}};