5adaebdfb1341b5801f61166f33329f95aca509d
[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 _0x3f94=['voicePrefix:','./voicePrefix.events','update','emit','removeListener','register','length'];(function(_0x582003,_0x4e8a19){var _0x331aed=function(_0x32d19c){while(--_0x32d19c){_0x582003['push'](_0x582003['shift']());}};_0x331aed(++_0x4e8a19);}(_0x3f94,0x19e));var _0x43f9=function(_0xe66cf2,_0x32ba5f){_0xe66cf2=_0xe66cf2-0x0;var _0x2d84e7=_0x3f94[_0xe66cf2];return _0x2d84e7;};'use strict';var VoicePrefixEvents=require(_0x43f9('0x0'));var events=['save','remove',_0x43f9('0x1')];function createListener(_0xd1101b,_0xbe66b2){return function(_0x5d7176){_0xbe66b2[_0x43f9('0x2')](_0xd1101b,_0x5d7176);};}function removeListener(_0x14719c,_0xf31834){return function(){VoicePrefixEvents[_0x43f9('0x3')](_0x14719c,_0xf31834);};}exports[_0x43f9('0x4')]=function(_0xa80de){for(var _0x562f21=0x0,_0xdceddf=events[_0x43f9('0x5')];_0x562f21<_0xdceddf;_0x562f21++){var _0x5e4a1a=events[_0x562f21];var _0x41e4e8=createListener(_0x43f9('0x6')+_0x5e4a1a,_0xa80de);VoicePrefixEvents['on'](_0x5e4a1a,_0x41e4e8);}};