8b4affb4f91a9d140a543637b94be944e268cedf
[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 _0xf8c7=['length','voiceExtension:','save','update','emit','removeListener','register'];(function(_0x5a75f7,_0x1bdb5b){var _0x3619da=function(_0x55402a){while(--_0x55402a){_0x5a75f7['push'](_0x5a75f7['shift']());}};_0x3619da(++_0x1bdb5b);}(_0xf8c7,0x1d7));var _0x7f8c=function(_0x198666,_0x472745){_0x198666=_0x198666-0x0;var _0x502ce5=_0xf8c7[_0x198666];return _0x502ce5;};'use strict';var VoiceExtensionEvents=require('./voiceExtension.events');var events=[_0x7f8c('0x0'),'remove',_0x7f8c('0x1')];function createListener(_0x15109f,_0xf2b17d){return function(_0x17fc5b){_0xf2b17d[_0x7f8c('0x2')](_0x15109f,_0x17fc5b);};}function removeListener(_0x348b87,_0x3d64e2){return function(){VoiceExtensionEvents[_0x7f8c('0x3')](_0x348b87,_0x3d64e2);};}exports[_0x7f8c('0x4')]=function(_0x5b030a){for(var _0x462ca9=0x0,_0x1ad27b=events[_0x7f8c('0x5')];_0x462ca9<_0x1ad27b;_0x462ca9++){var _0x4e2d34=events[_0x462ca9];var _0x2f3755=createListener(_0x7f8c('0x6')+_0x4e2d34,_0x5b030a);VoiceExtensionEvents['on'](_0x4e2d34,_0x2f3755);}};