Built motion from commit f57cc866.|2.6.31
[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 _0xec6f=['../../config/environment','jayson/promise','http','request','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x1517be,_0x499922){var _0x3a275e=function(_0xcbd79c){while(--_0xcbd79c){_0x1517be['push'](_0x1517be['shift']());}};_0x3a275e(++_0x499922);}(_0xec6f,0x7b));var _0xfec6=function(_0x1d77c8,_0x474bcf){_0x1d77c8=_0x1d77c8-0x0;var _0x3efd70=_0xec6f[_0x1d77c8];return _0x3efd70;};'use strict';var _=require(_0xfec6('0x0'));var util=require(_0xfec6('0x1'));var moment=require(_0xfec6('0x2'));var BPromise=require(_0xfec6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfec6('0x4'));var db=require(_0xfec6('0x5'))['db'];var utils=require(_0xfec6('0x6'));var logger=require(_0xfec6('0x7'))(_0xfec6('0x8'));var config=require(_0xfec6('0x9'));var jayson=require(_0xfec6('0xa'));var client=jayson['client'][_0xfec6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xb7edce,_0x367305,_0x2c745e){return new BPromise(function(_0x45fddd,_0x4ee11f){return client[_0xfec6('0xc')](_0xb7edce,_0x2c745e)['then'](function(_0x3899ff){logger[_0xfec6('0xd')](_0xfec6('0xe'),_0x367305,_0xfec6('0xf'));logger[_0xfec6('0x10')]('ScreenRecording,\x20%s,\x20%s,\x20%s',_0x367305,_0xfec6('0xf'),JSON['stringify'](_0x3899ff));if(_0x3899ff[_0xfec6('0x11')]){if(_0x3899ff[_0xfec6('0x11')][_0xfec6('0x12')]===0x1f4){logger[_0xfec6('0x11')](_0xfec6('0xe'),_0x367305,_0x3899ff[_0xfec6('0x11')]['message']);return _0x4ee11f(_0x3899ff[_0xfec6('0x11')][_0xfec6('0x13')]);}logger[_0xfec6('0x11')]('ScreenRecording,\x20%s,\x20%s',_0x367305,_0x3899ff[_0xfec6('0x11')]['message']);return _0x45fddd(_0x3899ff[_0xfec6('0x11')]['message']);}else{logger['info'](_0xfec6('0xe'),_0x367305,_0xfec6('0xf'));_0x45fddd(_0x3899ff[_0xfec6('0x14')][_0xfec6('0x13')]);}})[_0xfec6('0x15')](function(_0x5d51c0){logger[_0xfec6('0x11')](_0xfec6('0xe'),_0x367305,_0x5d51c0);_0x4ee11f(_0x5d51c0);});});}