02e0e8442dda5b908ccde88bbd9fc770f2573d45
[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 _0x8c5b=['register','length','voiceExtension:','./voiceExtension.events','save','remove','update','removeListener'];(function(_0x47aa64,_0xfb8a07){var _0x549c7a=function(_0x266165){while(--_0x266165){_0x47aa64['push'](_0x47aa64['shift']());}};_0x549c7a(++_0xfb8a07);}(_0x8c5b,0x1b3));var _0xb8c5=function(_0x21f931,_0x598b2d){_0x21f931=_0x21f931-0x0;var _0x3f083c=_0x8c5b[_0x21f931];return _0x3f083c;};'use strict';var VoiceExtensionEvents=require(_0xb8c5('0x0'));var events=[_0xb8c5('0x1'),_0xb8c5('0x2'),_0xb8c5('0x3')];function createListener(_0x443e98,_0x524c7b){return function(_0xb8757f){_0x524c7b['emit'](_0x443e98,_0xb8757f);};}function removeListener(_0x29d4e9,_0x364a1f){return function(){VoiceExtensionEvents[_0xb8c5('0x4')](_0x29d4e9,_0x364a1f);};}exports[_0xb8c5('0x5')]=function(_0xe534b7){for(var _0x4db47e=0x0,_0x22211d=events[_0xb8c5('0x6')];_0x4db47e<_0x22211d;_0x4db47e++){var _0x3be950=events[_0x4db47e];var _0xb46065=createListener(_0xb8c5('0x7')+_0x3be950,_0xe534b7);VoiceExtensionEvents['on'](_0x3be950,_0xb46065);}};