ed3e11fbd2daed5ab53d94fb8cee22c1cbb02267
[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 _0x05cc=['voiceExtension:','./voiceExtension.events','save','update','emit','removeListener','register','length'];(function(_0x107184,_0x4dd552){var _0x10337a=function(_0x20353a){while(--_0x20353a){_0x107184['push'](_0x107184['shift']());}};_0x10337a(++_0x4dd552);}(_0x05cc,0x1a9));var _0xc05c=function(_0x37518d,_0x3cc0bf){_0x37518d=_0x37518d-0x0;var _0x2e9617=_0x05cc[_0x37518d];return _0x2e9617;};'use strict';var VoiceExtensionEvents=require(_0xc05c('0x0'));var events=[_0xc05c('0x1'),'remove',_0xc05c('0x2')];function createListener(_0x20511b,_0x503b9f){return function(_0x301c6e){_0x503b9f[_0xc05c('0x3')](_0x20511b,_0x301c6e);};}function removeListener(_0x2482b7,_0x504911){return function(){VoiceExtensionEvents[_0xc05c('0x4')](_0x2482b7,_0x504911);};}exports[_0xc05c('0x5')]=function(_0x1c135d){for(var _0x5a7688=0x0,_0x2ff02f=events[_0xc05c('0x6')];_0x5a7688<_0x2ff02f;_0x5a7688++){var _0x15b3f1=events[_0x5a7688];var _0x40cb7f=createListener(_0xc05c('0x7')+_0x15b3f1,_0x1c135d);VoiceExtensionEvents['on'](_0x15b3f1,_0x40cb7f);}};