af6c254603ce4138335452b7c04861e07e6da2ae
[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 _0xc901=['register','length','./voicePrefix.events','removeListener'];(function(_0xb7daea,_0x1ce791){var _0x2463de=function(_0x13e9ec){while(--_0x13e9ec){_0xb7daea['push'](_0xb7daea['shift']());}};_0x2463de(++_0x1ce791);}(_0xc901,0x142));var _0x1c90=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xc901[_0x122ef9];return _0x42fba0;};'use strict';var VoicePrefixEvents=require(_0x1c90('0x0'));var events=['save','remove','update'];function createListener(_0x5430b3,_0x21d387){return function(_0x4386c8){_0x21d387['emit'](_0x5430b3,_0x4386c8);};}function removeListener(_0x197c65,_0x317443){return function(){VoicePrefixEvents[_0x1c90('0x1')](_0x197c65,_0x317443);};}exports[_0x1c90('0x2')]=function(_0x1c9021){for(var _0x14eb4f=0x0,_0x912860=events[_0x1c90('0x3')];_0x14eb4f<_0x912860;_0x14eb4f++){var _0x423cfb=events[_0x14eb4f];var _0x19196f=createListener('voicePrefix:'+_0x423cfb,_0x1c9021);VoicePrefixEvents['on'](_0x423cfb,_0x19196f);}};