705c25b1dba4ce64db7656f7e38d62e87cb7a34b
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0x05b0=['remove','update','register','length'];(function(_0x4a611f,_0x320fd1){var _0x29b3f8=function(_0x5abfee){while(--_0x5abfee){_0x4a611f['push'](_0x4a611f['shift']());}};_0x29b3f8(++_0x320fd1);}(_0x05b0,0x188));var _0x005b=function(_0x28ba61,_0x1c5483){_0x28ba61=_0x28ba61-0x0;var _0x2f2d11=_0x05b0[_0x28ba61];return _0x2f2d11;};'use strict';var VoicePrefixEvents=require('./voicePrefix.events');var events=['save',_0x005b('0x0'),_0x005b('0x1')];function createListener(_0x4c8e5f,_0xbc782b){return function(_0x2f5c09){_0xbc782b['emit'](_0x4c8e5f,_0x2f5c09);};}function removeListener(_0x342d08,_0x2849ed){return function(){VoicePrefixEvents['removeListener'](_0x342d08,_0x2849ed);};}exports[_0x005b('0x2')]=function(_0x18fb51){for(var _0x31fe01=0x0,_0x98e71c=events[_0x005b('0x3')];_0x31fe01<_0x98e71c;_0x31fe01++){var _0x35998d=events[_0x31fe01];var _0x263bc9=createListener('voicePrefix:'+_0x35998d,_0x18fb51);VoicePrefixEvents['on'](_0x35998d,_0x263bc9);}};