95a667fc56d350c674e7edb4883386041b24244c
[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 _0xa7b5=['length','voicePrefix:','./voicePrefix.events','save','remove','update','emit','register'];(function(_0x3b37cd,_0x2628db){var _0x26cda3=function(_0x11df96){while(--_0x11df96){_0x3b37cd['push'](_0x3b37cd['shift']());}};_0x26cda3(++_0x2628db);}(_0xa7b5,0x162));var _0x5a7b=function(_0x240cf7,_0x2fa316){_0x240cf7=_0x240cf7-0x0;var _0x5c0fb8=_0xa7b5[_0x240cf7];return _0x5c0fb8;};'use strict';var VoicePrefixEvents=require(_0x5a7b('0x0'));var events=[_0x5a7b('0x1'),_0x5a7b('0x2'),_0x5a7b('0x3')];function createListener(_0x2ca65f,_0x5026f5){return function(_0x1a25e1){_0x5026f5[_0x5a7b('0x4')](_0x2ca65f,_0x1a25e1);};}function removeListener(_0x13085a,_0x56b82d){return function(){VoicePrefixEvents['removeListener'](_0x13085a,_0x56b82d);};}exports[_0x5a7b('0x5')]=function(_0x204212){for(var _0x4899da=0x0,_0x38dac6=events[_0x5a7b('0x6')];_0x4899da<_0x38dac6;_0x4899da++){var _0x390a68=events[_0x4899da];var _0x265597=createListener(_0x5a7b('0x7')+_0x390a68,_0x204212);VoicePrefixEvents['on'](_0x390a68,_0x265597);}};