c114a56e38abe4632b280ee0b4e65074f45b4b34
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0xf2a6=['emit','removeListener','register','length','voicePrefix:','./voicePrefix.events'];(function(_0x4369ef,_0x55cfbc){var _0x5b6913=function(_0x7a7436){while(--_0x7a7436){_0x4369ef['push'](_0x4369ef['shift']());}};_0x5b6913(++_0x55cfbc);}(_0xf2a6,0x13d));var _0x6f2a=function(_0x4362fa,_0x2ba244){_0x4362fa=_0x4362fa-0x0;var _0x3740ce=_0xf2a6[_0x4362fa];return _0x3740ce;};'use strict';var VoicePrefixEvents=require(_0x6f2a('0x0'));var events=['save','remove','update'];function createListener(_0x1b32c0,_0x5b2cbc){return function(_0x3b14e2){_0x5b2cbc[_0x6f2a('0x1')](_0x1b32c0,_0x3b14e2);};}function removeListener(_0x454ff7,_0x32ddb6){return function(){VoicePrefixEvents[_0x6f2a('0x2')](_0x454ff7,_0x32ddb6);};}exports[_0x6f2a('0x3')]=function(_0x4684f4){for(var _0x19ebe9=0x0,_0x1efd8=events[_0x6f2a('0x4')];_0x19ebe9<_0x1efd8;_0x19ebe9++){var _0x4b4fde=events[_0x19ebe9];var _0x379b80=createListener(_0x6f2a('0x5')+_0x4b4fde,_0x4684f4);VoicePrefixEvents['on'](_0x4b4fde,_0x379b80);}};