Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / screenRecording / screenRecording.rpc.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 _0x7754=['result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','ScreenRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ScreenRecording,\x20%s,\x20%s'];(function(_0x1e6e8f,_0x35e1bc){var _0x3caa5f=function(_0x2195b4){while(--_0x2195b4){_0x1e6e8f['push'](_0x1e6e8f['shift']());}};_0x3caa5f(++_0x35e1bc);}(_0x7754,0xda));var _0x4775=function(_0x30f5bb,_0x4db4bd){_0x30f5bb=_0x30f5bb-0x0;var _0x1cfc00=_0x7754[_0x30f5bb];return _0x1cfc00;};'use strict';var _=require(_0x4775('0x0'));var util=require('util');var moment=require(_0x4775('0x1'));var BPromise=require(_0x4775('0x2'));var rs=require(_0x4775('0x3'));var fs=require('fs');var Redis=require(_0x4775('0x4'));var db=require(_0x4775('0x5'))['db'];var utils=require(_0x4775('0x6'));var logger=require(_0x4775('0x7'))(_0x4775('0x8'));var config=require(_0x4775('0x9'));var jayson=require(_0x4775('0xa'));var client=jayson[_0x4775('0xb')][_0x4775('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x49efba,_0x2cc324,_0x2e0318){return new BPromise(function(_0x22db63,_0x5e15e3){return client['request'](_0x49efba,_0x2e0318)[_0x4775('0xd')](function(_0x3987a){logger[_0x4775('0xe')]('ScreenRecording,\x20%s,\x20%s',_0x2cc324,_0x4775('0xf'));logger['debug'](_0x4775('0x10'),_0x2cc324,'request\x20sent',JSON[_0x4775('0x11')](_0x3987a));if(_0x3987a['error']){if(_0x3987a[_0x4775('0x12')][_0x4775('0x13')]===0x1f4){logger[_0x4775('0x12')]('ScreenRecording,\x20%s,\x20%s',_0x2cc324,_0x3987a[_0x4775('0x12')][_0x4775('0x14')]);return _0x5e15e3(_0x3987a[_0x4775('0x12')][_0x4775('0x14')]);}logger[_0x4775('0x12')](_0x4775('0x15'),_0x2cc324,_0x3987a[_0x4775('0x12')][_0x4775('0x14')]);return _0x22db63(_0x3987a[_0x4775('0x12')][_0x4775('0x14')]);}else{logger[_0x4775('0xe')](_0x4775('0x15'),_0x2cc324,'request\x20sent');_0x22db63(_0x3987a[_0x4775('0x16')][_0x4775('0x14')]);}})[_0x4775('0x17')](function(_0x4452d0){logger[_0x4775('0x12')](_0x4775('0x15'),_0x2cc324,_0x4452d0);_0x5e15e3(_0x4452d0);});});}