190e0c9c87229aba87dcac29d299edc8bc10651c
[motion2.git] / server / api / voiceQueue / voiceQueue.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 _0x938c=['emit','register','voiceQueue:','save','update'];(function(_0x3561f3,_0x197767){var _0x62a55a=function(_0x3e07ee){while(--_0x3e07ee){_0x3561f3['push'](_0x3561f3['shift']());}};_0x62a55a(++_0x197767);}(_0x938c,0x76));var _0xc938=function(_0x15f3c0,_0xb8ab65){_0x15f3c0=_0x15f3c0-0x0;var _0xbf6095=_0x938c[_0x15f3c0];return _0xbf6095;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=[_0xc938('0x0'),'remove',_0xc938('0x1')];function createListener(_0x5d96f2,_0x28a4eb){return function(_0x3e88e2){_0x28a4eb[_0xc938('0x2')](_0x5d96f2,_0x3e88e2);};}function removeListener(_0x449c6d,_0x728d8f){return function(){VoiceQueueEvents['removeListener'](_0x449c6d,_0x728d8f);};}exports[_0xc938('0x3')]=function(_0x2c304b){for(var _0x285ae5=0x0,_0x3e38f6=events['length'];_0x285ae5<_0x3e38f6;_0x285ae5++){var _0xf32c3d=events[_0x285ae5];var _0x53deed=createListener(_0xc938('0x4')+_0xf32c3d,_0x2c304b);VoiceQueueEvents['on'](_0xf32c3d,_0x53deed);}};