12093f8a0486479e8ba8aa191f120927934145e6
[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 _0x9ef8=['length','save','update','emit','removeListener','register'];(function(_0x48e549,_0x2ce034){var _0x4157c1=function(_0x389772){while(--_0x389772){_0x48e549['push'](_0x48e549['shift']());}};_0x4157c1(++_0x2ce034);}(_0x9ef8,0x181));var _0x89ef=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x9ef8[_0x2c7618];return _0x5ce3f0;};'use strict';var VoiceExtensionEvents=require('./voiceExtension.events');var events=[_0x89ef('0x0'),'remove',_0x89ef('0x1')];function createListener(_0x2003d3,_0x27edae){return function(_0x208ecc){_0x27edae[_0x89ef('0x2')](_0x2003d3,_0x208ecc);};}function removeListener(_0xad3091,_0x91007a){return function(){VoiceExtensionEvents[_0x89ef('0x3')](_0xad3091,_0x91007a);};}exports[_0x89ef('0x4')]=function(_0x23d704){for(var _0x5eda54=0x0,_0x764775=events[_0x89ef('0x5')];_0x5eda54<_0x764775;_0x5eda54++){var _0x280c35=events[_0x5eda54];var _0x39e0c6=createListener('voiceExtension:'+_0x280c35,_0x23d704);VoiceExtensionEvents['on'](_0x280c35,_0x39e0c6);}};