4f761936b7db4449f0834999368522b6f987d3fc
[motion2.git] / server / api / voiceExtension / voiceExtension.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 _0x0295=['emit','removeListener','register','voiceExtension:','./voiceExtension.events','update'];(function(_0x5c4da6,_0x589a02){var _0x11908a=function(_0x5ae581){while(--_0x5ae581){_0x5c4da6['push'](_0x5c4da6['shift']());}};_0x11908a(++_0x589a02);}(_0x0295,0x1f0));var _0x5029=function(_0x511b17,_0xe6b453){_0x511b17=_0x511b17-0x0;var _0x4fa333=_0x0295[_0x511b17];return _0x4fa333;};'use strict';var VoiceExtensionEvents=require(_0x5029('0x0'));var events=['save','remove',_0x5029('0x1')];function createListener(_0x4f552a,_0x53c2e1){return function(_0x315589){_0x53c2e1[_0x5029('0x2')](_0x4f552a,_0x315589);};}function removeListener(_0x157a4f,_0x3d0af1){return function(){VoiceExtensionEvents[_0x5029('0x3')](_0x157a4f,_0x3d0af1);};}exports[_0x5029('0x4')]=function(_0x200217){for(var _0x215955=0x0,_0x5b3cd=events['length'];_0x215955<_0x5b3cd;_0x215955++){var _0x54978f=events[_0x215955];var _0x4ee867=createListener(_0x5029('0x5')+_0x54978f,_0x200217);VoiceExtensionEvents['on'](_0x54978f,_0x4ee867);}};