c14fd51f7510a16a8294467f63a516573cab0c53
[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 _0xffe1=['length','./voicePrefix.events','save','removeListener'];(function(_0x53fe97,_0x544271){var _0x5c49a2=function(_0x3fa2b4){while(--_0x3fa2b4){_0x53fe97['push'](_0x53fe97['shift']());}};_0x5c49a2(++_0x544271);}(_0xffe1,0x175));var _0x1ffe=function(_0xc04b24,_0x79b9c7){_0xc04b24=_0xc04b24-0x0;var _0xf7d2ed=_0xffe1[_0xc04b24];return _0xf7d2ed;};'use strict';var VoicePrefixEvents=require(_0x1ffe('0x0'));var events=[_0x1ffe('0x1'),'remove','update'];function createListener(_0x37f22a,_0x100207){return function(_0x38121){_0x100207['emit'](_0x37f22a,_0x38121);};}function removeListener(_0x2be98c,_0x21ba54){return function(){VoicePrefixEvents[_0x1ffe('0x2')](_0x2be98c,_0x21ba54);};}exports['register']=function(_0x219223){for(var _0x22d421=0x0,_0x6bc1ed=events[_0x1ffe('0x3')];_0x22d421<_0x6bc1ed;_0x22d421++){var _0xb34112=events[_0x22d421];var _0x8eee2b=createListener('voicePrefix:'+_0xb34112,_0x219223);VoicePrefixEvents['on'](_0xb34112,_0x8eee2b);}};