68d92eb02b789c8dae79767be39296d9433964e8
[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 _0x36a7=['removeListener','register','length','voicePrefix:','./voicePrefix.events','save','remove','update'];(function(_0xa76c2f,_0x536dc5){var _0x449326=function(_0x42cbdc){while(--_0x42cbdc){_0xa76c2f['push'](_0xa76c2f['shift']());}};_0x449326(++_0x536dc5);}(_0x36a7,0x84));var _0x736a=function(_0x404a84,_0x507234){_0x404a84=_0x404a84-0x0;var _0x24ac7b=_0x36a7[_0x404a84];return _0x24ac7b;};'use strict';var VoicePrefixEvents=require(_0x736a('0x0'));var events=[_0x736a('0x1'),_0x736a('0x2'),_0x736a('0x3')];function createListener(_0x65389f,_0x156737){return function(_0x2deef8){_0x156737['emit'](_0x65389f,_0x2deef8);};}function removeListener(_0x56e258,_0x139af4){return function(){VoicePrefixEvents[_0x736a('0x4')](_0x56e258,_0x139af4);};}exports[_0x736a('0x5')]=function(_0x44bbb8){for(var _0x427185=0x0,_0x3a2efe=events[_0x736a('0x6')];_0x427185<_0x3a2efe;_0x427185++){var _0x1dafbb=events[_0x427185];var _0x3bd707=createListener(_0x736a('0x7')+_0x1dafbb,_0x44bbb8);VoicePrefixEvents['on'](_0x1dafbb,_0x3bd707);}};