47d58cf3adcb17d35239be89bbedac129d985752
[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 _0x44f8=['remove','update','length','voicePrefix:','./voicePrefix.events','save'];(function(_0x329905,_0x13c144){var _0x3aa42=function(_0x2fac43){while(--_0x2fac43){_0x329905['push'](_0x329905['shift']());}};_0x3aa42(++_0x13c144);}(_0x44f8,0x1de));var _0x844f=function(_0xf53e05,_0x4e603d){_0xf53e05=_0xf53e05-0x0;var _0xbcb5c8=_0x44f8[_0xf53e05];return _0xbcb5c8;};'use strict';var VoicePrefixEvents=require(_0x844f('0x0'));var events=[_0x844f('0x1'),_0x844f('0x2'),_0x844f('0x3')];function createListener(_0x8193a3,_0x24561f){return function(_0x4aad74){_0x24561f['emit'](_0x8193a3,_0x4aad74);};}function removeListener(_0x26151e,_0x5cd939){return function(){VoicePrefixEvents['removeListener'](_0x26151e,_0x5cd939);};}exports['register']=function(_0xe654ca){for(var _0x2cd42=0x0,_0x46eb2c=events[_0x844f('0x4')];_0x2cd42<_0x46eb2c;_0x2cd42++){var _0x37b697=events[_0x2cd42];var _0x1987a9=createListener(_0x844f('0x5')+_0x37b697,_0xe654ca);VoicePrefixEvents['on'](_0x37b697,_0x1987a9);}};