62ee2a40497a0501ef1e3430f28060f0ee6c6218
[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 _0x3ff4=['voiceExtension:','save','update','emit','length'];(function(_0x14c2ad,_0x5602af){var _0x2d4419=function(_0x19c6d8){while(--_0x19c6d8){_0x14c2ad['push'](_0x14c2ad['shift']());}};_0x2d4419(++_0x5602af);}(_0x3ff4,0x79));var _0x43ff=function(_0x12fc8d,_0x19ee33){_0x12fc8d=_0x12fc8d-0x0;var _0x3f9d04=_0x3ff4[_0x12fc8d];return _0x3f9d04;};'use strict';var VoiceExtensionEvents=require('./voiceExtension.events');var events=[_0x43ff('0x0'),'remove',_0x43ff('0x1')];function createListener(_0x583534,_0x47341e){return function(_0x4d6e5a){_0x47341e[_0x43ff('0x2')](_0x583534,_0x4d6e5a);};}function removeListener(_0x2bc947,_0x4054b2){return function(){VoiceExtensionEvents['removeListener'](_0x2bc947,_0x4054b2);};}exports['register']=function(_0x579860){for(var _0x29f097=0x0,_0x118de1=events[_0x43ff('0x3')];_0x29f097<_0x118de1;_0x29f097++){var _0x403f82=events[_0x29f097];var _0x5553fb=createListener(_0x43ff('0x4')+_0x403f82,_0x579860);VoiceExtensionEvents['on'](_0x403f82,_0x5553fb);}};