e57df06d7c7385c12b18f8444bb3a63ebb29145a
[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 _0x9dce=['remove','update','removeListener','length','voiceQueue:'];(function(_0x437d6a,_0x524316){var _0x49bfc6=function(_0x2bd915){while(--_0x2bd915){_0x437d6a['push'](_0x437d6a['shift']());}};_0x49bfc6(++_0x524316);}(_0x9dce,0x17c));var _0xe9dc=function(_0x2e6418,_0x557928){_0x2e6418=_0x2e6418-0x0;var _0xe5435=_0x9dce[_0x2e6418];return _0xe5435;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=['save',_0xe9dc('0x0'),_0xe9dc('0x1')];function createListener(_0x2f0665,_0x3a5b91){return function(_0xf55895){_0x3a5b91['emit'](_0x2f0665,_0xf55895);};}function removeListener(_0x53bdbd,_0x20bfd0){return function(){VoiceQueueEvents[_0xe9dc('0x2')](_0x53bdbd,_0x20bfd0);};}exports['register']=function(_0x19b9c4){for(var _0x563fbd=0x0,_0x4dfc9f=events[_0xe9dc('0x3')];_0x563fbd<_0x4dfc9f;_0x563fbd++){var _0x20a520=events[_0x563fbd];var _0x2ef3cb=createListener(_0xe9dc('0x4')+_0x20a520,_0x19b9c4);VoiceQueueEvents['on'](_0x20a520,_0x2ef3cb);}};