|
@@ -4,8 +4,6 @@
|
|
|
#ifdef RVC_OS_WIN
|
|
|
#include <Mmsystem.h>
|
|
|
#include <windows.h>
|
|
|
-#else
|
|
|
-
|
|
|
#endif
|
|
|
|
|
|
#ifndef MAX_PATH
|
|
@@ -745,7 +743,7 @@ void CITCtrlEntity::SendAnswer(int sub_type, ErrorCodeEnum Error)
|
|
|
Info.encrypt = true;
|
|
|
Info.type = ACM_TYPE_IM;
|
|
|
Info.data = buf.ToBlob();
|
|
|
- m_pChannelClient->Send(Info);
|
|
|
+ (*m_pChannelClient)(EntityResource::getLink().upgradeLink())->Send(Info);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1758,6 +1756,15 @@ void CITCtrlEntity::OnSalesRecordingFailed(const char* pszFailedMsg)
|
|
|
}
|
|
|
|
|
|
|
|
|
+bool CITCtrlEntity::IsSupportTransRecordDeviceType()
|
|
|
+{
|
|
|
+ bool bRet = false;
|
|
|
+ if (eStand2sType == m_eDeviceType || eMobilePadType == m_eDeviceType || eStand1SPlusType == m_eDeviceType) {
|
|
|
+ bRet = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return bRet;
|
|
|
+}
|
|
|
ErrorCodeEnum CITCtrlEntity::StartTransactionRecord(CSimpleStringA strVideoName)
|
|
|
{
|
|
|
char strmsg[MAX_PATH] = { 0 };
|
|
@@ -1792,8 +1799,10 @@ ErrorCodeEnum CITCtrlEntity::StartTransactionRecord(CSimpleStringA strVideoName)
|
|
|
|
|
|
ErrorCodeEnum CITCtrlEntity::StopTransactionRecord(CSimpleStringA strVideoName)
|
|
|
{
|
|
|
+ char strmsg[MAX_PATH] = { 0 };
|
|
|
if (!IsRecordEntityAvailable()) {
|
|
|
- LogWarn(Severity_Middle, Error_Debug, LOG_EVT_STOP_TRANSACTIONRECORD_FAILED, "stop transaction record failed for connect RecordClient failed!");
|
|
|
+ snprintf(strmsg, MAX_PATH, "stop transaction record %s failed for connect RecordClient failed!", strVideoName.GetData());
|
|
|
+ LogWarn(Severity_Middle, Error_Debug, LOG_EVT_STOP_TRANSACTIONRECORD_FAILED, strmsg);
|
|
|
return Error_DevConnFailed;
|
|
|
}
|
|
|
|
|
@@ -1802,11 +1811,11 @@ ErrorCodeEnum CITCtrlEntity::StopTransactionRecord(CSimpleStringA strVideoName)
|
|
|
req.VideoName = strVideoName;
|
|
|
ErrorCodeEnum rc = (*m_pRecordClient)(EntityResource::getLink().upgradeLink())->StopTransactionRecord(req, ans, 5000);
|
|
|
if (Error_Succeed == rc) {
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_STOP_TRANSACTIONRECORD_SUCCESS, "stop transaction record success.");
|
|
|
+ snprintf(strmsg, MAX_PATH, "stop transaction record %s success.", strVideoName.GetData());
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_EVT_STOP_TRANSACTIONRECORD_SUCCESS, strmsg);
|
|
|
}
|
|
|
else {
|
|
|
- char strmsg[MAX_PATH] = { 0 };
|
|
|
- snprintf(strmsg, MAX_PATH, "stop transaction record failed for 0x%08x.", rc);
|
|
|
+ snprintf(strmsg, MAX_PATH, "stop transaction record %s failed for 0x%08x.", strVideoName.GetData(), rc);
|
|
|
LogWarn(Severity_Middle, Error_Debug, LOG_EVT_STOP_TRANSACTIONRECORD_FAILED, strmsg);
|
|
|
}
|
|
|
|
|
@@ -1864,11 +1873,12 @@ void CITCtrlEntity::FreeRecordClient()
|
|
|
|
|
|
void UIServiceSession::Handle_SetUIState(SpOnewayCallContext<UIService_SetUIState_Info>::Pointer ctx)
|
|
|
{
|
|
|
-
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_SendAgentText( SpReqAnsContext<UIService_SendAgentText_Req, UIService_SendAgentText_Ans>::Pointer ctx )
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->SendAgentText(ctx->Req.content);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -1876,38 +1886,45 @@ void UIServiceSession::Handle_SendAgentText( SpReqAnsContext<UIService_SendAgent
|
|
|
void UIServiceSession::Handle_SetMenuTree( SpOnewayCallContext<UIService_SetMenuTree_Info>::Pointer ctx )
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->SetMenuTree(ctx->Info.content);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_SetMenuPath( SpOnewayCallContext<UIService_SetMenuPath_Info>::Pointer ctx )
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->SetMenuTreePath(ctx->Info.content);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_SendFrontSyncData(SpOnewayCallContext<UIService_SendFrontSyncData_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->SendFrontSyncData(ctx->Info.id, ctx->Info.content);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_SendH5SyncData(SpOnewayCallContext<UIService_SendH5SyncData_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->SendH5SyncData(ctx->Info.content);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_StartRecordVideo(SpReqAnsContext<UIService_StartRecordVideo_Req, UIService_StartRecordVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum rc = Error_Succeed;
|
|
|
ctx->Answer(rc);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_StopRecordVideo(SpReqAnsContext<UIService_StopRecordVideo_Req, UIService_StopRecordVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_ShowVideo(SpReqAnsContext<UIService_ShowVideo_Req, UIService_ShowVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("show video.");
|
|
|
ErrorCodeEnum Error = m_pEntity->PlayVideo(CSimpleStringW2A(ctx->Req.VideoName));
|
|
|
ctx->Answer(Error);
|
|
@@ -1915,6 +1932,7 @@ void UIServiceSession::Handle_ShowVideo(SpReqAnsContext<UIService_ShowVideo_Req,
|
|
|
|
|
|
void UIServiceSession::Handle_SaveVideo(SpReqAnsContext<UIService_SaveVideo_Req, UIService_SaveVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("save video.");
|
|
|
ErrorCodeEnum Error = m_pEntity->SaveVideo(CSimpleStringW2A(ctx->Req.VideoName));
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("entity save video return.");
|
|
@@ -1923,6 +1941,7 @@ void UIServiceSession::Handle_SaveVideo(SpReqAnsContext<UIService_SaveVideo_Req,
|
|
|
|
|
|
void UIServiceSession::Handle_DeleteVideo(SpReqAnsContext<UIService_DeleteVideo_Req, UIService_DeleteVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_DELETEVIDEO,(LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("delete video.");
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -1931,12 +1950,14 @@ void UIServiceSession::Handle_DeleteVideo(SpReqAnsContext<UIService_DeleteVideo_
|
|
|
// add by ly
|
|
|
void UIServiceSession::Handle_StartPhotograph(SpOnewayCallContext<UIService_StartPhotograph_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_STARTPHOTOGRAPH,"StartPhotograph");
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Start Photograph.");
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_StopPhotograph(SpOnewayCallContext<UIService_StopPhotograph_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_STOPPHOTOGRAPH,"StopPhotograph");
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Photograph.");
|
|
|
}
|
|
@@ -1944,11 +1965,13 @@ void UIServiceSession::Handle_StopPhotograph(SpOnewayCallContext<UIService_StopP
|
|
|
|
|
|
void UIServiceSession::Handle_StartPlayVideo(SpReqAnsContext<UIService_StartPlayVideo_Req, UIService_StartPlayVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_StartPlayAudio(SpReqAnsContext<UIService_StartPlayAudio_Req, UIService_StartPlayAudio_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->StartPlayAudio(ctx->Req.AudioNames, 800);
|
|
|
if (Error_Succeed == Error){
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Start Play Local Audio Success!");
|
|
@@ -1962,6 +1985,7 @@ void UIServiceSession::Handle_StartPlayAudio(SpReqAnsContext<UIService_StartPlay
|
|
|
|
|
|
void UIServiceSession::Handle_StartPlayImage(SpReqAnsContext<UIService_StartPlayImage_Req, UIService_StartPlayImage_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->StartPlayImage(ctx->Req.CfgInx, ctx->Req.WndX, ctx->Req.WndY, ctx->Req.WndWidth, ctx->Req.WndHeight, 800);
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Start Play Local Image!");
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -1969,11 +1993,13 @@ void UIServiceSession::Handle_StartPlayImage(SpReqAnsContext<UIService_StartPlay
|
|
|
|
|
|
void UIServiceSession::Handle_StopPlayVideo(SpReqAnsContext<UIService_StopPlayVideo_Req, UIService_StopPlayVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
void UIServiceSession::Handle_StopPlayAudio(SpReqAnsContext<UIService_StopPlayAudio_Req, UIService_StopPlayAudio_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->StopPlayAudio(800);
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Stop Play Local Audio!");
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -1981,6 +2007,7 @@ void UIServiceSession::Handle_StopPlayAudio(SpReqAnsContext<UIService_StopPlayAu
|
|
|
|
|
|
void UIServiceSession::Handle_StopPlayImage(SpReqAnsContext<UIService_StopPlayImage_Req, UIService_StopPlayImage_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
m_pEntity->StopPlayImage(ctx->Req.CfgInx, 800);
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Stop Play Local Image!");
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -1989,6 +2016,7 @@ void UIServiceSession::Handle_StopPlayImage(SpReqAnsContext<UIService_StopPlayIm
|
|
|
|
|
|
void UIServiceSession::Handle_SendOperateState(SpOnewayCallContext<UIService_SendOperateState_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_SENDOPERATESTATE,"UI send operate state");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send operate state!");
|
|
@@ -1996,6 +2024,7 @@ void UIServiceSession::Handle_SendOperateState(SpOnewayCallContext<UIService_Sen
|
|
|
|
|
|
void UIServiceSession::Handle_HideOnlineVideo(SpOnewayCallContext<UIService_HideOnlineVideo_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_HIDEONLINEVIDEO,"UI send Hide online video");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send Hide online video");
|
|
@@ -2003,6 +2032,7 @@ void UIServiceSession::Handle_HideOnlineVideo(SpOnewayCallContext<UIService_Hide
|
|
|
|
|
|
void UIServiceSession::Handle_ShowOnlineVideo(SpOnewayCallContext<UIService_ShowOnlineVideo_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_SHOWONLINEVIDEO,"UI send show online video");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send show online video");
|
|
@@ -2010,6 +2040,7 @@ void UIServiceSession::Handle_ShowOnlineVideo(SpOnewayCallContext<UIService_Show
|
|
|
|
|
|
void UIServiceSession::Handle_HideLocalVideo(SpOnewayCallContext<UIService_HideLocalVideo_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_HIDELOCALVIDEO,"UI send Hide local video");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send Hide local video");
|
|
@@ -2017,6 +2048,7 @@ void UIServiceSession::Handle_HideLocalVideo(SpOnewayCallContext<UIService_HideL
|
|
|
|
|
|
void UIServiceSession::Handle_ShowLocalVideo(SpOnewayCallContext<UIService_ShowLocalVideo_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_SHOWLOCALVIDEO,"UI send show local video");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send show local video");
|
|
@@ -2024,12 +2056,14 @@ void UIServiceSession::Handle_ShowLocalVideo(SpOnewayCallContext<UIService_ShowL
|
|
|
|
|
|
void UIServiceSession::Handle_HidePersonArea(SpOnewayCallContext<UIService_HidePersonArea_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_HIDEPERSONAREA,"UI send Hide Person area");
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("UI send Hide Person area");
|
|
|
}
|
|
|
void UIServiceSession::Handle_ShowPersonArea(SpOnewayCallContext<UIService_ShowPersonArea_Info>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
/// override by user
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_SHOWPERSONAREA,"UI send show Person area");
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UI send show Person area");
|
|
@@ -2038,6 +2072,7 @@ void UIServiceSession::Handle_ShowPersonArea(SpOnewayCallContext<UIService_ShowP
|
|
|
|
|
|
void UIServiceSession::Handle_AnswerPacket(SpReqAnsContext<UIService_AnswerPacket_Req, UIService_AnswerPacket_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Send Answer to Mobile,%s",ctx->Req.Packet);
|
|
|
m_pEntity->SendAnswertoMobile(ctx->Req.Packet);
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -2045,6 +2080,7 @@ void UIServiceSession::Handle_AnswerPacket(SpReqAnsContext<UIService_AnswerPacke
|
|
|
|
|
|
void UIServiceSession::Handle_GetLocalVideoVolume( SpReqAnsContext<UIService_GetLocalVideoVolume_Req, UIService_GetLocalVideoVolume_Ans>::Pointer ctx )
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Get Local Video Volume with CfgInx:%d!", ctx->Req.CfgInx);
|
|
|
ErrorCodeEnum error = m_pEntity->GetLocalVideoVolume(ctx->Req.CfgInx, ctx->Ans.Volume, 2000);
|
|
|
ctx->Answer(error);
|
|
@@ -2052,6 +2088,7 @@ void UIServiceSession::Handle_GetLocalVideoVolume( SpReqAnsContext<UIService_Get
|
|
|
|
|
|
void UIServiceSession::Handle_SetLocalVideoVolume( SpReqAnsContext<UIService_SetLocalVideoVolume_Req, UIService_SetLocalVideoVolume_Ans>::Pointer ctx )
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Set Local Video Volume with CfgInx:%d, Volume:%d!", ctx->Req.CfgInx, ctx->Req.Volume);
|
|
|
ErrorCodeEnum error = m_pEntity->SetLocalVideoVolume(ctx->Req.CfgInx, ctx->Req.Volume, 2000);
|
|
|
ctx->Answer(error);
|
|
@@ -2059,6 +2096,7 @@ void UIServiceSession::Handle_SetLocalVideoVolume( SpReqAnsContext<UIService_Set
|
|
|
|
|
|
void UIServiceSession::Handle_GetLocalAudioVolume(SpReqAnsContext<UIService_GetLocalAudioVolume_Req, UIService_GetLocalAudioVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Get Local Audio Volume");
|
|
|
ErrorCodeEnum error = m_pEntity->GetLocalAudioVolume(ctx->Ans.Volume, 2000);
|
|
|
ctx->Answer(error);
|
|
@@ -2066,6 +2104,7 @@ void UIServiceSession::Handle_GetLocalAudioVolume(SpReqAnsContext<UIService_GetL
|
|
|
|
|
|
void UIServiceSession::Handle_SetLocalAudioVolume(SpReqAnsContext<UIService_SetLocalAudioVolume_Req, UIService_SetLocalAudioVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Set Local Audio Volume with Volume:%d!", ctx->Req.Volume);
|
|
|
ErrorCodeEnum error = m_pEntity->SetLocalAudioVolume(ctx->Req.Volume, 2000);
|
|
|
ctx->Answer(error);
|
|
@@ -2073,6 +2112,7 @@ void UIServiceSession::Handle_SetLocalAudioVolume(SpReqAnsContext<UIService_SetL
|
|
|
|
|
|
void UIServiceSession::Handle_SendBusinessDesktopCmd(SpReqAnsContext<UIService_SendBusinessDesktopCmd_Req, UIService_SendBusinessDesktopCmd_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Handle_SendBusinessDesktopCmd : %s %s", ctx->Req.xapName, ctx->Req.command);
|
|
|
ErrorCodeEnum error = m_pEntity->SendBusinessDesktopCmd(ctx->Req.xapName, ctx->Req.command);
|
|
|
ctx->Answer(error);
|
|
@@ -2081,6 +2121,7 @@ void UIServiceSession::Handle_SendBusinessDesktopCmd(SpReqAnsContext<UIService_S
|
|
|
|
|
|
void UIServiceSession::Handle_VideoAppendWaterMark(SpReqAnsContext<UIService_VideoAppendWaterMark_Req, UIService_VideoAppendWaterMark_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Handle_VideoAppendWaterMark append water mark is %s", (LPCTSTR)CSimpleStringW2A(ctx->Req.appendstr));
|
|
|
CSimpleStringA strParam = CSimpleStringA::Format("%s|%s", (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.videoName))), (LPCTSTR)CSimpleStringW2A(ctx->Req.appendstr));
|
|
|
LogEvent(Severity_Middle,LOG_EVT_UI_VIDEOAPPENDWATERMARK,(LPCTSTR)strParam);
|
|
@@ -2089,6 +2130,7 @@ void UIServiceSession::Handle_VideoAppendWaterMark(SpReqAnsContext<UIService_Vid
|
|
|
|
|
|
void UIServiceSession::Handle_StartRemoteRecord(SpReqAnsContext<UIService_StartRemoteRecord_Req, UIService_StartRemoteRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum rc = Error_DevNotAvailable;
|
|
|
|
|
|
CSimpleStringA camstate;
|
|
@@ -2135,6 +2177,7 @@ void UIServiceSession::Handle_StartRemoteRecord(SpReqAnsContext<UIService_StartR
|
|
|
|
|
|
void UIServiceSession::Handle_StopRemoteRecord(SpReqAnsContext<UIService_StopRemoteRecord_Req, UIService_StopRemoteRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("stop remote record.");
|
|
|
|
|
|
if (m_pEntity->m_bSalesRecording) {
|
|
@@ -2156,6 +2199,7 @@ void UIServiceSession::Handle_StopRemoteRecord(SpReqAnsContext<UIService_StopRem
|
|
|
|
|
|
void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSalesRecord_Req, UIService_StartSalesRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2163,6 +2207,7 @@ void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSa
|
|
|
|
|
|
void UIServiceSession::Handle_StartRecordPreview(SpReqAnsContext<UIService_StartRecordPreview_Req, UIService_StartRecordPreview_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2170,6 +2215,7 @@ void UIServiceSession::Handle_StartRecordPreview(SpReqAnsContext<UIService_Start
|
|
|
|
|
|
void UIServiceSession::Handle_StartSalesVideoRecord(SpReqAnsContext<UIService_StartSalesVideoRecord_Req, UIService_StartSalesVideoRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2177,6 +2223,7 @@ void UIServiceSession::Handle_StartSalesVideoRecord(SpReqAnsContext<UIService_St
|
|
|
|
|
|
void UIServiceSession::Handle_AjustVideoPreviewSize(SpReqAnsContext<UIService_AjustVideoPreviewSize_Req, UIService_AjustVideoPreviewSize_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2184,6 +2231,7 @@ void UIServiceSession::Handle_AjustVideoPreviewSize(SpReqAnsContext<UIService_Aj
|
|
|
|
|
|
void UIServiceSession::Handle_StopShowVideo(SpReqAnsContext<UIService_StopShowVideo_Req, UIService_StopShowVideo_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop show video,videoname=%s",(LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
|
|
|
ErrorCodeEnum Error = m_pEntity->StopShowVideo(CSimpleStringW2A(ctx->Req.VideoName));
|
|
|
ctx->Answer(Error);
|
|
@@ -2192,6 +2240,7 @@ void UIServiceSession::Handle_StopShowVideo(SpReqAnsContext<UIService_StopShowVi
|
|
|
|
|
|
void UIServiceSession::Handle_StartPlaySalesRecord(SpReqAnsContext<UIService_StartPlaySalesRecord_Req, UIService_StartPlaySalesRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start play sales record, videoname=%s, WndX=%d, WndY=%d, WndWidth=%d, WndHeight=%d.",(LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName), ctx->Req.WndX, ctx->Req.WndY, ctx->Req.WndWidth, ctx->Req.WndHeight);
|
|
|
ErrorCodeEnum Error = m_pEntity->StartPlaySalesRecordVideo(CSimpleStringW2A(ctx->Req.VideoName), ctx->Req.WndX, ctx->Req.WndY, ctx->Req.WndWidth, ctx->Req.WndHeight);
|
|
|
ctx->Answer(Error);
|
|
@@ -2199,6 +2248,7 @@ void UIServiceSession::Handle_StartPlaySalesRecord(SpReqAnsContext<UIService_Sta
|
|
|
|
|
|
void UIServiceSession::Handle_GetHandfreeOutVolume(SpReqAnsContext<UIService_GetHandfreeOutVolume_Req, UIService_GetHandfreeOutVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->GetHandfreeCallOutVolume(ctx->Ans.Volume, 2000);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2206,6 +2256,7 @@ void UIServiceSession::Handle_GetHandfreeOutVolume(SpReqAnsContext<UIService_Get
|
|
|
|
|
|
void UIServiceSession::Handle_SetHandfreeOutVolume(SpReqAnsContext<UIService_SetHandfreeOutVolume_Req, UIService_SetHandfreeOutVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->SetHandfreeCallOutVolume(ctx->Req.Volume, 2000);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2213,6 +2264,7 @@ void UIServiceSession::Handle_SetHandfreeOutVolume(SpReqAnsContext<UIService_Set
|
|
|
|
|
|
void UIServiceSession::Handle_GetPickupOutVolume(SpReqAnsContext<UIService_GetPickupOutVolume_Req, UIService_GetPickupOutVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->GetPickupCallOutVolume(ctx->Ans.Volume, 2000);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2220,6 +2272,7 @@ void UIServiceSession::Handle_GetPickupOutVolume(SpReqAnsContext<UIService_GetPi
|
|
|
|
|
|
void UIServiceSession::Handle_SetPickupOutVolume(SpReqAnsContext<UIService_SetPickupOutVolume_Req, UIService_SetPickupOutVolume_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = m_pEntity->SetPickupCallOutVolume(ctx->Req.Volume, 2000);
|
|
|
ctx->Answer(Error);
|
|
|
}
|
|
@@ -2227,6 +2280,7 @@ void UIServiceSession::Handle_SetPickupOutVolume(SpReqAnsContext<UIService_SetPi
|
|
|
|
|
|
void UIServiceSession::Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPlayNotice_Req, UIService_StartPlayNotice_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
auto pPlayClient = new LocalPlayClient(m_pEntity);
|
|
|
if (pPlayClient->Connect() != Error_Succeed) {
|
|
@@ -2263,6 +2317,7 @@ void UIServiceSession::Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPla
|
|
|
|
|
|
void UIServiceSession::Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayNotice_Req, UIService_StopPlayNotice_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum Error = Error_Succeed;
|
|
|
auto pPlayClient = new LocalPlayClient(m_pEntity);
|
|
|
if (pPlayClient->Connect() != Error_Succeed) {
|
|
@@ -2299,6 +2354,7 @@ void UIServiceSession::Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayN
|
|
|
|
|
|
void UIServiceSession::Handle_GetRecordMode(SpReqAnsContext<UIService_GetRecordMode_Req, UIService_GetRecordMode_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
int iRecordMode = m_pEntity->GetRecordMode();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Get Record Mode is %d.", iRecordMode);
|
|
|
ctx->Ans.RecordMode = iRecordMode;
|
|
@@ -2308,42 +2364,47 @@ void UIServiceSession::Handle_GetRecordMode(SpReqAnsContext<UIService_GetRecordM
|
|
|
|
|
|
void UIServiceSession::Handle_StartTransactionRecord(SpReqAnsContext<UIService_StartTransactionRecord_Req, UIService_StartTransactionRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
- if (m_pEntity->GetRecordMode()) {
|
|
|
- LogEvent(Severity_Middle, LOG_EVT_BEGIN_HANDLE_BUSINESS, "begin handle business.");
|
|
|
-
|
|
|
- ErrorCodeEnum rc = Error_DevNotAvailable;
|
|
|
- CSimpleStringA camstate;
|
|
|
- m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start transaction record, camstate=%s.", camstate.GetData());
|
|
|
- if ('B' != camstate[0]) {
|
|
|
- if (Error_Succeed == m_pEntity->StartTransactionRecord(ctx->Req.StrVideoName)){
|
|
|
- ctx->Ans.ErrorCode = Error_Succeed;
|
|
|
- ctx->Ans.ErrorMsg = CSimpleStringA2W("启动交易录像成功.");
|
|
|
- m_pEntity->m_bRecording = TRUE;
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
+ if (m_pEntity->IsSupportTransRecordDeviceType()) {
|
|
|
+ if (m_pEntity->GetRecordMode()) {
|
|
|
+ LogEvent(Severity_Middle, LOG_EVT_BEGIN_HANDLE_BUSINESS, "begin handle business.");
|
|
|
+
|
|
|
+ ErrorCodeEnum rc = Error_DevNotAvailable;
|
|
|
+ CSimpleStringA camstate;
|
|
|
+ m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start transaction record, camstate=%s.", camstate.GetData());
|
|
|
+ if ('B' != camstate[0]) {
|
|
|
+ if (Error_Succeed == m_pEntity->StartTransactionRecord(ctx->Req.StrVideoName)) {
|
|
|
+ ctx->Ans.ErrorCode = Error_Succeed;
|
|
|
+ ctx->Ans.ErrorMsg = CSimpleStringA2W("启动交易录像成功.");
|
|
|
+ m_pEntity->m_bRecording = TRUE;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ctx->Ans.ErrorCode = Error_DevNotAvailable;
|
|
|
+ ctx->Ans.ErrorMsg = CSimpleStringA2W("启动交易录像失败.");
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
ctx->Ans.ErrorCode = Error_DevNotAvailable;
|
|
|
- ctx->Ans.ErrorMsg = CSimpleStringA2W("启动交易录像失败.");
|
|
|
+ ctx->Ans.ErrorMsg = CSimpleStringA2W("摄像头故障,启动交易录像失败.");
|
|
|
+ char strmsg[MAX_PATH] = { 0 };
|
|
|
+ snprintf(strmsg, MAX_PATH, "摄像头故障,启动交易录像 %s 失败.", ctx->Req.StrVideoName.GetData());
|
|
|
+ LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_TRANSACTIONRECORD_FAILED, strmsg);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- ctx->Ans.ErrorCode = Error_DevNotAvailable;
|
|
|
- ctx->Ans.ErrorMsg = CSimpleStringA2W("摄像头故障,启动交易录像失败.");
|
|
|
- char strmsg[MAX_PATH] = { 0 };
|
|
|
- snprintf(strmsg, MAX_PATH, "摄像头故障,启动交易录像 %s 失败.", ctx->Req.StrVideoName.GetData());
|
|
|
- LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_TRANSACTIONRECORD_FAILED, strmsg);
|
|
|
+ ctx->Ans.ErrorCode = Error_Param;
|
|
|
+ ctx->Ans.ErrorMsg = CSimpleStringA2W("该设备不支持业务层启动交易录像.");
|
|
|
}
|
|
|
}
|
|
|
- else {
|
|
|
- ctx->Ans.ErrorCode = Error_Param;
|
|
|
- ctx->Ans.ErrorMsg = CSimpleStringA2W("该设备不支持业务层启动交易录像.");
|
|
|
- }
|
|
|
+
|
|
|
ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
|
|
|
void UIServiceSession::Handle_StopTransactionRecord(SpReqAnsContext<UIService_StopTransactionRecord_Req, UIService_StopTransactionRecord_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
if (m_pEntity->GetRecordMode()) {
|
|
|
LogEvent(Severity_Middle, LOG_EVT_END_HANDLE_BUSINESS, "end handle business.");
|
|
|
|